diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json
index 45eee23bf3..cad38ac3ba 100644
--- a/modules/worker/back/models/worker.json
+++ b/modules/worker/back/models/worker.json
@@ -42,6 +42,11 @@
"model": "Account",
"foreignKey": "userFk"
},
+ "boss": {
+ "type": "belongsTo",
+ "model": "Account",
+ "foreignKey": "bossFk"
+ },
"client": {
"type": "belongsTo",
"model": "Client",
diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html
index a2cbbc637b..a767eccc4a 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/locale/es.yml b/modules/worker/front/locale/es.yml
index 63570ddf07..1414d089bc 100644
--- a/modules/worker/front/locale/es.yml
+++ b/modules/worker/front/locale/es.yml
@@ -7,6 +7,7 @@ Extension: Extensión
Fiscal identifier: NIF
Go to client: Ir al cliente
Last name: Apellidos
+Boss: Jefe
Log: Historial
Private Branch Exchange: Centralita
Role: Rol
diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html
index 0a99959e4f..d2a7e750bd 100644
--- a/modules/worker/front/summary/index.html
+++ b/modules/worker/front/summary/index.html
@@ -30,6 +30,14 @@
+
+
+ {{::worker.boss.nickname}}
+
+
@@ -50,4 +58,7 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/modules/worker/front/summary/index.js b/modules/worker/front/summary/index.js
index 6a4d870074..3cdb2c36f1 100644
--- a/modules/worker/front/summary/index.js
+++ b/modules/worker/front/summary/index.js
@@ -11,8 +11,8 @@ class Controller extends Summary {
this.$.worker = null;
if (!value) return;
- let query = `Workers/${value.id}`;
- let filter = {
+ const query = `Workers/${value.id}`;
+ const filter = {
include: [
{
relation: 'user',
@@ -31,13 +31,20 @@ class Controller extends Summary {
}
}]
}
- }, {
+ },
+ {
relation: 'client',
scope: {fields: ['fi']}
- }, {
+ },
+ {
+ relation: 'boss',
+ scope: {fields: ['id', 'nickname']}
+ },
+ {
relation: 'sip',
scope: {fields: ['extension']}
- }, {
+ },
+ {
relation: 'department',
scope: {
include: {