feat(ParticipantController, ParticipantModel, ParticipantRoutes, DiaryParticipantsPanel, i18n): implement participant status management and UI updates

- Added functionality to update participant attendance status, allowing for 'excused' and 'cancelled' states.
- Enhanced the participant model to include a default attendance status and validation for status values.
- Updated participant routes to support status updates and integrated new status handling in the participant controller.
- Modified the DiaryParticipantsPanel to visually indicate participant status and added a toggle for changing status.
- Expanded localization files to include new keys for participant status, improving accessibility for users in both English and German.
This commit is contained in:
Torsten Schulz (local)
2026-03-17 15:23:35 +01:00
parent 46812a0c14
commit 483d5d2bc7
7 changed files with 262 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
import express from 'express';
import { getParticipants, addParticipant, removeParticipant, updateParticipantGroup } from '../controllers/participantController.js';
import { getParticipants, addParticipant, removeParticipant, updateParticipantGroup, updateParticipantStatus } from '../controllers/participantController.js';
import { authenticate } from '../middleware/authMiddleware.js';
const router = express.Router();
@@ -7,6 +7,7 @@ const router = express.Router();
router.get('/:dateId', authenticate, getParticipants);
router.post('/add', authenticate, addParticipant);
router.post('/remove', authenticate, removeParticipant);
router.put('/:dateId/:memberId/status', authenticate, updateParticipantStatus);
router.put('/:dateId/:memberId/group', authenticate, updateParticipantGroup);
export default router;