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