import { Budget, BudgetDashboardMap, BudgetDetail, BudgetDrilldownMap, FundingSource, FundingSourceDashboardMap, FundingSourceDrilldownMap, FundingSourceInsights, SimpleBudgetFundingSource } from '@core/typings/budget.typing'; import { SimpleStringMap, TypeaheadSelectOption } from '@yourcause/common'; import { BaseYcState, RegisterYCState } from '@yourcause/common/state'; @RegisterYCState() export class BudgetState extends BaseYcState { readonly budgets: Budget[]; readonly budgetEditMap: { [budgetId: number]: BudgetDetail; } = {}; readonly budgetMap: { [b: string]: BudgetDetail; } = {}; readonly budgetNameMap: { [b: string]: string; } = {}; readonly fundingSourceNameMap: { [f: string]: string; } = {}; readonly simpleBudgetMap: SimpleStringMap = {}; readonly budgetFundingSources: SimpleBudgetFundingSource[]; readonly openFundingSources: FundingSource[]; readonly closedFundingSources: FundingSource[]; readonly fundingSourcesForDashboard: FundingSourceInsights[]; readonly budgetsForDashboard: Budget[]; readonly allBudgetOptions: TypeaheadSelectOption[]; readonly cashBudgetOptions: TypeaheadSelectOption[]; readonly inKindBudgetOptions: TypeaheadSelectOption[]; readonly allSourceOptions: TypeaheadSelectOption[]; readonly cashSourceOptions: TypeaheadSelectOption[]; readonly inKindSourceOptions: TypeaheadSelectOption[]; readonly myBudgetOptions: TypeaheadSelectOption[]; // segmented readonly mySourceOptions: TypeaheadSelectOption[]; // segmented readonly budgetDashboardMap: BudgetDashboardMap = {}; readonly fundingSourceDashboardMap: FundingSourceDashboardMap = {}; readonly unallocatedSourceMap: SimpleStringMap = {}; readonly closedBudgets: Budget[]; readonly openBudgets: Budget[]; readonly budgetDrilldownMap: BudgetDrilldownMap = {}; readonly fundingSourceDrilldownMap: FundingSourceDrilldownMap = {}; }