Use this page for technical screen behavior, source references, and active Playwright coverage.
Settings supports business settings, save/reset/defaults, persistence validation.
| ID | Section | Action | Expected Outcome | Controls |
|---|---|---|---|---|
| UC-SETTINGS-001 | Page Load | Navigate to /settings | Loads settings page | Container |
| UC-SETTINGS-002 | Auth | CustomerOperator required | Authorized access | Authorize |
| UC-SETTINGS-003 | Loading | Data loading | Shows spinner | Spinner |
| UC-SETTINGS-004 | General | Default Currency | INR/USD/EUR/GBP dropdown | Select |
| UC-SETTINGS-005 | General | Default Tax Rate % | Decimal input step=0.01 | Input number |
| UC-SETTINGS-006 | General | Date Format | dd/MM/yyyy, MM/dd/yyyy, yyyy-MM-dd | Select |
| UC-SETTINGS-007 | General | Number Format | en-IN/en-US/en-GB dropdown | Select |
| UC-SETTINGS-008 | Inventory | Low Stock Threshold | Integer input | Input number |
| UC-SETTINGS-009 | Inventory | Auto-Generate Product Codes | Switch toggle | Checkbox switch |
| UC-SETTINGS-010 | Sales | Default Payment Terms (Days) | Integer input | Input number |
| UC-SETTINGS-011 | Sales | Auto-Generate Invoice Numbers | Switch toggle | Checkbox switch |
| UC-SETTINGS-012 | Save | Click Save Settings | SaveSettings with spinner | Button primary |
| UC-SETTINGS-013 | Save | No business selected | Alert "select a business" | Alert |
| UC-SETTINGS-014 | Save | Success | Alert "saved successfully" + update timestamp | Alert |
| UC-SETTINGS-015 | Save | Error | Alert with error message | Alert |
| UC-SETTINGS-016 | Reset | Click Reset to Defaults | Confirm dialog + reset values | Button |
| UC-SETTINGS-017 | Reset | Confirmation | JS confirm dialog | Confirm |
| UC-SETTINGS-018 | Reset | Confirmed | All fields reset to defaults | StateHasChanged |
| UC-SETTINGS-019 | Default Values | Currency | INR | Default |
| UC-SETTINGS-020 | Default Values | Tax Rate | 18.0 | Default |
| UC-SETTINGS-021 | Default Values | Date Format | dd/MM/yyyy | Default |
| UC-SETTINGS-022 | Default Values | Number Format | en-IN | Default |
| UC-SETTINGS-023 | Default Values | Low Stock Threshold | 10 | Default |
| UC-SETTINGS-024 | Default Values | Auto Product Codes | true | Default |
| UC-SETTINGS-025 | Default Values | Payment Terms | 30 | Default |
| UC-SETTINGS-026 | Default Values | Auto Invoice Numbers | true | Default |
| UC-SETTINGS-027 | Quick Info | Business name | SelectedBusinessName or "Not Selected" | Text |
| UC-SETTINGS-028 | Quick Info | Last Updated | DateTime or "Never" | Text |
| UC-SETTINGS-029 | Quick Info | Note | Settings per-business info alert | Alert info |
| UC-SETTINGS-030 | Page Title | Dynamic | Business name in title | PageTitle |
| UC-SETTINGS-031 | Save Indicator | isSaving=true | Spinner shows in button | Spinner |
| UC-SETTINGS-032 | Save Indicator | isSaving=false | Button enabled | Button |
| UC-SETTINGS-033 | Card Header | General Settings | Card header text | Card header |
| UC-SETTINGS-034 | Card Header | Inventory Settings | Card header text | Card header |
| UC-SETTINGS-035 | Card Header | Sales Settings | Card header text | Card header |
| UC-SETTINGS-036 | Render Guard | hasRendered check | JS only after first render | Boolean |
| UC-SETTINGS-037 | Init | OnAfterRenderAsync | LoadSettings called once | Lifecycle |
| UC-SETTINGS-038 | Layout | Main content | col-lg-8 | Column |
| UC-SETTINGS-039 | Layout | Sidebar | col-lg-4 | Column |
| UC-SETTINGS-040 | Dispose | Component disposed | Cleanup if needed | Dispose |