2019-03-22 15:47:20 +00:00
|
|
|
import ngModule from '../module';
|
2020-03-17 14:24:55 +00:00
|
|
|
import Section from 'salix/components/section';
|
2019-03-22 15:47:20 +00:00
|
|
|
|
2020-03-17 14:24:55 +00:00
|
|
|
export default class Controller extends Section {
|
2019-03-22 15:47:20 +00:00
|
|
|
onSubmit() {
|
2020-03-17 14:24:55 +00:00
|
|
|
this.$.watcher.submit().then(
|
2022-07-05 08:19:06 +00:00
|
|
|
res => {
|
2022-07-19 12:40:41 +00:00
|
|
|
this.$http.post(`Routes/${res.data.id}/updateWorkCenter`, null)
|
|
|
|
.then(() => {
|
|
|
|
this.$state.go('route.card.summary', {id: res.data.id});
|
|
|
|
});
|
2022-07-05 08:19:06 +00:00
|
|
|
}
|
2019-03-22 15:47:20 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnRouteCreate', {
|
2019-03-22 15:47:20 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|