+
diff --git a/software/src/pages/misc/basketPage/orderingDialog.vue b/software/src/pages/misc/basketPage/orderingDialog.vue
index 256b279..f77e28e 100644
--- a/software/src/pages/misc/basketPage/orderingDialog.vue
+++ b/software/src/pages/misc/basketPage/orderingDialog.vue
@@ -26,7 +26,6 @@ async function doOrder() {
}
if (basketStore.usedAddress != null && basketStore.usedPayment != null) {
-
await basketStore.takeOrder()
showDialog.value = false
}
diff --git a/software/src/pages/misc/helpPage/index.vue b/software/src/pages/misc/helpPage/index.vue
index 0444887..b7c2b10 100644
--- a/software/src/pages/misc/helpPage/index.vue
+++ b/software/src/pages/misc/helpPage/index.vue
@@ -2,24 +2,21 @@
import { getAllExerciseGroups } from '@/data/api/exerciseApi';
import scoreCard from './scoreCard.vue';
import { ref } from 'vue';
-import { useFeedbackStore } from '@/stores/feedbackStore';
import { ExerciseGroupApiModel } from '@/data/models/exercises/exerciseGroupApiModel';
+import { usePreferencesStore } from '@/stores/preferences.store';
const exerciseGroups = ref>([])
-const feedbackStore = useFeedbackStore()
-
-feedbackStore.fetchDataFromServerInProgress = true
+const preferencesStore = usePreferencesStore()
getAllExerciseGroups()
.then(result => {
exerciseGroups.value = result.data
- feedbackStore.fetchDataFromServerInProgress = false
})
-
+
diff --git a/software/src/pages/misc/preferencesPage/pageSetup.vue b/software/src/pages/misc/preferencesPage/pageSetup.vue
index 1d7a633..ed4683d 100644
--- a/software/src/pages/misc/preferencesPage/pageSetup.vue
+++ b/software/src/pages/misc/preferencesPage/pageSetup.vue
@@ -3,7 +3,7 @@ import { ThemeEnum } from '@/data/enums/themeEnums';
import { useTheme } from 'vuetify/lib/framework.mjs';
import { i18n } from '@/plugins/i18n';
import cardView from '@/components/basics/cardView.vue';
-import { usePreferencesStore } from '@/stores/preferencesStore';
+import { usePreferencesStore } from '@/stores/preferences.store';
const preferencesStore = usePreferencesStore()
const theme = useTheme()
diff --git a/software/src/pages/misc/preferencesPage/systemSetup.vue b/software/src/pages/misc/preferencesPage/systemSetup.vue
index 007b173..8104c55 100644
--- a/software/src/pages/misc/preferencesPage/systemSetup.vue
+++ b/software/src/pages/misc/preferencesPage/systemSetup.vue
@@ -1,11 +1,11 @@
@@ -30,7 +31,7 @@ const searchStore = useSearchStore()
@@ -46,7 +47,7 @@ const searchStore = useSearchStore()
:band="band"
:concerts="band.concerts"
:genres="band.genres"
- :loading="searchStore.searchInProgress"
+ :loading="searchStore.fetchInProgress"
/>
@@ -62,6 +63,46 @@ const searchStore = useSearchStore()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -70,7 +111,7 @@ const searchStore = useSearchStore()
@@ -82,11 +123,11 @@ const searchStore = useSearchStore()
>
@@ -99,49 +140,7 @@ const searchStore = useSearchStore()
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/software/src/pages/misc/searchPage/searchBar.vue b/software/src/pages/misc/searchPage/searchBar.vue
index 74fd0b9..0cc4873 100644
--- a/software/src/pages/misc/searchPage/searchBar.vue
+++ b/software/src/pages/misc/searchPage/searchBar.vue
@@ -1,6 +1,6 @@
diff --git a/software/src/scripts/validationRules.ts b/software/src/scripts/validationRules.ts
index 2c2e1ee..aecdc95 100644
--- a/software/src/scripts/validationRules.ts
+++ b/software/src/scripts/validationRules.ts
@@ -1,4 +1,4 @@
-import { useFeedbackStore } from "@/stores/feedbackStore"
+import { useFeedbackStore } from "@/stores/feedback.store"
/**
* Check a string for no numbers and more than four digits
diff --git a/software/src/stores/account.store.ts b/software/src/stores/account.store.ts
index 9621ce2..6e943c0 100644
--- a/software/src/stores/account.store.ts
+++ b/software/src/stores/account.store.ts
@@ -2,9 +2,9 @@ import { useLocalStorage } from "@vueuse/core";
import { defineStore } from "pinia";
import { AccountModel } from "../data/models/user/accountModel";
import { OrderModel } from "../data/models/ordering/orderModel";
-import { useFeedbackStore } from "./feedbackStore";
+import { useFeedbackStore } from "./feedback.store";
import { loginAccount, registerAccount, updateAccount } from "../data/api/accountApi";
-import { getUserOrders } from "../data/api/orderApi";
+import { fetchUserOrders } from "../data/api/orderApi";
import { BannerStateEnum } from "../data/enums/bannerStateEnum";
import { AddressModel } from "../data/models/user/addressModel";
import { PaymentModel } from "../data/models/user/paymentModel";
@@ -17,27 +17,49 @@ export const useAccountStore = defineStore("accountStore", {
/** Useraccount which is currently logged in */
userAccount: useLocalStorage("hackmycart/accountStore/userAccount", new AccountApiModel()),
+ /** User input on login screen */
+ loginData: ref<{ username: String, password: String}>(
+ { username: "duranduran", password: "H4nn0ver" }
+ ),
+
+ /** */
+ registerData: ref
(new AccountModel()),
+
/** All orders of the user */
- orders: ref>([])
+ orders: ref>([]),
+
+ /** Request to server sent, waiting for data response */
+ fetchInProgress: ref(false)
}),
actions: {
/**
* Start the login process
*
- * @param username Account username
- * @param password Account password
+ * @returns True on success
*/
- async login(username: string, password: string) {
+ async login(): Promise {
const feedbackStore = useFeedbackStore()
+ this.fetchInProgress = true
- await loginAccount(username, password)
+ // Validate
+ if (this.loginData.username == null || this.loginData.username.length == 0 ||
+ this.loginData.password == null || this.loginData.password.length == 0
+ ) {
+ feedbackStore.changeBanner(BannerStateEnum.ACCOUNTLOGINWRONGLOGIN)
+ this.fetchInProgress = false
+ return false
+ }
+ else
+ {
+ await loginAccount(this.loginData.username, this.loginData.password)
.then(async result => {
this.userAccount = result.data
feedbackStore.changeBanner(BannerStateEnum.ACCOUNTLOGINSUCCESSFUL)
- this.refreshOrders()
+ this.fetchInProgress = false
+ return true
})
.catch(error => {
if (error.status == 400) {
@@ -45,22 +67,39 @@ export const useAccountStore = defineStore("accountStore", {
} else if (error.status == 401) {
feedbackStore.changeBanner(BannerStateEnum.ACCOUNTLOGINWRONGLOGIN)
}
+
+ this.fetchInProgress = false
+ return false
})
+ }
},
/**
* Register a new account to the database
+ * Log in on success
*
- * @param userAccount New account dataset
+ * @returns True on success
*/
- async registerAccount(userAccount: AccountModel) {
+ async registerAccount(): Promise {
const feedbackStore = useFeedbackStore()
+ this.fetchInProgress = true
- await registerAccount(userAccount)
- .then(res => {
+ await registerAccount(this.registerData)
+ .then(async res => {
if (res.status == 201) {
feedbackStore.changeBanner(BannerStateEnum.ACCOUNTREGISTERSUCCESSFUL)
}
+
+ this.loginData = {
+ username: this.registerData.username,
+ password: this.registerData.password
+ }
+
+ await this.login()
+ .then(result => {
+ this.fetchInProgress = false
+ return true
+ })
})
.catch((error) => {
if (error.status == 400) {
@@ -68,9 +107,17 @@ export const useAccountStore = defineStore("accountStore", {
} else if (error.status == 409) {
feedbackStore.changeBanner(BannerStateEnum.ACCOUNTREGISTERUSERNAMEINUSE)
}
+
+ this.fetchInProgress = false
+ return false
})
+
+ return false
},
+ /**
+ * Update values of an existing account on server
+ */
async updateAccount() {
const feedbackStore = useFeedbackStore()
@@ -82,6 +129,9 @@ export const useAccountStore = defineStore("accountStore", {
})
},
+ /**
+ * Logout user
+ */
logout() {
const feedbackStore = useFeedbackStore()
@@ -95,9 +145,12 @@ export const useAccountStore = defineStore("accountStore", {
* Get all orders from current user
*/
async refreshOrders() {
- await getUserOrders(this.userAccount.id)
+ this.fetchInProgress = true
+
+ await fetchUserOrders(this.userAccount.id)
.then(result => {
this.orders = result.data
+ this.fetchInProgress = false
})
},
diff --git a/software/src/stores/bandStore.ts b/software/src/stores/band.store.ts
similarity index 77%
rename from software/src/stores/bandStore.ts
rename to software/src/stores/band.store.ts
index 1786459..4874c48 100644
--- a/software/src/stores/bandStore.ts
+++ b/software/src/stores/band.store.ts
@@ -1,13 +1,18 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import { BandApiModel } from "../data/models/acts/bandApiModel";
-import { fetchAllBands, getBand } from "../data/api/bandApi";
+import { fetchAllBands, fetchBandByName } from "../data/api/bandApi";
import { BandDetailsApiModel } from "../data/models/acts/bandDetailsApiModel";
export const useBandStore = defineStore("bandStore", {
state: () => ({
+ /** All available bands */
bands: ref>([]),
+
+ /** All information about a single band */
band: ref(new BandDetailsApiModel()),
+
+ /** Request to server sent, waiting for data response */
fetchInProgress: ref(false)
}),
@@ -25,7 +30,7 @@ export const useBandStore = defineStore("bandStore", {
async getBand(name: string) {
this.fetchInProgress = true
- getBand(name)
+ fetchBandByName(name)
.then(result => {
this.band = result.data
this.fetchInProgress = false
diff --git a/software/src/stores/basket.store.ts b/software/src/stores/basket.store.ts
index 19aadbb..d759efb 100644
--- a/software/src/stores/basket.store.ts
+++ b/software/src/stores/basket.store.ts
@@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { useLocalStorage } from "@vueuse/core";
import { BasketItemModel } from "../data/models/ordering/basketItemModel";
-import { useFeedbackStore } from "./feedbackStore";
+import { useFeedbackStore } from "./feedback.store";
import { BannerStateEnum } from "../data/enums/bannerStateEnum";
import { AddressModel } from "../data/models/user/addressModel";
import { PaymentModel } from "../data/models/user/paymentModel";
@@ -15,9 +15,16 @@ import { createOrder } from "@/data/api/orderApi";
export const useBasketStore = defineStore('basketStore', {
state: () => ({
- itemsInBasket: useLocalStorage>("hackmycart/basketStore/productsInBasket", []),
+ /** Items in customers basket */
+ itemsInBasket: useLocalStorage>("hackmycart/basketStore/itemsInBasket", []),
+
+ /** Address used in the order dialog */
usedAddress: useLocalStorage("hackmycart/basketStore/usedAddress", new AddressModel()),
+
+ /** Payment method used in the order dialog */
usedPayment: useLocalStorage("hackmycart/basketStore/usedPayment", new PaymentModel()),
+
+ /** Selected seats in the booking page */
selectedSeats: ref>([])
}),
@@ -53,9 +60,16 @@ export const useBasketStore = defineStore('basketStore', {
)
},
- moveSeatSelectionsToBasket(concert: ConcertModel, band: BandModel) {
+ /**
+ * Move all selected seats from selectedSeats to itemsInBasket variable
+ *
+ * @param band Band of the concert
+ */
+ moveSeatSelectionsToBasket(band: BandModel) {
for (let selectedSeat of this.selectedSeats) {
- let itemInBasket: BasketItemModel = this.itemsInBasket.find((basketItem: BasketItemModel) => {
+ let itemInBasket: BasketItemModel =
+ this.itemsInBasket.find((basketItem: BasketItemModel) =>
+ {
return basketItem.concert.id == selectedSeat.concert.id
})
@@ -77,13 +91,19 @@ export const useBasketStore = defineStore('basketStore', {
},
/**
- * Take an order to the server. Sends all articles in the basket and creates an order entry in the backend database
+ * Take an order to the server. Sends all articles in the basket and
+ * creates an order entry in the backend database
*/
async takeOrder() {
const accountStore = useAccountStore()
const feedbackStore = useFeedbackStore()
- await createOrder(accountStore.userAccount.id, this.itemsInBasket, this.usedPayment.id, this.usedAddress.id)
+ await createOrder(
+ accountStore.userAccount.id,
+ this.itemsInBasket,
+ this.usedPayment.id,
+ this.usedAddress.id
+ )
.then(async result => {
if (result.status == 201) {
await accountStore.refreshOrders()
diff --git a/software/src/stores/concertStore.ts b/software/src/stores/concert.store.ts
similarity index 69%
rename from software/src/stores/concertStore.ts
rename to software/src/stores/concert.store.ts
index 81839f0..54b1b5c 100644
--- a/software/src/stores/concertStore.ts
+++ b/software/src/stores/concert.store.ts
@@ -1,14 +1,21 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import { ConcertApiModel } from "../data/models/acts/concertApiModel";
-import { fetchConcert, fetchConcerts, fetchUpcomingConcerts } from "../data/api/concertApi";
+import { fetchConcertById, fetchAllConcerts, fetchUpcomingConcerts } from "../data/api/concertApi";
import { ConcertDetailsApiModel } from "../data/models/acts/concertDetailsApiModel";
export const useConcertStore = defineStore("concertStore", {
state: () => ({
+ /** All available concerts */
concerts: ref>([]),
+
+ /** Next upcoming concerts */
upcomingConcerts: ref>([]),
+
+ /** Enhanced data about a specific concert */
concert: ref(new ConcertDetailsApiModel()),
+
+ /** Request to server sent, waiting for data response */
fetchInProgress: ref(false)
}),
@@ -19,23 +26,31 @@ export const useConcertStore = defineStore("concertStore", {
async getConcerts() {
this.fetchInProgress = true
- fetchConcerts()
+ fetchAllConcerts()
.then(result => {
this.concerts = result.data
this.fetchInProgress = false
})
},
+ /**
+ * Get all data about a specific concert
+ *
+ * @param id ID of the concert in the database
+ */
async getConcert(id: number) {
this.fetchInProgress = true
- fetchConcert(id)
+ fetchConcertById(id)
.then(result => {
this.concert = result.data
this.fetchInProgress = false
})
},
+ /**
+ * Download the next four upcoming concerts from server
+ */
async getUpcomingConcerts() {
this.fetchInProgress = true
diff --git a/software/src/stores/feedbackStore.ts b/software/src/stores/feedback.store.ts
similarity index 98%
rename from software/src/stores/feedbackStore.ts
rename to software/src/stores/feedback.store.ts
index 235e242..34304aa 100644
--- a/software/src/stores/feedbackStore.ts
+++ b/software/src/stores/feedback.store.ts
@@ -3,13 +3,16 @@ import { ref } from "vue";
import { BannerStateEnum } from "../data/enums/bannerStateEnum";
import { Composer } from 'vue-i18n';
+/**
+ * Logic of the bubble notifications
+ * Includes an i18n object for translation
+ */
export const useFeedbackStore = defineStore("feedbackStore", {
state: () => ({
showBanner: ref(false),
title: ref(""),
color: ref(""),
icon: ref(""),
- fetchDataFromServerInProgress: ref(false),
$i18n: {}
}),
@@ -50,21 +53,27 @@ export const useFeedbackStore = defineStore("feedbackStore", {
case BannerStateEnum.ACCOUNTLOGINSUCCESSFUL: {
this.title = this.i18n.t('bannerMessages.loginSuccessful'); break;
}
+
case BannerStateEnum.ACCOUNTLOGINWRONGLOGIN: {
this.title = this.i18n.t('bannerMessages.wrongLogin'); break;
}
+
case BannerStateEnum.ACCOUNTLOGINERROR: {
this.title = this.i18n.t('bannerMessages.error'); break;
}
+
case BannerStateEnum.ACCOUNTREGISTERSUCCESSFUL: {
this.title = this.i18n.t("bannerMessages.registerSuccessful"); break;
}
+
case BannerStateEnum.ACCOUNTREGISTERUSERNAMEINUSE: {
this.title = this.i18n.t("bannerMessages.usernameInUse"); break;
}
+
case BannerStateEnum.ACCOUNTUPDATESUCCESSFUL: {
this.title = this.i18n.t("bannerMessages.accountUpdated"); break;
}
+
case BannerStateEnum.ACCOUNTLOGOUTSUCCESSFUL: {
this.title = this.i18n.t('bannerMessages.logoutSuccessful'); break;
}
@@ -75,12 +84,15 @@ export const useFeedbackStore = defineStore("feedbackStore", {
case BannerStateEnum.CATEGORYCREATESUCCESSFUL: {
this.title = this.i18n.t('bannerMessages.categoryCreateSuccessful'); break;
}
+
case BannerStateEnum.CATEGORYDELETESUCESSFUL: {
this.title = this.i18n.t('bannerMessages.categoryDeleteSuccessful'); break;
}
+
case BannerStateEnum.CATEGORYCREATEERROR: {
this.title = this.i18n.t('bannerMessages.categoryCreateError'); break;
}
+
case BannerStateEnum.CATEGORYDELETEERROR: {
this.title = this.i18n.t('bannerMessages.categoryDeleteError'); break;
}
@@ -98,17 +110,21 @@ export const useFeedbackStore = defineStore("feedbackStore", {
case BannerStateEnum.PRODUCTCREATESUCCESSFUL: {
this.title = this.i18n.t('bannerMessages.productCreateSuccessful'); break;
}
+
case BannerStateEnum.PRODUCTCREATEERROR: {
this.title = this.i18n.t('bannerMessages.productCreateError'); break;
}
+
case BannerStateEnum.PRODUCTDELETESUCCESSFUL: {
this.title = this.i18n.t('bannerMessages.productDeleteSuccessful'); break;
}
+
case BannerStateEnum.PRODUCTDELETEERROR: {
this.title = this.i18n.t('bannerMessages.productDeleteError'); break;
}
}
+
// Banner color
switch (bannerState) {
@@ -201,9 +217,6 @@ export const useFeedbackStore = defineStore("feedbackStore", {
break;
}
-
-
-
this.showBanner = true
}
}
diff --git a/software/src/stores/locationStore.ts b/software/src/stores/location.store.ts
similarity index 65%
rename from software/src/stores/locationStore.ts
rename to software/src/stores/location.store.ts
index 1d25d51..2380cdc 100644
--- a/software/src/stores/locationStore.ts
+++ b/software/src/stores/location.store.ts
@@ -1,15 +1,26 @@
import { defineStore } from "pinia";
import { ref } from "vue";
-import { fetchAllLocations, fetchTopLocations } from "../data/api/locationApi";
+import { fetchAllLocations, fetchLocationByName, fetchTopLocations } from "../data/api/locationApi";
import { LocationApiModel } from "../data/models/locations/locationApiModel";
import { CityModel } from "../data/models/locations/cityModel";
import { fetchAllCities } from "../data/api/cityApi";
+import { LocationDetailsApiModel } from "@/data/models/locations/locationDetailsApiModel";
export const useLocationStore = defineStore("locationStore", {
state: () => ({
+ /** All available locations */
locations: ref>([]),
+
+ /** Locations with the most concerts */
topLocations: ref>([]),
+
+ /** Enhanced data about a specific location */
+ location: ref(),
+
+ /** All available cities */
cities: ref>([]),
+
+ /** Request to server sent, waiting for data response */
fetchInProgress: ref(false)
}),
@@ -32,6 +43,16 @@ export const useLocationStore = defineStore("locationStore", {
})
},
+ getLocationByName(name: string) {
+ this.fetchInProgress = true
+
+ fetchLocationByName(name)
+ .then(result => {
+ this.location = result.data
+ this.fetchInProgress = false
+ })
+ },
+
/**
* Get all locations in a specific city
*
@@ -46,6 +67,9 @@ export const useLocationStore = defineStore("locationStore", {
},
+ /**
+ * Fetch top 8 locations from server
+ */
async getTopLocations() {
await fetchTopLocations(8)
.then(result => {
diff --git a/software/src/stores/preferencesStore.ts b/software/src/stores/preferences.store.ts
similarity index 65%
rename from software/src/stores/preferencesStore.ts
rename to software/src/stores/preferences.store.ts
index 794dd22..5eace61 100644
--- a/software/src/stores/preferencesStore.ts
+++ b/software/src/stores/preferences.store.ts
@@ -2,10 +2,17 @@ import { defineStore } from "pinia";
import { useLocalStorage } from "@vueuse/core";
import { ThemeEnum } from "../data/enums/themeEnums";
import { LanguageEnum } from "../data/enums/languageEnum";
+import { ref } from "vue";
export const usePreferencesStore = defineStore('preferencesStore', {
state: () => ({
+ /** Selected theme by user */
theme: useLocalStorage("hackmycart/preferencesStore/theme", ThemeEnum.DARKBLUE),
- language: useLocalStorage("hackmycart/preferencesStore/language", LanguageEnum.GERMAN)
+
+ /** Selected language by user */
+ language: useLocalStorage("hackmycart/preferencesStore/language", LanguageEnum.GERMAN),
+
+ /** Request to server sent, waiting for data response */
+ fetchInProgress: ref(false)
}),
})
\ No newline at end of file
diff --git a/software/src/stores/search.store.ts b/software/src/stores/search.store.ts
new file mode 100644
index 0000000..5ffd85c
--- /dev/null
+++ b/software/src/stores/search.store.ts
@@ -0,0 +1,55 @@
+import { defineStore } from "pinia";
+import { ref } from "vue";
+import { fetchBandsBySearchTerm } from "../data/api/bandApi";
+import { fetchLocationsBySearchTerm } from "../data/api/locationApi";
+import { fetchConcertsBySearchTerm } from "../data/api/concertApi";
+import { ConcertApiModel } from "@/data/models/acts/concertApiModel";
+
+export const useSearchStore = defineStore("searchStore", {
+ state: () => ({
+ /** Search term */
+ searchTerm: ref(""),
+
+ /** Band results */
+ bands: ref(),
+
+ /** Location results */
+ locations: ref(),
+
+ /** Concert results */
+ concerts: ref>([]),
+
+ /** One or more searches are already performed */
+ alreadySearched: ref(false),
+
+ /** Request to server sent, waiting for data response */
+ fetchInProgress: ref(false)
+ }),
+
+ actions: {
+ /**
+ * Search for the term in all bands, locations, events
+ */
+ async startSearch() {
+ this.alreadySearched = true
+ this.fetchInProgress = true
+
+ await fetchBandsBySearchTerm(this.searchTerm)
+ .then(result => {
+ this.bands = result.data
+ })
+
+ await fetchLocationsBySearchTerm(this.searchTerm)
+ .then(result => {
+ this.locations = result.data
+ })
+
+ await fetchConcertsBySearchTerm(this.searchTerm)
+ .then(result => {
+ this.concerts = result.data
+ })
+
+ this.fetchInProgress = false
+ }
+ }
+})
\ No newline at end of file
diff --git a/software/src/stores/searchStore.ts b/software/src/stores/searchStore.ts
deleted file mode 100644
index 4ef01ed..0000000
--- a/software/src/stores/searchStore.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { defineStore } from "pinia";
-import { ref } from "vue";
-import { searchBand } from "../data/api/bandApi";
-import { searchLocation } from "../data/api/locationApi";
-import { searchConcert } from "../data/api/concertApi";
-
-export const useSearchStore = defineStore("searchStore", {
- state: () => ({
- searchTerm: ref(""),
- bands: ref(),
- locations: ref(),
- concerts: ref(),
- alreadySearched: ref(false),
- searchInProgress: ref(false)
- }),
-
- actions: {
- /**
- * Search for the termin in all bands, locations, events
- */
- async startSearch() {
- this.alreadySearched = true
- this.searchInProgress = true
-
- await searchBand(this.searchTerm)
- .then(result => {
- this.bands = result.data
- })
-
- await searchLocation(this.searchTerm)
- .then(result => {
- this.locations = result.data
- })
-
- await searchConcert(this.searchTerm)
- .then(result => {
- this.concerts = result.data
- })
-
- this.searchInProgress = false
- }
- }
-})
\ No newline at end of file
diff --git a/software/src/stores/shopStore.ts b/software/src/stores/shopStore.ts
deleted file mode 100644
index 359a267..0000000
--- a/software/src/stores/shopStore.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import { defineStore } from "pinia";
-import { ref } from "vue";
-import { ConcertApiModel } from "../data/models/acts/concertApiModel";
-import { BandApiModel } from "../data/models/acts/bandApiModel";
-import { CityApiModel } from "../data/models/locations/cityApiModel";
-import { GenreApiModel } from "../data/models/acts/genreApiModel";
-import { searchBand } from "../data/api/bandApi";
-import { searchLocation } from "../data/api/locationApi";
-import { fetchConcerts, searchConcert } from "../data/api/concertApi";
-import { useFeedbackStore } from "./feedbackStore";
-
-export const useShopStore = defineStore("shopStore", {
- state: () => ({
- concertsFiltered: ref>([]),
- bandsFiltered: ref>([]),
- cities: ref>([]),
- cityFilterName: ref(),
- genreFilterName: ref(),
- genres: ref>([]),
- alreadySearched: ref(false),
- searchInProgress: ref(false)
- }),
-
- actions: {
- /**
- * Search for the termin in all bands, locations, events
- */
- async startSearch() {
- this.alreadySearched = true
- this.searchInProgress = true
-
- await searchBand(this.searchTerm)
- .then(result => {
- this.bands = result.data
- })
-
- await searchLocation(this.searchTerm)
- .then(result => {
- this.locations = result.data
- })
-
- await searchConcert(this.searchTerm)
- .then(result => {
- this.concerts = result.data
- })
-
- this.searchInProgress = false
- },
-
- async getConcerts() {
- const feedbackStore = useFeedbackStore()
- feedbackStore.fetchDataFromServerInProgress = true
-
- await fetchConcerts()
- .then(result => {
- this.concerts = result.data
- })
- }
- }
-})
\ No newline at end of file
diff --git a/software/src/stores/shoppingStore.ts b/software/src/stores/shoppingStore.ts
deleted file mode 100644
index bffc1e1..0000000
--- a/software/src/stores/shoppingStore.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { defineStore } from "pinia";
-import { ref } from "vue";
-import { fetchAllCities } from "../data/api/cityApi";
-import { fetchAllGenres } from "../data/api/genreApi";
-import { useFeedbackStore } from "./feedbackStore";
-import { CityApiModel } from "../data/models/locations/cityApiModel";
-import { GenreApiModel } from "../data/models/acts/genreApiModel";
-
-/**
- * @deprecated
- */
-export const useShoppingStore = defineStore("shoppingStore", {
- state: () => ({
- cities: ref>([]),
- genres: ref>([]),
- cityFilterName: ref(),
- genreFilterName: ref()
- }),
-
- actions: {
- async getEvents() {
- const feedbackStore = useFeedbackStore()
- feedbackStore.fetchDataFromServerInProgress = true
- },
-
- async getCities() {
- const feedbackStore = useFeedbackStore()
- feedbackStore.fetchDataFromServerInProgress = true
-
- await fetchAllCities()
- .then(result => {
- this.cities = result.data
- feedbackStore.fetchDataFromServerInProgress = false
- })
- },
-
- async getGenres() {
- const feedbackStore = useFeedbackStore()
- feedbackStore.fetchDataFromServerInProgress = true
-
- await fetchAllGenres()
- .then(result => {
- this.genres = result.data
- feedbackStore.fetchDataFromServerInProgress = false
- })
- }
- }
-})
\ No newline at end of file
diff --git a/software/tsconfig.web.json b/software/tsconfig.web.json
index 317df77..1212262 100644
--- a/software/tsconfig.web.json
+++ b/software/tsconfig.web.json
@@ -1,7 +1,8 @@
{
"include": [
"src/**/*",
- "src/**/*.vue"
+ "src/**/*.vue",
+ "package.json"
],
"compilerOptions": {
"composite": true,