Redesign home page

This commit is contained in:
2024-09-27 15:52:22 +02:00
parent c6c8cf0ae8
commit ef0c48ae17
31 changed files with 587 additions and 161 deletions

View File

@@ -3,13 +3,13 @@ import { MemberModel } from "./memberModel"
import { RatingModel } from "./ratingModel"
export class BandModel {
id: Number
id: number
name: string
foundingYear: Number
descriptionEn: String
descriptionDe: String
images: Array<String>
logo: String
foundingYear: number
descriptionEn: string
descriptionDe: string
images: Array<string>
logo: string
genre: GenreModel
ratings: Array<RatingModel>
members: Array<MemberModel>

View File

@@ -1,9 +1,9 @@
import { CityModel } from "./cityModel"
export class LocationModel {
id: Number
name: String
address: String
id: number
name: string
address: string
city: CityModel
image: String
image: string
}

View File

@@ -2,7 +2,7 @@ import { AccountModel } from "./accountModel"
import { BandModel } from "./bandModel"
export class RatingModel {
id: Number
rating: Number
id: number
rating: number
band: BandModel
}

View File

@@ -0,0 +1,36 @@
import { useLocalStorage } from "@vueuse/core";
import { defineStore } from "pinia";
import { TourModel } from "../models/tourModel";
import { getAllTours } from "../api/tourApi";
import { GenreModel } from "../models/genreModel";
import { getAllBands } from "../api/bandApi";
import { BandModel } from "../models/bandModel";
import { LocationModel } from "../models/locationModel";
import { getAllLocations } from "../api/locationApi";
export const useShowStore = defineStore("showStore", {
state: () => ({
tours: useLocalStorage<Array<TourModel>>("hackmycart/showStore/tours", []),
bands: useLocalStorage<Array<BandModel>>("hackmycart/showStore/bands", []),
locations: useLocalStorage<Array<LocationModel>>("hackmycart/showStore/locations", [])
}),
actions: {
async fetchAllTours() {
await getAllTours()
.then(result => {
this.tours = result.data
})
await getAllBands()
.then(result => {
this.bands = result.data
})
await getAllLocations()
.then(result => {
this.locations = result.data
})
}
}
})

View File

@@ -1,21 +0,0 @@
import { useLocalStorage } from "@vueuse/core";
import { defineStore } from "pinia";
import { TourModel } from "../models/tourModel";
import { getAllTours } from "../api/tourApi";
import { GenreModel } from "../models/genreModel";
export const useTourStore = defineStore("tourStore", {
state: () => ({
tours: useLocalStorage<Array<TourModel>>("hackmycart/tourStore/tours", []),
genres: useLocalStorage<Array<GenreModel>>("hackmycart/tourStore/genres", [])
}),
actions: {
async fetchAllTours() {
await getAllTours()
.then(result => {
this.tours = result.data
})
}
}
})