From 9783be1ff00dd2709f9e3633956e85797be49616 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 18 Dec 2024 10:45:02 +0100 Subject: [PATCH 1/5] fix: fixed recipient param --- src/pages/Worker/Card/WorkerTimeControl.vue | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index 491e5e180..96e7cd441 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -100,15 +100,23 @@ const formattedWeekTotalHours = computed(() => secondsToHoursMinutes(weekTotalHours.value) ); +// const onInputChange = async (date) => { +// if (!date) return; + +// const { timestamp, outside } = date.scope; +// const { year, month, day } = timestamp; +// const _date = new Date(year, month - 1, day); +// setDate(_date); + +// if (outside) getMailStates(_date); +// }; + const onInputChange = async (date) => { if (!date) return; - const { timestamp, outside } = date.scope; - const { year, month, day } = timestamp; + const { year, month, day } = date.scope.timestamp; const _date = new Date(year, month - 1, day); setDate(_date); - - if (outside) getMailStates(_date); }; const setDate = async (date) => { @@ -381,12 +389,13 @@ const isUnsatisfied = async (reason) => { const resendEmail = async () => { const params = { - recipient: worker.value?.user?.email, + recipient: worker.value[0]?.user?.emailUser?.email, week: selectedWeekNumber.value, year: selectedDate.value.getFullYear(), workerId: Number(route.params.id), state: 'SENDED', }; + console.log('params: ', params); await axios.post('WorkerTimeControls/weekly-hour-record-email', params); await getMailStates(selectedDate.value); notify(t('Email sended'), 'positive'); From 06d3a025fcd355981a41887a4a4382ca584941af Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 18 Dec 2024 10:45:42 +0100 Subject: [PATCH 2/5] fix: deleted code --- src/pages/Worker/Card/WorkerTimeControl.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index 96e7cd441..f4c81102f 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -395,7 +395,6 @@ const resendEmail = async () => { workerId: Number(route.params.id), state: 'SENDED', }; - console.log('params: ', params); await axios.post('WorkerTimeControls/weekly-hour-record-email', params); await getMailStates(selectedDate.value); notify(t('Email sended'), 'positive'); From 76788fe8892e2744698283ce749787f4549d46a0 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 18 Dec 2024 10:46:50 +0100 Subject: [PATCH 3/5] fix: changes --- src/pages/Worker/Card/WorkerTimeControl.vue | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index f4c81102f..c480d5bd8 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -100,23 +100,15 @@ const formattedWeekTotalHours = computed(() => secondsToHoursMinutes(weekTotalHours.value) ); -// const onInputChange = async (date) => { -// if (!date) return; - -// const { timestamp, outside } = date.scope; -// const { year, month, day } = timestamp; -// const _date = new Date(year, month - 1, day); -// setDate(_date); - -// if (outside) getMailStates(_date); -// }; - const onInputChange = async (date) => { if (!date) return; - const { year, month, day } = date.scope.timestamp; + const { timestamp, outside } = date.scope; + const { year, month, day } = timestamp; const _date = new Date(year, month - 1, day); setDate(_date); + + if (outside) getMailStates(_date); }; const setDate = async (date) => { From d29ecd0a2b570cc38d02afa52f3ff5bf64485f13 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 23 Dec 2024 09:47:00 +0000 Subject: [PATCH 4/5] fix: use value intead computedRef --- src/pages/Customer/components/CustomerSamplesCreate.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Customer/components/CustomerSamplesCreate.vue b/src/pages/Customer/components/CustomerSamplesCreate.vue index a75dfa1b2..665e136e4 100644 --- a/src/pages/Customer/components/CustomerSamplesCreate.vue +++ b/src/pages/Customer/components/CustomerSamplesCreate.vue @@ -107,7 +107,7 @@ const setParams = (params) => { const getPreview = async () => { const params = { - recipientId: entityId, + recipientId: entityId.value, }; const validationMessage = validateMessage(); if (validationMessage) return notify(t(validationMessage), 'negative'); From 17b178d9f13aa6ea2c588438d137a325e58a8ab9 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 24 Dec 2024 09:06:17 +0000 Subject: [PATCH 5/5] fix: orderBy priority --- src/pages/Claim/ClaimList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index d561a69f7..6b9fa77a0 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -131,7 +131,7 @@ const STATE_COLOR = {