updates on the active section andthe profitability page
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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-value profitability-summary-value--loss">{rupees(slotCost)}</span>
|
||||||
<span className="profitability-summary-detail">Fixed + variable</span>
|
<span className="profitability-summary-detail">Fixed + variable</span>
|
||||||
</div>
|
</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-label">Slot Net</span>
|
||||||
<span
|
<span className={`profitability-summary-value ${slotIsProfit ? 'net-positive' : 'net-negative'}`}>
|
||||||
className={`profitability-summary-value ${
|
|
||||||
slotIsProfit ? 'profitability-summary-value--profit' : 'profitability-summary-value--loss'
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
{slotIsProfit ? '+' : ''}
|
{slotIsProfit ? '+' : ''}
|
||||||
{rupees(slotNet)}
|
{rupees(slotNet)}
|
||||||
</span>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user