27 lines
589 B
JavaScript
27 lines
589 B
JavaScript
import ngModule from '../../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
class Controller extends Section {
|
|
constructor(...args) {
|
|
super(...args);
|
|
this.greuge = {
|
|
shipped: Date.vnNew(),
|
|
clientFk: this.$params.id
|
|
};
|
|
}
|
|
|
|
goToIndex() {
|
|
return this.$state.go('client.card.greuge.index');
|
|
}
|
|
|
|
onSubmit() {
|
|
this.$.watcher.submit()
|
|
.then(() => this.goToIndex());
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnClientGreugeCreate', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|