52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
import ngModule from '../module';
|
|
import './style.scss';
|
|
|
|
class Controller {
|
|
constructor($stateParams, $scope, vnToken) {
|
|
this.$stateParams = $stateParams;
|
|
this.$ = $scope;
|
|
this.accessToken = vnToken.token;
|
|
this.filter = {
|
|
include: {
|
|
relation: 'dms',
|
|
scope: {
|
|
fields: ['dmsTypeFk', 'workerFk', 'file', 'created'],
|
|
include: [{
|
|
relation: 'dmsType',
|
|
scope: {
|
|
fields: ['name']
|
|
}
|
|
},
|
|
{
|
|
relation: 'worker',
|
|
scope: {
|
|
fields: ['userFk'],
|
|
include: {
|
|
relation: 'user',
|
|
scope: {
|
|
fields: ['nickname']
|
|
}
|
|
},
|
|
}
|
|
}]
|
|
},
|
|
}
|
|
};
|
|
}
|
|
|
|
showWorkerDescriptor(event, workerFk) {
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
this.$.workerDescriptor.parent = event.target;
|
|
this.$.workerDescriptor.workerFk = workerFk;
|
|
this.$.workerDescriptor.show();
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$stateParams', '$scope', 'vnToken'];
|
|
|
|
ngModule.component('vnTicketDms', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
});
|