updates on the profitiability page
This commit is contained in:
@@ -441,6 +441,7 @@ export default function ProfitabilitySection({
|
||||
const slotRevenue = activeEnriched.reduce((s, r) => s + r._m.revenue, 0);
|
||||
const slotCost = activeEnriched.reduce((s, r) => s + r._m.totalCost, 0);
|
||||
const slotNet = activeEnriched.reduce((s, r) => s + r._m.net, 0);
|
||||
const slotKms = activeEnriched.reduce((s, r) => s + r._m.kms, 0);
|
||||
const profitCount = activeEnriched.filter((r) => r._m.net >= 0).length;
|
||||
const lossCount = activeEnriched.length - profitCount;
|
||||
|
||||
@@ -525,6 +526,11 @@ export default function ProfitabilitySection({
|
||||
{profitCount} in profit · {lossCount} at loss
|
||||
</span>
|
||||
</div>
|
||||
<div className="profitability-summary-card profitability-summary-card--primary">
|
||||
<span className="profitability-summary-label">Total Distance</span>
|
||||
<span className="profitability-summary-value">{slotKms.toFixed(1)} km</span>
|
||||
<span className="profitability-summary-detail">Cumulative travel distance</span>
|
||||
</div>
|
||||
<div className="profitability-summary-card profitability-summary-card--primary">
|
||||
<span className="profitability-summary-label">Slot Revenue</span>
|
||||
<span className="profitability-summary-value">{rupees(slotRevenue)}</span>
|
||||
|
||||
Reference in New Issue
Block a user