diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue index 3295a2234..4f1786a67 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,11 +86,6 @@ const maritalStatus = [ :label="t('Mobile extension')" clearable /> - @@ -163,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/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue index e0047bf9e..d76ef6f59 100644 --- a/src/pages/Worker/Card/WorkerCard.vue +++ b/src/pages/Worker/Card/WorkerCard.vue @@ -1,15 +1,12 @@ { }); const worker = ref(); -const filter = computed(() => { - return { where: { id: entityId.value } }; -}); +const filter = { + include: [ + { + relation: 'user', + scope: { + fields: ['email', 'name', 'nickname'], + }, + }, + { + relation: 'department', + scope: { + include: [ + { + relation: 'department', + }, + ], + }, + }, + { + relation: 'sip', + }, + ], +}; const sip = ref(null); @@ -62,7 +82,7 @@ const setData = (entity) => { { workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`; }); -const filter = computed(() => { - return { 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 }} @@ -75,6 +103,12 @@ const filter = computed(() => { + + + {{ t('worker.summary.personalPhone') }} + + +