comparison client/src/components/fairway/BottleneckDialogue.vue @ 5586:215e6ba9651b surveysperbottleneckid

Added property "displayName" to bottlenecks. Before displayed, bottlenecks ordered by country are now checked for doubles per country. In case a double is found the displayName is enriched with the bottleneck_id. Otherwise the displayName is equal to "name" or "objnam". Example: const testList = [ { properties: { responsible_country: "AT", name: "Bananas", bottleneck_id: "BN1" } }, { properties: { responsible_country: "DE", name: "Bananas", bottleneck_id: "BN2" } }, { properties: { responsible_country: "DE", name: "Bananas", bottleneck_id: "BN3" } } ]; is rendered to: AT Bananas DE Bananas / BN2 Bananas / BN3
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 04 Apr 2022 15:12:43 +0200
parents 2cadfdc9960c
children 7768f14f6535
comparison
equal deleted inserted replaced
5585:7e8830c808ba 5586:215e6ba9651b
29 <option 29 <option
30 v-for="bn in bottlenecksForCountry" 30 v-for="bn in bottlenecksForCountry"
31 :key="bn.properties.id" 31 :key="bn.properties.id"
32 :value="bn.properties.bottleneck_id" 32 :value="bn.properties.bottleneck_id"
33 > 33 >
34 {{ bn.properties.name }} 34 {{ bn.properties.displayName }}
35 <!-- name for display is okay--> 35 <!-- name for display is okay-->
36 </option> 36 </option>
37 </optgroup> 37 </optgroup>
38 </select> 38 </select>
39 <button @click="takeMeThere" class="btn btn-sm btn-info"> 39 <button @click="takeMeThere" class="btn btn-sm btn-info">