annotate client/src/components/fairway/AvailableFairwayDepthDialogue.vue @ 3667:c91bcb92e0b7

client: fix rendering of diagram on PDF (Fairwayprofile)
author Fadi Abbud <fadi.abbud@intevation.de>
date Mon, 17 Jun 2019 11:00:21 +0200
parents c69c01045498
children 017827d9bb14
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" />
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
12 <div class="mb-2 d-flex justify-content-between align-items-center">
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
13 <div>
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
14 <input :value="$options.BOTTLENECK" type="radio" v-model="type" />
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
15 <small class="ml-1 text-muted">
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
16 <translate>Bottlenecks</translate>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
17 </small>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
18 </div>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
19 <div>
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
20 <input :value="$options.STRETCH" type="radio" v-model="type" />
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
21 <small class="ml-1 text-muted">
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
22 <translate>Stretches</translate>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
23 </small>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
24 </div>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
25 <div>
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
26 <input :value="$options.SECTION" type="radio" v-model="type" />
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
27 <small class="ml-1 text-muted">
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
28 <translate>Sections</translate>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
29 </small>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
30 </div>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
31 </div>
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
32 <select
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
33 v-if="type === $options.BOTTLENECK"
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
34 @change="entrySelected"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
35 class="form-control font-weight-bold"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
36 v-model="selectedEntry"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
37 >
3315
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
38 <option :value="null">{{ placeholder }}</option>
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
39 <optgroup
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
40 v-for="(bottlenecksForCountry, cc) in orderedBottlenecks"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
41 :key="cc"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
42 :label="cc"
3236
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
43 >
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
44 <option
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
45 v-for="bn in bottlenecksForCountry"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
46 :key="bn.properties.name"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
47 :value="bn"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
48 >
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
49 {{ bn.properties.name }}
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
50 </option>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
51 </optgroup>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
52 </select>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
53 <select
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
54 v-else-if="type === $options.STRETCH"
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
55 @change="entrySelected"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
56 class="form-control font-weight-bold"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
57 v-model="selectedEntry"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
58 >
3315
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
59 <option :value="null">{{ placeholder }}</option>
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
60 <option
3316
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
61 v-for="stretch in stretches"
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
62 :value="stretch"
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
63 :key="stretch.id"
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
64 >
3316
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
65 {{ stretch.properties.name }}
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
66 </option>
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
67 </select>
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
68 <select
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
69 v-else-if="type === $options.SECTION"
3316
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
70 @change="entrySelected"
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
71 class="form-control font-weight-bold"
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
72 v-model="selectedEntry"
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
73 >
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
74 <option :value="null">{{ placeholder }}</option>
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
75 <option
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
76 v-for="section in sections"
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
77 :value="section"
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
78 :key="section.id"
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
79 >
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
80 {{ section.properties.name }}
c7b48272e11e client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents: 3315
diff changeset
81 </option>
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
82 </select>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
83 <div class="d-flex mt-2">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
84 <div class="d-flex flex-column w-50 mr-1">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
85 <small class="my-auto text-muted">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
86 <translate>Type</translate>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
87 </small>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
88 <select
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
89 v-model="selectedFrequency"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
90 class="form-control form-control-sm"
3236
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
91 >
5914d615f703 available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents: 3233
diff changeset
92 <option
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
93 v-for="(option, index) in $options.FREQUENCIES"
3572
c69c01045498 client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3486
diff changeset
94 :value="index"
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
95 :key="index"
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
96 >
3572
c69c01045498 client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3486
diff changeset
97 {{ option }}
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
98 </option>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
99 </select>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
100 </div>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
101 <div class="d-flex flex-column w-50 ml-1">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
102 <small class="my-auto text-muted"><translate>LOS</translate></small>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
103 <select v-model="los" class="form-control form-control-sm">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
104 <option value="1">1</option>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
105 <option value="2">2</option>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
106 <option value="3">3</option>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
107 </select>
3185
505414dfe3e7 available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents: 3184
diff changeset
108 </div>
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
109 </div>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
110 <div class="d-flex mt-2">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
111 <div class="d-flex flex-column w-50 mr-1">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
112 <small for="from" class="my-auto text-muted">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
113 <translate>Date from</translate>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
114 </small>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
115 <input
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
116 id="from"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
117 v-model="fromDate"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
118 class="form-control form-control-sm"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
119 type="date"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
120 />
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
121 </div>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
122 <div class="d-flex flex-column w-50 ml-1">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
123 <small for="to" class="my-auto text-muted">
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
124 <translate>Date to</translate>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
125 </small>
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
126 <input
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
127 id="to"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
128 v-model="toDate"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
129 class="form-control form-control-sm"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
130 type="date"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
131 />
3185
505414dfe3e7 available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents: 3184
diff changeset
132 </div>
505414dfe3e7 available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents: 3184
diff changeset
133 </div>
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
134
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
135 <div v-if="depthLimitVisible" class="d-flex mt-2" :key="1">
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
136 <div class="d-flex flex-column w-50 mr-1">
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
137 <small for="from" class="my-auto text-muted">
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
138 <translate>Depthlimit 1 (in cm)</translate>
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
139 </small>
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
140 <input
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
141 id="depthlimit1"
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
142 v-model.number="depthLimit1"
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
143 class="form-control form-control-sm"
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
144 type="number"
3354
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
145 min="0"
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
146 />
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
147 </div>
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
148 <div
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
149 v-if="depthLimitVisible"
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
150 class="d-flex flex-column w-50 ml-1"
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
151 :key="2"
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
152 >
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
153 <small for="to" class="my-auto text-muted">
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
154 <translate>Depthlimit 2 ( in cm)</translate>
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
155 </small>
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
156 <input
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
157 id="depthlimit2"
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
158 v-model.number="depthLimit2"
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
159 class="form-control form-control-sm"
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
160 type="number"
3354
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
161 min="0"
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
162 />
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
163 </div>
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
164 </div>
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
165 <div v-if="widthLimitVisible" class="d-flex mt-2" :key="3">
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
166 <div class="d-flex flex-column w-50 mr-1">
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
167 <small for="from" class="my-auto text-muted">
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
168 <translate>Widthlimit 1</translate>
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
169 </small>
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
170 <input
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
171 id="widthLimit"
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
172 v-model.number="widthLimit1"
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
173 class="form-control form-control-sm"
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
174 type="number"
3354
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
175 min="0"
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
176 />
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
177 </div>
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
178 <div
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
179 v-if="widthLimitVisible"
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
180 class="d-flex flex-column w-50 mr-1"
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
181 :key="4"
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
182 >
3354
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
183 <small for="from" class="my-auto text-muted">
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
184 <translate>Widthlimit 2</translate>
3354
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
185 </small>
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
186 <input
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
187 id="widthLimit"
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
188 v-model.number="widthLimit2"
3354
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
189 class="form-control form-control-sm"
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
190 type="number"
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
191 min="0"
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
192 />
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
193 </div>
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
194 </div>
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
195
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
196 <div class="mt-3">
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
197 <button
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
198 @click="openFairwaydepthDiagram"
3315
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
199 :disabled="!isComplete"
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
200 class="btn btn-info btn-sm d-block w-100"
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
201 >
3296
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
202 <translate>Available fairway depth</translate>
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
203 </button>
fa7dc3f31ef3 available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents: 3294
diff changeset
204 <button
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
205 @click="openFairwaydepthLNWLDiagram"
3315
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
206 :disabled="!isComplete"
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
207 class="btn btn-info btn-sm d-block w-100 mt-2"
3296
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 <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
210 </button>
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
211 </div>
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
212 </div>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
213 </div>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
214 </div>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
215 </template>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
216
3199
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
217 <style lang="scss" scoped>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
218 input,
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
219 select {
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
220 font-size: 0.8em;
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
221 }
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
222 </style>
25a26f666ee8 statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents: 3198
diff changeset
223
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
224 <script>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
225 /* 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
226 * without warranty, see README.md and license for details.
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
227 *
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
228 * SPDX-License-Identifier: AGPL-3.0-or-later
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
229 * License-Filename: LICENSES/AGPL-3.0.txt
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
230 *
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
231 * Copyright (C) 2018 by via donau
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
232 * – Österreichische Wasserstraßen-Gesellschaft mbH
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
233 * Software engineering by Intevation GmbH
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
234 *
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
235 * Author(s):
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
236 * Markus Kottländer <markus.kottlaender@intevation.de>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
237 * Thomas Junk <thomas.junk@intevation.de>
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
238 */
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
239
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
240 import app from "@/main";
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
241 import { displayError } from "@/lib/errors";
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
242 import { mapState, mapGetters } from "vuex";
3572
c69c01045498 client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3486
diff changeset
243 import { LIMITINGFACTORS } from "@/store/fairwayavailability";
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
244
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
245 export default {
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
246 data() {
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
247 return {
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
248 loading: false
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
249 };
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
250 },
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
251 computed: {
3231
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
252 ...mapState("application", [
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
253 "showFairwayDepth",
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
254 "paneSetup",
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
255 "showProfiles"
2dab20bed284 show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents: 3214
diff changeset
256 ]),
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
257 ...mapState("fairwayavailability", [
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
258 "selectedFairwayAvailabilityFeature",
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
259 "from",
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
260 "to",
3198
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
261 "frequency",
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
262 "LOS",
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
263 "depthlimit1",
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
264 "depthlimit2",
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
265 "widthlimit1",
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
266 "widthlimit2"
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
267 ]),
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
268 ...mapState("imports", [
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
269 "stretches",
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
270 "sections",
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
271 "selectedStretchId",
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
272 "selectedSectionId"
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
273 ]),
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
274 ...mapState("bottlenecks", ["bottlenecksList", "selectedBottleneck"]),
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
275 ...mapGetters("map", ["openLayersMap"]),
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
276 ...mapGetters("bottlenecks", [
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
277 "orderedBottlenecks",
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
278 "limitingFactorsPerBottleneck"
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
279 ]),
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
280 depthLimitVisible() {
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
281 if (this.type !== this.$options.BOTTLENECK) return true;
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
282 if (
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
283 this.selectedEntry &&
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
284 this.limitingFactorsPerBottleneck[this.selectedEntry.properties.name] ==
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
285 this.$options.LIMITINGFACTORS.DEPTH
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
286 )
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
287 return true;
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
288 return false;
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
289 },
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
290 widthLimitVisible() {
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
291 if (this.type !== this.$options.BOTTLENECK) return true;
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
292 if (
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
293 this.selectedEntry &&
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
294 this.limitingFactorsPerBottleneck[this.selectedEntry.properties.name] ==
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
295 this.$options.LIMITINGFACTORS.WIDTH
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
296 )
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
297 return true;
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
298 },
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
299 limitingFactor() {
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
300 if (this.type !== this.$options.BOTTLENECK) return;
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
301 if (this.selectedEntry)
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
302 return this.limitingFactorsPerBottleneck[
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
303 this.selectedEntry.properties.name
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
304 ];
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
305 },
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
306 isComplete() {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
307 return (
3315
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
308 this.from !== null &&
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
309 this.to !== null &&
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
310 this.frequency !== null &&
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
311 this.los !== null &&
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
312 this.selectedFairwayAvailabilityFeature !== null
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
313 );
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
314 },
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
315 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
316 get() {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
317 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
318 },
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
319 set(type) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
320 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
321 }
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
322 },
3198
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
323 los: {
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
324 get() {
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
325 return this.LOS;
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
326 },
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
327 set(value) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
328 this.$store.commit("fairwayavailability/setLOS", value);
3198
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
329 }
b0328646e34f statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3191
diff changeset
330 },
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
331 fromDate: {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
332 get() {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
333 return this.from;
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
334 },
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
335 set(value) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
336 this.$store.commit("fairwayavailability/setFrom", value);
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
337 }
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
338 },
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
339 toDate: {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
340 get() {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
341 return this.to;
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
342 },
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
343 set(value) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
344 this.$store.commit("fairwayavailability/setTo", value);
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
345 }
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
346 },
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
347 depthLimit1: {
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
348 get() {
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
349 return this.depthlimit1;
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
350 },
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
351 set(value) {
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
352 this.$store.commit("fairwayavailability/setDepthlimit1", value);
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
353 }
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
354 },
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
355 depthLimit2: {
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
356 get() {
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
357 return this.depthlimit2;
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
358 },
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
359 set(value) {
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
360 this.$store.commit("fairwayavailability/setDepthlimit2", value);
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
361 }
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
362 },
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
363 widthLimit1: {
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
364 get() {
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
365 return this.widthlimit1;
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
366 },
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
367 set(value) {
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
368 this.$store.commit("fairwayavailability/setWidthlimit1", value);
3354
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
369 }
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
370 },
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
371 widthLimit2: {
3354
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
372 get() {
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
373 return this.widthlimit2;
3354
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
374 },
e12e8bf044a6 available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents: 3352
diff changeset
375 set(value) {
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
376 this.$store.commit("fairwayavailability/setWidthlimit2", value);
3352
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
377 }
399a2eb496ee available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents: 3325
diff changeset
378 },
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
379 selectedFrequency: {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
380 get() {
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
381 return this.frequency;
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
382 },
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
383 set(value) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
384 this.$store.commit("fairwayavailability/setFrequency", value);
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
385 }
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
386 },
3183
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
387 selectedEntry: {
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
388 get() {
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
389 return this.selectedFairwayAvailabilityFeature;
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
390 },
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
391 set(feature) {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
392 this.$store.commit(
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
393 "fairwayavailability/setSelectedFairwayAvailability",
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
394 feature
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
395 );
3183
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
396 }
f64cc98746a1 statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents: 3178
diff changeset
397 },
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
398 label() {
3294
5f0c6e931e7f Available_fairway_depth: label
Thomas Junk <thomas.junk@intevation.de>
parents: 3272
diff changeset
399 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
400 },
3315
d61b88439c85 client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents: 3314
diff changeset
401 placeholder() {
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
402 if (this.type === this.$options.BOTTLENECK)
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
403 return this.$gettext("Select bottleneck");
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
404 if (this.type === this.$options.STRETCH)
3238
94e966ebef35 available_fairway_depth: fix typo
Thomas Junk <thomas.junk@intevation.de>
parents: 3237
diff changeset
405 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
406 return this.$gettext("Select section");
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
407 }
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
408 },
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
409 watch: {
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
410 selectedBottleneck() {
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
411 this.type = this.$options.BOTTLENECK;
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
412 this.setSelectedBottleneck();
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
413 },
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
414 selectedStretchId() {
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
415 this.type = this.$options.STRETCH;
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
416 this.setSelectedStretch();
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
417 },
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
418 selectedSectionId() {
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
419 this.type = this.$options.SECTION;
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
420 this.setSelectedSection();
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
421 },
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
422 type(type) {
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
423 if (type === this.$options.BOTTLENECK && this.selectedBottleneck) {
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
424 this.openLayersMap()
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
425 .getLayer("BOTTLENECKS")
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
426 .setVisible(true);
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
427 this.setSelectedBottleneck();
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
428 } else if (type === this.$options.STRETCH && this.selectedStretchId) {
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
429 this.openLayersMap()
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
430 .getLayer("STRETCHES")
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
431 .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
432 this.setSelectedStretch();
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
433 } else if (type === this.$options.SECTION && this.selectedSectionId) {
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
434 this.openLayersMap()
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
435 .getLayer("SECTIONS")
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
436 .setVisible(true);
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
437 this.setSelectedSection();
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
438 } else {
3207
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
439 this.$store.commit(
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
440 "fairwayavailability/setSelectedFairwayAvailability",
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
441 null
ba7bc3740fb3 client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents: 3205
diff changeset
442 );
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
443 }
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
444 },
3237
86e108358216 available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents: 3236
diff changeset
445 showFairwayDepth() {
86e108358216 available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents: 3236
diff changeset
446 if (this.showFairwayDepth) {
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
447 this.loading = true;
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
448 Promise.all([
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
449 this.$store.dispatch("bottlenecks/loadBottlenecks"),
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
450 this.$store.dispatch("bottlenecks/loadBottlenecksList"),
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
451 this.$store.dispatch("imports/loadStretches"),
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
452 this.$store.dispatch("imports/loadSections")
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
453 ])
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
454 .then(() => {
3173
1287b031424c statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 3172
diff changeset
455 if (this.selectedBottleneck) this.setSelectedBottleneck();
3309
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
456 })
80037790032d client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents: 3296
diff changeset
457 .finally(() => (this.loading = false));
3172
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
458 }
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
459 }
975efa874acf statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 3159
diff changeset
460 },
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
461 methods: {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
462 openFairwaydepthLNWLDiagram() {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
463 this.loading = true;
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
464 this.$store
3368
70605404f37d fa_lnwl: prototypical diagram added
Thomas Junk <thomas.junk@intevation.de>
parents: 3354
diff changeset
465 .dispatch("fairwayavailability/loadAvailableFairwayDepthLNWLDiagram", {
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
466 feature: this.selectedFairwayAvailabilityFeature,
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
467 from: this.from,
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
468 to: this.to,
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
469 frequency: this.frequency,
3463
6f4dad7473d7 afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents: 3438
diff changeset
470 LOS: this.los,
6f4dad7473d7 afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents: 3438
diff changeset
471 type: this.type,
6f4dad7473d7 afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents: 3438
diff changeset
472 depthLimit1: this.depthLimit1,
6f4dad7473d7 afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents: 3438
diff changeset
473 depthLimit2: this.depthLimit2,
6f4dad7473d7 afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents: 3438
diff changeset
474 widthLimit1: this.widthLimit1,
6f4dad7473d7 afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents: 3438
diff changeset
475 widthLimit2: this.widthLimit2,
6f4dad7473d7 afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents: 3438
diff changeset
476 limitingFactor: this.limitingFactor
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
477 })
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
478 .then(() => {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
479 this.$store.commit(
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
480 "application/paneSetup",
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
481 "AVAILABLEFAIRWAYDEPTHLNWL"
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
482 );
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
483 })
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
484 .catch(error => {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
485 const { status, data } = error.response;
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
486 displayError({
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
487 title: this.$gettext("Backend Error"),
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
488 message: `${status}: ${data.message || data}`
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
489 });
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
490 })
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
491 .finally(() => {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
492 this.loading = false;
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
493 });
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
494 },
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
495 openFairwaydepthDiagram() {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
496 this.loading = true;
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
497 this.$store
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
498 .dispatch("fairwayavailability/loadAvailableFairwayDepth", {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
499 feature: this.selectedFairwayAvailabilityFeature,
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
500 from: this.from,
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
501 to: this.to,
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
502 frequency: this.frequency,
3407
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
503 LOS: this.los,
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
504 type: this.type,
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
505 depthLimit1: this.depthLimit1,
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
506 depthLimit2: this.depthLimit2,
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
507 widthLimit1: this.widthLimit1,
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
508 widthLimit2: this.widthLimit2,
7ea54c3b3fd6 afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 3398
diff changeset
509 limitingFactor: this.limitingFactor
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
510 })
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
511 .then(() => {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
512 this.$store.commit("application/paneSetup", "AVAILABLEFAIRWAYDEPTH");
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
513 })
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
514 .catch(error => {
3438
df6c2973f791 New parsing of incoming afdcsv
Thomas Junk <thomas.junk@intevation.de>
parents: 3414
diff changeset
515 console.log(error);
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
516 const { status, data } = error.response;
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
517 displayError({
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
518 title: this.$gettext("Backend Error"),
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
519 message: `${status}: ${data.message || data}`
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
520 });
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
521 })
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
522 .finally(() => {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
523 this.loading = false;
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
524 });
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
525 },
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
526 close() {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
527 this.$store.commit("application/showFairwayDepth", false);
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
528 this.$store.commit("application/showFairwayDepthLNWL", false);
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
529 },
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
530 entrySelected() {
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
531 if (this.type === this.$options.BOTTLENECK) {
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
532 this.openLayersMap()
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
533 .getLayer("BOTTLENECKS")
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
534 .setVisible(true);
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
535 if (this.showProfiles) {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
536 this.$store.dispatch(
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
537 "bottlenecks/setSelectedBottleneck",
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
538 this.selectedFairwayAvailabilityFeature.properties.name
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
539 );
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
540 }
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
541 }
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
542 if (this.type === this.$options.STRETCH) {
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
543 this.openLayersMap()
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
544 .getLayer("STRETCHES")
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
545 .setVisible(true);
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
546 }
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
547 if (this.type === this.$options.SECTION) {
3314
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
548 this.openLayersMap()
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
549 .getLayer("SECTIONS")
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
550 .setVisible(true);
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
551 }
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
552 if (this.selectedFairwayAvailabilityFeature) {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
553 this.$store.dispatch("map/moveToFeauture", {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
554 feature: this.selectedFairwayAvailabilityFeature,
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
555 zoom: 17,
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
556 preventZoomOut: true
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
557 });
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
558 }
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
559 },
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
560 setSelectedBottleneck() {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
561 const bn = this.bottlenecksList.filter(
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
562 x => x.properties.name === this.selectedBottleneck
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
563 )[0];
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
564 this.$store.commit(
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
565 "fairwayavailability/setSelectedFairwayAvailability",
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
566 bn
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
567 );
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
568 },
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
569 setSelectedStretch() {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
570 const stretch = this.stretches.find(x => x.id === this.selectedStretchId);
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
571 this.$store.commit(
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
572 "fairwayavailability/setSelectedFairwayAvailability",
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
573 stretch
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
574 );
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
575 },
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
576 setSelectedSection() {
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
577 const section = this.sections.find(x => x.id === this.selectedSectionId);
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
578 this.$store.commit(
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
579 "fairwayavailability/setSelectedFairwayAvailability",
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
580 section
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
581 );
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
582 }
70676557a66f client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents: 3309
diff changeset
583 },
3486
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
584 BOTTLENECK: "bottleneck",
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
585 SECTION: "section",
1fbb6dc7d362 fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents: 3463
diff changeset
586 STRETCH: "stretch",
3191
c0cd5dfec153 statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents: 3185
diff changeset
587 AVAILABLEFAIRWAYDEPTH: app.$gettext("Available Fairway Depth"),
3572
c69c01045498 client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3486
diff changeset
588 FREQUENCIES: {
c69c01045498 client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3486
diff changeset
589 monthly: app.$gettext("monthly"),
c69c01045498 client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3486
diff changeset
590 quarterly: app.$gettext("quarterly"),
c69c01045498 client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3486
diff changeset
591 yearly: app.$gettext("yearly")
c69c01045498 client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3486
diff changeset
592 },
3397
3675c60afd4f afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents: 3368
diff changeset
593 LIMITINGFACTORS: LIMITINGFACTORS
3159
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
594 };
4f4905b57fcf toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
595 </script>