From 725b7053f7e1807d0f550e1cdf911477349d58eb Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 17 Jul 2024 13:32:04 +0200 Subject: [PATCH 1/2] fix(workerTimeControl): correct request 'updateMailState' --- src/pages/Worker/Card/WorkerTimeControl.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index f466c4f9a..cb9b36703 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -380,7 +380,7 @@ const updateWorkerTimeControlMail = async (state, reason) => { if (reason) params.reason = reason; - await axios.post('WorkerTimeControls/updateWorkerTimeControlMail', params); + await axios.post('WorkerTimeControls/updateMailState', params); await getMailStates(selectedDate.value); await fetchWeekData(); notify(t('globals.dataSaved'), 'positive'); From 3999d93268a627ea18c3b2591fc8171ce2354728 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 17 Jul 2024 14:17:00 +0200 Subject: [PATCH 2/2] fix(WorkerTimeControl): url --- src/pages/Worker/Card/WorkerTimeControl.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index cb9b36703..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/updateMailState', params); + await axios.post(`WorkerTimeControls/${workerId}/updateMailState`, params); await getMailStates(selectedDate.value); await fetchWeekData(); notify(t('globals.dataSaved'), 'positive');