diff --git a/memberflow-api/src/main/java/com/denniseckerskorn/controllers/user_managment_controllers/NotificationController.java b/memberflow-api/src/main/java/com/denniseckerskorn/controllers/user_managment_controllers/NotificationController.java index ecbba8a..6468507 100644 --- a/memberflow-api/src/main/java/com/denniseckerskorn/controllers/user_managment_controllers/NotificationController.java +++ b/memberflow-api/src/main/java/com/denniseckerskorn/controllers/user_managment_controllers/NotificationController.java @@ -10,6 +10,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; +import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.stream.Collectors; @@ -70,7 +71,8 @@ public class NotificationController { Set existingUsers = updated.getUsers(); if (existingUsers != null) { - for (User user : existingUsers) { + List clonedUsers = new ArrayList<>(existingUsers); + for (User user : clonedUsers) { notificationService.removeNotificationFromUser(updated, user); } } @@ -85,6 +87,7 @@ public class NotificationController { return ResponseEntity.ok(toDTO(updated)); } + @Operation(summary = "Delete a notification by ID", description = "Delete a notification by its ID") @DeleteMapping("/delete/{id}") public ResponseEntity delete(@PathVariable Integer id) { diff --git a/memberflow-frontend.zip b/memberflow-frontend.zip index 101b8f4..0a01b46 100644 Binary files a/memberflow-frontend.zip and b/memberflow-frontend.zip differ diff --git a/memberflow-frontend/src/api/axiosConfig.js b/memberflow-frontend/src/api/axiosConfig.js index 2d4bdcc..aa2ebfc 100644 --- a/memberflow-frontend/src/api/axiosConfig.js +++ b/memberflow-frontend/src/api/axiosConfig.js @@ -18,4 +18,5 @@ api.interceptors.request.use( (error) => Promise.reject(error) ); -export default api; \ No newline at end of file +export default api; + diff --git a/memberflow-frontend/src/components/forms/IVATypeManager.jsx b/memberflow-frontend/src/components/forms/IVATypeManager.jsx index 1b213b0..fd06df9 100644 --- a/memberflow-frontend/src/components/forms/IVATypeManager.jsx +++ b/memberflow-frontend/src/components/forms/IVATypeManager.jsx @@ -1,6 +1,7 @@ import React, { useEffect, useState } from "react"; import api from "../../api/axiosConfig"; + const IVATypeManager = () => { const [ivaTypes, setIvaTypes] = useState([]); const [newIva, setNewIva] = useState({ percentage: "", description: "" }); diff --git a/memberflow-frontend/src/components/forms/NotificationCreateForm.jsx b/memberflow-frontend/src/components/forms/NotificationCreateForm.jsx index c893642..14db164 100644 --- a/memberflow-frontend/src/components/forms/NotificationCreateForm.jsx +++ b/memberflow-frontend/src/components/forms/NotificationCreateForm.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import api from '../../api/axiosConfig'; -import '../styles/FormStyles.css'; +import '../styles/ContentArea.css'; const NotificationCreateForm = () => { const today = new Date().toISOString().split('T')[0]; @@ -82,7 +82,7 @@ const NotificationCreateForm = () => {

Crear nueva notificación

-
+