refactor: remove deprecated components and streamline member coverage calculations, enhance budget management with improved payroll handling, and update UI elements for better clarity
This commit is contained in:
parent
983aeca2dc
commit
09d8794d72
42 changed files with 2166 additions and 2974 deletions
|
|
@ -2,18 +2,14 @@ import { useMembersStore } from '~/stores/members'
|
|||
import { usePoliciesStore } from '~/stores/policies'
|
||||
import { useStreamsStore } from '~/stores/streams'
|
||||
import { useBudgetStore } from '~/stores/budget'
|
||||
import { useScenariosStore } from '~/stores/scenarios'
|
||||
import { useCashStore } from '~/stores/cash'
|
||||
import { useSessionStore } from '~/stores/session'
|
||||
|
||||
export type AppSnapshot = {
|
||||
members: any[]
|
||||
policies: Record<string, any>
|
||||
streams: any[]
|
||||
budget: Record<string, any>
|
||||
scenarios: Record<string, any>
|
||||
cash: Record<string, any>
|
||||
session: Record<string, any>
|
||||
}
|
||||
|
||||
export function useFixtureIO() {
|
||||
|
|
@ -22,9 +18,7 @@ export function useFixtureIO() {
|
|||
const policies = usePoliciesStore()
|
||||
const streams = useStreamsStore()
|
||||
const budget = useBudgetStore()
|
||||
const scenarios = useScenariosStore()
|
||||
const cash = useCashStore()
|
||||
const session = useSessionStore()
|
||||
|
||||
return {
|
||||
members: members.members,
|
||||
|
|
@ -48,23 +42,12 @@ export function useFixtureIO() {
|
|||
productionCosts: budget.productionCosts,
|
||||
currentPeriod: budget.currentPeriod
|
||||
},
|
||||
scenarios: {
|
||||
sliders: scenarios.sliders,
|
||||
activeScenario: scenarios.activeScenario
|
||||
},
|
||||
cash: {
|
||||
cashEvents: cash.cashEvents,
|
||||
paymentQueue: cash.paymentQueue,
|
||||
currentCash: cash.currentCash,
|
||||
currentSavings: cash.currentSavings
|
||||
},
|
||||
session: {
|
||||
checklist: session.checklist,
|
||||
draftAllocations: session.draftAllocations,
|
||||
rationale: session.rationale,
|
||||
currentSession: session.currentSession,
|
||||
savedRecords: session.savedRecords
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -73,9 +56,7 @@ export function useFixtureIO() {
|
|||
const policies = usePoliciesStore()
|
||||
const streams = useStreamsStore()
|
||||
const budget = useBudgetStore()
|
||||
const scenarios = useScenariosStore()
|
||||
const cash = useCashStore()
|
||||
const session = useSessionStore()
|
||||
|
||||
try {
|
||||
// Import members
|
||||
|
|
@ -98,10 +79,6 @@ export function useFixtureIO() {
|
|||
budget.$patch(snapshot.budget)
|
||||
}
|
||||
|
||||
// Import scenarios
|
||||
if (snapshot.scenarios) {
|
||||
scenarios.$patch(snapshot.scenarios)
|
||||
}
|
||||
|
||||
// Import cash
|
||||
if (snapshot.cash) {
|
||||
|
|
@ -118,10 +95,6 @@ export function useFixtureIO() {
|
|||
}
|
||||
}
|
||||
|
||||
// Import session
|
||||
if (snapshot.session) {
|
||||
session.$patch(snapshot.session)
|
||||
}
|
||||
|
||||
console.log('Successfully imported data snapshot')
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue