diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue index 775472065..c59f4281d 100644 --- a/src/pages/Worker/Card/WorkerBasicData.vue +++ b/src/pages/Worker/Card/WorkerBasicData.vue @@ -27,7 +27,6 @@ const workerFilter = { }, { relation: 'sip', scope: { fields: ['extension', 'secret'] } }, { relation: 'department', scope: { include: { relation: 'department' } } }, - { relation: 'client', scope: {fields:['phone']} }, ], }; const workersFilter = { @@ -87,7 +86,6 @@ const maritalStatus = [ :label="t('Mobile extension')" clearable /> - @@ -159,7 +157,6 @@ es: Last name: Apellidos Business phone: Teléfono de empresa Mobile extension: Extensión móvil - Personal phone: Teléfono personal Boss: Jefe Marital status: Estado civil Married: Casado/a diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue index 6f876b8fa..a20ad5546 100644 --- a/src/pages/Worker/Card/WorkerDescriptor.vue +++ b/src/pages/Worker/Card/WorkerDescriptor.vue @@ -31,7 +31,29 @@ const entityId = computed(() => { }); const worker = ref(); -const filter = { where: { id: entityId } }; +const filter = { + include: [ + { + relation: 'user', + scope: { + fields: ['email', 'name', 'nickname'], + }, + }, + { + relation: 'department', + scope: { + include: [ + { + relation: 'department', + }, + ], + }, + }, + { + relation: 'sip', + }, + ], +}; const sip = ref(null); @@ -60,7 +82,7 @@ const setData = (entity) => { $props.id || params.id); +const entityId = computed(() => $props.id || route.params.id); const workerUrl = ref(); onMounted(async () => { workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`; }); -const filter = { where: { id: entityId.value } }; +const filter = { + include: [ + { + relation: 'user', + scope: { + fields: ['email', 'name', 'nickname', 'roleFk'], + include: { + relation: 'role', + scope: { + fields: ['name'], + }, + }, + }, + }, + { + relation: 'department', + scope: { + include: { + relation: 'department', + scope: { + fields: ['name'], + }, + }, + }, + }, + { + relation: 'boss', + }, + { + relation: 'client', + }, + { + relation: 'sip', + }, + ], +}; - + {{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }} @@ -68,6 +103,12 @@ const filter = { where: { id: entityId.value } }; + + + {{ t('worker.summary.personalPhone') }} + + +