25 lines
565 B
JavaScript
25 lines
565 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: Date.vnNew()
|
|
};
|
|
}
|
|
|
|
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
|
|
});
|