updates on the active section andthe profitability page

This commit is contained in:
2026-06-15 19:45:09 +05:30
parent ec1957d6ca
commit b35361d440
2 changed files with 1019 additions and 498 deletions

View File

@@ -484,17 +484,15 @@ export default function ProfitabilitySection({ riders = [], totalDailyProfit = 0
<span className="profitability-summary-value profitability-summary-value--loss">{rupees(slotCost)}</span>
<span className="profitability-summary-detail">Fixed + variable</span>
</div>
<div className="profitability-summary-card profitability-summary-card--profit">
<div className={`profitability-summary-card ${slotIsProfit ? 'card-profit' : 'card-loss'}`}>
<span className="profitability-summary-label">Slot Net</span>
<span
className={`profitability-summary-value ${
slotIsProfit ? 'profitability-summary-value--profit' : 'profitability-summary-value--loss'
}`}
>
<span className={`profitability-summary-value ${slotIsProfit ? 'net-positive' : 'net-negative'}`}>
{slotIsProfit ? '+' : ''}
{rupees(slotNet)}
</span>
<span className="profitability-summary-detail">{slotRevenue > 0 ? ((slotNet / slotRevenue) * 100).toFixed(0) : 0}% margin</span>
<span className={`profitability-summary-detail ${slotRevenue > 0 ? (slotNet / slotRevenue >= 0 ? 'margin-positive' : 'margin-negative') : ''}`}>
{slotRevenue > 0 ? `${slotNet / slotRevenue >= 0 ? '+' : ''}${((slotNet / slotRevenue) * 100).toFixed(0)}% margin` : '0% margin'}
</span>
</div>
</div>