salix/modules/worker/front/department/basic-data/index.js

28 lines
644 B
JavaScript
Raw Normal View History

2023-05-15 08:43:06 +00:00
import ngModule from '../module';
import Section from 'salix/components/section';
class Controller extends Section {
constructor($element, $) {
super($element, $);
this.maritalStatus = [
{code: 'M', name: this.$t('Married')},
{code: 'S', name: this.$t('Single')}
];
}
onSubmit() {
return this.$.watcher.submit()
.then(() => this.card.reload());
}
}
ngModule.vnComponent('vnWorkerBasicData', {
template: require('./index.html'),
controller: Controller,
bindings: {
worker: '<'
},
require: {
card: '^vnWorkerCard'
}
});