Compare commits

..

21 Commits

Author SHA1 Message Date
Benjamin Esteve bde19f0d4c Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-12 12:45:36 +02:00
Benjamin Esteve 9cf7e33afb Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-12 11:27:02 +02:00
Benjamin Esteve c3ae161eb0 refactor: refs #7549 optimize claim data retrieval in handleWorker function
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-09 12:38:41 +02:00
Benjamin Esteve c1b6d96aef Merge branch '7549-autofillWorkerClaimDevelopment' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-09 10:43:15 +02:00
Benjamin Esteve 640bc21022 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment 2025-05-09 10:43:11 +02:00
Benjamin Esteve f3b06c84a5 Merge branch 'dev' into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-09 08:40:07 +00:00
Benjamin Esteve 02a4960712 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-08 10:38:19 +02:00
Benjamin Esteve 254d5562dd Merge branch '7549-autofillWorkerClaimDevelopment' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-08 09:45:25 +02:00
Benjamin Esteve 40899c4c3d fix(ClaimDevelopment): refs #7549 move claim data fetch to after responsible check 2025-05-08 09:45:23 +02:00
Benjamin Esteve 191af3f917 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment 2025-05-08 09:08:54 +02:00
Benjamin Esteve b9788bc097 Merge branch 'dev' into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-07 11:32:07 +00:00
Benjamin Esteve a63926ff48 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-07 11:38:03 +02:00
Benjamin Esteve b687c80559 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-07 10:24:39 +02:00
Benjamin Esteve ad178825db fix: refs #7549 update handleWorker to check for commercial responsible by description
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-07 09:40:53 +02:00
Benjamin Esteve 8eb81fadf3 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-07 09:12:05 +02:00
Benjamin Esteve f351734d84 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-06 11:31:57 +02:00
Benjamin Esteve a6a3d5a3d5 fix: refs #7549 handle null claimResponsibleFk in handleWorker function 2025-05-06 11:31:02 +02:00
Benjamin Esteve 20ca8f8072 Merge branch 'dev' of https: refs #7549//gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-06 09:20:57 +02:00
Benjamin Esteve 9af63555c3 fix: refs #7549 update handleWorker function to correctly assign workerFk based on claimResponsibleFk
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-05 14:18:55 +02:00
Benjamin Esteve 50cb0e243b Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7549-autofillWorkerClaimDevelopment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-05 11:50:18 +02:00
Benjamin Esteve 41e4cc13b1 feat: refs #7549 implement worker selection handling
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-02 12:28:55 +02:00
1 changed files with 43 additions and 0 deletions

View File

@ -7,6 +7,8 @@ import FetchData from 'components/FetchData.vue';
import VnSelect from 'components/common/VnSelect.vue';
import { tMobile } from 'composables/tMobile';
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
import axios from 'axios';
import { useArrayData } from 'composables/useArrayData';
const route = useRoute();
@ -19,6 +21,7 @@ const claimResponsibles = ref([]);
const claimRedeliveries = ref([]);
const selected = ref([]);
const saveButtonRef = ref();
const arrayData = useArrayData('Claim');
const developmentsFilter = computed(() => {
return {
@ -105,6 +108,32 @@ const columns = computed(() => [
align: 'left',
},
]);
const handleWorker = async (row) => {
const { claimResponsibleFk } = row;
if (!claimResponsibleFk) {
row.workerFk = null;
return;
}
const commercialResponsible = claimResponsibles?.value?.find(
(responsible) => responsible.description === 'Comerciales',
);
const claim = arrayData.store.data;
if (claimResponsibleFk === commercialResponsible?.id) {
row.workerFk = claim.workerFk;
return;
}
const { data: [responsible] = [] } = await axios.get(
`ClaimDevelopments/${claim.ticketFk}/getResponsible/${claimResponsibleFk}`,
);
row.workerFk = responsible?.userFk ?? null;
};
</script>
<template>
<FetchData
@ -166,6 +195,20 @@ const columns = computed(() => [
input-debounce="0"
hide-selected
/>
<VnSelect
v-else-if="col.name == 'claimResponsible'"
v-model="row[col.model]"
:url="col.url"
:where="col.where"
:sort-by="col.sortBy"
:options="col.options"
:option-value="col.optionValue"
:option-label="col.optionLabel"
@update:modelValue="handleWorker(row)"
:autofocus="col.tabIndex == 1"
input-debounce="0"
hide-selected
/>
<VnSelect
v-else
v-model="row[col.model]"