salix/modules/route/front/basic-data/index.js

29 lines
628 B
JavaScript
Raw Normal View History

2019-03-23 15:16:47 +00:00
import ngModule from '../module';
2020-03-17 14:24:55 +00:00
import Section from 'salix/components/section';
2019-03-23 15:16:47 +00:00
2020-03-17 14:24:55 +00:00
class Controller extends Section {
2023-06-26 05:43:36 +00:00
$onInit() {
this.$http.post(`Vehicles/sorted`, {warehouseFk: this.vnConfig.warehouseFk})
.then(res => {
this.vehicles = res.data;
});
}
onSubmit() {
2020-03-17 14:24:55 +00:00
this.$.watcher.submit().then(() =>
this.card.reload()
);
}
}
2019-10-25 11:29:05 +00:00
ngModule.vnComponent('vnRouteBasicData', {
2019-03-23 15:16:47 +00:00
template: require('./index.html'),
controller: Controller,
2019-03-23 15:16:47 +00:00
bindings: {
route: '<'
},
require: {
card: '^vnRouteCard'
2019-03-23 15:16:47 +00:00
}
});