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

25 lines
563 B
JavaScript

import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
$onInit() {
this.zone = {
travelingDays: 0,
price: 0.20,
bonus: 0.20,
hour: new Date()
};
}
onSubmit() {
return this.$.watcher.submit().then(res =>
this.$state.go('zone.card.location', {id: res.data.id})
);
}
}
ngModule.vnComponent('vnZoneCreate', {
template: require('./index.html'),
controller: Controller
});