feat(ClubSettings): add country and state code fields for regional calendar data
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 43s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 43s
- Introduced `countryCode` and `stateCode` fields in the Club model to support regional calendar data. - Updated ClubSettings component to allow users to select their country and state, enhancing the configuration options for clubs. - Enhanced the ClubService to handle normalization of country and state codes during updates. - Added new routes and middleware to support the training cancellation feature and calendar integration in the backend. - Updated frontend navigation to include a calendar link, improving user access to scheduling features.
This commit is contained in:
9
backend/routes/calendarRoutes.js
Normal file
9
backend/routes/calendarRoutes.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import express from 'express';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
import { getClubCalendarDays } from '../controllers/calendarController.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get('/club/:clubId/holidays', authenticate, getClubCalendarDays);
|
||||
|
||||
export default router;
|
||||
16
backend/routes/trainingCancellationRoutes.js
Normal file
16
backend/routes/trainingCancellationRoutes.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import express from 'express';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
import {
|
||||
deleteTrainingCancellation,
|
||||
getTrainingCancellations,
|
||||
upsertTrainingCancellation,
|
||||
} from '../controllers/trainingCancellationController.js';
|
||||
|
||||
const router = express.Router();
|
||||
router.use(authenticate);
|
||||
|
||||
router.get('/:clubId', getTrainingCancellations);
|
||||
router.post('/:clubId', upsertTrainingCancellation);
|
||||
router.delete('/:clubId/:cancellationId', deleteTrainingCancellation);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user