Add training times management and enhance diary view with group selection dialog
This commit introduces the `TrainingTime` model and related functionality, allowing for the management of training times associated with training groups. The backend is updated to include new routes for training times, while the frontend is enhanced with a new dialog in the `DiaryView` for selecting training groups and suggesting available training times. This improves user experience by streamlining the process of scheduling training sessions and managing associated data.
This commit is contained in:
19
backend/routes/trainingTimeRoutes.js
Normal file
19
backend/routes/trainingTimeRoutes.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import express from 'express';
|
||||
import { authenticate } from '../middleware/authMiddleware.js';
|
||||
import {
|
||||
getTrainingTimes,
|
||||
createTrainingTime,
|
||||
updateTrainingTime,
|
||||
deleteTrainingTime
|
||||
} from '../controllers/trainingTimeController.js';
|
||||
|
||||
const router = express.Router();
|
||||
router.use(authenticate);
|
||||
|
||||
router.get('/:clubId', getTrainingTimes);
|
||||
router.post('/:clubId', createTrainingTime);
|
||||
router.put('/:clubId/:timeId', updateTrainingTime);
|
||||
router.delete('/:clubId/:timeId', deleteTrainingTime);
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user