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 {
|
2020-03-09 08:00:03 +00:00
|
|
|
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() {
|
2020-03-09 08:00:03 +00:00
|
|
|
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() {
|
2020-03-09 08:00:03 +00:00
|
|
|
this.$.watcher.submit()
|
|
|
|
.then(() => this.goToIndex());
|
2017-12-04 07:17:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +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
|
|
|
});
|