diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 71440760b..8cecdc628 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -660,6 +660,8 @@ worker:
department: Departament
workerBusinessCategory: Worker Business Category
notes: Notes
+ workCenter: Center
+ professionalCategory: Professional Category
notificationsManager:
activeNotifications: Active notifications
availableNotifications: Available notifications
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 3f0830f33..db4e685c0 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -663,6 +663,8 @@ worker:
department: Departamento
workerBusinessCategory: Categoria profesional
notes: Notas
+ workCenter: Centro
+ professionalCategory: Categoria profesional
notificationsManager:
activeNotifications: Notificaciones activas
availableNotifications: Notificaciones disponibles
diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue
index ea5ddcdec..3e85f9c8e 100644
--- a/src/pages/Worker/Card/WorkerSummary.vue
+++ b/src/pages/Worker/Card/WorkerSummary.vue
@@ -11,6 +11,7 @@ import VnTitle from 'src/components/common/VnTitle.vue';
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
import { useAdvancedSummary } from 'src/composables/useAdvancedSummary';
+import axios from 'axios';
const route = useRoute();
const { t } = useI18n();
@@ -69,36 +70,52 @@ 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'],
+ },
+ },
+ ],
+ },
+ },
],
};
+
+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 () => {
advancedSummary.value = await useAdvancedSummary('Workers', entityId.value);
basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
+ businessCurrent();
});
@@ -214,24 +231,27 @@ onBeforeMount(async () => {
:url="`#/worker/${entityId}/business`"
:text="t('worker.summary.business')"
/>
- {{ worker.business }}
+
-
+