refactor: enhance AnnualBudget component layout with improved dark mode support, streamline table structure, and update CSS for better visual consistency
This commit is contained in:
parent
24e8b7a3a8
commit
f073f91569
14 changed files with 1440 additions and 922 deletions
|
|
@ -102,7 +102,7 @@ export function useCoopBuilder() {
|
|||
streams: baseStreams.map(s => {
|
||||
// Reduce service revenue by 30%
|
||||
if (s.category?.toLowerCase().includes('service') || s.label.toLowerCase().includes('service')) {
|
||||
return { ...s, monthly: (s.monthly || 0) * 0.7 }
|
||||
return { ...s, monthly: Math.round((s.monthly || 0) * 0.7) }
|
||||
}
|
||||
return s
|
||||
})
|
||||
|
|
@ -128,7 +128,7 @@ export function useCoopBuilder() {
|
|||
if (revenueDelay > 0) {
|
||||
adjustedStreams = adjustedStreams.map(s => ({
|
||||
...s,
|
||||
monthly: (s.monthly || 0) * Math.max(0, 1 - (revenueDelay / 12))
|
||||
monthly: Math.round((s.monthly || 0) * Math.max(0, 1 - (revenueDelay / 12)))
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
@ -251,7 +251,7 @@ export function useCoopBuilder() {
|
|||
// Calculate monthly payroll
|
||||
const payrollCost = monthlyPayroll(scenarioMembers || [], currentMode) || 0
|
||||
const oncostPct = store.payrollOncostPct || 0
|
||||
const totalPayroll = payrollCost * (1 + Math.max(0, oncostPct) / 100)
|
||||
const totalPayroll = Math.round(payrollCost * (1 + Math.max(0, oncostPct) / 100))
|
||||
|
||||
// Calculate revenue and costs
|
||||
const totalRevenue = (scenarioStreams || []).reduce((sum, s) => sum + (s.monthly || 0), 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue