feat: Implement member self-service features for profile change requests and event responses

- Added MemberProfileChangeRequest and MemberEventResponse models with associations.
- Created API endpoints for member dashboard, profile change requests, event responses, and training attendance updates.
- Developed MemberHomeView component to display member-specific information and actions.
- Updated routing to include new member dashboard and profile change request functionalities.
- Added SQL migration scripts for new database tables related to member self-service.
- Enhanced login functionality to redirect members based on their roles and club associations.
This commit is contained in:
Torsten Schulz (local)
2026-07-24 07:53:05 +02:00
parent 3ac4039097
commit 63a5db1196
12 changed files with 398 additions and 21 deletions

View File

@@ -20,7 +20,14 @@ import {
deleteMemberImage,
setPrimaryMemberImage,
generateMemberGallery,
linkMemberUser
linkMemberUser,
getMemberDashboard,
createProfileChangeRequest,
respondToCalendarEvent,
updateOwnTrainingAttendance,
getEventResponses,
getProfileChangeRequests,
reviewProfileChangeRequest
} from '../controllers/memberController.js';
import express from 'express';
import { authenticate } from '../middleware/authMiddleware.js';
@@ -41,6 +48,13 @@ router.get('/get/:id/:showAll', authenticate, authorize('members', 'read'), getC
router.get('/gallery/:clubId', authenticate, authorize('members', 'read'), generateMemberGallery);
router.post('/set/:id', authenticate, authorize('members', 'write'), setClubMembers);
router.put('/link-user/:clubId/:memberId', authenticate, authorize('members', 'write'), linkMemberUser);
router.get('/dashboard/:clubId', authenticate, getMemberDashboard);
router.post('/profile/:clubId/change-requests', authenticate, createProfileChangeRequest);
router.put('/dashboard/:clubId/events/:eventId/response', authenticate, respondToCalendarEvent);
router.put('/dashboard/:clubId/training/:diaryDateId/attendance', authenticate, updateOwnTrainingAttendance);
router.get('/event-responses/:clubId/:eventId', authenticate, authorize('schedule', 'read'), getEventResponses);
router.get('/profile-change-requests/:clubId', authenticate, authorize('members', 'read'), getProfileChangeRequests);
router.patch('/profile-change-requests/:clubId/:requestId', authenticate, authorize('members', 'write'), reviewProfileChangeRequest);
router.get('/sepa/:clubId/:memberId', authenticate, authorize('members', 'read'), getMemberSepaMandate);
router.put('/sepa/:clubId/:memberId', authenticate, authorize('members', 'write'), saveMemberSepaMandate);
router.get('/play-interest/:clubId', authenticate, authorize('members', 'read'), getMemberPlayInterests);