Fix order view

This commit is contained in:
2024-09-20 15:30:40 +02:00
parent 718dbe30b7
commit 89e91c3213
7 changed files with 34 additions and 20 deletions

View File

@@ -1,19 +1,7 @@
<script setup lang="ts">
import { useUserStore } from '@/data/stores/userStore';
import axios from 'axios';
import { ref } from 'vue';
const userStore = useUserStore()
const orders = ref([])
axios.get("http://127.0.0.1:3000/orders", {
params: {
accountId: userStore.userAccountId
}
})
.then(res => {
orders.value = res.data
})
function getDotColor(order, step: number) {
if (order.shippingProgress == step)
@@ -38,7 +26,7 @@ function formatDateTimeString(string: string) {
<template>
<v-container>
<v-row v-for="order in orders">
<v-row v-for="order in userStore.orders">
<v-col>
<v-card
:title="$t('orders.orderFrom') + ' ' + formatDateTimeString(order.createdAt) + ' ' + $t('oclock')"