2019-01-28 15:24:45 +00:00
|
|
|
import ngModule from '../module';
|
2020-03-18 11:55:22 +00:00
|
|
|
import Component from 'core/lib/component';
|
2019-01-28 15:24:45 +00:00
|
|
|
|
2020-03-18 11:55:22 +00:00
|
|
|
class Controller extends Component {
|
2019-10-21 12:21:52 +00:00
|
|
|
get worker() {
|
|
|
|
return this._worker;
|
|
|
|
}
|
|
|
|
|
|
|
|
set worker(value) {
|
|
|
|
this._worker = value;
|
|
|
|
|
|
|
|
if (!value) return;
|
|
|
|
|
|
|
|
this._quicklinks = {
|
|
|
|
btnOne: {
|
|
|
|
icon: 'person',
|
|
|
|
state: `client.card.summary({id: ${value.userFk}})`,
|
|
|
|
tooltip: 'Go to client'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
set quicklinks(value = {}) {
|
|
|
|
this._quicklinks = Object.assign(value, this._quicklinks);
|
|
|
|
}
|
|
|
|
|
|
|
|
get quicklinks() {
|
|
|
|
return this._quicklinks;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-28 15:24:45 +00:00
|
|
|
ngModule.component('vnWorkerDescriptor', {
|
|
|
|
template: require('./index.html'),
|
2019-10-21 12:21:52 +00:00
|
|
|
controller: Controller,
|
2019-01-28 15:24:45 +00:00
|
|
|
bindings: {
|
|
|
|
worker: '<'
|
|
|
|
}
|
|
|
|
});
|