From 105f463865f7c38cf40cf1bd398c113760a274f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Musia=C5=82?= Date: Thu, 18 Dec 2025 17:19:18 +0100 Subject: [PATCH 01/50] Decision modal for on close account --- package-lock.json | 2 +- src/ROUTES.ts | 4 + src/SCREENS.ts | 1 + src/components/ConfirmContent.tsx | 6 + src/components/DecisionModal.tsx | 44 ++++- src/languages/en.ts | 4 + .../ModalStackNavigators/index.tsx | 1 + .../linkingConfig/RELATIONS/DOMAIN_TO_RHP.ts | 1 + src/libs/Navigation/linkingConfig/config.ts | 3 + src/libs/Navigation/types.ts | 4 + src/pages/domain/BaseDomainMembersPage.tsx | 96 +++++------ .../Members/DomainMemberDetailsPage.tsx | 156 ++++++++++++++++++ .../domain/Members/DomainMembersPage.tsx | 9 +- 13 files changed, 269 insertions(+), 62 deletions(-) create mode 100644 src/pages/domain/Members/DomainMemberDetailsPage.tsx diff --git a/package-lock.json b/package-lock.json index 05a096708934..b345ebfc9b45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -244,7 +244,7 @@ "electron-builder": "26.0.19", "eslint": "^9.36.0", "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-config-expensify": "^2.0.101", + "eslint-config-expensify": "2.0.101", "eslint-config-prettier": "^9.1.0", "eslint-plugin-jest": "^29.0.1", "eslint-plugin-jsdoc": "^60.7.0", diff --git a/src/ROUTES.ts b/src/ROUTES.ts index dbabd1274e82..02fcbe07a471 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -3460,6 +3460,10 @@ const ROUTES = { route: 'domain/:domainAccountID/members', getRoute: (domainAccountID: number) => `domain/${domainAccountID}/members` as const, }, + DOMAIN_MEMBER_DETAILS: { + route: 'domain/:domainAccountID/members/:accountID', + getRoute: (domainAccountID: number, accountID: number) => `domain/${domainAccountID}/members/${accountID}` as const, + }, } as const; /** diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 00bbafaaccc2..f8368b38b52b 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -855,6 +855,7 @@ const SCREENS = { ADMINS: 'Domain_Admins', ADMIN_DETAILS: 'Domain_Admin_Details', MEMBERS: 'Domain_Members', + MEMBER_DETAILS: 'Domain_Member_Details', }, } as const; diff --git a/src/components/ConfirmContent.tsx b/src/components/ConfirmContent.tsx index 3d5af3240302..0b772d974b5a 100644 --- a/src/components/ConfirmContent.tsx +++ b/src/components/ConfirmContent.tsx @@ -40,6 +40,9 @@ type ConfirmContentProps = { /** Whether we should use the success button color */ success?: boolean; + /** Whether we should use the success button color for secondary action */ + secondarySuccess?: boolean; + /** Whether we should use the danger button color. Use if the action is destructive */ danger?: boolean; @@ -112,6 +115,7 @@ function ConfirmContent({ cancelText = '', prompt = '', success = true, + secondarySuccess = false, danger = false, shouldDisableConfirmButtonWhenOffline = false, shouldShowCancelButton = false, @@ -201,6 +205,7 @@ function ConfirmContent({ onPress={onCancel} large text={cancelText || translate('common.no')} + success={secondarySuccess} /> )}