Fix order process

This commit is contained in:
2024-10-21 14:57:03 +02:00
parent 18a7814747
commit b1b731f3d3
17 changed files with 212 additions and 213 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { useBasketStore } from '@/stores/basketStore';
import { useBasketStore } from '@/stores/basket.store';
import cardView from '@/components/basics/cardView.vue';
import orderingDialog from './orderingDialog.vue';
import outlinedButton from '@/components/basics/outlinedButton.vue';
@@ -24,9 +24,7 @@ const showOrderingDialog = ref()
icon="mdi-cart"
>
<!-- Display items if basket is not empty -->
<div v-if="basketStore.itemsInBasket.length > 0">
<tickets-table />
</div>
<tickets-table v-if="basketStore.itemsInBasket.length > 0"/>
<!-- Display empty state if card is empty -->
<v-empty-state v-else

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import actionDialog from '@/components/basics/actionDialog.vue';
import { useBasketStore } from '@/stores/basketStore';
import { useBasketStore } from '@/stores/basket.store';
import outlinedButton from '@/components/basics/outlinedButton.vue';
import { ModelRef, ref } from 'vue';
import { useAccountStore } from '@/stores/account.store';
@@ -43,14 +43,12 @@ async function doOrder() {
max-width="800"
persistent
>
<v-row>
<v-col>
<v-list class="pa-0">
<v-list-subheader>
{{ $t('account.address', accountStore.userAccount.addresses.length) }}
</v-col>
</v-row>
<v-row>
<v-col>
</v-list-subheader>
<v-list-item>
<v-radio-group
v-model="basketStore.usedAddress"
:error="addressError"
@@ -62,17 +60,13 @@ async function doOrder() {
/>
</v-radio-group>
</v-col>
</v-row>
</v-list-item>
<v-row>
<v-col>
<v-list-subheader>
{{ $t('account.payment', accountStore.userAccount.payments.length) }}
</v-col>
</v-row>
<v-row>
<v-col>
</v-list-subheader>
<v-list-item>
<v-radio-group
v-model="basketStore.usedPayment"
>
@@ -83,8 +77,8 @@ async function doOrder() {
:error="paymentError"
/>
</v-radio-group>
</v-col>
</v-row>
</v-list-item>
</v-list>
<template #actions>
<outlined-button

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { useBasketStore } from '@/stores/basketStore';
import { useBasketStore } from '@/stores/basket.store';
import { BasketItemModel } from '@/data/models/ordering/basketItemModel';
import { calcPrice } from '@/scripts/concertScripts';
@@ -15,7 +15,7 @@ function removeFromBasket(basketItem: BasketItemModel) {
<thead>
<tr>
<th>{{ $t('band') }}</th>
<th>{{ $t('event') }}</th>
<th>{{ $t('concert') }}</th>
<th class="text-center">{{ $t('quantity') }}</th>
<th class="text-right">{{ $t('product.productPrice') }}</th>
<th class="text-right">{{ $t('totalPrice') }}</th>
@@ -30,9 +30,9 @@ function removeFromBasket(basketItem: BasketItemModel) {
{{ basketItem.band.name }}
</td>
<!-- Event name -->
<!-- Concert name -->
<td>
{{ basketItem.event.name }}
{{ basketItem.concert.name }}
</td>
<!-- Quantity -->
@@ -52,7 +52,7 @@ function removeFromBasket(basketItem: BasketItemModel) {
{{ (calcPrice(basketItem.concert.price, basketItem.seats.length)).toFixed(2) }}
</td>
<td>
<td class="text-right">
<v-btn
icon="mdi-delete"
@click="removeFromBasket(basketItem)"