# HG changeset patch # User Thomas Junk # Date 1558016599 -7200 # Node ID fa7dc3f31ef36b01b1c3dcdc4566acd3883f4597 # Parent a409608dd6b3bd70dfbebe1b3870922a1658039f available_fairwaydepth_vs_lnwl: POC etd. diff -r a409608dd6b3 -r fa7dc3f31ef3 client/src/components/Main.vue --- a/client/src/components/Main.vue Thu May 16 15:36:11 2019 +0200 +++ b/client/src/components/Main.vue Thu May 16 16:23:19 2019 +0200 @@ -97,6 +97,12 @@ : ["w-50 h-100", "w-50 h-100"]; } + if (this.paneSetup === "AVAILABLEFAIRWAYDEPTHLNWL") { + return [1, 3].includes(this.paneRotate) + ? ["w-100 h-50", "w-100 h-50"] + : ["w-50 h-100", "w-50 h-100"]; + } + if (this.paneSetup === "COMPARESURVEYS_FAIRWAYPROFILE") { return [1, 3].includes(this.paneRotate) ? ["wh-50", "wh-50", "w-100 h-50"] diff -r a409608dd6b3 -r fa7dc3f31ef3 client/src/components/Pane.vue --- a/client/src/components/Pane.vue Thu May 16 15:36:11 2019 +0200 +++ b/client/src/components/Pane.vue Thu May 16 16:23:19 2019 +0200 @@ -26,6 +26,8 @@ Map: () => import("./map/Map"), Fairwayprofile: () => import("./fairway/Fairwayprofile"), AvailableFairwayDepth: () => import("./fairway/AvailableFairwayDepth"), + AvailableFairwayDepthLNWL: () => + import("./fairway/AvailableFairwayDepthLNWL"), Waterlevel: () => import("./gauge/Waterlevel"), HydrologicalConditions: () => import("./gauge/HydrologicalConditions") } diff -r a409608dd6b3 -r fa7dc3f31ef3 client/src/components/fairway/AvailableFairwayDepthDialogue.vue --- a/client/src/components/fairway/AvailableFairwayDepthDialogue.vue Thu May 16 15:36:11 2019 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepthDialogue.vue Thu May 16 16:23:19 2019 +0200 @@ -128,7 +128,16 @@ :disabled="isComplete" class="btn btn-info btn-sm w-100" > - Available Fairway Depth + Available fairway depth + + +
+
@@ -170,6 +179,34 @@ }; }, methods: { + openFairwaydepthLNWL() { + this.loading = true; + this.$store + .dispatch("fairwayavailability/loadAvailableFairwayDepth", { + feature: this.selectedFairwayAvailabilityFeature, + from: this.from, + to: this.to, + frequency: this.frequency, + LOS: this.los + }) + .then(() => { + this.$store.commit( + "application/paneSetup", + "AVAILABLEFAIRWAYDEPTHLNWL" + ); + }) + .catch(error => { + console.log(error); + const { status, data } = error.response; + displayError({ + title: this.$gettext("Backend Error"), + message: `${status}: ${data.message || data}` + }); + }) + .finally(() => { + this.loading = false; + }); + }, openFairwaydepth() { this.loading = true; this.$store @@ -197,6 +234,7 @@ }, close() { this.$store.commit("application/showFairwayDepth", false); + this.$store.commit("application/showFairwayDepthLNWL", false); }, entrySelected() { if (this.type === this.$options.BOTTLENECKS) { diff -r a409608dd6b3 -r fa7dc3f31ef3 client/src/components/fairway/AvailableFairwayDepthLNWL.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/fairway/AvailableFairwayDepthLNWL.vue Thu May 16 16:23:19 2019 +0200 @@ -0,0 +1,531 @@ + + + + + diff -r a409608dd6b3 -r fa7dc3f31ef3 client/src/components/paneSetups.js --- a/client/src/components/paneSetups.js Thu May 16 15:36:11 2019 +0200 +++ b/client/src/components/paneSetups.js Thu May 16 16:23:19 2019 +0200 @@ -18,6 +18,14 @@ } }; +export const AVAILABLEFAIRWAYDEPTHLNWL = { + main, + availablefairwaydepth: { + id: "availablefairwaydepthlnwl", + component: "AvailableFairwayDepthLNWL" + } +}; + export const COMPARESURVEYS_FAIRWAYPROFILE = { main, compare: { id: "compare-survey", component: "Map" }, diff -r a409608dd6b3 -r fa7dc3f31ef3 client/src/store/application.js --- a/client/src/store/application.js Thu May 16 15:36:11 2019 +0200 +++ b/client/src/store/application.js Thu May 16 16:23:19 2019 +0200 @@ -36,6 +36,7 @@ showProfiles: false, showGauges: false, showFairwayDepth: false, + showFairwayDepthLNWL: false, contextBoxContent: null, // bottlenecks, imports, staging expandToolbar: false, countries: ["AT", "SK", "HU", "HR", "RS", "BiH", "BG", "RO", "UA"], @@ -117,6 +118,9 @@ showFairwayDepth: (state, show) => { state.showFairwayDepth = show; }, + showFairwayDepthLNWL: (state, show) => { + state.showFairwayDepthLNWL = show; + }, contextBoxContent: (state, context) => { state.contextBoxContent = context; if (context) {