diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js
index 3a2d6be5b..b10813488 100644
--- a/e2e/helpers/selectors.js
+++ b/e2e/helpers/selectors.js
@@ -899,12 +899,12 @@ export default {
},
departmentSummary: {
header: 'vn-worker-department-summary h5',
- name: 'vn-worker-department-summary vn-horizontal > vn-vertical > vn-label-value:nth-child(1) > section > span',
- code: 'vn-worker-department-summary vn-horizontal > vn-vertical > vn-label-value:nth-child(2) > section > span',
- chat: 'vn-worker-department-summary vn-horizontal > vn-vertical > vn-label-value:nth-child(3) > section > span',
- bossDepartment: 'vn-worker-department-summary vn-horizontal > vn-vertical > vn-label-value:nth-child(4) > section > span',
- email: 'vn-worker-department-summary vn-horizontal > vn-vertical > vn-label-value:nth-child(5) > section > span',
- clientFk: 'vn-worker-department-summary vn-horizontal > vn-vertical > vn-label-value:nth-child(6) > section > span',
+ name: 'vn-worker-department-summary vn-horizontal > vn-one > vn-vertical > vn-label-value:nth-child(1) > section > span',
+ code: 'vn-worker-department-summary vn-horizontal > vn-one > vn-vertical > vn-label-value:nth-child(2) > section > span',
+ chat: 'vn-worker-department-summary vn-horizontal > vn-one > vn-vertical > vn-label-value:nth-child(3) > section > span',
+ bossDepartment: 'vn-worker-department-summary vn-horizontal > vn-one > vn-vertical > vn-label-value:nth-child(4) > section > span',
+ email: 'vn-worker-department-summary vn-horizontal > vn-one > vn-vertical > vn-label-value:nth-child(5) > section > span',
+ clientFk: 'vn-worker-department-summary vn-horizontal > vn-one > vn-vertical > vn-label-value:nth-child(6) > section > span',
},
workerBasicData: {
name: 'vn-worker-basic-data vn-textfield[ng-model="$ctrl.worker.firstName"]',
diff --git a/e2e/paths/03-worker/01-department/01_summary.spec.js b/e2e/paths/03-worker/01-department/01_summary.spec.js
index de5b762e6..e4bf8fc2d 100644
--- a/e2e/paths/03-worker/01-department/01_summary.spec.js
+++ b/e2e/paths/03-worker/01-department/01_summary.spec.js
@@ -20,7 +20,7 @@ describe('department summary path', () => {
it('should reach the employee summary section and check all properties', async() => {
expect(await page.waitToGetProperty(selectors.departmentSummary.header, 'innerText')).toEqual('INFORMATICA');
expect(await page.getProperty(selectors.departmentSummary.name, 'innerText')).toEqual('INFORMATICA');
- expect(await page.getProperty(selectors.departmentSummary.code, 'innerText')).toEqual('IT');
+ expect(await page.getProperty(selectors.departmentSummary.code, 'innerText')).toEqual('it');
expect(await page.getProperty(selectors.departmentSummary.chat, 'innerText')).toEqual('informatica-cau');
expect(await page.getProperty(selectors.departmentSummary.bossDepartment, 'innerText')).toEqual('');
expect(await page.getProperty(selectors.departmentSummary.email, 'innerText')).toEqual('-');
diff --git a/loopback/locale/es.json b/loopback/locale/es.json
index 1dc37ab22..5ba116051 100644
--- a/loopback/locale/es.json
+++ b/loopback/locale/es.json
@@ -297,6 +297,8 @@
"Fecha fuera de rango": "Fecha fuera de rango",
"Error while generating PDF": "Error al generar PDF",
"Error when sending mail to client": "Error al enviar el correo al cliente",
- "Mail not sent": "Se ha producido un fallo al enviar la factura al cliente [{{clientId}}]({{{clientUrl}}}), por favor revisa la dirección de correo electrónico",
- "The renew period has not been exceeded": "El periodo de renovación no ha sido superado"
-}
+ "Mail not sent": "Se ha producido un fallo al enviar la factura al cliente [{{clientId}}]({{{clientUrl}}}), por favor revisa la dirección de correo electrónico",
+ "The renew period has not been exceeded": "El periodo de renovación no ha sido superado",
+ "Valid priorities: 1,2,3": "Valid priorities: 1,2,3",
+ "No se pueden borrar tickets con abonos asociados. Este ticket está asociado al abono Nº 3": "No se pueden borrar tickets con abonos asociados. Este ticket está asociado al abono Nº 3"
+}
\ No newline at end of file
diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json
index 88200a4a9..978d613e9 100644
--- a/modules/worker/back/models/worker.json
+++ b/modules/worker/back/models/worker.json
@@ -60,7 +60,7 @@
"user": {
"type": "belongsTo",
"model": "VnUser",
- "foreignKey": "userFk"
+ "foreignKey": "id"
},
"boss": {
"type": "belongsTo",
diff --git a/modules/worker/front/department/card/index.js b/modules/worker/front/department/card/index.js
index 62ecf998b..0a6e3e71c 100644
--- a/modules/worker/front/department/card/index.js
+++ b/modules/worker/front/department/card/index.js
@@ -15,7 +15,13 @@ class Controller extends ModuleCard {
}, {
relation: 'worker',
scope: {
- fields: ['id', 'firstName', 'lastName']
+ fields: ['id', 'firstName', 'lastName'],
+ include: {
+ relation: 'user',
+ scope: {
+ fields: ['name']
+ }
+ }
}
}
]
diff --git a/modules/worker/front/department/summary/index.html b/modules/worker/front/department/summary/index.html
index 8aa400683..185d024d7 100644
--- a/modules/worker/front/department/summary/index.html
+++ b/modules/worker/front/department/summary/index.html
@@ -11,73 +11,75 @@
{{summary.name}}
-
+
- Basic data
-
+ ui-sref="worker.department.card.basicData({id:summary.id})">
+ Basic data
+
Basic data
-
-
-
-
-
-
-
-
-
-
- {{summary.worker.firstName}} {{summary.worker.lastName}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{summary.worker.user.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/worker/front/department/summary/index.js b/modules/worker/front/department/summary/index.js
index 574dfac35..a9f8ef33a 100644
--- a/modules/worker/front/department/summary/index.js
+++ b/modules/worker/front/department/summary/index.js
@@ -1,5 +1,6 @@
import ngModule from '../../module';
import Component from 'core/lib/component';
+import './style.scss';
class Controller extends Component {
set department(value) {
diff --git a/modules/worker/front/department/summary/style.scss b/modules/worker/front/department/summary/style.scss
new file mode 100644
index 000000000..7820dbb3c
--- /dev/null
+++ b/modules/worker/front/department/summary/style.scss
@@ -0,0 +1,8 @@
+@import "./variables";
+
+vn-worker-department-summary {
+ .expand {
+ min-width: 100%;
+ }
+}
+
diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html
index e980623ca..2607d9b2f 100644
--- a/modules/worker/front/summary/index.html
+++ b/modules/worker/front/summary/index.html
@@ -39,7 +39,7 @@
- {{::worker.boss.nickname}}
+ {{::worker.boss.name}}