From ce43bd63c955f8dfbae001314ac5166b57d3cb3b Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Fri, 22 Mar 2019 16:47:20 +0100 Subject: [PATCH] #1234 route.create --- modules/route/front/create/index.html | 60 +++++++++++++++++++++++++++ modules/route/front/create/index.js | 20 +++++++++ 2 files changed, 80 insertions(+) create mode 100644 modules/route/front/create/index.html create mode 100644 modules/route/front/create/index.js diff --git a/modules/route/front/create/index.html b/modules/route/front/create/index.html new file mode 100644 index 000000000..23f5033a2 --- /dev/null +++ b/modules/route/front/create/index.html @@ -0,0 +1,60 @@ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/modules/route/front/create/index.js b/modules/route/front/create/index.js new file mode 100644 index 000000000..03fe574fc --- /dev/null +++ b/modules/route/front/create/index.js @@ -0,0 +1,20 @@ +import ngModule from '../module'; + +export default class Controller { + constructor($scope, $state) { + this.$scope = $scope; + this.$state = $state; + } + + onSubmit() { + this.$scope.watcher.submit().then( + res => this.$state.go('route.card.summary', {id: res.data.id}) + ); + } +} +Controller.$inject = ['$scope', '$state']; + +ngModule.component('vnRouteCreate', { + template: require('./index.html'), + controller: Controller +});