This commit is contained in:
parent
2ddf8e5de6
commit
168d05a830
|
@ -1,11 +1,10 @@
|
|||
import ngModule from '../../module';
|
||||
import Section from 'salix/components/section';
|
||||
|
||||
export default class Controller extends Section {}
|
||||
|
||||
ngModule.vnComponent('vnWorkerDepartmentBasicData', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller,
|
||||
controller: Section,
|
||||
bindings: {
|
||||
department: '<'
|
||||
}
|
||||
|
|
|
@ -32,28 +32,6 @@ class Controller extends Descriptor {
|
|||
this.vnApp.showSuccess(this.$t('Department deleted.'));
|
||||
});
|
||||
}
|
||||
|
||||
loadData() {
|
||||
const filter = {
|
||||
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
|
||||
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMail', 'hasToMistake', 'clientFk'],
|
||||
include: [
|
||||
{relation: 'client',
|
||||
scope: {
|
||||
fields: ['id', 'name']
|
||||
}},
|
||||
{
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
fields: ['id', 'firstName', 'lastName']
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return this.getData(`Departments/${this.id}`, {filter})
|
||||
.then(res => this.entity = res.data);
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$element', '$scope', '$rootScope'];
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import ngModule from '../../module';
|
||||
import ModuleMain from 'salix/components/module-main';
|
||||
|
||||
export default class Department extends ModuleMain {}
|
||||
|
||||
ngModule.vnComponent('vnWorkerDepartment', {
|
||||
controller: Department,
|
||||
controller: ModuleMain,
|
||||
template: require('./index.html')
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue