Fixed Account pages
This commit is contained in:
8
software/package-lock.json
generated
8
software/package-lock.json
generated
@@ -15,6 +15,8 @@
|
||||
"concurrently": "^9.0.1",
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.21.1",
|
||||
"moment": "^2.30.1",
|
||||
"momentjs": "^2.0.0",
|
||||
"pinia": "^2.2.4",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"sequelize": "^6.37.4",
|
||||
@@ -4070,6 +4072,12 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/momentjs": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/momentjs/-/momentjs-2.0.0.tgz",
|
||||
"integrity": "sha512-GYMUxLyCwVhECkJR1/LMHEyb9gWYSPRnXi+elGN0m5bet7ngQOxU4QLWUI/eBzgN4N/T194n6yP7lQiE+Udw9A==",
|
||||
"deprecated": "WARNING: The correct package name for Moment.js is 'moment', not 'momentjs'."
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
"concurrently": "^9.0.1",
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.21.1",
|
||||
"moment": "^2.30.1",
|
||||
"momentjs": "^2.0.0",
|
||||
"pinia": "^2.2.4",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"sequelize": "^6.37.4",
|
||||
|
||||
@@ -4,8 +4,8 @@ import { i18n } from './plugins/i18n';
|
||||
import { watch } from 'vue';
|
||||
import navigationAppendItems from './components/navigation/navigationAppendItems.vue';
|
||||
import navigationPrependItems from './components/navigation/navigationPrependItems.vue';
|
||||
import { usePreferencesStore } from './data/stores/preferencesStore';
|
||||
import { useFeedbackStore } from './data/stores/feedbackStore';
|
||||
import { usePreferencesStore } from './stores/preferencesStore';
|
||||
import { useFeedbackStore } from './stores/feedbackStore';
|
||||
import footerItems from './components/navigation/footerItems.vue';
|
||||
import urlBar from './components/navigation/urlBar.vue';
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
defineProps({
|
||||
title: String,
|
||||
subtitle: String,
|
||||
icon: {
|
||||
type: String
|
||||
},
|
||||
@@ -15,13 +16,20 @@ defineProps({
|
||||
<template>
|
||||
<v-card variant="tonal" >
|
||||
<v-card-title v-if="title || loading" color="primary" class="pa-0">
|
||||
<v-sheet color="primary" class="pl-2 py-1">
|
||||
<v-sheet color="primary">
|
||||
<v-skeleton-loader
|
||||
type="heading"
|
||||
:loading="loading"
|
||||
style="background-color: transparent"
|
||||
>
|
||||
<v-icon :icon="icon" v-if="icon" /> {{ title }}
|
||||
<div>
|
||||
<div class="pl-2 py-1">
|
||||
<v-icon :icon="icon" v-if="icon" /> {{ title }}
|
||||
</div>
|
||||
<div>
|
||||
<v-card-subtitle >{{ subtitle }}</v-card-subtitle>
|
||||
</div>
|
||||
</div>
|
||||
</v-skeleton-loader>
|
||||
</v-sheet>
|
||||
</v-card-title>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useBasketStore } from '@/data/stores/basketStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import { useBasketStore } from '@/stores/basketStore';
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
const basketStore = useBasketStore()
|
||||
@@ -9,8 +9,8 @@ const basketStore = useBasketStore()
|
||||
<template>
|
||||
<v-btn variant="plain" icon="mdi-magnify" to="/search" />
|
||||
|
||||
<v-btn v-if="accountStore.userAccount.id == 0" variant="plain" icon="mdi-account" to="/account/login" />
|
||||
<v-btn v-else variant="plain" icon="mdi-account" to="/account" />
|
||||
<v-btn v-if="accountStore.userAccount.id == undefined" variant="plain" icon="mdi-account" to="/account/login" />
|
||||
<v-btn v-else variant="plain" icon="mdi-account" to="/account/home" />
|
||||
|
||||
<div>
|
||||
<v-badge
|
||||
|
||||
@@ -34,12 +34,9 @@ defineProps({
|
||||
|
||||
seatRow: Number,
|
||||
|
||||
seat: Number,
|
||||
seatNr: Number,
|
||||
|
||||
standingArea: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
standingArea: Boolean
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -110,7 +107,7 @@ defineProps({
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ seat }}
|
||||
{{ seatNr }}
|
||||
</div>
|
||||
</v-card>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { SeatGroupModel } from '@/data/models/locations/seatGroupModel';
|
||||
import { SeatModel } from '@/data/models/locations/seatModel';
|
||||
import { SeatRowModel } from '@/data/models/locations/seatRowModel';
|
||||
import { SelectedSeatModel } from '@/data/models/ordering/selectedSeatModel';
|
||||
import { useBasketStore } from '@/data/stores/basketStore';
|
||||
import { useBasketStore } from '@/stores/basketStore';
|
||||
|
||||
const basketStore = useBasketStore()
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { ConcertModel } from '@/data/models/acts/concertModel';
|
||||
import { SeatGroupModel } from '@/data/models/locations/seatGroupModel';
|
||||
import { SelectedSeatModel } from '@/data/models/ordering/selectedSeatModel';
|
||||
import { useBasketStore } from '@/data/stores/basketStore';
|
||||
import { useBasketStore } from '@/stores/basketStore';
|
||||
|
||||
const basketStore = useBasketStore()
|
||||
|
||||
|
||||
32
software/src/data/models/apiEndpoints/orderApiModel.ts
Normal file
32
software/src/data/models/apiEndpoints/orderApiModel.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { AccountModel } from "../user/accountModel"
|
||||
import { AddressModel } from "../user/addressModel"
|
||||
import { PaymentModel } from "../user/paymentModel"
|
||||
import { OrderModel } from "../ordering/orderModel"
|
||||
import { TicketModel } from "../ordering/ticketModel"
|
||||
import { ConcertApiModel } from "../acts/concertApiModel"
|
||||
import { SeatModel } from "../locations/seatModel"
|
||||
import { SeatRowModel } from "../locations/seatRowModel"
|
||||
import { SeatGroupModel } from "../locations/seatGroupModel"
|
||||
|
||||
/**
|
||||
* Replica of API endpoint /orders/:id
|
||||
*/
|
||||
export class OrderApiModel extends OrderModel {
|
||||
tickets: Array<TicketOrderModel>
|
||||
account: AccountModel
|
||||
payment: PaymentModel
|
||||
address: AddressModel
|
||||
}
|
||||
|
||||
class TicketOrderModel extends TicketModel {
|
||||
concert: ConcertApiModel
|
||||
seat: SeatTicketModel
|
||||
}
|
||||
|
||||
class SeatTicketModel extends SeatModel {
|
||||
seatRow: SeatRowTicketModel
|
||||
}
|
||||
|
||||
class SeatRowTicketModel extends SeatRowModel {
|
||||
seatGroup: SeatGroupModel
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import { SeatRowModel } from "./seatRowModel"
|
||||
export class SeatGroupModel {
|
||||
name: string = ""
|
||||
surcharge: number = 0
|
||||
standingArea: Boolean = false
|
||||
standingArea: boolean = false
|
||||
capacity: number = 0
|
||||
seatRows: Array<SeatRowModel>
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
export class SeatModel {
|
||||
id: number = -1
|
||||
seatNr: string = ""
|
||||
seatNr: number = 0
|
||||
state: number = 0
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import { AccountModel } from "../user/accountModel"
|
||||
import { AddressModel } from "../user/addressModel"
|
||||
import { PaymentModel } from "../user/paymentModel"
|
||||
import { OrderModel } from "./orderModel"
|
||||
import { TicketApiModel } from "./ticketApiModel"
|
||||
|
||||
export class OrderApiModel extends OrderModel {
|
||||
tickets: Array<TicketApiModel>
|
||||
account: AccountModel
|
||||
payment: PaymentModel
|
||||
address: AddressModel
|
||||
}
|
||||
@@ -2,4 +2,5 @@ export class TicketModel {
|
||||
id: number
|
||||
orderId: number = -1
|
||||
orderPrice: number = 0
|
||||
concertId: number = 0
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import vuetify from './plugins/vuetify'
|
||||
import router from './plugins/router'
|
||||
import pinia from './plugins/pinia'
|
||||
import { i18n } from './plugins/i18n'
|
||||
import { useFeedbackStore } from './data/stores/feedbackStore'
|
||||
import { useFeedbackStore } from './stores/feedbackStore'
|
||||
|
||||
createApp(App)
|
||||
.use(vuetify)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
const feedbackStore = useFeedbackStore()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import confirmDialog from '@/components/basics/confirmDialog.vue';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const showConfirmDialog = ref(false)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { AddressModel } from '@/data/models/user/addressModel';
|
||||
import { getNumberStartRules, getPostalRules, getStringRules } from '@/scripts/validationRules';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { PaymentModel } from '@/data/models/user/paymentModel';
|
||||
import { getIbanRules, getStringRules } from '@/scripts/validationRules';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
@@ -33,7 +33,7 @@ const router = useRouter()
|
||||
<card-view
|
||||
:title="$t('accountManagement')"
|
||||
icon="mdi-account"
|
||||
@click="router.push('/account/edit')"
|
||||
@click="router.push('/account/data')"
|
||||
>
|
||||
{{ $t('accountManagementDescription') }}
|
||||
</card-view>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { ref } from 'vue';
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
@@ -35,7 +35,6 @@ async function startLogin() {
|
||||
if (accountStore.userAccount.id != undefined) {
|
||||
router.push("/account/home")
|
||||
}
|
||||
// todo: Route to account home page
|
||||
}
|
||||
|
||||
loginInProgress.value = false
|
||||
@@ -43,7 +42,11 @@ async function startLogin() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<card-view :title="$t('login')" prepend-icon="mdi-login" elevation="8">
|
||||
<card-view
|
||||
:title="$t('login')"
|
||||
icon="mdi-login"
|
||||
max-width="600"
|
||||
>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
|
||||
@@ -3,8 +3,7 @@ import { AccountModel } from '@/data/models/user/accountModel';
|
||||
import { ref } from 'vue';
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import { getEmailRules, getPasswordRules, getStringRules } from '@/scripts/validationRules';
|
||||
|
||||
const newUser = ref(new AccountModel())
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import orderItem from './orderItem.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { getUserOrders } from '@/data/api/orderApi';
|
||||
import { ref } from 'vue';
|
||||
import { OrderApiModel } from '@/data/models/ordering/orderApiModel';
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
const router = useRouter()
|
||||
const orders = ref<Array<OrderApiModel>>([])
|
||||
|
||||
getUserOrders(accountStore.userAccount.id)
|
||||
.then(result => {
|
||||
orders.value = result.data
|
||||
})
|
||||
accountStore.refreshOrders()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -28,8 +21,8 @@ getUserOrders(accountStore.userAccount.id)
|
||||
</v-row>
|
||||
|
||||
<v-row
|
||||
v-if="orders.length > 0"
|
||||
v-for="order in orders"
|
||||
v-if="accountStore.orders.length > 0"
|
||||
v-for="order in accountStore.orders"
|
||||
>
|
||||
<v-col>
|
||||
<order-item
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import ticketListItem from '@/components/pageParts/ticketListItem.vue';
|
||||
import { OrderApiModel } from '@/data/models/ordering/orderApiModel';
|
||||
import { OrderApiModel } from '@/data/models/apiEndpoints/orderApiModel';
|
||||
import moment from 'moment';
|
||||
|
||||
defineProps({
|
||||
order: OrderApiModel,
|
||||
@@ -10,18 +11,11 @@ defineProps({
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
function formatDateTimeString(string: string) {
|
||||
let date = new Date(string)
|
||||
|
||||
return date.getDate() + '.' + (date.getMonth() + 1) + '.' + date.getFullYear() + ', ' +
|
||||
date.getHours() + ':' + date.getMinutes()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<card-view
|
||||
:title="$t('orderedAt') + ' ' + formatDateTimeString(order.orderedAt) + ' ' + $t('oclock')"
|
||||
:title="$t('orderedAt') + ' ' + moment(order.orderedAt).format('DD.MM.YY, HH:mm') + ' ' + $t('oclock')"
|
||||
variant="outlined"
|
||||
>
|
||||
<v-row>
|
||||
@@ -53,16 +47,16 @@ function formatDateTimeString(string: string) {
|
||||
<v-col>
|
||||
<ticket-list-item
|
||||
:concert="ticket.concert"
|
||||
:event="ticket.concert.event"
|
||||
:band="ticket.concert.event.band"
|
||||
:event="ticket.concert.name"
|
||||
:band="ticket.concert.band"
|
||||
:location="ticket.concert.location"
|
||||
:city="ticket.concert.location.city"
|
||||
:image="ticket.concert.event.image"
|
||||
/>
|
||||
<!-- todo :seat-group="ticket.seat.seatRow.seatGroup.name"
|
||||
:seat-row="ticket.seat.seatRow.row"
|
||||
:image="ticket.concert.image"
|
||||
:seat="ticket.seat.seatNr"
|
||||
:standing-area="ticket.seat.seatRow.seatGroup.standingArea" -->
|
||||
:seat-group="ticket.seat.seatRow.seatGroup.name"
|
||||
:seat-row="ticket.seat.seatRow.row"
|
||||
:standing-area="ticket.seat.seatRow.seatGroup.standingArea"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import cardWithTopImage from '@/components/basics/cardViewTopImage.vue';
|
||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
||||
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||
import { BandApiModel } from '@/data/models/acts/bandApiModel';
|
||||
|
||||
const feedbackStore = useFeedbackStore()
|
||||
|
||||
@@ -3,7 +3,7 @@ import concertListItem from '@/components/pageParts/concertListItem.vue';
|
||||
import { BandApiModel } from '@/data/models/acts/bandApiModel';
|
||||
import { ConcertApiModel } from '@/data/models/acts/concertApiModel';
|
||||
import CardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
||||
import { useConcertStore } from '@/data/stores/concertStore';
|
||||
import { useConcertStore } from '@/stores/concertStore';
|
||||
|
||||
const concertStore = useConcertStore()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { BandModel } from '@/data/models/acts/bandModel';
|
||||
import { useBandStore } from '@/data/stores/bandStore';
|
||||
import { useBandStore } from '@/stores/bandStore';
|
||||
|
||||
const bandStore = useBandStore()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import gallerySection from './gallerySection.vue';
|
||||
import concertSection from './concertSection.vue';
|
||||
import heroImage from '@/components/pageParts/heroImage.vue';
|
||||
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
||||
import { useBandStore } from '@/data/stores/bandStore';
|
||||
import { useBandStore } from '@/stores/bandStore';
|
||||
|
||||
const router = useRouter()
|
||||
const bandStore = useBandStore()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useBandStore } from '@/data/stores/bandStore';
|
||||
import { useBandStore } from '@/stores/bandStore';
|
||||
import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
||||
import bandListItem from '@/components/pageParts/bandListItem.vue';
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
import seatPlanMap from '@/components/seatPlanMap/seatPlanMap.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
||||
import { useBasketStore } from '@/data/stores/basketStore';
|
||||
import { useBasketStore } from '@/stores/basketStore';
|
||||
import concertListItem from '@/components/pageParts/concertListItem.vue';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { useConcertStore } from '@/data/stores/concertStore';
|
||||
import { useConcertStore } from '@/stores/concertStore';
|
||||
|
||||
const router = useRouter()
|
||||
const basketStore = useBasketStore()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useConcertStore } from '@/data/stores/concertStore';
|
||||
import { useConcertStore } from '@/stores/concertStore';
|
||||
import concertListItem from '@/components/pageParts/concertListItem.vue';
|
||||
import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
||||
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import OutlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { useShoppingStore } from '@/data/stores/shoppingStore';
|
||||
import { useShoppingStore } from '@/stores/shoppingStore';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const shoppingStore = useShoppingStore()
|
||||
|
||||
@@ -5,9 +5,9 @@ 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 { useConcertStore } from '@/data/stores/concertStore';
|
||||
import { useLocationStore } from '@/data/stores/locationStore';
|
||||
import { useBandStore } from '@/data/stores/bandStore';
|
||||
import { useConcertStore } from '@/stores/concertStore';
|
||||
import { useLocationStore } from '@/stores/locationStore';
|
||||
import { useBandStore } from '@/stores/bandStore';
|
||||
|
||||
const router = useRouter()
|
||||
const concertStore = useConcertStore()
|
||||
|
||||
@@ -4,7 +4,7 @@ import sectionDivider from '@/components/basics/sectionDivider.vue';
|
||||
import seatPlanMap from '@/components/seatPlanMap/seatPlanMap.vue';
|
||||
import { getLocation } from '@/data/api/locationApi';
|
||||
import { ref } from 'vue';
|
||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
||||
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||
import heroImage from '@/components/pageParts/heroImage.vue';
|
||||
import concertListItem from '@/components/pageParts/concertListItem.vue';
|
||||
import { LocationDetailsApiModel } from '@/data/models/locations/locationDetailsApiModel';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
||||
import cardWithTopImage from '@/components/basics/cardViewTopImage.vue';
|
||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
||||
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||
import locationListItem from '@/components/pageParts/locationListItem.vue';
|
||||
import { useLocationStore } from '@/data/stores/locationStore';
|
||||
import { useLocationStore } from '@/stores/locationStore';
|
||||
|
||||
const locationStore = useLocationStore()
|
||||
const feedbackStore = useFeedbackStore()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useBasketStore } from '@/data/stores/basketStore';
|
||||
import { useBasketStore } from '@/stores/basketStore';
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import orderingDialog from './orderingDialog.vue';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { ref } from 'vue';
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
import ticketsTable from './ticketsTable.vue';
|
||||
|
||||
const basketStore = useBasketStore()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import actionDialog from '@/components/basics/actionDialog.vue';
|
||||
import { useBasketStore } from '@/data/stores/basketStore';
|
||||
import { useBasketStore } from '@/stores/basketStore';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { ModelRef, ref } from 'vue';
|
||||
import { useAccountStore } from '@/data/stores/accountStore';
|
||||
import { useAccountStore } from '@/stores/account.store';
|
||||
|
||||
const basketStore = useBasketStore()
|
||||
const accountStore = useAccountStore()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useBasketStore } from '@/data/stores/basketStore';
|
||||
import { useBasketStore } from '@/stores/basketStore';
|
||||
import { BasketItemModel } from '@/data/models/ordering/basketItemModel';
|
||||
import { calcPrice } from '@/scripts/concertScripts';
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
import { getAllExerciseGroups } from '@/data/api/exerciseApi';
|
||||
import scoreCard from './scoreCard.vue';
|
||||
import { ref } from 'vue';
|
||||
import { ExerciseGroupModel } from '@/data/models/exercises/exerciseGroupModel';
|
||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
||||
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||
import { ExerciseGroupApiModel } from '@/data/models/exercises/exerciseGroupApiModel';
|
||||
|
||||
const exerciseGroups = ref<Array<ExerciseGroupModel>>([])
|
||||
const exerciseGroups = ref<Array<ExerciseGroupApiModel>>([])
|
||||
const feedbackStore = useFeedbackStore()
|
||||
|
||||
feedbackStore.fetchDataFromServerInProgress = true
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import { ExerciseGroupModel } from '@/data/models/exercises/exerciseGroupModel';
|
||||
import { ExerciseGroupApiModel } from '@/data/models/exercises/exerciseGroupApiModel';
|
||||
|
||||
defineProps({
|
||||
exerciseGroup: ExerciseGroupModel,
|
||||
exerciseGroup: ExerciseGroupApiModel,
|
||||
loading: Boolean
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -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 '@/data/stores/preferencesStore';
|
||||
import { usePreferencesStore } from '@/stores/preferencesStore';
|
||||
|
||||
const preferencesStore = usePreferencesStore()
|
||||
const theme = useTheme()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { BannerStateEnum } from '@/data/enums/bannerStateEnum';
|
||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
||||
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
@@ -5,7 +5,7 @@ import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
||||
import locationListItem from '@/components/pageParts/locationListItem.vue';
|
||||
import cardViewTopImage from '@/components/basics/cardViewTopImage.vue';
|
||||
import bandListItem from '@/components/pageParts/bandListItem.vue';
|
||||
import { useSearchStore } from '@/data/stores/searchStore';
|
||||
import { useSearchStore } from '@/stores/searchStore';
|
||||
|
||||
const searchStore = useSearchStore()
|
||||
</script>
|
||||
@@ -118,7 +118,7 @@ const searchStore = useSearchStore()
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row
|
||||
<!-- <v-row
|
||||
v-else-if="searchStore.events.length > 0"
|
||||
v-for="event in searchStore.events"
|
||||
>
|
||||
@@ -130,7 +130,7 @@ const searchStore = useSearchStore()
|
||||
:loading="searchStore.searchInProgress"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-row> -->
|
||||
|
||||
<v-row v-else >
|
||||
<v-col>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import { useSearchStore } from '@/data/stores/searchStore';
|
||||
import { useSearchStore } from '@/stores/searchStore';
|
||||
|
||||
const searchStore = useSearchStore()
|
||||
</script>
|
||||
|
||||
@@ -20,7 +20,7 @@ const routes = [
|
||||
{ path: "/", component: HomePage },
|
||||
|
||||
// Account
|
||||
{ path: '/account', component: AccountHomePage },
|
||||
{ path: '/account/home', component: AccountHomePage },
|
||||
{ path: '/account/orders', component: OrdersPage },
|
||||
{ path: '/account/data', component: AccountDataPage },
|
||||
{ path: '/account/login', component: LoginPage },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useFeedbackStore } from "@/data/stores/feedbackStore"
|
||||
import { useFeedbackStore } from "@/stores/feedbackStore"
|
||||
|
||||
/**
|
||||
* Check a string for no numbers and more than four digits
|
||||
|
||||
@@ -1,21 +1,33 @@
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { defineStore } from "pinia";
|
||||
import { AccountModel } from "../models/user/accountModel";
|
||||
import { OrderModel } from "../models/ordering/orderModel";
|
||||
import { AccountModel } from "../data/models/user/accountModel";
|
||||
import { OrderModel } from "../data/models/ordering/orderModel";
|
||||
import { useFeedbackStore } from "./feedbackStore";
|
||||
import { loginAccount, registerAccount, updateAccount } from "../api/accountApi";
|
||||
import { getUserOrders } from "../api/orderApi";
|
||||
import { BannerStateEnum } from "../enums/bannerStateEnum";
|
||||
import { AddressModel } from "../models/user/addressModel";
|
||||
import { PaymentModel } from "../models/user/paymentModel";
|
||||
import { AccountApiModel } from "../models/user/accountApiModel";
|
||||
import { loginAccount, registerAccount, updateAccount } from "../data/api/accountApi";
|
||||
import { getUserOrders } from "../data/api/orderApi";
|
||||
import { BannerStateEnum } from "../data/enums/bannerStateEnum";
|
||||
import { AddressModel } from "../data/models/user/addressModel";
|
||||
import { PaymentModel } from "../data/models/user/paymentModel";
|
||||
import { AccountApiModel } from "../data/models/user/accountApiModel";
|
||||
import { ref } from "vue";
|
||||
import { OrderApiModel } from "@/data/models/ordering/orderApiModel";
|
||||
|
||||
export const useAccountStore = defineStore("accountStore", {
|
||||
state: () => ({
|
||||
userAccount: useLocalStorage("hackmycart/accountStore/userAccount", new AccountApiModel())
|
||||
/** Useraccount which is currently logged in */
|
||||
userAccount: useLocalStorage("hackmycart/accountStore/userAccount", new AccountApiModel()),
|
||||
|
||||
/** All orders of the user */
|
||||
orders: ref<Array<OrderApiModel>>([])
|
||||
}),
|
||||
|
||||
actions: {
|
||||
/**
|
||||
* Start the login process
|
||||
*
|
||||
* @param username Account username
|
||||
* @param password Account password
|
||||
*/
|
||||
async login(username: string, password: string) {
|
||||
const feedbackStore = useFeedbackStore()
|
||||
|
||||
@@ -36,6 +48,11 @@ export const useAccountStore = defineStore("accountStore", {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Register a new account to the database
|
||||
*
|
||||
* @param userAccount New account dataset
|
||||
*/
|
||||
async registerAccount(userAccount: AccountModel) {
|
||||
const feedbackStore = useFeedbackStore()
|
||||
|
||||
@@ -74,6 +91,9 @@ export const useAccountStore = defineStore("accountStore", {
|
||||
feedbackStore.changeBanner(BannerStateEnum.ACCOUNTLOGOUTSUCCESSFUL)
|
||||
},
|
||||
|
||||
/**
|
||||
* Get all orders from current user
|
||||
*/
|
||||
async refreshOrders() {
|
||||
await getUserOrders(this.userAccount.id)
|
||||
.then(result => {
|
||||
@@ -92,12 +112,22 @@ export const useAccountStore = defineStore("accountStore", {
|
||||
return Math.round(totalPrice * 100) / 100
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove an address from the user model
|
||||
*
|
||||
* @param address Address dataset to remove
|
||||
*/
|
||||
removeAddress(address: AddressModel) {
|
||||
this.userAccount.addresses = this.userAccount.addresses.filter((addr: AddressModel) =>
|
||||
addr != address
|
||||
)
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove an payment from the user model
|
||||
*
|
||||
* @param address Payment dataset to remove
|
||||
*/
|
||||
removePayment(payment: PaymentModel) {
|
||||
this.userAccount.payments = this.userAccount.payments.filter((paym: PaymentModel) =>
|
||||
paym != payment
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { BandApiModel } from "../models/acts/bandApiModel";
|
||||
import { fetchAllBands, getBand } from "../api/bandApi";
|
||||
import { BandDetailsApiModel } from "../models/acts/bandDetailsApiModel";
|
||||
import { BandApiModel } from "../data/models/acts/bandApiModel";
|
||||
import { fetchAllBands, getBand } from "../data/api/bandApi";
|
||||
import { BandDetailsApiModel } from "../data/models/acts/bandDetailsApiModel";
|
||||
|
||||
export const useBandStore = defineStore("bandStore", {
|
||||
state: () => ({
|
||||
@@ -1,15 +1,15 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { BasketItemModel } from "../models/ordering/basketItemModel";
|
||||
import { BasketItemModel } from "../data/models/ordering/basketItemModel";
|
||||
import { useFeedbackStore } from "./feedbackStore";
|
||||
import { BannerStateEnum } from "../enums/bannerStateEnum";
|
||||
import { AddressModel } from "../models/user/addressModel";
|
||||
import { PaymentModel } from "../models/user/paymentModel";
|
||||
import { BannerStateEnum } from "../data/enums/bannerStateEnum";
|
||||
import { AddressModel } from "../data/models/user/addressModel";
|
||||
import { PaymentModel } from "../data/models/user/paymentModel";
|
||||
import { ref } from "vue";
|
||||
import { SelectedSeatModel } from "../models/ordering/selectedSeatModel";
|
||||
import { SelectedSeatModel } from "../data/models/ordering/selectedSeatModel";
|
||||
import { calcPrice } from "@/scripts/concertScripts";
|
||||
import { BandModel } from "../models/acts/bandModel";
|
||||
import { ConcertModel } from "../models/acts/concertModel";
|
||||
import { BandModel } from "../data/models/acts/bandModel";
|
||||
import { ConcertModel } from "../data/models/acts/concertModel";
|
||||
|
||||
export const useBasketStore = defineStore('basketStore', {
|
||||
state: () => ({
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { ConcertApiModel } from "../models/acts/concertApiModel";
|
||||
import { fetchConcert, fetchConcerts, fetchUpcomingConcerts } from "../api/concertApi";
|
||||
import { ConcertDetailsApiModel } from "../models/acts/concertDetailsApiModel";
|
||||
import { ConcertApiModel } from "../data/models/acts/concertApiModel";
|
||||
import { fetchConcert, fetchConcerts, fetchUpcomingConcerts } from "../data/api/concertApi";
|
||||
import { ConcertDetailsApiModel } from "../data/models/acts/concertDetailsApiModel";
|
||||
|
||||
export const useConcertStore = defineStore("concertStore", {
|
||||
state: () => ({
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { BannerStateEnum } from "../enums/bannerStateEnum";
|
||||
import { BannerStateEnum } from "../data/enums/bannerStateEnum";
|
||||
import { Composer } from 'vue-i18n';
|
||||
|
||||
export const useFeedbackStore = defineStore("feedbackStore", {
|
||||
@@ -1,9 +1,9 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { fetchAllLocations, fetchTopLocations } from "../api/locationApi";
|
||||
import { LocationApiModel } from "../models/locations/locationApiModel";
|
||||
import { CityModel } from "../models/locations/cityModel";
|
||||
import { fetchAllCities } from "../api/cityApi";
|
||||
import { fetchAllLocations, 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";
|
||||
|
||||
export const useLocationStore = defineStore("locationStore", {
|
||||
state: () => ({
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { ThemeEnum } from "../enums/themeEnums";
|
||||
import { LanguageEnum } from "../enums/languageEnum";
|
||||
import { ThemeEnum } from "../data/enums/themeEnums";
|
||||
import { LanguageEnum } from "../data/enums/languageEnum";
|
||||
|
||||
export const usePreferencesStore = defineStore('preferencesStore', {
|
||||
state: () => ({
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { searchBand } from "../api/bandApi";
|
||||
import { searchLocation } from "../api/locationApi";
|
||||
import { searchConcert } from "../api/concertApi";
|
||||
import { searchBand } from "../data/api/bandApi";
|
||||
import { searchLocation } from "../data/api/locationApi";
|
||||
import { searchConcert } from "../data/api/concertApi";
|
||||
|
||||
export const useSearchStore = defineStore("searchStore", {
|
||||
state: () => ({
|
||||
@@ -1,12 +1,12 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { ConcertApiModel } from "../models/acts/concertApiModel";
|
||||
import { BandApiModel } from "../models/acts/bandApiModel";
|
||||
import { CityApiModel } from "../models/locations/cityApiModel";
|
||||
import { GenreApiModel } from "../models/acts/genreApiModel";
|
||||
import { searchBand } from "../api/bandApi";
|
||||
import { searchLocation } from "../api/locationApi";
|
||||
import { fetchConcerts, searchConcert } from "../api/concertApi";
|
||||
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", {
|
||||
@@ -1,10 +1,10 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { fetchAllCities } from "../api/cityApi";
|
||||
import { fetchAllGenres } from "../api/genreApi";
|
||||
import { fetchAllCities } from "../data/api/cityApi";
|
||||
import { fetchAllGenres } from "../data/api/genreApi";
|
||||
import { useFeedbackStore } from "./feedbackStore";
|
||||
import { CityApiModel } from "../models/locations/cityApiModel";
|
||||
import { GenreApiModel } from "../models/acts/genreApiModel";
|
||||
import { CityApiModel } from "../data/models/locations/cityApiModel";
|
||||
import { GenreApiModel } from "../data/models/acts/genreApiModel";
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
Reference in New Issue
Block a user