refactor: streamline WizardPoliciesStep component layout and improve budget management forms with enhanced initial value handling

This commit is contained in:
Jennie Robinson Faber 2025-08-24 07:38:30 +01:00
parent 4cea1f71fe
commit fc2d9ed56b
3 changed files with 272 additions and 267 deletions

View file

@ -661,7 +661,7 @@ export const useBudgetStore = defineStore(
}
}
function addBudgetItem(category, name, selectedCategory = "") {
function addBudgetItem(category, name, selectedCategory = "", subcategory = "") {
const id = `${category}-${Date.now()}`;
// Create empty monthly values for next 12 months
@ -681,7 +681,7 @@ export const useBudgetStore = defineStore(
mainCategory:
selectedCategory ||
(category === "revenue" ? "Games & Products" : "Other Expenses"),
subcategory: "", // Will be set by user via dropdown
subcategory: subcategory || "",
source: "user",
monthlyValues,
values: {