File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ export const useWebsiteStore = defineStore('websiteStore', () => {
7878 }
7979 }
8080
81+ // Exclude locations with names that contain any of the following strings
82+ const ignoreLocationsNames = [
83+ 'paróquia' , 'nossa senhora'
84+ ]
85+
8186 const citiesDatabase : Record < string , string > = {
8287 'Muenchen' : 'Munich' ,
8388 'Zuerich' : 'Zurich' ,
@@ -107,7 +112,9 @@ export const useWebsiteStore = defineStore('websiteStore', () => {
107112 loadingLocations . value = false
108113 return
109114 }
110- locations . value [ cityName ] = locations . value [ cityName ] ?. concat ( res . data ) || res . data
115+
116+ const allLocations = locations . value [ cityName ] . filter ( location => ! ignoreLocationsNames . some ( name => location . name . toLowerCase ( ) . includes ( name ) ) )
117+ locations . value [ cityName ] = locations . value [ cityName ] ?. concat ( allLocations ) || allLocations
111118 locationsCount . value [ cityName ] = res . pagination . total_items
112119 if ( ! fetchedPages . value [ cityName ] ) {
113120 fetchedPages . value [ cityName ] = { pages : new Set ( ) , totalPages : res . pagination . total_pages }
You can’t perform that action at this time.
0 commit comments