From 8deb11d33336d0da988f581992b8a6b7cd408cce Mon Sep 17 00:00:00 2001 From: jorgebl Date: Fri, 19 Feb 2021 17:45:45 +0100 Subject: [PATCH] Added boss on basic data and summary --- modules/worker/back/models/worker.json | 5 +++++ modules/worker/front/basic-data/index.html | 9 +++++++++ modules/worker/front/summary/index.html | 4 ++++ modules/worker/front/summary/index.js | 3 +++ 4 files changed, 21 insertions(+) diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index 45eee23bf..906f9baef 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -61,6 +61,11 @@ "type": "hasMany", "model": "WorkerTeamCollegues", "foreignKey": "workerFk" + }, + "boss": { + "type": "belongsTo", + "model": "Worker", + "foreignKey": "bossFk" } } } \ No newline at end of file diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html index a2cbbc637..a767eccc4 100644 --- a/modules/worker/front/basic-data/index.html +++ b/modules/worker/front/basic-data/index.html @@ -29,6 +29,15 @@ ng-model="$ctrl.worker.phone" rule> + + diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html index 0a99959e4..cc7a0b03c 100644 --- a/modules/worker/front/summary/index.html +++ b/modules/worker/front/summary/index.html @@ -30,6 +30,10 @@ + + diff --git a/modules/worker/front/summary/index.js b/modules/worker/front/summary/index.js index 6a4d87007..631b307a2 100644 --- a/modules/worker/front/summary/index.js +++ b/modules/worker/front/summary/index.js @@ -34,6 +34,9 @@ class Controller extends Summary { }, { relation: 'client', scope: {fields: ['fi']} + }, { + relation: 'boss', + scope: {fields: ['id', 'firstName']} }, { relation: 'sip', scope: {fields: ['extension']}