Fix order view
This commit is contained in:
@@ -5,8 +5,8 @@ import { ref } from 'vue';
|
||||
|
||||
const userStore = useUserStore()
|
||||
const showRegisterCard = defineModel("showRegisterCard", { type: Boolean, default: false })
|
||||
const username = ref("")
|
||||
const password = ref("")
|
||||
const username = ref("duranduran")
|
||||
const password = ref("H4nn0ver")
|
||||
|
||||
function startLogin() {
|
||||
userStore.login(username.value, password.value)
|
||||
|
||||
@@ -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')"
|
||||
|
||||
Reference in New Issue
Block a user