show wallets
This commit is contained in:
@@ -47,6 +47,7 @@ import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import { usePriceWithoutType } from '@/utils/usePrice'
|
||||
import { useWalletAssets } from '@/composables/useWalletAssets'
|
||||
import type { WalletMetalTotal } from '@/models/walletAssets'
|
||||
import { resolveSummaryMetalWeight } from '@/utils/productAssets'
|
||||
|
||||
const { assetsSummary, loadWalletAssets } = useWalletAssets()
|
||||
|
||||
@@ -68,15 +69,7 @@ onMounted(() => {
|
||||
void loadWalletAssets()
|
||||
})
|
||||
|
||||
function summaryMetalWeight(metal: WalletMetalTotal) {
|
||||
if (inventoryCards.value.length > 0) {
|
||||
return metal.product_weight
|
||||
}
|
||||
|
||||
return metal.total_weight
|
||||
}
|
||||
|
||||
function formatMetalTotal(metal: WalletMetalTotal) {
|
||||
return `${summaryMetalWeight(metal)}${metal.unit}`
|
||||
return `${resolveSummaryMetalWeight(metal, inventoryCards.value)}${metal.unit}`
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user