Merge pull request 'fix: workerBasicData' (!1484) from warmfix-workerBasicDataFix into test
gitea/salix-front/pipeline/pr-dev This commit looks good Details
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #1484
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Carlos Satorres 2025-02-25 13:02:20 +00:00
commit ef85c2cfa2
1 changed files with 7 additions and 7 deletions

View File

@ -17,6 +17,12 @@ const maritalStatus = [
{ code: 'M', name: t('Married') },
{ code: 'S', name: t('Single') },
];
async function setAdvancedSummary(data) {
const advanced = (await useAdvancedSummary('Workers', data.id)) ?? {};
Object.assign(form.value.formData, advanced);
await nextTick();
if (form.value) form.value.hasChanges = false;
}
</script>
<template>
<FetchData
@ -36,13 +42,7 @@ const maritalStatus = [
:url-update="`Workers/${$route.params.id}`"
auto-load
model="Worker"
@on-fetch="
async (data) => {
Object.assign(data, (await useAdvancedSummary('Workers', data.id)) ?? {});
await $nextTick();
if (form) form.hasChanges = false;
}
"
@on-fetch="setAdvancedSummary"
>
<template #form="{ data }">
<VnRow>