Fixed Account pages
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.17 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.17">
|
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.17 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.17">
|
||||||
<diagram name="Page-1" id="WevClHWmhzPAQ7FDN5po">
|
<diagram name="Page-1" id="WevClHWmhzPAQ7FDN5po">
|
||||||
<mxGraphModel dx="3676" dy="1858" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
<mxGraphModel dx="3470" dy="1739" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
<root>
|
<root>
|
||||||
<mxCell id="0" />
|
<mxCell id="0" />
|
||||||
<mxCell id="1" parent="0" />
|
<mxCell id="1" parent="0" />
|
||||||
@@ -458,8 +458,8 @@
|
|||||||
<mxPoint x="-1598.1399999999999" y="440" as="sourcePoint" />
|
<mxPoint x="-1598.1399999999999" y="440" as="sourcePoint" />
|
||||||
<mxPoint x="-1719.1" y="330" as="targetPoint" />
|
<mxPoint x="-1719.1" y="330" as="targetPoint" />
|
||||||
<Array as="points">
|
<Array as="points">
|
||||||
<mxPoint x="-1328.1399999999999" y="235" />
|
<mxPoint x="-1240" y="205" />
|
||||||
<mxPoint x="-1328.1399999999999" y="355" />
|
<mxPoint x="-1240" y="195" />
|
||||||
</Array>
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
@@ -478,8 +478,8 @@
|
|||||||
<mxPoint x="-1883.58" y="440" as="sourcePoint" />
|
<mxPoint x="-1883.58" y="440" as="sourcePoint" />
|
||||||
<mxPoint x="-1618.1399999999999" y="480" as="targetPoint" />
|
<mxPoint x="-1618.1399999999999" y="480" as="targetPoint" />
|
||||||
<Array as="points">
|
<Array as="points">
|
||||||
<mxPoint x="-1288.1399999999999" y="265" />
|
<mxPoint x="-1288" y="235" />
|
||||||
<mxPoint x="-1288.1399999999999" y="555" />
|
<mxPoint x="-1288" y="395" />
|
||||||
</Array>
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
@@ -835,10 +835,10 @@
|
|||||||
<mxCell id="4QbvcL21_BjxR5MsDnpr-17" value="<blockquote style="margin: 0px 0px 0px 8px; border: none; padding: 0px;">groupNr: Number</blockquote>" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
|
<mxCell id="4QbvcL21_BjxR5MsDnpr-17" value="<blockquote style="margin: 0px 0px 0px 8px; border: none; padding: 0px;">groupNr: Number</blockquote>" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
|
||||||
<mxGeometry x="-1518.1399999999999" y="760" width="160" height="30" as="geometry" />
|
<mxGeometry x="-1518.1399999999999" y="760" width="160" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="q2-4bsxMYXESQ5WjL4G4-1" value="<blockquote style="margin: 0px 0px 0px 8px; border: none; padding: 0px;">name: String</blockquote>" style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
|
<mxCell id="q2-4bsxMYXESQ5WjL4G4-1" value="<blockquote style="margin: 0px 0px 0px 8px; border: none; padding: 0px;">name: String</blockquote>" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
|
||||||
<mxGeometry x="-597.97" y="130" width="160" height="30" as="geometry" />
|
<mxGeometry x="-597.97" y="130" width="160" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="q2-4bsxMYXESQ5WjL4G4-3" value="<blockquote style="margin: 0px 0px 0px 8px; border: none; padding: 0px;">layout: Number</blockquote>" style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
|
<mxCell id="q2-4bsxMYXESQ5WjL4G4-3" value="<blockquote style="margin: 0px 0px 0px 8px; border: none; padding: 0px;">layout: Number</blockquote>" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
|
||||||
<mxGeometry x="-597.97" y="570" width="160" height="30" as="geometry" />
|
<mxGeometry x="-597.97" y="570" width="160" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
8
software/package-lock.json
generated
8
software/package-lock.json
generated
@@ -15,6 +15,8 @@
|
|||||||
"concurrently": "^9.0.1",
|
"concurrently": "^9.0.1",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.21.1",
|
"express": "^4.21.1",
|
||||||
|
"moment": "^2.30.1",
|
||||||
|
"momentjs": "^2.0.0",
|
||||||
"pinia": "^2.2.4",
|
"pinia": "^2.2.4",
|
||||||
"reflect-metadata": "^0.2.2",
|
"reflect-metadata": "^0.2.2",
|
||||||
"sequelize": "^6.37.4",
|
"sequelize": "^6.37.4",
|
||||||
@@ -4070,6 +4072,12 @@
|
|||||||
"node": "*"
|
"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": {
|
"node_modules/ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
"concurrently": "^9.0.1",
|
"concurrently": "^9.0.1",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.21.1",
|
"express": "^4.21.1",
|
||||||
|
"moment": "^2.30.1",
|
||||||
|
"momentjs": "^2.0.0",
|
||||||
"pinia": "^2.2.4",
|
"pinia": "^2.2.4",
|
||||||
"reflect-metadata": "^0.2.2",
|
"reflect-metadata": "^0.2.2",
|
||||||
"sequelize": "^6.37.4",
|
"sequelize": "^6.37.4",
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import { i18n } from './plugins/i18n';
|
|||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import navigationAppendItems from './components/navigation/navigationAppendItems.vue';
|
import navigationAppendItems from './components/navigation/navigationAppendItems.vue';
|
||||||
import navigationPrependItems from './components/navigation/navigationPrependItems.vue';
|
import navigationPrependItems from './components/navigation/navigationPrependItems.vue';
|
||||||
import { usePreferencesStore } from './data/stores/preferencesStore';
|
import { usePreferencesStore } from './stores/preferencesStore';
|
||||||
import { useFeedbackStore } from './data/stores/feedbackStore';
|
import { useFeedbackStore } from './stores/feedbackStore';
|
||||||
import footerItems from './components/navigation/footerItems.vue';
|
import footerItems from './components/navigation/footerItems.vue';
|
||||||
import urlBar from './components/navigation/urlBar.vue';
|
import urlBar from './components/navigation/urlBar.vue';
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
title: String,
|
title: String,
|
||||||
|
subtitle: String,
|
||||||
icon: {
|
icon: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
@@ -15,13 +16,20 @@ defineProps({
|
|||||||
<template>
|
<template>
|
||||||
<v-card variant="tonal" >
|
<v-card variant="tonal" >
|
||||||
<v-card-title v-if="title || loading" color="primary" class="pa-0">
|
<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
|
<v-skeleton-loader
|
||||||
type="heading"
|
type="heading"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
style="background-color: transparent"
|
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-skeleton-loader>
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAccountStore } from '@/data/stores/accountStore';
|
import { useAccountStore } from '@/stores/account.store';
|
||||||
import { useBasketStore } from '@/data/stores/basketStore';
|
import { useBasketStore } from '@/stores/basketStore';
|
||||||
|
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
const basketStore = useBasketStore()
|
const basketStore = useBasketStore()
|
||||||
@@ -9,8 +9,8 @@ const basketStore = useBasketStore()
|
|||||||
<template>
|
<template>
|
||||||
<v-btn variant="plain" icon="mdi-magnify" to="/search" />
|
<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-if="accountStore.userAccount.id == undefined" variant="plain" icon="mdi-account" to="/account/login" />
|
||||||
<v-btn v-else variant="plain" icon="mdi-account" to="/account" />
|
<v-btn v-else variant="plain" icon="mdi-account" to="/account/home" />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<v-badge
|
<v-badge
|
||||||
|
|||||||
@@ -34,12 +34,9 @@ defineProps({
|
|||||||
|
|
||||||
seatRow: Number,
|
seatRow: Number,
|
||||||
|
|
||||||
seat: Number,
|
seatNr: Number,
|
||||||
|
|
||||||
standingArea: {
|
standingArea: Boolean
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -110,7 +107,7 @@ defineProps({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{{ seat }}
|
{{ seatNr }}
|
||||||
</div>
|
</div>
|
||||||
</v-card>
|
</v-card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { SeatGroupModel } from '@/data/models/locations/seatGroupModel';
|
|||||||
import { SeatModel } from '@/data/models/locations/seatModel';
|
import { SeatModel } from '@/data/models/locations/seatModel';
|
||||||
import { SeatRowModel } from '@/data/models/locations/seatRowModel';
|
import { SeatRowModel } from '@/data/models/locations/seatRowModel';
|
||||||
import { SelectedSeatModel } from '@/data/models/ordering/selectedSeatModel';
|
import { SelectedSeatModel } from '@/data/models/ordering/selectedSeatModel';
|
||||||
import { useBasketStore } from '@/data/stores/basketStore';
|
import { useBasketStore } from '@/stores/basketStore';
|
||||||
|
|
||||||
const basketStore = useBasketStore()
|
const basketStore = useBasketStore()
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ConcertModel } from '@/data/models/acts/concertModel';
|
import { ConcertModel } from '@/data/models/acts/concertModel';
|
||||||
import { SeatGroupModel } from '@/data/models/locations/seatGroupModel';
|
import { SeatGroupModel } from '@/data/models/locations/seatGroupModel';
|
||||||
import { SelectedSeatModel } from '@/data/models/ordering/selectedSeatModel';
|
import { SelectedSeatModel } from '@/data/models/ordering/selectedSeatModel';
|
||||||
import { useBasketStore } from '@/data/stores/basketStore';
|
import { useBasketStore } from '@/stores/basketStore';
|
||||||
|
|
||||||
const basketStore = useBasketStore()
|
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 {
|
export class SeatGroupModel {
|
||||||
name: string = ""
|
name: string = ""
|
||||||
surcharge: number = 0
|
surcharge: number = 0
|
||||||
standingArea: Boolean = false
|
standingArea: boolean = false
|
||||||
capacity: number = 0
|
capacity: number = 0
|
||||||
seatRows: Array<SeatRowModel>
|
seatRows: Array<SeatRowModel>
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
export class SeatModel {
|
export class SeatModel {
|
||||||
id: number = -1
|
id: number = -1
|
||||||
seatNr: string = ""
|
seatNr: number = 0
|
||||||
state: 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
|
id: number
|
||||||
orderId: number = -1
|
orderId: number = -1
|
||||||
orderPrice: number = 0
|
orderPrice: number = 0
|
||||||
|
concertId: number = 0
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import vuetify from './plugins/vuetify'
|
|||||||
import router from './plugins/router'
|
import router from './plugins/router'
|
||||||
import pinia from './plugins/pinia'
|
import pinia from './plugins/pinia'
|
||||||
import { i18n } from './plugins/i18n'
|
import { i18n } from './plugins/i18n'
|
||||||
import { useFeedbackStore } from './data/stores/feedbackStore'
|
import { useFeedbackStore } from './stores/feedbackStore'
|
||||||
|
|
||||||
createApp(App)
|
createApp(App)
|
||||||
.use(vuetify)
|
.use(vuetify)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import { useAccountStore } from '@/data/stores/accountStore';
|
import { useAccountStore } from '@/stores/account.store';
|
||||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||||
|
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
const feedbackStore = useFeedbackStore()
|
const feedbackStore = useFeedbackStore()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import confirmDialog from '@/components/basics/confirmDialog.vue';
|
import confirmDialog from '@/components/basics/confirmDialog.vue';
|
||||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { useAccountStore } from '@/data/stores/accountStore';
|
import { useAccountStore } from '@/stores/account.store';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const showConfirmDialog = ref(false)
|
const showConfirmDialog = ref(false)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
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 outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { AddressModel } from '@/data/models/user/addressModel';
|
import { AddressModel } from '@/data/models/user/addressModel';
|
||||||
import { getNumberStartRules, getPostalRules, getStringRules } from '@/scripts/validationRules';
|
import { getNumberStartRules, getPostalRules, getStringRules } from '@/scripts/validationRules';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
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 outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { PaymentModel } from '@/data/models/user/paymentModel';
|
import { PaymentModel } from '@/data/models/user/paymentModel';
|
||||||
import { getIbanRules, getStringRules } from '@/scripts/validationRules';
|
import { getIbanRules, getStringRules } from '@/scripts/validationRules';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAccountStore } from '@/data/stores/accountStore';
|
import { useAccountStore } from '@/stores/account.store';
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ const router = useRouter()
|
|||||||
<card-view
|
<card-view
|
||||||
:title="$t('accountManagement')"
|
:title="$t('accountManagement')"
|
||||||
icon="mdi-account"
|
icon="mdi-account"
|
||||||
@click="router.push('/account/edit')"
|
@click="router.push('/account/data')"
|
||||||
>
|
>
|
||||||
{{ $t('accountManagementDescription') }}
|
{{ $t('accountManagementDescription') }}
|
||||||
</card-view>
|
</card-view>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import outlinedButton from '@/components/basics/outlinedButton.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';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
@@ -35,7 +35,6 @@ async function startLogin() {
|
|||||||
if (accountStore.userAccount.id != undefined) {
|
if (accountStore.userAccount.id != undefined) {
|
||||||
router.push("/account/home")
|
router.push("/account/home")
|
||||||
}
|
}
|
||||||
// todo: Route to account home page
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loginInProgress.value = false
|
loginInProgress.value = false
|
||||||
@@ -43,7 +42,11 @@ async function startLogin() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<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-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ import { AccountModel } from '@/data/models/user/accountModel';
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { useAccountStore } from '@/data/stores/accountStore';
|
import { useAccountStore } from '@/stores/account.store';
|
||||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
|
||||||
import { getEmailRules, getPasswordRules, getStringRules } from '@/scripts/validationRules';
|
import { getEmailRules, getPasswordRules, getStringRules } from '@/scripts/validationRules';
|
||||||
|
|
||||||
const newUser = ref(new AccountModel())
|
const newUser = ref(new AccountModel())
|
||||||
|
|||||||
@@ -1,20 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAccountStore } from '@/data/stores/accountStore';
|
import { useAccountStore } from '@/stores/account.store';
|
||||||
import orderItem from './orderItem.vue';
|
import orderItem from './orderItem.vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
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 accountStore = useAccountStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const orders = ref<Array<OrderApiModel>>([])
|
|
||||||
|
|
||||||
getUserOrders(accountStore.userAccount.id)
|
accountStore.refreshOrders()
|
||||||
.then(result => {
|
|
||||||
orders.value = result.data
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -28,8 +21,8 @@ getUserOrders(accountStore.userAccount.id)
|
|||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row
|
<v-row
|
||||||
v-if="orders.length > 0"
|
v-if="accountStore.orders.length > 0"
|
||||||
v-for="order in orders"
|
v-for="order in accountStore.orders"
|
||||||
>
|
>
|
||||||
<v-col>
|
<v-col>
|
||||||
<order-item
|
<order-item
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import ticketListItem from '@/components/pageParts/ticketListItem.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({
|
defineProps({
|
||||||
order: OrderApiModel,
|
order: OrderApiModel,
|
||||||
@@ -10,18 +11,11 @@ defineProps({
|
|||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function formatDateTimeString(string: string) {
|
|
||||||
let date = new Date(string)
|
|
||||||
|
|
||||||
return date.getDate() + '.' + (date.getMonth() + 1) + '.' + date.getFullYear() + ', ' +
|
|
||||||
date.getHours() + ':' + date.getMinutes()
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<card-view
|
<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"
|
variant="outlined"
|
||||||
>
|
>
|
||||||
<v-row>
|
<v-row>
|
||||||
@@ -53,16 +47,16 @@ function formatDateTimeString(string: string) {
|
|||||||
<v-col>
|
<v-col>
|
||||||
<ticket-list-item
|
<ticket-list-item
|
||||||
:concert="ticket.concert"
|
:concert="ticket.concert"
|
||||||
:event="ticket.concert.event"
|
:event="ticket.concert.name"
|
||||||
:band="ticket.concert.event.band"
|
:band="ticket.concert.band"
|
||||||
:location="ticket.concert.location"
|
:location="ticket.concert.location"
|
||||||
:city="ticket.concert.location.city"
|
:city="ticket.concert.location.city"
|
||||||
:image="ticket.concert.event.image"
|
:image="ticket.concert.image"
|
||||||
/>
|
|
||||||
<!-- todo :seat-group="ticket.seat.seatRow.seatGroup.name"
|
|
||||||
:seat-row="ticket.seat.seatRow.row"
|
|
||||||
:seat="ticket.seat.seatNr"
|
: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-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardWithTopImage from '@/components/basics/cardViewTopImage.vue';
|
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';
|
import { BandApiModel } from '@/data/models/acts/bandApiModel';
|
||||||
|
|
||||||
const feedbackStore = useFeedbackStore()
|
const feedbackStore = useFeedbackStore()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import concertListItem from '@/components/pageParts/concertListItem.vue';
|
|||||||
import { BandApiModel } from '@/data/models/acts/bandApiModel';
|
import { BandApiModel } from '@/data/models/acts/bandApiModel';
|
||||||
import { ConcertApiModel } from '@/data/models/acts/concertApiModel';
|
import { ConcertApiModel } from '@/data/models/acts/concertApiModel';
|
||||||
import CardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
import CardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
||||||
import { useConcertStore } from '@/data/stores/concertStore';
|
import { useConcertStore } from '@/stores/concertStore';
|
||||||
|
|
||||||
const concertStore = useConcertStore()
|
const concertStore = useConcertStore()
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { BandModel } from '@/data/models/acts/bandModel';
|
import { BandModel } from '@/data/models/acts/bandModel';
|
||||||
import { useBandStore } from '@/data/stores/bandStore';
|
import { useBandStore } from '@/stores/bandStore';
|
||||||
|
|
||||||
const bandStore = useBandStore()
|
const bandStore = useBandStore()
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import gallerySection from './gallerySection.vue';
|
|||||||
import concertSection from './concertSection.vue';
|
import concertSection from './concertSection.vue';
|
||||||
import heroImage from '@/components/pageParts/heroImage.vue';
|
import heroImage from '@/components/pageParts/heroImage.vue';
|
||||||
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
||||||
import { useBandStore } from '@/data/stores/bandStore';
|
import { useBandStore } from '@/stores/bandStore';
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const bandStore = useBandStore()
|
const bandStore = useBandStore()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useBandStore } from '@/data/stores/bandStore';
|
import { useBandStore } from '@/stores/bandStore';
|
||||||
import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
||||||
import bandListItem from '@/components/pageParts/bandListItem.vue';
|
import bandListItem from '@/components/pageParts/bandListItem.vue';
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
import seatPlanMap from '@/components/seatPlanMap/seatPlanMap.vue';
|
import seatPlanMap from '@/components/seatPlanMap/seatPlanMap.vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
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 concertListItem from '@/components/pageParts/concertListItem.vue';
|
||||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { useConcertStore } from '@/data/stores/concertStore';
|
import { useConcertStore } from '@/stores/concertStore';
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const basketStore = useBasketStore()
|
const basketStore = useBasketStore()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useConcertStore } from '@/data/stores/concertStore';
|
import { useConcertStore } from '@/stores/concertStore';
|
||||||
import concertListItem from '@/components/pageParts/concertListItem.vue';
|
import concertListItem from '@/components/pageParts/concertListItem.vue';
|
||||||
import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
||||||
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import OutlinedButton from '@/components/basics/outlinedButton.vue';
|
import OutlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { useShoppingStore } from '@/data/stores/shoppingStore';
|
import { useShoppingStore } from '@/stores/shoppingStore';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const shoppingStore = useShoppingStore()
|
const shoppingStore = useShoppingStore()
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import cardWithTopImage from '@/components/basics/cardViewTopImage.vue';
|
|||||||
import { lowestTicketPrice } from '@/scripts/concertScripts';
|
import { lowestTicketPrice } from '@/scripts/concertScripts';
|
||||||
import OutlinedButton from '@/components/basics/outlinedButton.vue';
|
import OutlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useConcertStore } from '@/data/stores/concertStore';
|
import { useConcertStore } from '@/stores/concertStore';
|
||||||
import { useLocationStore } from '@/data/stores/locationStore';
|
import { useLocationStore } from '@/stores/locationStore';
|
||||||
import { useBandStore } from '@/data/stores/bandStore';
|
import { useBandStore } from '@/stores/bandStore';
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const concertStore = useConcertStore()
|
const concertStore = useConcertStore()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import sectionDivider from '@/components/basics/sectionDivider.vue';
|
|||||||
import seatPlanMap from '@/components/seatPlanMap/seatPlanMap.vue';
|
import seatPlanMap from '@/components/seatPlanMap/seatPlanMap.vue';
|
||||||
import { getLocation } from '@/data/api/locationApi';
|
import { getLocation } from '@/data/api/locationApi';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||||
import heroImage from '@/components/pageParts/heroImage.vue';
|
import heroImage from '@/components/pageParts/heroImage.vue';
|
||||||
import concertListItem from '@/components/pageParts/concertListItem.vue';
|
import concertListItem from '@/components/pageParts/concertListItem.vue';
|
||||||
import { LocationDetailsApiModel } from '@/data/models/locations/locationDetailsApiModel';
|
import { LocationDetailsApiModel } from '@/data/models/locations/locationDetailsApiModel';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
||||||
import cardWithTopImage from '@/components/basics/cardViewTopImage.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 locationListItem from '@/components/pageParts/locationListItem.vue';
|
||||||
import { useLocationStore } from '@/data/stores/locationStore';
|
import { useLocationStore } from '@/stores/locationStore';
|
||||||
|
|
||||||
const locationStore = useLocationStore()
|
const locationStore = useLocationStore()
|
||||||
const feedbackStore = useFeedbackStore()
|
const feedbackStore = useFeedbackStore()
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useBasketStore } from '@/data/stores/basketStore';
|
import { useBasketStore } from '@/stores/basketStore';
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import orderingDialog from './orderingDialog.vue';
|
import orderingDialog from './orderingDialog.vue';
|
||||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useAccountStore } from '@/data/stores/accountStore';
|
import { useAccountStore } from '@/stores/account.store';
|
||||||
import ticketsTable from './ticketsTable.vue';
|
import ticketsTable from './ticketsTable.vue';
|
||||||
|
|
||||||
const basketStore = useBasketStore()
|
const basketStore = useBasketStore()
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import actionDialog from '@/components/basics/actionDialog.vue';
|
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 outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { ModelRef, ref } from 'vue';
|
import { ModelRef, ref } from 'vue';
|
||||||
import { useAccountStore } from '@/data/stores/accountStore';
|
import { useAccountStore } from '@/stores/account.store';
|
||||||
|
|
||||||
const basketStore = useBasketStore()
|
const basketStore = useBasketStore()
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useBasketStore } from '@/data/stores/basketStore';
|
import { useBasketStore } from '@/stores/basketStore';
|
||||||
import { BasketItemModel } from '@/data/models/ordering/basketItemModel';
|
import { BasketItemModel } from '@/data/models/ordering/basketItemModel';
|
||||||
import { calcPrice } from '@/scripts/concertScripts';
|
import { calcPrice } from '@/scripts/concertScripts';
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
import { getAllExerciseGroups } from '@/data/api/exerciseApi';
|
import { getAllExerciseGroups } from '@/data/api/exerciseApi';
|
||||||
import scoreCard from './scoreCard.vue';
|
import scoreCard from './scoreCard.vue';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { ExerciseGroupModel } from '@/data/models/exercises/exerciseGroupModel';
|
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||||
import { useFeedbackStore } from '@/data/stores/feedbackStore';
|
import { ExerciseGroupApiModel } from '@/data/models/exercises/exerciseGroupApiModel';
|
||||||
|
|
||||||
const exerciseGroups = ref<Array<ExerciseGroupModel>>([])
|
const exerciseGroups = ref<Array<ExerciseGroupApiModel>>([])
|
||||||
const feedbackStore = useFeedbackStore()
|
const feedbackStore = useFeedbackStore()
|
||||||
|
|
||||||
feedbackStore.fetchDataFromServerInProgress = true
|
feedbackStore.fetchDataFromServerInProgress = true
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import { ExerciseGroupModel } from '@/data/models/exercises/exerciseGroupModel';
|
import { ExerciseGroupApiModel } from '@/data/models/exercises/exerciseGroupApiModel';
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
exerciseGroup: ExerciseGroupModel,
|
exerciseGroup: ExerciseGroupApiModel,
|
||||||
loading: Boolean
|
loading: Boolean
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { ThemeEnum } from '@/data/enums/themeEnums';
|
|||||||
import { useTheme } from 'vuetify/lib/framework.mjs';
|
import { useTheme } from 'vuetify/lib/framework.mjs';
|
||||||
import { i18n } from '@/plugins/i18n';
|
import { i18n } from '@/plugins/i18n';
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import { usePreferencesStore } from '@/data/stores/preferencesStore';
|
import { usePreferencesStore } from '@/stores/preferencesStore';
|
||||||
|
|
||||||
const preferencesStore = usePreferencesStore()
|
const preferencesStore = usePreferencesStore()
|
||||||
const theme = useTheme()
|
const theme = useTheme()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { BannerStateEnum } from '@/data/enums/bannerStateEnum';
|
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 cardView from '@/components/basics/cardView.vue';
|
||||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
|||||||
import locationListItem from '@/components/pageParts/locationListItem.vue';
|
import locationListItem from '@/components/pageParts/locationListItem.vue';
|
||||||
import cardViewTopImage from '@/components/basics/cardViewTopImage.vue';
|
import cardViewTopImage from '@/components/basics/cardViewTopImage.vue';
|
||||||
import bandListItem from '@/components/pageParts/bandListItem.vue';
|
import bandListItem from '@/components/pageParts/bandListItem.vue';
|
||||||
import { useSearchStore } from '@/data/stores/searchStore';
|
import { useSearchStore } from '@/stores/searchStore';
|
||||||
|
|
||||||
const searchStore = useSearchStore()
|
const searchStore = useSearchStore()
|
||||||
</script>
|
</script>
|
||||||
@@ -118,7 +118,7 @@ const searchStore = useSearchStore()
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row
|
<!-- <v-row
|
||||||
v-else-if="searchStore.events.length > 0"
|
v-else-if="searchStore.events.length > 0"
|
||||||
v-for="event in searchStore.events"
|
v-for="event in searchStore.events"
|
||||||
>
|
>
|
||||||
@@ -130,7 +130,7 @@ const searchStore = useSearchStore()
|
|||||||
:loading="searchStore.searchInProgress"
|
:loading="searchStore.searchInProgress"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row> -->
|
||||||
|
|
||||||
<v-row v-else >
|
<v-row v-else >
|
||||||
<v-col>
|
<v-col>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import { useSearchStore } from '@/data/stores/searchStore';
|
import { useSearchStore } from '@/stores/searchStore';
|
||||||
|
|
||||||
const searchStore = useSearchStore()
|
const searchStore = useSearchStore()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const routes = [
|
|||||||
{ path: "/", component: HomePage },
|
{ path: "/", component: HomePage },
|
||||||
|
|
||||||
// Account
|
// Account
|
||||||
{ path: '/account', component: AccountHomePage },
|
{ path: '/account/home', component: AccountHomePage },
|
||||||
{ path: '/account/orders', component: OrdersPage },
|
{ path: '/account/orders', component: OrdersPage },
|
||||||
{ path: '/account/data', component: AccountDataPage },
|
{ path: '/account/data', component: AccountDataPage },
|
||||||
{ path: '/account/login', component: LoginPage },
|
{ 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
|
* Check a string for no numbers and more than four digits
|
||||||
|
|||||||
@@ -1,21 +1,33 @@
|
|||||||
import { useLocalStorage } from "@vueuse/core";
|
import { useLocalStorage } from "@vueuse/core";
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { AccountModel } from "../models/user/accountModel";
|
import { AccountModel } from "../data/models/user/accountModel";
|
||||||
import { OrderModel } from "../models/ordering/orderModel";
|
import { OrderModel } from "../data/models/ordering/orderModel";
|
||||||
import { useFeedbackStore } from "./feedbackStore";
|
import { useFeedbackStore } from "./feedbackStore";
|
||||||
import { loginAccount, registerAccount, updateAccount } from "../api/accountApi";
|
import { loginAccount, registerAccount, updateAccount } from "../data/api/accountApi";
|
||||||
import { getUserOrders } from "../api/orderApi";
|
import { getUserOrders } from "../data/api/orderApi";
|
||||||
import { BannerStateEnum } from "../enums/bannerStateEnum";
|
import { BannerStateEnum } from "../data/enums/bannerStateEnum";
|
||||||
import { AddressModel } from "../models/user/addressModel";
|
import { AddressModel } from "../data/models/user/addressModel";
|
||||||
import { PaymentModel } from "../models/user/paymentModel";
|
import { PaymentModel } from "../data/models/user/paymentModel";
|
||||||
import { AccountApiModel } from "../models/user/accountApiModel";
|
import { AccountApiModel } from "../data/models/user/accountApiModel";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { OrderApiModel } from "@/data/models/ordering/orderApiModel";
|
||||||
|
|
||||||
export const useAccountStore = defineStore("accountStore", {
|
export const useAccountStore = defineStore("accountStore", {
|
||||||
state: () => ({
|
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: {
|
actions: {
|
||||||
|
/**
|
||||||
|
* Start the login process
|
||||||
|
*
|
||||||
|
* @param username Account username
|
||||||
|
* @param password Account password
|
||||||
|
*/
|
||||||
async login(username: string, password: string) {
|
async login(username: string, password: string) {
|
||||||
const feedbackStore = useFeedbackStore()
|
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) {
|
async registerAccount(userAccount: AccountModel) {
|
||||||
const feedbackStore = useFeedbackStore()
|
const feedbackStore = useFeedbackStore()
|
||||||
|
|
||||||
@@ -74,6 +91,9 @@ export const useAccountStore = defineStore("accountStore", {
|
|||||||
feedbackStore.changeBanner(BannerStateEnum.ACCOUNTLOGOUTSUCCESSFUL)
|
feedbackStore.changeBanner(BannerStateEnum.ACCOUNTLOGOUTSUCCESSFUL)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all orders from current user
|
||||||
|
*/
|
||||||
async refreshOrders() {
|
async refreshOrders() {
|
||||||
await getUserOrders(this.userAccount.id)
|
await getUserOrders(this.userAccount.id)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
@@ -92,12 +112,22 @@ export const useAccountStore = defineStore("accountStore", {
|
|||||||
return Math.round(totalPrice * 100) / 100
|
return Math.round(totalPrice * 100) / 100
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove an address from the user model
|
||||||
|
*
|
||||||
|
* @param address Address dataset to remove
|
||||||
|
*/
|
||||||
removeAddress(address: AddressModel) {
|
removeAddress(address: AddressModel) {
|
||||||
this.userAccount.addresses = this.userAccount.addresses.filter((addr: AddressModel) =>
|
this.userAccount.addresses = this.userAccount.addresses.filter((addr: AddressModel) =>
|
||||||
addr != address
|
addr != address
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove an payment from the user model
|
||||||
|
*
|
||||||
|
* @param address Payment dataset to remove
|
||||||
|
*/
|
||||||
removePayment(payment: PaymentModel) {
|
removePayment(payment: PaymentModel) {
|
||||||
this.userAccount.payments = this.userAccount.payments.filter((paym: PaymentModel) =>
|
this.userAccount.payments = this.userAccount.payments.filter((paym: PaymentModel) =>
|
||||||
paym != payment
|
paym != payment
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { BandApiModel } from "../models/acts/bandApiModel";
|
import { BandApiModel } from "../data/models/acts/bandApiModel";
|
||||||
import { fetchAllBands, getBand } from "../api/bandApi";
|
import { fetchAllBands, getBand } from "../data/api/bandApi";
|
||||||
import { BandDetailsApiModel } from "../models/acts/bandDetailsApiModel";
|
import { BandDetailsApiModel } from "../data/models/acts/bandDetailsApiModel";
|
||||||
|
|
||||||
export const useBandStore = defineStore("bandStore", {
|
export const useBandStore = defineStore("bandStore", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { useLocalStorage } from "@vueuse/core";
|
import { useLocalStorage } from "@vueuse/core";
|
||||||
import { BasketItemModel } from "../models/ordering/basketItemModel";
|
import { BasketItemModel } from "../data/models/ordering/basketItemModel";
|
||||||
import { useFeedbackStore } from "./feedbackStore";
|
import { useFeedbackStore } from "./feedbackStore";
|
||||||
import { BannerStateEnum } from "../enums/bannerStateEnum";
|
import { BannerStateEnum } from "../data/enums/bannerStateEnum";
|
||||||
import { AddressModel } from "../models/user/addressModel";
|
import { AddressModel } from "../data/models/user/addressModel";
|
||||||
import { PaymentModel } from "../models/user/paymentModel";
|
import { PaymentModel } from "../data/models/user/paymentModel";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { SelectedSeatModel } from "../models/ordering/selectedSeatModel";
|
import { SelectedSeatModel } from "../data/models/ordering/selectedSeatModel";
|
||||||
import { calcPrice } from "@/scripts/concertScripts";
|
import { calcPrice } from "@/scripts/concertScripts";
|
||||||
import { BandModel } from "../models/acts/bandModel";
|
import { BandModel } from "../data/models/acts/bandModel";
|
||||||
import { ConcertModel } from "../models/acts/concertModel";
|
import { ConcertModel } from "../data/models/acts/concertModel";
|
||||||
|
|
||||||
export const useBasketStore = defineStore('basketStore', {
|
export const useBasketStore = defineStore('basketStore', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { ConcertApiModel } from "../models/acts/concertApiModel";
|
import { ConcertApiModel } from "../data/models/acts/concertApiModel";
|
||||||
import { fetchConcert, fetchConcerts, fetchUpcomingConcerts } from "../api/concertApi";
|
import { fetchConcert, fetchConcerts, fetchUpcomingConcerts } from "../data/api/concertApi";
|
||||||
import { ConcertDetailsApiModel } from "../models/acts/concertDetailsApiModel";
|
import { ConcertDetailsApiModel } from "../data/models/acts/concertDetailsApiModel";
|
||||||
|
|
||||||
export const useConcertStore = defineStore("concertStore", {
|
export const useConcertStore = defineStore("concertStore", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { BannerStateEnum } from "../enums/bannerStateEnum";
|
import { BannerStateEnum } from "../data/enums/bannerStateEnum";
|
||||||
import { Composer } from 'vue-i18n';
|
import { Composer } from 'vue-i18n';
|
||||||
|
|
||||||
export const useFeedbackStore = defineStore("feedbackStore", {
|
export const useFeedbackStore = defineStore("feedbackStore", {
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { fetchAllLocations, fetchTopLocations } from "../api/locationApi";
|
import { fetchAllLocations, fetchTopLocations } from "../data/api/locationApi";
|
||||||
import { LocationApiModel } from "../models/locations/locationApiModel";
|
import { LocationApiModel } from "../data/models/locations/locationApiModel";
|
||||||
import { CityModel } from "../models/locations/cityModel";
|
import { CityModel } from "../data/models/locations/cityModel";
|
||||||
import { fetchAllCities } from "../api/cityApi";
|
import { fetchAllCities } from "../data/api/cityApi";
|
||||||
|
|
||||||
export const useLocationStore = defineStore("locationStore", {
|
export const useLocationStore = defineStore("locationStore", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { useLocalStorage } from "@vueuse/core";
|
import { useLocalStorage } from "@vueuse/core";
|
||||||
import { ThemeEnum } from "../enums/themeEnums";
|
import { ThemeEnum } from "../data/enums/themeEnums";
|
||||||
import { LanguageEnum } from "../enums/languageEnum";
|
import { LanguageEnum } from "../data/enums/languageEnum";
|
||||||
|
|
||||||
export const usePreferencesStore = defineStore('preferencesStore', {
|
export const usePreferencesStore = defineStore('preferencesStore', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { searchBand } from "../api/bandApi";
|
import { searchBand } from "../data/api/bandApi";
|
||||||
import { searchLocation } from "../api/locationApi";
|
import { searchLocation } from "../data/api/locationApi";
|
||||||
import { searchConcert } from "../api/concertApi";
|
import { searchConcert } from "../data/api/concertApi";
|
||||||
|
|
||||||
export const useSearchStore = defineStore("searchStore", {
|
export const useSearchStore = defineStore("searchStore", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { ConcertApiModel } from "../models/acts/concertApiModel";
|
import { ConcertApiModel } from "../data/models/acts/concertApiModel";
|
||||||
import { BandApiModel } from "../models/acts/bandApiModel";
|
import { BandApiModel } from "../data/models/acts/bandApiModel";
|
||||||
import { CityApiModel } from "../models/locations/cityApiModel";
|
import { CityApiModel } from "../data/models/locations/cityApiModel";
|
||||||
import { GenreApiModel } from "../models/acts/genreApiModel";
|
import { GenreApiModel } from "../data/models/acts/genreApiModel";
|
||||||
import { searchBand } from "../api/bandApi";
|
import { searchBand } from "../data/api/bandApi";
|
||||||
import { searchLocation } from "../api/locationApi";
|
import { searchLocation } from "../data/api/locationApi";
|
||||||
import { fetchConcerts, searchConcert } from "../api/concertApi";
|
import { fetchConcerts, searchConcert } from "../data/api/concertApi";
|
||||||
import { useFeedbackStore } from "./feedbackStore";
|
import { useFeedbackStore } from "./feedbackStore";
|
||||||
|
|
||||||
export const useShopStore = defineStore("shopStore", {
|
export const useShopStore = defineStore("shopStore", {
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { fetchAllCities } from "../api/cityApi";
|
import { fetchAllCities } from "../data/api/cityApi";
|
||||||
import { fetchAllGenres } from "../api/genreApi";
|
import { fetchAllGenres } from "../data/api/genreApi";
|
||||||
import { useFeedbackStore } from "./feedbackStore";
|
import { useFeedbackStore } from "./feedbackStore";
|
||||||
import { CityApiModel } from "../models/locations/cityApiModel";
|
import { CityApiModel } from "../data/models/locations/cityApiModel";
|
||||||
import { GenreApiModel } from "../models/acts/genreApiModel";
|
import { GenreApiModel } from "../data/models/acts/genreApiModel";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
Reference in New Issue
Block a user