feat(TrainingCancellation): enhance cancellation functionality and localization support
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s
- Updated the training cancellation controller to accept training group IDs, improving the cancellation process. - Modified the database schema to include a JSON field for training group IDs in the training cancellations table. - Enhanced the TrainingCancellation model to support the new training group IDs field. - Updated the training cancellation service to normalize and handle training group IDs effectively. - Added localization support for training cancellation features across multiple languages, improving user experience.
This commit is contained in:
@@ -19,13 +19,14 @@ export const upsertTrainingCancellation = async (req, res) => {
|
||||
try {
|
||||
const { authcode: userToken } = req.headers;
|
||||
const { clubId } = req.params;
|
||||
const { date, startDate, endDate, reason } = req.body;
|
||||
const { date, startDate, endDate, reason, trainingGroupIds } = req.body;
|
||||
const result = await trainingCancellationService.upsertTrainingCancellation(
|
||||
userToken,
|
||||
clubId,
|
||||
startDate || date,
|
||||
reason,
|
||||
endDate || date || startDate
|
||||
endDate || date || startDate,
|
||||
trainingGroupIds
|
||||
);
|
||||
res.status(200).json(result);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user