Persist Ledger type-filter state to UserSettings #210
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nidde/parenting-tool!210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "copilot/update-user-settings-ledger-filters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ledger UFAB filter toggles (Virtual, Deferred, Real, Actualized, Mortgages, Purchases, Income, Expenses) were reset on every page visit. This adds automatic persistence so the active filter set is restored when returning to the Ledger.
Description
Save strategy: Auto-save on change, debounced 800 ms to batch rapid toggling into a single request. Text filter is intentionally not persisted — it's ephemeral.
Config / Validation
config/user_settings.php— addedledger_filters.type_filterswith all 8 booleans defaulting tofalseconfig/user_settings_validation.php— addednullable|booleanrules for each filter fieldFrontend
userSettingsStore.ts— extendedUserSettingsStatewith typedledger_filtersshapeLedgerFilterFab.vue:getInitialTypeFilters()merges savedledger_filters.type_filtersover defaults on mount (safe against partial/missing data)saveSetting('ledger_filters', { type_filters: {...} })using the existinguseUserSettingscomposableonUnmountedclears any pending debounce timerType of Change
Testing
Code Quality
CI/CD Checks
Additional Notes
No schema migration needed —
UserSettingsstores everything insettings_json(JSON column). ThesaveSingleendpoint already handles top-level array values; nested boolean validation is covered by thesaveendpoint rules but the single-setting path only checksnullable|arrayat the top level, which is sufficient here.LG2M 👍
Comment
@coderabbitai helpto get the list of available commands and usage tips.