diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index f466c4f9a..00e1147d1 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -372,15 +372,15 @@ const showReasonForm = () => { const updateWorkerTimeControlMail = async (state, reason) => { try { const params = { - workerId: Number(route.params.id), year: selectedDate.value.getFullYear(), week: selectedWeekNumber.value, state, }; + const workerId = Number(route.params.id); if (reason) params.reason = reason; - await axios.post('WorkerTimeControls/updateWorkerTimeControlMail', params); + await axios.post(`WorkerTimeControls/${workerId}/updateMailState`, params); await getMailStates(selectedDate.value); await fetchWeekData(); notify(t('globals.dataSaved'), 'positive');