دارایی ریالی:
{{ usePriceWithoutType(cashWallet) }} ریال
@@ -77,7 +79,7 @@
import { computed } from 'vue'
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
import BoursecuAssetsSummary from './BoursecuAssetsSummary.vue'
-import PortfolioOverview from './PortfolioOverview.vue'
+import PortfolioProfitInsight from './PortfolioProfitInsight.vue'
import { formatWeightAmount, usePriceWithoutType } from '@/utils/usePrice'
import { useWalletAssets } from '@/composables/useWalletAssets'
import type { WalletMetalTotal } from '@/models/walletAssets'
@@ -119,8 +121,6 @@ const inventoryCards = computed(() => assetsSummary.value?.inventory_cards ?? []
const countBasedInventory = computed(() =>
(assetsSummary.value?.count_products ?? []).reduce((sum, item) => sum + Number(item.quantity ?? 0), 0)
)
-const showLegacyRows = computed(() => !assetsSummary.value?.portfolio)
-
function formatMetalTotal(metal: WalletMetalTotal) {
return `${formatWeightAmount(resolveSummaryMetalWeight(metal, inventoryCards.value))}${metal.unit}`
}
diff --git a/src/views/base/home/components/PortfolioProfitInsight.vue b/src/views/base/home/components/PortfolioProfitInsight.vue
new file mode 100644
index 0000000..6f26a28
--- /dev/null
+++ b/src/views/base/home/components/PortfolioProfitInsight.vue
@@ -0,0 +1,129 @@
+
+
+ {{ profitText }}
+ {{ profitPercent }}
+ سود/زیان تحققنیافته طلا
+
+
+
+
+
+
+
diff --git a/src/views/base/home/desktop/components/DesktopAssetsMetrics.vue b/src/views/base/home/desktop/components/DesktopAssetsMetrics.vue
index 15a0c41..8a30566 100644
--- a/src/views/base/home/desktop/components/DesktopAssetsMetrics.vue
+++ b/src/views/base/home/desktop/components/DesktopAssetsMetrics.vue
@@ -2,7 +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 PortfolioProfitInsight from '../../components/PortfolioProfitInsight.vue'
import { formatWeightAmount, usePriceWithoutType } from '@/utils/usePrice'
import { useWalletAssets } from '@/composables/useWalletAssets'
import type { WalletMetalTotal } from '@/models/walletAssets'
@@ -25,7 +25,6 @@ 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
@@ -104,9 +103,9 @@ function handleInfo(metric: MetricItem) {
/>
-
+
-