Compare commits

...

3 Commits

Author SHA1 Message Date
Carlos Satorres 6f227d45c4 Merge pull request 'hotfix-loadData' (!1696) from hotifx-loadDataDepartment into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #1696
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2023-08-02 07:08:25 +00:00
Alex Moreno b8780dfbbf Merge branch 'master' into hotifx-loadDataDepartment
gitea/salix/pipeline/head This commit looks good Details
2023-08-01 12:12:17 +00:00
Carlos Satorres 40607a42cf hotfix-loadData
gitea/salix/pipeline/head This commit looks good Details
2023-08-01 10:25:44 +02:00
1 changed files with 22 additions and 0 deletions

View File

@ -32,6 +32,28 @@ 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'];