forked from verdnatura/salix-front
fix: refs #6553 fix summary
This commit is contained in:
parent
b479ce83e0
commit
5a869f0722
|
@ -660,6 +660,8 @@ worker:
|
||||||
department: Departament
|
department: Departament
|
||||||
workerBusinessCategory: Worker Business Category
|
workerBusinessCategory: Worker Business Category
|
||||||
notes: Notes
|
notes: Notes
|
||||||
|
workCenter: Center
|
||||||
|
professionalCategory: Professional Category
|
||||||
notificationsManager:
|
notificationsManager:
|
||||||
activeNotifications: Active notifications
|
activeNotifications: Active notifications
|
||||||
availableNotifications: Available notifications
|
availableNotifications: Available notifications
|
||||||
|
|
|
@ -663,6 +663,8 @@ worker:
|
||||||
department: Departamento
|
department: Departamento
|
||||||
workerBusinessCategory: Categoria profesional
|
workerBusinessCategory: Categoria profesional
|
||||||
notes: Notas
|
notes: Notas
|
||||||
|
workCenter: Centro
|
||||||
|
professionalCategory: Categoria profesional
|
||||||
notificationsManager:
|
notificationsManager:
|
||||||
activeNotifications: Notificaciones activas
|
activeNotifications: Notificaciones activas
|
||||||
availableNotifications: Notificaciones disponibles
|
availableNotifications: Notificaciones disponibles
|
||||||
|
|
|
@ -11,6 +11,7 @@ import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
|
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
|
||||||
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import { useAdvancedSummary } from 'src/composables/useAdvancedSummary';
|
import { useAdvancedSummary } from 'src/composables/useAdvancedSummary';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -69,36 +70,52 @@ 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'],
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// ],
|
],
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let business = ref(null);
|
||||||
|
const workerCurrentBusiness = ref(null);
|
||||||
|
const businessCurrent = async () => {
|
||||||
|
await getWorker();
|
||||||
|
console.log('workerCurrentBusiness: ', workerCurrentBusiness.value);
|
||||||
|
const { data } = await axios.get(`Businesses/${workerCurrentBusiness.value}`, {});
|
||||||
|
business.value = data;
|
||||||
|
console.log('business: ', business.value);
|
||||||
|
};
|
||||||
|
const getWorker = async () => {
|
||||||
|
const { data } = await axios.get(`Workers/${entityId.value}`, {});
|
||||||
|
workerCurrentBusiness.value = data.businessFk;
|
||||||
|
return workerCurrentBusiness.value;
|
||||||
|
};
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
advancedSummary.value = await useAdvancedSummary('Workers', entityId.value);
|
advancedSummary.value = await useAdvancedSummary('Workers', entityId.value);
|
||||||
basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
|
basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
|
||||||
|
businessCurrent();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -214,24 +231,27 @@ onBeforeMount(async () => {
|
||||||
: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(business?.started)"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.summary.ended')"
|
:label="t('worker.summary.ended')"
|
||||||
:value="toDate(worker?.business[0]?.ended)"
|
:value="toDate(business?.ended)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('worker.summary.professionalCategory')"
|
||||||
|
:value="business?.WorkerBusinessProfessionalCategory?.description"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.summary.reasonEnd')"
|
:label="t('worker.summary.reasonEnd')"
|
||||||
:value="worker?.business[0]?.reasonEnd?.reason"
|
:value="business?.reasonEnd?.reason"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.summary.notes')"
|
:label="t('worker.summary.workCenter')"
|
||||||
:value="worker?.business[0]?.notes"
|
:value="business?.WorkCenter?.name"
|
||||||
/>
|
/>
|
||||||
|
<VnLv :label="t('worker.summary.notes')" :value="business?.notes" />
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
|
|
Loading…
Reference in New Issue