Improve filterBar on eventsPage, improve API access from frontend

This commit is contained in:
2024-10-03 19:56:44 +02:00
parent 2b7e87a68d
commit c611cc04fc
27 changed files with 170 additions and 164 deletions

View File

@@ -29,15 +29,15 @@ export const useConcertStore = defineStore("concertStore", {
async fetchAllTours() {
await getAllTours()
.then(result => {
this.tours = result.data
// this.tours = result.data
this.tours.sort((a, b) => {
return new Date(a.concerts[0].date) < new Date(b.concerts[0].date) ? -1 : 1
})
// this.tours.sort((a, b) => {
// return new Date(a.concerts[0].date) < new Date(b.concerts[0].date) ? -1 : 1
// })
this.filteredTours = this.tours
// this.filteredTours = this.tours
this.filterTours()
// this.filterTours()
})
await getAllBands()
@@ -47,7 +47,6 @@ export const useConcertStore = defineStore("concertStore", {
await getAllLocations()
.then(result => {
console.log(result.data)
this.locations = result.data
})