2018-12-04 12:18:27 +00:00
|
|
|
import ngModule from '../module';
|
2020-03-18 11:55:22 +00:00
|
|
|
import Section from 'salix/components/section';
|
2018-09-19 13:05:07 +00:00
|
|
|
|
2020-03-18 11:55:22 +00:00
|
|
|
export default class Controller extends Section {
|
|
|
|
$onInit() {
|
2018-09-19 13:05:07 +00:00
|
|
|
this.zone = {
|
|
|
|
travelingDays: 0,
|
2019-03-13 10:27:45 +00:00
|
|
|
price: 0.20,
|
|
|
|
bonus: 0.20,
|
2018-09-24 12:51:27 +00:00
|
|
|
hour: new Date()
|
2018-09-19 13:05:07 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
onSubmit() {
|
2020-03-18 11:55:22 +00:00
|
|
|
return this.$.watcher.submit().then(res =>
|
|
|
|
this.$state.go('zone.card.location', {id: res.data.id})
|
|
|
|
);
|
2018-09-19 13:05:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ngModule.component('vnZoneCreate', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|