refs #5334 fix errors
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2023-06-21 13:07:04 +02:00
parent 2ddf8e5de6
commit 168d05a830
3 changed files with 2 additions and 27 deletions

View File

@ -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: '<'
}

View File

@ -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'];

View File

@ -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')
});