1010 "noSnapshot.municipalityText": "diese Gemeinde",
1111 "noSnapshot.p1": "Für {municipalityText} stehen zur Zeit noch keine Daten zur Verfügung.",
1212 "noSnapshot.p2": "Erkunden Sie unsere Fallbeispiele um ein besseres Bild der Möglichkeiten für Ihre Gemeinde zu erhalten.",
13- "listtitle": "Fallbeispiele"
13+ "listtitle": "Fallbeispiele",
14+ "listtitleMore": "Weitere Fallbeispiele"
1415 },
1516 "fr": {
1617 "calltoactionText": "Offre pour votre commune",
2122 "noSnapshot.municipalityText": "cette communauté",
2223 "noSnapshot.p1": "En ce moment il n’éxiste pas encore de données pour {municipalityText}.",
2324 "noSnapshot.p2": "Prenez compte de nos études pour une meilleure vue d’ensemble des possibilitiées qui s’offrent à votre commune.",
24- "listtitle": "Examples"
25+ "listtitle": "Examples",
26+ "listtitleMore": "D'autres examples"
2527 }
2628}
2729</i18n >
6264 </router-link >
6365 </v-btn >
6466 </div >
67+
68+ <snapshot-list
69+ v-if =" snapshotsMunicipality"
70+ :snapshots =" snapshotsMunicipality"
71+ />
6572 </div >
6673
6774 <snapshot-list
75+ v-if =" snapshotsExamples"
6876 :snapshots =" snapshotsExamples"
69- :pushRoute =" true"
70- :listtitle =" this.$t('listtitle')"
77+ :title =" listtitleText"
7178 />
7279 </div >
7380
@@ -124,7 +131,9 @@ export default {
124131 geojson: null ,
125132 geobounds: [],
126133 municipalityName: ' ' ,
127- snapshotsExamples: []
134+ snapshotsExamples: [],
135+ snapshotsIdExamplesExclude: [],
136+ snapshotsMunicipality: []
128137 };
129138 },
130139
@@ -153,6 +162,13 @@ export default {
153162
154163 municipalityText () {
155164 return this .municipalityName ? this .municipalityName : this .$t (' noSnapshot.municipalityText' );
165+ },
166+
167+ listtitleText () {
168+ if (this .snapshotsMunicipality .length > 0 ) {
169+ return this .$t (' listtitleMore' );
170+ }
171+ return this .$t (' listtitle' );
156172 }
157173 },
158174
@@ -167,6 +183,15 @@ export default {
167183 municipality {
168184 bfsNumber
169185 fullname
186+ snapshots {
187+ id
188+ pk
189+ title
190+ topic
191+ screenshot {
192+ url
193+ }
194+ }
170195 }
171196 }
172197
@@ -191,7 +216,12 @@ export default {
191216 if (result .data .hasOwnProperty (' snapshot' ) && result .data .snapshot ) {
192217 this .geojson = result .data .snapshot .data ;
193218 this .municipalityName = result .data .snapshot .municipality .fullname ;
194- this .snapshotsExamples = result .data .snapshots .edges .map (snapshot => snapshot .node );
219+ this .snapshotsMunicipality = result .data .snapshot .municipality .snapshots ;
220+ const snapshotsIdExamplesExclude = this .snapshotsMunicipality .map (snapshot => snapshot .id );
221+ this .snapshotsExamples = result .data .snapshots .edges .map (snapshot => snapshot .node ).filter (
222+ snapshot => ! snapshotsIdExamplesExclude .includes (snapshot .id )
223+ );
224+
195225 this .$store .commit (' setBfsnumber' , result .data .snapshot .municipality .bfsNumber );
196226 this .$store .commit (' setBfsname' , result .data .snapshot .municipality .fullname );
197227 } else {
@@ -208,8 +238,18 @@ export default {
208238 fullname
209239 perimeter
210240 perimeterBounds
241+ snapshots {
242+ id
243+ pk
244+ title
245+ topic
246+ screenshot {
247+ url
248+ }
249+ }
211250 }
212- snapshots {
251+
252+ snapshots (isShowcase : true ) {
213253 edges {
214254 node {
215255 id
@@ -230,7 +270,7 @@ export default {
230270 this .municipalityName = result .data .municipality .fullname ;
231271 this .geojson = result .data .municipality .perimeter ;
232272 this .geobounds = result .data .municipality .perimeterBounds ;
233- this .snapshotsExamples = result .data .snapshots .edges ;
273+ this .snapshotsExamples = result .data .snapshots .edges . map ( snapshot => snapshot . node ) ;
234274 this .$store .commit (' setBfsnumber' , result .data .municipality .bfsNumber );
235275 this .$store .commit (' setBfsname' , result .data .municipality .fullname );
236276 }
0 commit comments