From ceaaece0071108b1096d16eb190be039d781e2b8 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 26 May 2023 14:08:37 +0200 Subject: [PATCH] refs #5334 label-value --- .../front/department/basic-data/index.js | 4 --- .../front/department/descriptor/index.js | 32 +++++-------------- .../front/department/summary/index.html | 18 ++++------- .../worker/front/department/summary/index.js | 7 ++-- 4 files changed, 20 insertions(+), 41 deletions(-) diff --git a/modules/worker/front/department/basic-data/index.js b/modules/worker/front/department/basic-data/index.js index d9b60c6835..d5f988141a 100644 --- a/modules/worker/front/department/basic-data/index.js +++ b/modules/worker/front/department/basic-data/index.js @@ -4,10 +4,6 @@ import Section from 'salix/components/section'; class Controller extends Section { constructor($element, $) { super($element, $); - this.maritalStatus = [ - {code: 'M', name: this.$t('Married')}, - {code: 'S', name: this.$t('Single')} - ]; } onSubmit() { return this.$.watcher.submit() diff --git a/modules/worker/front/department/descriptor/index.js b/modules/worker/front/department/descriptor/index.js index 937f4c351b..eb64898261 100644 --- a/modules/worker/front/department/descriptor/index.js +++ b/modules/worker/front/department/descriptor/index.js @@ -16,35 +16,19 @@ class Controller extends Descriptor { } loadData() { const filter = { + fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName', + 'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMai', 'hasToMistake', 'clientFk'], include: [ { - relation: 'user', - scope: { - fields: ['name'], - include: { - relation: 'emailUser', - scope: { - fields: ['email'] - } - } - } - }, { relation: 'client', - scope: { - fields: ['fi'] - } - }, { - relation: 'sip', - scope: { - fields: ['extension'] - } + scope: {fields: ['name']} + }, + { + relation: 'worker', + scope: {fields: ['name']} }, { relation: 'department', - scope: { - include: { - relation: 'department' - } - } + scope: {fields: ['name']} } ] }; diff --git a/modules/worker/front/department/summary/index.html b/modules/worker/front/department/summary/index.html index 6b7ded649c..979f01dc0a 100644 --- a/modules/worker/front/department/summary/index.html +++ b/modules/worker/front/department/summary/index.html @@ -2,9 +2,9 @@
- + {{department.name}}
@@ -12,7 +12,7 @@

+ ui-sref="department.card.basicData({id:$ctrl.worker.department.id})"> Basic data

@@ -24,21 +24,17 @@ - - - {{::worker.boss.nickname}} - + label="Boss department" + value="{{$ctrl.worker.department.workerFk}}"> -