refactor: remove CashFlowChart and UnifiedCashFlowDashboard components, update routing paths in app.vue, and enhance budget page with cumulative balance calculations and payroll explanation modal for improved user experience

This commit is contained in:
Jennie Robinson Faber 2025-09-10 07:42:56 +01:00
parent 864a81065c
commit f1889b3a70
17 changed files with 922 additions and 1004 deletions

View file

@ -2,8 +2,6 @@ import { defineStore } from "pinia";
export const useCoopBuilderStore = defineStore("coop", {
state: () => ({
operatingMode: "min" as "min" | "target",
// Currency preference
currency: "EUR" as string,
@ -51,6 +49,9 @@ export const useCoopBuilderStore = defineStore("coop", {
},
equalHourlyWage: 50,
payrollOncostPct: 25,
// Cash flow management
minCashThreshold: 5000, // Minimum cash balance to maintain
savingsTargetMonths: 6,
minCashCushion: 10000,
@ -152,11 +153,6 @@ export const useCoopBuilderStore = defineStore("coop", {
this.milestones = this.milestones.filter((m) => m.id !== id);
},
// Operating mode
setOperatingMode(mode: "min" | "target") {
this.operatingMode = mode;
},
// Scenario
setScenario(
scenario: "current" | "start-production" | "custom"
@ -182,6 +178,10 @@ export const useCoopBuilderStore = defineStore("coop", {
this.payrollOncostPct = pct;
},
setMinCashThreshold(amount: number) {
this.minCashThreshold = amount;
},
setCurrency(currency: string) {
this.currency = currency;
},
@ -245,7 +245,6 @@ export const useCoopBuilderStore = defineStore("coop", {
clearAll() {
// Reset ALL state to initial empty values
this._wasCleared = true;
this.operatingMode = "min";
this.currency = "EUR";
this.members = [];
this.streams = [];