46 lines
887 B
JavaScript
46 lines
887 B
JavaScript
import ngModule from '../module';
|
|
|
|
class Controller {
|
|
constructor($http, $state) {
|
|
this.$state = $state;
|
|
this.$http = $http;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$http', '$state'];
|
|
|
|
|
|
ngModule.component('vnWorkerDescriptor', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
worker: '<'
|
|
}
|
|
});
|