refactor: simplify profit metrics display by removing HPP from StatCard and adjusting Dashboard calculations

This commit is contained in:
Yoga Pangestu 2026-07-01 17:40:48 +07:00
parent 4a647cb3e6
commit a7a938e1ff
2 changed files with 2 additions and 10 deletions

View File

@ -578,17 +578,13 @@ watch([startDate, endDate], () => {
},
]" />
<StatCard v-if="can('analysis.profit_gross') || can('analysis.profit_hpp')" title="Laba Kotor & HPP" :icon="TrendingUp" main-label="Gross Profit"
<StatCard v-if="can('analysis.profit_gross') || can('analysis.profit_hpp')" title="Laba Kotor" :icon="TrendingUp" main-label="Gross Profit"
:main-value="'Rp' + formatRupiah(profitMetrics.laba_kotor)"
:sub-label="profitMetrics.laba_kotor >= 0 ? 'Positif' : 'Negatif'" :items="[
{
label: 'Revenue',
value: 'Rp' + formatRupiah(revenueSummary.total_revenue),
},
{
label: 'HPP',
value: 'Rp' + formatRupiah(profitMetrics.hpp),
},
{
label: 'Laba Bersih',
value: 'Rp' + formatRupiah(profitMetrics.laba_bersih),

View File

@ -323,13 +323,9 @@ const chartsGridClass = computed(() => {
label: 'Bersih',
value: 'Rp' + formatRupiah(
revenueSummary.total_revenue -
revenueSummary.total_deduction,
revenueSummary.total_deduction,
),
},
{
label: 'Harga Modal',
value: 'Rp' + formatRupiah(revenueSummary.total_cost_price ?? 0),
},
{
label: 'Potongan',
value: 'Rp' + formatRupiah(revenueSummary.total_marketplace_fees ?? 0),