fix some bugs
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
<DashboardStatCard
|
||||
tone="amber"
|
||||
icon="vuesax-linear:coin"
|
||||
title="کارمزد طلایی"
|
||||
:title="metalLabel.goldCommission()"
|
||||
:value="usePrice(finance?.fullPriceKarmozd ?? finance?.fullPriceKaermozd ?? 0, true, '')"
|
||||
:help="copy.kpi.commission"
|
||||
/>
|
||||
@@ -68,10 +68,22 @@
|
||||
:value="String(finance?.orderCount ?? 0)"
|
||||
:help="copy.kpi.orderCount"
|
||||
/>
|
||||
<template v-if="metalBalanceItems.length">
|
||||
<DashboardStatCard
|
||||
v-for="item in metalBalanceItems"
|
||||
:key="item.metal_id"
|
||||
tone="blue"
|
||||
icon="vuesax-linear:empty-wallet"
|
||||
:title="metalBalanceTitle(item.metal_id, item.label)"
|
||||
:value="formatGram(item.goldBalance, item.metal_id)"
|
||||
:help="copy.kpi.goldBalance"
|
||||
/>
|
||||
</template>
|
||||
<DashboardStatCard
|
||||
v-else
|
||||
tone="blue"
|
||||
icon="vuesax-linear:empty-wallet"
|
||||
title="تراز طلایی"
|
||||
:title="metalLabel.goldBalance()"
|
||||
:value="formatGram(balance?.goldBalance)"
|
||||
:help="copy.kpi.goldBalance"
|
||||
/>
|
||||
@@ -452,6 +464,7 @@ import {
|
||||
} from '@/pages/dashboard/dashboardSectionCopy'
|
||||
import { useDashboardPage } from '@/pages/dashboard/composables/useDashboardPage'
|
||||
import { useDashboardQuickActions } from '@/pages/dashboard/composables/useDashboardQuickActions'
|
||||
import { metalBalanceTitle, metalLabel } from '@/utils/adminMetalLabels'
|
||||
|
||||
const copy = {
|
||||
hero: dashboardHero,
|
||||
@@ -472,6 +485,7 @@ const {
|
||||
master,
|
||||
finance,
|
||||
balance,
|
||||
metalBalanceItems,
|
||||
walletSums,
|
||||
recentOrders,
|
||||
peakHoursRange,
|
||||
@@ -573,7 +587,7 @@ const customerMetricItems = computed(() => [
|
||||
|
||||
const walletMetricItems = computed(() => [
|
||||
{
|
||||
label: 'طلای مشتریان',
|
||||
label: metalLabel.customersGold(),
|
||||
value: formatGram(walletSums.value?.gold),
|
||||
help: dashboardWalletMetrics.gold,
|
||||
variant: 'amber',
|
||||
@@ -585,7 +599,7 @@ const walletMetricItems = computed(() => [
|
||||
variant: 'sky',
|
||||
},
|
||||
{
|
||||
label: 'ارزش طلا به ریال',
|
||||
label: metalLabel.goldValueInRial(),
|
||||
value: usePrice(walletSums.value?.goldToCash ?? 0, true, ''),
|
||||
help: dashboardWalletMetrics.goldToCash,
|
||||
variant: 'violet',
|
||||
|
||||
Reference in New Issue
Block a user