Imported from TaxMyself-dev/TaxMyself (
frontend/src/app/pages/settings/AGENTS.md). Install upstream withnpx skills add TaxMyself-dev/TaxMyself --skill settings. Copyright stays with the author.
Purpose
Account/profile settings hub: tabbed page for editing personal details, spouse details, children, businesses, category customization, and (feature-flagged) open-banking account permissions/consent management.
Key entities/files
settings.page.ts—SettingsPage(standalone component, no module.ts — routed directly vialoadComponentinapp-routing.module.ts). Owns per-tab reactive forms (personalFormGroup,spouseFormGroup,childrenFormArray,businessesFormArray,addBusinessFormGroup,addPermissionFormGroup) and tab visibility driven byAccessService.getFeatureState.settings.page.html/.scss— tabbed layout (personal / businesses / categories / permissions).my-categories-tab/my-categories-tab.component.ts(+html/scss)— child component for the "הקטגוריות שלי" tab; manages user category/subcategory rules (UserCategoryGroup,UserRuleRow) — custom recognition %, VAT %, tax %, equipment flag, comment-pattern rules per category/subcategory.
Main flows
- Personal / spouse details: forms patched from
AuthService.getUserDataFromLocalStorage()+ refreshed viaAuthService.restoreUserData();updatePersonalDetails/updateSpouseDetailsPATCH viaAuthService.updateUser. - Children:
loadChildren/updateChildrenDetails/confirmDeleteChildviaAuthService.getChildren/updateChildren/deleteChild, backed by a dynamicchildrenFormArray. - Businesses:
loadBusinesses/saveBusiness/openAddBusinessModal+submitAddBusiness/deleteBusinessall delegate toGenericService(loadBusinessesFromServer,createBusiness,updateBusiness,deleteBusiness, backed by a dynamicbusinessesFormArraysynced to theBusiness[]signal. - Categories tab: delegated entirely to
MyCategoriesTabComponent. - Permissions tab ("ניהול הרשאות וחשבונות", access-gated by
AppFeature.OPEN_BANKING_PERMISSIONS_TAB"):fetchMyPermissions/grantViewPermissionviaMyPermissionsService(view-permission grants to other users), and account-source management —fetchAccountSources/onPullSourceviaTransactionsService.getSourcesWithTypesandSyncStatusService.retrySource(per-source manual transaction pull retry), rendered throughGenericTableComponent`. - Date handling helpers (
stringToDate/toDisplayDate/toApiDate/dateToApiString) convert between dd-mm-yyyy display strings,Dateobjects (form controls), and yyyy-mm-dd API strings.
Related topics
- Backend: auth (user/spouse/children CRUD), business (business CRUD), transactions (account sources, retry-source), delegation (view-permission grants via MyPermissionsService).
- Frontend shared: category-management is a related but separate topic —
my-categories-tabhere is settings-local category rule editing, not the same component as sharedcategory-management. - Frontend pages: transactions (via
TransactionsServicefor account sources).