annotate client/src/components/fairway/AvailableFairwayDepthDialogue.vue @ 3309:80037790032d

client: fully implemented sections - added map layer with new style - implemented in identify tool, map popup and fairway availability dialog - added sidebar menu item
author Markus Kottlaender <markus@intevation.de>
date Fri, 17 May 2019 12:45:13 +0200
parents fa7dc3f31ef3
children 70676557a66f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
2 <div
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
3 :class="[
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
4 'box ui-element rounded bg-white text-nowrap',
3231
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
5 { expanded: showFairwayDepth }
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
6 ]"
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
7 >
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
8 <div style="width: 18rem">
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
9 <UIBoxHeader icon="chart-line" :title="label" :closeCallback="close" />
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
10 <div class="box-body">
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
11 <UISpinnerOverlay v-if="loading" />
3199
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
12 <div
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
13 class="mb-3 d-flex flex-row justify-content-between align-items-center"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
14 >
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
15 <div>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
16 <input :value="$options.BOTTLENECKS" type="radio" v-model="type" />
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
17 <small class="ml-1 text-muted">
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
18 <translate>Bottlenecks</translate>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
19 </small>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
20 </div>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
21 <div>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
22 <input :value="$options.STRETCHES" type="radio" v-model="type" />
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
23 <small class="ml-1 text-muted">
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
24 <translate>Stretches</translate>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
25 </small>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
26 </div>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
27 <div>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
28 <input :value="$options.SECTIONS" type="radio" v-model="type" />
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
29 <small class="ml-1 text-muted">
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
30 <translate>Sections</translate>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
31 </small>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
32 </div>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
33 </div>
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
34 <div class="d-flex flex-column">
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
35 <select
3236
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
36 :key="1"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
37 v-if="type === $options.BOTTLENECKS"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
38 @change="entrySelected"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
39 class="form-control form-control-sm font-weight-bold"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
40 v-model="selectedEntry"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
41 >
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
42 <option :value="null">{{ empty }}</option>
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
43 <optgroup
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
44 v-for="(bottlenecksForCountry, cc) in orderedBottlenecks"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
45 :key="cc"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
46 :label="cc"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
47 >
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
48 <option
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
49 v-for="bn in bottlenecksForCountry"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
50 :key="bn.properties.name"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
51 :value="bn"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
52 >
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
53 {{ bn.properties.name }}
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
54 </option>
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
55 </optgroup>
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
56 </select>
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
57 <select
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
58 :key="2"
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
59 v-else
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
60 @change="entrySelected"
3199
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
61 class="form-control form-control-sm font-weight-bold"
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
62 v-model="selectedEntry"
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
63 >
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
64 <option :value="null">{{ empty }}</option>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
65 <option
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
66 v-for="(entry, index) in entries"
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
67 :value="entry"
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
68 :key="index"
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
69 >{{ entry.properties.name }}</option
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
70 >
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
71 </select>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72 </div>
3185
505414dfe3e7 available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents: 3184
diff changeset
73 <div class="d-flex flex-column mt-3">
3199
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
74 <div class="d-flex flex-row w-100">
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
75 <div class="d-flex flex-column mb-3 w-50 mr-1">
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
76 <small class="my-auto text-muted"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
77 ><translate>Type</translate></small
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
78 >
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
79 <select
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
80 v-model="selectedFrequency"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
81 class="form-control form-control-sm"
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
82 >
3199
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
83 <option
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
84 v-for="(option, index) in $options.FREQUENCIES"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
85 :value="option"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
86 :key="index"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
87 ><translate>{{ option }}</translate></option
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
88 >
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
89 </select>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
90 </div>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
91 <div class="d-flex flex-column mb-3 w-50 ml-1">
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
92 <small class="my-auto text-muted"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
93 ><translate>LOS</translate></small
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
94 >
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
95 <select v-model="los" class="form-control form-control-sm">
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
96 <option value="1">1</option>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
97 <option value="2">2</option>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
98 <option value="3">3</option>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
99 </select>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
100 </div>
3185
505414dfe3e7 available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents: 3184
diff changeset
101 </div>
3199
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
102 <div class="d-flex flex-row w-100">
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
103 <div class="d-flex flex-column w-50 mr-1">
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
104 <small for="from" class="my-auto text-muted"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
105 ><translate>Date from</translate></small
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
106 ><input
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
107 id="from"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
108 v-model="fromDate"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
109 class="form-control form-control-sm"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
110 type="date"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
111 />
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
112 </div>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
113 <div class="d-flex flex-column w-50 ml-1">
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
114 <small for="to" class="my-auto text-muted"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
115 ><translate>Date to</translate></small
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
116 ><input
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
117 id="to"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
118 v-model="toDate"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
119 class="form-control form-control-sm"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
120 type="date"
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
121 />
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
122 </div>
3185
505414dfe3e7 available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents: 3184
diff changeset
123 </div>
505414dfe3e7 available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents: 3184
diff changeset
124 </div>
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
125 <div class="mt-3">
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
126 <button
3178
5ec34e08b01d available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents: 3175
diff changeset
127 @click="openFairwaydepth"
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
128 :disabled="isComplete"
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
129 class="btn btn-info btn-sm w-100"
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
130 >
3296
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
131 <translate>Available fairway depth</translate>
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
132 </button>
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
133 </div>
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
134 <div class="mt-3">
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
135 <button
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
136 @click="openFairwaydepthLNWL"
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
137 :disabled="isComplete"
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
138 class="btn btn-info btn-sm w-100"
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
139 >
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
140 <translate>Available fairway depth vs LNWL</translate>
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
141 </button>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
142 </div>
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
143 </div>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
144 </div>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
145 </div>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
146 </template>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
147
3199
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
148 <style lang="scss" scoped>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
149 input,
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
150 select {
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
151 font-size: 0.8em;
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
152 }
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
153 </style>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
154
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
155 <script>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
156 /* This is Free Software under GNU Affero General Public License v >= 3.0
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
157 * without warranty, see README.md and license for details.
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
158 *
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
159 * SPDX-License-Identifier: AGPL-3.0-or-later
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
160 * License-Filename: LICENSES/AGPL-3.0.txt
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
161 *
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
162 * Copyright (C) 2018 by via donau
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
163 * – Österreichische Wasserstraßen-Gesellschaft mbH
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
164 * Software engineering by Intevation GmbH
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
165 *
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
166 * Author(s):
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
167 * Markus Kottländer <markus.kottlaender@intevation.de>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
168 * Thomas Junk <thomas.junk@intevation.de>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
169 */
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
170
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
171 import app from "@/main";
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
172 import { displayError } from "@/lib/errors";
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
173 import { mapState, mapGetters } from "vuex";
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
174
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
175 export default {
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
176 data() {
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
177 return {
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
178 loading: false
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
179 };
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
180 },
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
181 methods: {
3296
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
182 openFairwaydepthLNWL() {
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
183 this.loading = true;
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
184 this.$store
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
185 .dispatch("fairwayavailability/loadAvailableFairwayDepth", {
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
186 feature: this.selectedFairwayAvailabilityFeature,
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
187 from: this.from,
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
188 to: this.to,
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
189 frequency: this.frequency,
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
190 LOS: this.los
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
191 })
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
192 .then(() => {
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
193 this.$store.commit(
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
194 "application/paneSetup",
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
195 "AVAILABLEFAIRWAYDEPTHLNWL"
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
196 );
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
197 })
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
198 .catch(error => {
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
199 console.log(error);
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
200 const { status, data } = error.response;
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
201 displayError({
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
202 title: this.$gettext("Backend Error"),
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
203 message: `${status}: ${data.message || data}`
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
204 });
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
205 })
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
206 .finally(() => {
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
207 this.loading = false;
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
208 });
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
209 },
3178
5ec34e08b01d available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents: 3175
diff changeset
210 openFairwaydepth() {
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
211 this.loading = true;
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
212 this.$store
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
213 .dispatch("fairwayavailability/loadAvailableFairwayDepth", {
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
214 feature: this.selectedFairwayAvailabilityFeature,
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
215 from: this.from,
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
216 to: this.to,
3198
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
217 frequency: this.frequency,
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
218 LOS: this.los
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
219 })
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
220 .then(() => {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
221 this.$store.commit("application/paneSetup", "AVAILABLEFAIRWAYDEPTH");
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
222 })
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
223 .catch(error => {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
224 console.log(error);
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
225 const { status, data } = error.response;
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
226 displayError({
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
227 title: this.$gettext("Backend Error"),
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
228 message: `${status}: ${data.message || data}`
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
229 });
3272
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
230 })
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
231 .finally(() => {
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
232 this.loading = false;
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
233 });
3178
5ec34e08b01d available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents: 3175
diff changeset
234 },
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
235 close() {
3231
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
236 this.$store.commit("application/showFairwayDepth", false);
3296
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
237 this.$store.commit("application/showFairwayDepthLNWL", false);
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
238 },
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
239 entrySelected() {
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
240 if (this.type === this.$options.BOTTLENECKS) {
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
241 this.openLayersMap()
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
242 .getLayer("BOTTLENECKS")
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
243 .setVisible(true);
3178
5ec34e08b01d available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents: 3175
diff changeset
244 if (this.showProfiles) {
5ec34e08b01d available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents: 3175
diff changeset
245 this.$store.dispatch(
5ec34e08b01d available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents: 3175
diff changeset
246 "bottlenecks/setSelectedBottleneck",
3183
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
247 this.selectedFairwayAvailabilityFeature.properties.name
3178
5ec34e08b01d available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents: 3175
diff changeset
248 );
5ec34e08b01d available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents: 3175
diff changeset
249 }
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
250 }
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
251 if (this.type === this.$options.STRETCHES) {
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
252 this.openLayersMap()
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
253 .getLayer("STRETCHES")
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
254 .setVisible(true);
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
255 }
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
256 if (this.type === this.$options.SECTIONS) {
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
257 this.openLayersMap()
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
258 .getLayer("SECTIONS")
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
259 .setVisible(true);
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
260 }
3183
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
261 if (this.selectedFairwayAvailabilityFeature) {
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
262 this.$store.dispatch("map/moveToFeauture", {
3183
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
263 feature: this.selectedFairwayAvailabilityFeature,
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
264 zoom: 17,
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
265 preventZoomOut: true
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
266 });
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
267 }
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
268 },
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
269 setSelectedBottleneck() {
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
270 const bn = this.bottlenecksList.filter(
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
271 x => x.properties.name === this.selectedBottleneck
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
272 )[0];
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
273 this.$store.commit(
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
274 "fairwayavailability/setSelectedFairwayAvailability",
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
275 bn
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
276 );
3272
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
277 },
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
278 setSelectedStretch() {
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
279 const stretch = this.stretches.find(x => x.id === this.selectedStretchId);
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
280 this.$store.commit(
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
281 "fairwayavailability/setSelectedFairwayAvailability",
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
282 stretch
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
283 );
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
284 },
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
285 setSelectedSection() {
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
286 const section = this.sections.find(x => x.id === this.selectedSectionId);
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
287 this.$store.commit(
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
288 "fairwayavailability/setSelectedFairwayAvailability",
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
289 section
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
290 );
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
291 }
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
292 },
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
293 computed: {
3231
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
294 ...mapState("application", [
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
295 "showFairwayDepth",
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
296 "paneSetup",
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
297 "showProfiles"
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
298 ]),
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
299 ...mapState("fairwayavailability", [
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
300 "selectedFairwayAvailabilityFeature",
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
301 "from",
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
302 "to",
3198
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
303 "frequency",
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
304 "LOS"
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
305 ]),
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
306 ...mapState("imports", [
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
307 "stretches",
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
308 "sections",
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
309 "selectedStretchId",
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
310 "selectedSectionId"
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
311 ]),
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
312 ...mapState("bottlenecks", ["bottlenecksList", "selectedBottleneck"]),
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
313 ...mapGetters("map", ["openLayersMap"]),
3236
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
314 ...mapGetters("bottlenecks", ["orderedBottlenecks"]),
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
315 isComplete() {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
316 return (
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
317 this.from == null ||
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
318 this.to == null ||
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
319 this.frequency == null ||
3214
861329d535b2 statistics: guarg for los
Thomas Junk <thomas.junk@intevation.de>
parents: 3207
diff changeset
320 this.los == null ||
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
321 this.selectedFairwayAvailabilityFeature == null
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
322 );
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
323 },
3205
bf571429515f client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents: 3199
diff changeset
324 type: {
bf571429515f client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents: 3199
diff changeset
325 get() {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
326 return this.$store.state.fairwayavailability.type;
3205
bf571429515f client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents: 3199
diff changeset
327 },
bf571429515f client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents: 3199
diff changeset
328 set(type) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
329 this.$store.commit("fairwayavailability/type", type);
3205
bf571429515f client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents: 3199
diff changeset
330 }
bf571429515f client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents: 3199
diff changeset
331 },
3198
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
332 los: {
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
333 get() {
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
334 return this.LOS;
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
335 },
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
336 set(value) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
337 this.$store.commit("fairwayavailability/setLOS", value);
3198
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
338 }
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
339 },
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
340 fromDate: {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
341 get() {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
342 return this.from;
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
343 },
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
344 set(value) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
345 this.$store.commit("fairwayavailability/setFrom", value);
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
346 }
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
347 },
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
348 toDate: {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
349 get() {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
350 return this.to;
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
351 },
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
352 set(value) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
353 this.$store.commit("fairwayavailability/setTo", value);
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
354 }
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
355 },
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
356 selectedFrequency: {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
357 get() {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
358 return this.frequency;
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
359 },
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
360 set(value) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
361 this.$store.commit("fairwayavailability/setFrequency", value);
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
362 }
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
363 },
3183
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
364 selectedEntry: {
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
365 get() {
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
366 return this.selectedFairwayAvailabilityFeature;
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
367 },
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
368 set(feature) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
369 this.$store.commit(
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
370 "fairwayavailability/setSelectedFairwayAvailability",
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
371 feature
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
372 );
3183
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
373 }
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
374 },
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
375 entries() {
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
376 if (this.type === this.$options.BOTTLENECKS) return this.bottlenecksList;
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
377 if (this.type === this.$options.STRETCHES) return this.stretches;
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
378 if (this.type === this.$options.SECTIONS) return this.sections;
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
379 return [];
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
380 },
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
381 label() {
3294
5f0c6e931e7f Available_fairway_depth: label
Thomas Junk <thomas.junk@intevation.de>
parents: 3272
diff changeset
382 return this.$gettext("Available fairway depth");
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
383 },
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
384 empty() {
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
385 if (this.type === this.$options.BOTTLENECKS)
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
386 return this.$gettext("Select bottleneck");
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
387 if (this.type === this.$options.STRETCHES)
3238
94e966ebef35 available_fairway_depth: fix typo
Thomas Junk <thomas.junk@intevation.de>
parents: 3237
diff changeset
388 return this.$gettext("Select stretch");
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
389 return this.$gettext("Select section");
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
390 }
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
391 },
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
392 watch: {
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
393 selectedBottleneck() {
3174
aeb9d6fc640a statistics: sprinkled more fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3173
diff changeset
394 this.type = this.$options.BOTTLENECKS;
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
395 this.setSelectedBottleneck();
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
396 },
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
397 type() {
3175
296392d4539c client: statistics dialog: fix resetting selectedEntry
Markus Kottlaender <markus@intevation.de>
parents: 3174
diff changeset
398 if (this.type === this.$options.BOTTLENECKS && this.selectedBottleneck) {
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
399 this.setSelectedBottleneck();
3272
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
400 } else if (
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
401 this.type === this.$options.STRETCHES &&
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
402 this.selectedStretchId
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
403 ) {
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
404 this.openLayersMap()
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
405 .getLayer("STRETCHES")
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
406 .setVisible(true);
3272
a9d047ccf408 client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents: 3238
diff changeset
407 this.setSelectedStretch();
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
408 } else if (
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
409 this.type === this.$options.SECTIONS &&
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
410 this.selectedSectionId
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
411 ) {
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
412 this.openLayersMap()
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
413 .getLayer("SECTIONS")
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
414 .setVisible(true);
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
415 this.setSelectedSection();
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
416 } else {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
417 this.$store.commit(
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
418 "fairwayavailability/setSelectedFairwayAvailability",
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
419 null
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
420 );
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
421 }
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
422 },
3237
86e108358216 available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents: 3236
diff changeset
423 showFairwayDepth() {
86e108358216 available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents: 3236
diff changeset
424 if (this.showFairwayDepth) {
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
425 this.loading = true;
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
426 Promise.all([
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
427 this.$store.dispatch("bottlenecks/loadBottlenecksList"),
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
428 this.$store.dispatch("imports/loadStretches"),
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
429 this.$store.dispatch("imports/loadSections")
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
430 ])
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
431 .then(() => {
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
432 if (this.selectedBottleneck) this.setSelectedBottleneck();
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
433 })
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
434 .finally(() => (this.loading = false));
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
435 }
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
436 }
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
437 },
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
438 BOTTLENECKS: "bottlenecks",
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
439 SECTIONS: "sections",
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
440 STRETCHES: "stretches",
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
441 AVAILABLEFAIRWAYDEPTH: app.$gettext("Available Fairway Depth"),
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
442 FREQUENCIES: {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
443 MONTHLY: "monthly",
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
444 QUARTERLY: "quarterly",
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
445 YEARLY: "yearly"
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
446 }
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
447 };
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
448 </script>