Skip to content

feat: implement debounced form autosave for scheduling and employee forms - #64

Open
waterWang wants to merge 1 commit into
LatterFixxx:mainfrom
waterWang:feat/069-form-autosave-33
Open

feat: implement debounced form autosave for scheduling and employee forms#64
waterWang wants to merge 1 commit into
LatterFixxx:mainfrom
waterWang:feat/069-form-autosave-33

Conversation

@waterWang

Copy link
Copy Markdown
Contributor

Summary

Implements autosave for complex configuration forms as described in issue #33.

Changes

SchedulingWizard.tsx — Payroll scheduler form:

  • Restores draft config from localStorage on mount (graceful recovery on unexpected reloads)
  • Autosaves wizard config changes with 1s debounce via useAutosave hook
  • Displays AutosaveIndicator (Saving draft... / Draft saved HH:MM / No changes yet) in the wizard header
  • Clears saved draft on confirm or cancel

EmployeeList.tsx — Add Employee modal:

  • Restores new employee form draft from localStorage on mount
  • Autosaves form state changes with debounce
  • Shows AutosaveIndicator in the modal header
  • Clears saved draft on successful submit or cancel

Acceptance Criteria

  • Debounced autosave triggers on input change
  • Visual indicator shows saving status
  • Draft state handled gracefully on unexpected reloads

Testing

All 27 existing tests pass (vitest run).

Closes #33

…ling and employee forms

- SchedulingWizard: autosave wizard config to localStorage (debounced),
  restore draft on mount, show AutosaveIndicator in header, clear draft
  on confirm or cancel
- EmployeeList: autosave Add Employee modal form state, restore draft on
  mount, show AutosaveIndicator, clear draft on submit or cancel
- Uses existing useAutosave hook and AutosaveIndicator component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

033: Form Autosave for Configurations

1 participant