Remove EventModel in frontend
This commit is contained in:
@@ -10,7 +10,7 @@ shoppingStore.getEvents()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-carousel
|
||||
<!-- <v-carousel
|
||||
hide-delimiters
|
||||
hide-delimiter-background
|
||||
height="700"
|
||||
@@ -30,10 +30,10 @@ shoppingStore.getEvents()
|
||||
@click="props.onClick"
|
||||
icon="mdi-chevron-right"
|
||||
/>
|
||||
</template>
|
||||
</template> -->
|
||||
|
||||
<v-carousel-item
|
||||
v-for="event in shoppingStore.events"
|
||||
<!-- <v-carousel-item
|
||||
v-for="event in shoppingStore.concerts"
|
||||
:src="'http://localhost:3000/static/' + event.band.imageMembers"
|
||||
cover
|
||||
>
|
||||
@@ -60,7 +60,7 @@ shoppingStore.getEvents()
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-carousel-item>
|
||||
</v-carousel>
|
||||
</v-carousel> -->
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -5,27 +5,17 @@ import cardWithTopImage from '@/components/basics/cardViewTopImage.vue';
|
||||
import { lowestTicketPrice } from '@/scripts/concertScripts';
|
||||
import OutlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
||||
import { ref } from 'vue';
|
||||
import { getTopLocations } from '@/data/api/locationApi';
|
||||
import { LocationApiModel } from '@/data/models/locations/locationApiModel';
|
||||
import { useConcertStore } from '@/data/stores/concertStore';
|
||||
import { useLocationStore } from '@/data/stores/locationStore';
|
||||
import { useBandStore } from '@/data/stores/bandStore';
|
||||
|
||||
const router = useRouter()
|
||||
const feedbackStore = useFeedbackStore()
|
||||
const topLocations = ref<Array<LocationApiModel>>(Array.from({length: 8}, () => new LocationApiModel()))
|
||||
const concertStore = useConcertStore()
|
||||
const locationStore = useLocationStore()
|
||||
const bandStore = useBandStore()
|
||||
|
||||
feedbackStore.fetchDataFromServerInProgress = true
|
||||
|
||||
// todo getTopEvents(4)
|
||||
// .then(events => {
|
||||
// topEvents.value = events.data
|
||||
|
||||
// getTopLocations(8)
|
||||
// .then(locations => {
|
||||
// topLocations.value = locations.data
|
||||
// feedbackStore.fetchDataFromServerInProgress = false
|
||||
// })
|
||||
// })
|
||||
concertStore.getUpcomingConcerts()
|
||||
locationStore.getTopLocations()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -38,32 +28,32 @@ feedbackStore.fetchDataFromServerInProgress = true
|
||||
<v-col cols="10">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<section-divider :title="$t('topEvents')" />
|
||||
<section-divider :title="$t('upcomingConcerts')" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<!-- <v-row> todo
|
||||
<v-col v-for="i in 4" cols="3">
|
||||
<v-row>
|
||||
<v-col v-for="concert in concertStore.upcomingConcerts" cols="3">
|
||||
<card-with-top-image
|
||||
:image="topEvents[i - 1].image"
|
||||
:title="topEvents[i - 1].band.name"
|
||||
:image="concert.image"
|
||||
:title="concert.band.name"
|
||||
smaller-title
|
||||
@click="router.push('/bands/' + topEvents[i - 1].band.name.replaceAll(' ', '-').toLowerCase())"
|
||||
:loading="feedbackStore.fetchDataFromServerInProgress"
|
||||
@click="router.push('/bands/details/' + concert.band.name.replaceAll(' ', '-').toLowerCase())"
|
||||
:loading="concertStore.fetchInProgress"
|
||||
>
|
||||
ab {{ lowestTicketPrice(topEvents[i - 1].concerts) }} €
|
||||
<!-- ab € todo -->
|
||||
</card-with-top-image>
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col>
|
||||
<outlined-button
|
||||
append-icon="mdi-chevron-right"
|
||||
@click="router.push('/events')"
|
||||
@click="router.push('/concerts')"
|
||||
block
|
||||
>
|
||||
{{ $t('allEvents') }}
|
||||
{{ $t('allConcerts') }}
|
||||
</outlined-button>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -75,15 +65,15 @@ feedbackStore.fetchDataFromServerInProgress = true
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col v-for="i in 8" cols="3">
|
||||
<v-col v-for="location in locationStore.topLocations" cols="3">
|
||||
<card-with-top-image
|
||||
:image="topLocations[i - 1].imageOutdoor"
|
||||
:title="topLocations[i - 1].name"
|
||||
:image="location.imageOutdoor"
|
||||
:title="location.name"
|
||||
smaller-title
|
||||
@click="router.push('/locations/' + topLocations[i - 1].name.replaceAll(' ', '-').toLowerCase())"
|
||||
:loading="feedbackStore.fetchDataFromServerInProgress"
|
||||
@click="router.push('/locations/details/' + location.name.replaceAll(' ', '-').toLowerCase())"
|
||||
:loading="locationStore.fetchInProgress"
|
||||
>
|
||||
{{ topLocations[i - 1].city.name }}, {{ topLocations[i - 1].city.country }}
|
||||
{{ location.city.name }}, {{ location.city.country }}
|
||||
</card-with-top-image>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
Reference in New Issue
Block a user