26 lines
673 B
JavaScript
26 lines
673 B
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
import './style.scss';
|
|
|
|
class Controller extends Section {
|
|
$onInit() {
|
|
this.$.params = {};
|
|
}
|
|
|
|
onSubmit() {
|
|
this.$.data = null;
|
|
this.$http.get(`Zones/getEvents`, {params: this.$.params})
|
|
.then(res => {
|
|
let data = res.data;
|
|
this.$.data = data;
|
|
if (!data.events.length)
|
|
this.vnApp.showMessage(this.$t('No service for the specified zone'));
|
|
});
|
|
}
|
|
}
|
|
|
|
ngModule.component('vnZoneDeliveryDays', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|