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

28 lines
644 B
JavaScript
Raw Permalink Normal View History

2019-01-28 15:24:45 +00:00
import ngModule from '../module';
2020-03-18 11:55:22 +00:00
import Section from 'salix/components/section';
2019-01-28 15:24:45 +00:00
2020-03-18 11:55:22 +00:00
class Controller extends Section {
constructor($element, $) {
super($element, $);
this.maritalStatus = [
{code: 'M', name: this.$t('Married')},
{code: 'S', name: this.$t('Single')}
];
}
2019-01-28 15:24:45 +00:00
onSubmit() {
2020-03-24 11:20:53 +00:00
return this.$.watcher.submit()
2019-01-30 12:32:25 +00:00
.then(() => this.card.reload());
2019-01-28 15:24:45 +00:00
}
}
ngModule.vnComponent('vnWorkerBasicData', {
2019-01-28 15:24:45 +00:00
template: require('./index.html'),
controller: Controller,
bindings: {
worker: '<'
},
require: {
card: '^vnWorkerCard'
}
});