salix/modules/route/front/create/index.js

21 lines
572 B
JavaScript

import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
onSubmit() {
this.$.watcher.submit().then(
res => {
this.$http.post(`Routes/${res.data.id}/updateWorkCenter`, null)
.then(() => {
this.$state.go('route.card.summary', {id: res.data.id});
});
}
);
}
}
ngModule.vnComponent('vnRouteCreate', {
template: require('./index.html'),
controller: Controller
});