diff --git a/front/core/components/label-value/label-value.js b/front/core/components/label-value/label-value.js index ecf3bf4b3..515df45c7 100644 --- a/front/core/components/label-value/label-value.js +++ b/front/core/components/label-value/label-value.js @@ -8,23 +8,37 @@ export default class Controller { this.hasInfo = Boolean($attrs.info); this.info = $attrs.info || null; } + set label(value) { let label = this.element.querySelector('vn-label'); label.textContent = this._.instant(value); this._label = value; } + get label() { return this._label; } + set value(value) { let span = this.element.querySelector('span'); span.title = value; span.textContent = value ? value : '-'; this._value = value; } + get value() { return this._value; } + + get title() { + return this._title; + } + + set title(value) { + let span = this.element.querySelector('span'); + span.title = value; + this._title = value; + } } Controller.$inject = ['$element', '$translate', '$attrs']; @@ -32,6 +46,7 @@ ngModule.component('vnLabelValue', { controller: Controller, template: require('./label-value.html'), bindings: { + title: '@?', label: '@', value: '@' } diff --git a/modules/worker/front/card/index.js b/modules/worker/front/card/index.js index c73c9f8ec..ea1457fc8 100644 --- a/modules/worker/front/card/index.js +++ b/modules/worker/front/card/index.js @@ -25,6 +25,13 @@ class Controller { }, { relation: 'sip', scope: {fields: ['extension']} + }, { + relation: 'department', + scope: { + include: { + relation: 'department' + } + } } ] }; diff --git a/modules/worker/front/descriptor/index.html b/modules/worker/front/descriptor/index.html index 315ad7c9c..696f2a22f 100644 --- a/modules/worker/front/descriptor/index.html +++ b/modules/worker/front/descriptor/index.html @@ -10,12 +10,15 @@