fix : drawer commentaire de semaine — toasts, titre et UI Malio

- Ajoute les clés i18n manquantes (success/errors weekComment.save/delete) qui faisaient afficher la clé brute dans le toast.
- Titre du drawer simplifié à "Commentaire" ; semaine (S{n}) et plage de dates affichées sous le nom de l'employé.
- Drawer, textarea et boutons migrés vers les composants Malio UI ; bouton Annuler supprimé.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-29 17:43:42 +02:00
parent 0f6577aedc
commit d595d323b3
4 changed files with 40 additions and 18 deletions

View File

@@ -10,15 +10,15 @@ export const createWeekComment = async (payload: { employeeId: number; weekStart
employee: `/api/employees/${payload.employeeId}`,
weekStartDate: payload.weekStartDate,
content: payload.content
}, { toastSuccessKey: 'success.week-comment.save', toastErrorKey: 'errors.week-comment.save' })
}, { toastSuccessKey: 'success.weekComment.save', toastErrorKey: 'errors.weekComment.save' })
}
export const updateWeekComment = async (id: number, content: string) => {
const api = useApi()
return api.patch<EmployeeWeekComment>(`/employee_week_comments/${id}`, { content }, { toastSuccessKey: 'success.week-comment.save', toastErrorKey: 'errors.week-comment.save' })
return api.patch<EmployeeWeekComment>(`/employee_week_comments/${id}`, { content }, { toastSuccessKey: 'success.weekComment.save', toastErrorKey: 'errors.weekComment.save' })
}
export const deleteWeekComment = async (id: number) => {
const api = useApi()
await api.delete(`/employee_week_comments/${id}`, {}, { toastSuccessKey: 'success.week-comment.delete', toastErrorKey: 'errors.week-comment.delete' })
await api.delete(`/employee_week_comments/${id}`, {}, { toastSuccessKey: 'success.weekComment.delete', toastErrorKey: 'errors.weekComment.delete' })
}