refactor: refs #7549 update worker handling logic to use responsible code instead of description
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
1e21abe978
commit
37a2adb0ad
|
@ -118,21 +118,21 @@ const handleWorker = async (row) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const commercialResponsible = claimResponsibles?.value?.find(
|
const commercialResponsible = claimResponsibles?.value?.find(
|
||||||
(responsible) => responsible.description === 'Comerciales',
|
(responsible) => responsible.code === 'com',
|
||||||
);
|
);
|
||||||
|
|
||||||
const claim = arrayData.store.data;
|
const claim = arrayData.store.data;
|
||||||
|
|
||||||
if (claimResponsibleFk === commercialResponsible?.id) {
|
if (claimResponsibleFk === commercialResponsible?.id) {
|
||||||
row.workerFk = claim.workerFk;
|
row.workerFk = claim.workerFk;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data: [responsible] = [] } = await axios.get(
|
const {data} = await axios.get(
|
||||||
`ClaimDevelopments/${claim.ticketFk}/getResponsible/${claimResponsibleFk}`,
|
`ClaimDevelopments/${claim.ticketFk}/getResponsible/${claimResponsibleFk}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
row.workerFk = responsible?.userFk ?? null;
|
row.workerFk = data?.userFk ?? null;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
Loading…
Reference in New Issue