feat: display percentage of net revenue in analysis component when total revenue is greater than zero
This commit is contained in:
parent
f32544ccce
commit
a301e96f33
@ -745,6 +745,11 @@ export default function Analysis({
|
|||||||
</span>
|
</span>
|
||||||
<span className="text-xs leading-none font-semibold sm:text-sm">
|
<span className="text-xs leading-none font-semibold sm:text-sm">
|
||||||
Rp{formatRupiah(value)}
|
Rp{formatRupiah(value)}
|
||||||
|
{key === 'net' && revenueSummary.total_revenue > 0 && (
|
||||||
|
<span className="ml-1 text-[10px] font-normal text-muted-foreground">
|
||||||
|
({((revenueSummary.net / revenueSummary.total_revenue) * 100).toFixed(1)}%)
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user