salix/modules/client/front/greuge/create/index.js

27 lines
587 B
JavaScript
Raw Normal View History

2018-05-23 12:26:51 +00:00
import ngModule from '../../module';
2020-03-17 10:17:50 +00:00
import Section from 'salix/components/section';
2017-12-04 07:17:29 +00:00
2020-03-17 10:17:50 +00:00
class Controller extends Section {
constructor(...args) {
super(...args);
2017-12-13 14:13:13 +00:00
this.greuge = {
2018-10-24 12:10:48 +00:00
shipped: new Date(),
2020-03-17 10:17:50 +00:00
clientFk: this.$params.id
2017-12-13 14:13:13 +00:00
};
2017-12-04 07:17:29 +00:00
}
2018-07-25 12:18:12 +00:00
goToIndex() {
return this.$state.go('client.card.greuge.index');
2018-07-25 12:18:12 +00:00
}
2017-12-04 07:17:29 +00:00
onSubmit() {
this.$.watcher.submit()
.then(() => this.goToIndex());
2017-12-04 07:17:29 +00:00
}
}
ngModule.vnComponent('vnClientGreugeCreate', {
2018-05-23 12:26:51 +00:00
template: require('./index.html'),
controller: Controller
2017-12-04 07:17:29 +00:00
});