wip(freight): migration 0017 + model/column-list groundwork for add-freight-templates
This commit is contained in:
@@ -52,7 +52,11 @@ onMounted(loadDashboard);
|
||||
const stats = computed(() => [
|
||||
{ key: "totalProducts", label: "shop.totalProducts", value: totalProducts.value },
|
||||
{ key: "publishedProducts", label: "shop.publishedProducts", value: publishedProducts.value },
|
||||
{ key: "pendingPayment", label: "shop.pendingPaymentOrders", value: orderCounts.value.pending_payment },
|
||||
{
|
||||
key: "pendingPayment",
|
||||
label: "shop.pendingPaymentOrders",
|
||||
value: orderCounts.value.pending_payment,
|
||||
},
|
||||
{ key: "paid", label: "shop.paidOrders", value: orderCounts.value.paid },
|
||||
{ key: "fulfilling", label: "shop.fulfillingOrders", value: orderCounts.value.fulfilling },
|
||||
{ key: "shipped", label: "shop.shippedOrders", value: orderCounts.value.shipped },
|
||||
@@ -65,28 +69,28 @@ const stats = computed(() => [
|
||||
<template #actions>
|
||||
<VBtn size="sm" :disabled="loading" @click="loadDashboard">{{ $t("common.search") }}</VBtn>
|
||||
</template>
|
||||
<div v-if="error" class="my-2 text-sm text-danger" role="alert">{{ error }}</div>
|
||||
<div v-if="error" class="text-danger my-2 text-sm" role="alert">{{ error }}</div>
|
||||
<p v-if="loading" class="text-muted">{{ $t("common.loading") }}</p>
|
||||
<template v-else>
|
||||
<div class="grid gap-4 [grid-template-columns:repeat(auto-fit,minmax(170px,1fr))]">
|
||||
<div class="grid [grid-template-columns:repeat(auto-fit,minmax(170px,1fr))] gap-4">
|
||||
<VCard v-for="stat in stats" :key="stat.key" class="grid gap-2">
|
||||
<span class="text-sm text-muted">{{ $t(stat.label) }}</span>
|
||||
<strong class="text-3xl font-bold text-text">{{ stat.value }}</strong>
|
||||
<span class="text-muted text-sm">{{ $t(stat.label) }}</span>
|
||||
<strong class="text-text text-3xl font-bold">{{ stat.value }}</strong>
|
||||
</VCard>
|
||||
</div>
|
||||
<VCard v-if="shop" class="mt-4">
|
||||
<h2 class="mb-4 text-lg font-semibold text-text">{{ $t("shop.profile") }}</h2>
|
||||
<div class="grid gap-4 [grid-template-columns:repeat(auto-fit,minmax(180px,1fr))]">
|
||||
<h2 class="text-text mb-4 text-lg font-semibold">{{ $t("shop.profile") }}</h2>
|
||||
<div class="grid [grid-template-columns:repeat(auto-fit,minmax(180px,1fr))] gap-4">
|
||||
<div class="grid gap-1.5">
|
||||
<span class="text-sm text-muted">{{ $t("product.shop") }}</span>
|
||||
<span class="text-muted text-sm">{{ $t("product.shop") }}</span>
|
||||
<strong>{{ localized(shop.name, locale) }}</strong>
|
||||
</div>
|
||||
<div class="grid gap-1.5">
|
||||
<span class="text-sm text-muted">{{ $t("shop.slug") }}</span>
|
||||
<span class="text-muted text-sm">{{ $t("shop.slug") }}</span>
|
||||
<strong>{{ shop.slug }}</strong>
|
||||
</div>
|
||||
<div class="grid gap-1.5">
|
||||
<span class="text-sm text-muted">{{ $t("shop.shopStatus") }}</span>
|
||||
<span class="text-muted text-sm">{{ $t("shop.shopStatus") }}</span>
|
||||
<VBadge :tone="shop.status === 'active' ? 'green' : 'red'">
|
||||
{{ $t(`admin.${shop.status}`) }}
|
||||
</VBadge>
|
||||
|
||||
Reference in New Issue
Block a user