From 766617f871f8e60f0b7b5b0a6156a62877fac3cd Mon Sep 17 00:00:00 2001 From: jorgebl Date: Wed, 24 Mar 2021 14:22:23 +0100 Subject: [PATCH] Correctly terminology --- modules/zone/front/delivery-days/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/zone/front/delivery-days/index.js b/modules/zone/front/delivery-days/index.js index ff369217e1..8a278db5db 100644 --- a/modules/zone/front/delivery-days/index.js +++ b/modules/zone/front/delivery-days/index.js @@ -7,17 +7,20 @@ class Controller extends Section { super($element, $scope); this.$location = $location; } + $onInit() { this.$.params = this.$location.search(); if (!this.$.params) this.$.params = {}; this.$.data = null; + this.$http.get(`Zones/getEvents`, {params: this.$.params}) .then(res => { const data = res.data; this.$.data = data; const agencyModeFk = this.$.params.agencyModeFk; const geoFk = this.$.params.geoFk; + this.$location.path('/zone/delivery-days').search({agencyModeFk, geoFk}); }); } @@ -25,14 +28,17 @@ class Controller extends Section { $postLink() { this.deliveryMethodFk = 'delivery'; } + onSubmit() { this.$.data = null; + this.$http.get(`Zones/getEvents`, {params: this.$.params}) .then(res => { const data = res.data; this.$.data = data; const agencyModeFk = this.$.params.agencyModeFk; const geoFk = this.$.params.geoFk; + this.$location.path('/zone/delivery-days').search({agencyModeFk, geoFk}); if (!data.events.length) this.vnApp.showMessage(this.$t('No service for the specified zone'));