wip(freight): migration 0017 + model/column-list groundwork for add-freight-templates
This commit is contained in:
+35
-18
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
const { t } = useI18n();
|
||||
definePageMeta({ middleware: "auth" });
|
||||
|
||||
@@ -43,9 +42,13 @@ const cards = computed(() => [
|
||||
{ label: "admin.totalUsers", value: stats.users, link: "/users", tone: "blue" },
|
||||
{ label: "admin.totalShops", value: stats.shops, link: "/shops", tone: "green" },
|
||||
{ label: "admin.totalOrders", value: stats.orders, link: "/orders", tone: "orange" },
|
||||
{ label: "admin.enabledCurrencies", value: stats.currencies, link: "/currencies", tone: "purple" },
|
||||
{
|
||||
label: "admin.enabledCurrencies",
|
||||
value: stats.currencies,
|
||||
link: "/currencies",
|
||||
tone: "purple",
|
||||
},
|
||||
]);
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -53,35 +56,49 @@ const cards = computed(() => [
|
||||
<template #actions>
|
||||
<VBtn size="sm" :disabled="loading" @click="loadDashboard">{{ $t("admin.refresh") }}</VBtn>
|
||||
</template>
|
||||
<p class="mb-4 text-xs font-bold uppercase tracking-[0.08em] text-primary">{{ $t("common.appName") }} · Admin</p>
|
||||
<p v-if="loading" class="text-sm text-muted">{{ $t("common.loading") }}</p>
|
||||
<p v-else-if="errorMessage" class="my-2 text-sm text-danger" role="alert">{{ errorMessage }}</p>
|
||||
<p class="text-primary mb-4 text-xs font-bold tracking-[0.08em] uppercase">
|
||||
{{ $t("common.appName") }} · Admin
|
||||
</p>
|
||||
<p v-if="loading" class="text-muted text-sm">{{ $t("common.loading") }}</p>
|
||||
<p v-else-if="errorMessage" class="text-danger my-2 text-sm" role="alert">{{ errorMessage }}</p>
|
||||
<template v-else>
|
||||
<div class="grid gap-4 sm:grid-cols-2 xl:grid-cols-4">
|
||||
<NuxtLink
|
||||
v-for="card in cards"
|
||||
:key="card.link"
|
||||
:to="card.link"
|
||||
class="flex flex-col gap-2 rounded-lg border border-border bg-surface p-5 shadow-sm transition-transform hover:-translate-y-0.5 hover:border-primary"
|
||||
class="border-border bg-surface hover:border-primary flex flex-col gap-2 rounded-lg border p-5 shadow-sm transition-transform hover:-translate-y-0.5"
|
||||
>
|
||||
<span class="text-[13px] text-muted">{{ $t(card.label) }}</span>
|
||||
<span class="text-muted text-[13px]">{{ $t(card.label) }}</span>
|
||||
<strong
|
||||
class="text-[32px] leading-none"
|
||||
:class="card.tone === 'green' ? 'text-success' : card.tone === 'orange' ? 'text-warning' : 'text-primary'"
|
||||
>{{ card.value }}</strong>
|
||||
<span class="text-xs text-primary">{{ $t("admin.open") }} →</span>
|
||||
:class="
|
||||
card.tone === 'green'
|
||||
? 'text-success'
|
||||
: card.tone === 'orange'
|
||||
? 'text-warning'
|
||||
: 'text-primary'
|
||||
"
|
||||
>{{ card.value }}</strong
|
||||
>
|
||||
<span class="text-primary text-xs">{{ $t("admin.open") }} →</span>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
<div class="mt-6 grid gap-4 sm:grid-cols-2 xl:grid-cols-4">
|
||||
<NuxtLink v-for="shortcut in [
|
||||
{ to: '/users', title: 'admin.userManagement', label: 'nav.users' },
|
||||
{ to: '/shops', title: 'admin.shopManagement', label: 'nav.shops' },
|
||||
{ to: '/orders', title: 'admin.orderManagement', label: 'nav.orders' },
|
||||
{ to: '/currencies', title: 'admin.currencyManagement', label: 'nav.currencies' },
|
||||
]" :key="shortcut.to" :to="shortcut.to" class="block no-underline hover:no-underline">
|
||||
<NuxtLink
|
||||
v-for="shortcut in [
|
||||
{ to: '/users', title: 'admin.userManagement', label: 'nav.users' },
|
||||
{ to: '/shops', title: 'admin.shopManagement', label: 'nav.shops' },
|
||||
{ to: '/orders', title: 'admin.orderManagement', label: 'nav.orders' },
|
||||
{ to: '/currencies', title: 'admin.currencyManagement', label: 'nav.currencies' },
|
||||
]"
|
||||
:key="shortcut.to"
|
||||
:to="shortcut.to"
|
||||
class="block no-underline hover:no-underline"
|
||||
>
|
||||
<VCard>
|
||||
<strong class="block">{{ $t(shortcut.title) }}</strong>
|
||||
<span class="text-sm text-muted">{{ $t(shortcut.label) }}</span>
|
||||
<span class="text-muted text-sm">{{ $t(shortcut.label) }}</span>
|
||||
</VCard>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user