From 0844b3d5b58dcbf4399ee952891829893126c12f Mon Sep 17 00:00:00 2001 From: TobiZog Date: Sun, 3 Nov 2024 17:30:07 +0100 Subject: [PATCH] Split home page in sections --- .../components/basics/cardViewTopImage.vue | 2 +- software/src/pages/homePage/index.vue | 75 ++----------------- .../pages/homePage/topLocationsSection.vue | 48 ++++++++++++ .../homePage/upcomingConcertsSection.vue | 48 ++++++++++++ software/src/stores/location.store.ts | 3 + 5 files changed, 105 insertions(+), 71 deletions(-) create mode 100644 software/src/pages/homePage/topLocationsSection.vue create mode 100644 software/src/pages/homePage/upcomingConcertsSection.vue diff --git a/software/src/components/basics/cardViewTopImage.vue b/software/src/components/basics/cardViewTopImage.vue index 128d57f..e8dfbe1 100644 --- a/software/src/components/basics/cardViewTopImage.vue +++ b/software/src/components/basics/cardViewTopImage.vue @@ -26,7 +26,7 @@ defineProps({ -import sectionDivider from '@/components/basics/sectionDivider.vue'; -import cardWithTopImage from '@/components/basics/cardViewTopImage.vue'; -import OutlinedButton from '@/components/basics/outlinedButton.vue'; -import { useRouter } from 'vue-router'; import { useConcertStore } from '@/stores/concert.store'; import { useLocationStore } from '@/stores/location.store'; import bandSection from './bandsSection.vue'; +import UpcomingConcertsSection from './upcomingConcertsSection.vue'; +import TopLocationsSection from './topLocationsSection.vue'; -const router = useRouter() const concertStore = useConcertStore() const locationStore = useLocationStore() @@ -21,75 +18,13 @@ locationStore.getTopLocations() - - - - - - - - - - - {{ $t("misc.from") }} {{ (concert.price).toPrecision(4) }} € - - - - - - - - - {{ $t('concert.allConcerts') }} - - - - - - - - - - - - - - {{ location.city.name }}, {{ location.city.country }} - - - - - - - - {{ $t('location.allLocations') }} - - - + + + diff --git a/software/src/pages/homePage/topLocationsSection.vue b/software/src/pages/homePage/topLocationsSection.vue new file mode 100644 index 0000000..dbfe2d6 --- /dev/null +++ b/software/src/pages/homePage/topLocationsSection.vue @@ -0,0 +1,48 @@ + + + \ No newline at end of file diff --git a/software/src/pages/homePage/upcomingConcertsSection.vue b/software/src/pages/homePage/upcomingConcertsSection.vue new file mode 100644 index 0000000..15f8da2 --- /dev/null +++ b/software/src/pages/homePage/upcomingConcertsSection.vue @@ -0,0 +1,48 @@ + + + \ No newline at end of file diff --git a/software/src/stores/location.store.ts b/software/src/stores/location.store.ts index 9692a1d..561fc80 100644 --- a/software/src/stores/location.store.ts +++ b/software/src/stores/location.store.ts @@ -73,9 +73,12 @@ export const useLocationStore = defineStore("locationStore", { * Fetch top 8 locations from server */ async getTopLocations() { + this.fetchInProgress = true + await fetchTopLocations(8) .then(result => { this.topLocations = result.data + this.fetchInProgress = false }) },