fix: refs #6553 fix BeforeMount filters

This commit is contained in:
Carlos Satorres 2025-01-09 14:06:02 +01:00
parent 3e16357878
commit b479ce83e0
1 changed files with 30 additions and 30 deletions

View File

@ -26,11 +26,6 @@ const entityId = computed(() => $props.id || route.params.id);
const basicDataUrl = ref(null); const basicDataUrl = ref(null);
const advancedSummary = ref(); const advancedSummary = ref();
onBeforeMount(async () => {
advancedSummary.value = await useAdvancedSummary('Workers', entityId.value);
basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
});
const filter = { const filter = {
include: [ include: [
{ {
@ -74,33 +69,37 @@ const filter = {
{ {
relation: 'sip', relation: 'sip',
}, },
{ // {
relation: 'business', // relation: 'business',
scope: { // scope: {
include: [ // include: [
{ // {
relation: 'department', // relation: 'department',
scope: { // scope: {
fields: ['id', 'name'], // fields: ['id', 'name'],
}, // },
}, // },
{ // {
relation: 'reasonEnd', // relation: 'reasonEnd',
scope: { // scope: {
fields: ['id', 'reason'], // fields: ['id', 'reason'],
}, // },
}, // },
{ // {
relation: 'workerBusinessProfessionalCategory', // relation: 'workerBusinessProfessionalCategory',
scope: { // scope: {
fields: ['id', 'description'], // fields: ['id', 'description'],
}, // },
}, // },
], // ],
}, // },
}, // },
], ],
}; };
onBeforeMount(async () => {
advancedSummary.value = await useAdvancedSummary('Workers', entityId.value);
basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
});
</script> </script>
<template> <template>
@ -215,6 +214,7 @@ const filter = {
:url="`#/worker/${entityId}/business`" :url="`#/worker/${entityId}/business`"
:text="t('worker.summary.business')" :text="t('worker.summary.business')"
/> />
{{ worker.business }}
<VnLv <VnLv
:label="t('worker.summary.started')" :label="t('worker.summary.started')"
:value="toDate(worker?.business[0]?.started)" :value="toDate(worker?.business[0]?.started)"