fix some bugs
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { computed } from 'vue'
|
||||
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import BoursecuAssetsSummary from '../../components/BoursecuAssetsSummary.vue'
|
||||
import PortfolioOverview from '../../components/PortfolioOverview.vue'
|
||||
import { formatWeightAmount, usePriceWithoutType } from '@/utils/usePrice'
|
||||
import { useWalletAssets } from '@/composables/useWalletAssets'
|
||||
import type { WalletMetalTotal } from '@/models/walletAssets'
|
||||
@@ -24,6 +25,7 @@ const cashWallet = computed(() => assetsSummary.value?.cash_wallet ?? 0)
|
||||
const countBasedInventory = computed(() =>
|
||||
(assetsSummary.value?.count_products ?? []).reduce((sum, item) => sum + Number(item.quantity ?? 0), 0),
|
||||
)
|
||||
const showLegacyMetrics = computed(() => !assetsSummary.value?.portfolio)
|
||||
|
||||
type MetricItem = {
|
||||
id: string
|
||||
@@ -101,7 +103,10 @@ function handleInfo(metric: MetricItem) {
|
||||
icon-color="tertiary"
|
||||
/>
|
||||
|
||||
<div v-else class="dhome-metrics">
|
||||
<template v-else>
|
||||
<PortfolioOverview variant="desktop" />
|
||||
|
||||
<div v-if="showLegacyMetrics" class="dhome-metrics">
|
||||
<article v-for="metric in metrics" :key="metric.id" class="dhome-metric-tile">
|
||||
<div class="dhome-metric-tile__head">
|
||||
<span class="dhome-metric-tile__label">{{ metric.label }}</span>
|
||||
@@ -117,5 +122,6 @@ function handleInfo(metric: MetricItem) {
|
||||
</div>
|
||||
<p class="dhome-metric-tile__value">{{ metric.value }}</p>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user