added pargar

This commit is contained in:
2026-07-05 20:49:01 +03:30
parent e4d92831c2
commit 51e3c3f0cb
7 changed files with 326 additions and 147 deletions
@@ -160,7 +160,7 @@ import { useUserStore } from '@/store/userStore'
import { useWalletStore } from '@/store/walletStore'
import { useWalletAssets } from '@/composables/useWalletAssets'
import { resolveAssetsRialValue } from '@/utils/productAssets'
import { usePrice, usePriceWithoutType, useTowDecimal } from '@/utils/usePrice'
import { usePrice, usePriceWithoutType, useTowDecimal, formatGoldAmount } from '@/utils/usePrice'
import {
getLastPrices,
getTradeBuyPrice,
@@ -210,10 +210,10 @@ const balanceLabel = computed(() => {
}
const metal = primaryMetalTotal.value
if (metal && Number(metal.total_weight) > 0) {
return `${Number(metal.total_weight).toFixed(3)} ${metal.unit}`
return `${formatGoldAmount(metal.total_weight)} ${metal.unit}`
}
const fallback = walletStore.walletInfo?.gold_sum ?? userStore.userInfo?.wallet?.count_gold ?? 0
return `${Number(fallback).toFixed(3)} گرم`
return `${formatGoldAmount(fallback)} گرم`
})
const totalRialDisplay = computed(() =>