comparison client/src/components/fairway/AvailableFairwayDepthDialogue.vue @ 3296:fa7dc3f31ef3

available_fairwaydepth_vs_lnwl: POC etd.
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 16 May 2019 16:23:19 +0200
parents 5f0c6e931e7f
children 80037790032d 9dc7d803e51f
comparison
equal deleted inserted replaced
3295:a409608dd6b3 3296:fa7dc3f31ef3
126 <button 126 <button
127 @click="openFairwaydepth" 127 @click="openFairwaydepth"
128 :disabled="isComplete" 128 :disabled="isComplete"
129 class="btn btn-info btn-sm w-100" 129 class="btn btn-info btn-sm w-100"
130 > 130 >
131 <translate>Available Fairway Depth</translate> 131 <translate>Available fairway depth</translate>
132 </button>
133 </div>
134 <div class="mt-3">
135 <button
136 @click="openFairwaydepthLNWL"
137 :disabled="isComplete"
138 class="btn btn-info btn-sm w-100"
139 >
140 <translate>Available fairway depth vs LNWL</translate>
132 </button> 141 </button>
133 </div> 142 </div>
134 </div> 143 </div>
135 </div> 144 </div>
136 </div> 145 </div>
168 return { 177 return {
169 loading: false 178 loading: false
170 }; 179 };
171 }, 180 },
172 methods: { 181 methods: {
182 openFairwaydepthLNWL() {
183 this.loading = true;
184 this.$store
185 .dispatch("fairwayavailability/loadAvailableFairwayDepth", {
186 feature: this.selectedFairwayAvailabilityFeature,
187 from: this.from,
188 to: this.to,
189 frequency: this.frequency,
190 LOS: this.los
191 })
192 .then(() => {
193 this.$store.commit(
194 "application/paneSetup",
195 "AVAILABLEFAIRWAYDEPTHLNWL"
196 );
197 })
198 .catch(error => {
199 console.log(error);
200 const { status, data } = error.response;
201 displayError({
202 title: this.$gettext("Backend Error"),
203 message: `${status}: ${data.message || data}`
204 });
205 })
206 .finally(() => {
207 this.loading = false;
208 });
209 },
173 openFairwaydepth() { 210 openFairwaydepth() {
174 this.loading = true; 211 this.loading = true;
175 this.$store 212 this.$store
176 .dispatch("fairwayavailability/loadAvailableFairwayDepth", { 213 .dispatch("fairwayavailability/loadAvailableFairwayDepth", {
177 feature: this.selectedFairwayAvailabilityFeature, 214 feature: this.selectedFairwayAvailabilityFeature,
195 this.loading = false; 232 this.loading = false;
196 }); 233 });
197 }, 234 },
198 close() { 235 close() {
199 this.$store.commit("application/showFairwayDepth", false); 236 this.$store.commit("application/showFairwayDepth", false);
237 this.$store.commit("application/showFairwayDepthLNWL", false);
200 }, 238 },
201 entrySelected() { 239 entrySelected() {
202 if (this.type === this.$options.BOTTLENECKS) { 240 if (this.type === this.$options.BOTTLENECKS) {
203 this.openLayersMap() 241 this.openLayersMap()
204 .getLayer("BOTTLENECKS") 242 .getLayer("BOTTLENECKS")