From 406c209dfe0e10e6810e6ec015bd4ada49e941ee Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Fri, 24 Jan 2025 08:22:41 +0100 Subject: [PATCH 1/5] Fix issue: Contact methods - Lets make sure it is you page appears twice --- src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx index a2475ca3ec70..62e75f6895cd 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx @@ -70,7 +70,7 @@ function NewContactMethodPage({route}: NewContactMethodPageProps) { return; } - Navigation.navigate(ROUTES.SETTINGS_CONTACT_METHODS.route); + Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.route); User.clearUnvalidatedNewContactMethodAction(); }, [pendingContactAction?.actionVerified]); From e1778df9d90af165a6a9d7482e1618acea8382d5 Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Fri, 24 Jan 2025 09:53:53 +0100 Subject: [PATCH 2/5] Fix issue: Web - Copilot - RHP is not dismissed after adding a copilot --- .../settings/Security/AddDelegate/DelegateMagicCodeModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Security/AddDelegate/DelegateMagicCodeModal.tsx b/src/pages/settings/Security/AddDelegate/DelegateMagicCodeModal.tsx index 208e28ab592b..2a544f8b5eaa 100644 --- a/src/pages/settings/Security/AddDelegate/DelegateMagicCodeModal.tsx +++ b/src/pages/settings/Security/AddDelegate/DelegateMagicCodeModal.tsx @@ -33,7 +33,7 @@ function DelegateMagicCodeModal({login, role, onClose, isValidateCodeActionModal } // Dismiss modal on successful magic code verification - Navigation.navigate(ROUTES.SETTINGS_SECURITY); + Navigation.goBack(ROUTES.SETTINGS_SECURITY); }, [login, currentDelegate, role, addDelegateErrors]); const onBackButtonPress = () => { From 4cfdaa8da576d8ca5ba193918fd367cc9a991b59 Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Fri, 24 Jan 2025 11:00:28 +0100 Subject: [PATCH 3/5] Fix issue: Workspace - Wrong navigation when opening workspace after redirecting to Subscription from Upgrade modal --- src/pages/workspace/WorkspacesListPage.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 0751dd86125f..f1af407969df 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -345,6 +345,18 @@ function WorkspacesListPage() { }, {}); }, [reports]); + const navigateToWorkspace = useCallback( + (policyID: string) => { + // On the wide layout, we always want to open the Profile page when opening workpsace settings from the list + if (shouldUseNarrowLayout) { + Navigation.navigate(ROUTES.WORKSPACE_INITIAL.getRoute(policyID)); + return; + } + Navigation.navigate(ROUTES.WORKSPACE_PROFILE.getRoute(policyID)); + }, + [shouldUseNarrowLayout], + ); + /** * Add free policies (workspaces) to the list of menu items and returns the list of menu items */ @@ -380,7 +392,7 @@ function WorkspacesListPage() { return { title: policy.name, icon: policy.avatarURL ? policy.avatarURL : getDefaultWorkspaceAvatar(policy.name), - action: () => Navigation.navigate(ROUTES.WORKSPACE_INITIAL.getRoute(policy.id)), + action: () => navigateToWorkspace(policy.id), brickRoadIndicator: !isPolicyAdmin(policy) ? undefined : reimbursementAccountBrickRoadIndicator ?? @@ -405,7 +417,7 @@ function WorkspacesListPage() { }; }) .sort((a, b) => localeCompare(a.title, b.title)); - }, [reimbursementAccount?.errors, policies, isOffline, theme.textLight, policyRooms, session?.email, allConnectionSyncProgresses]); + }, [reimbursementAccount?.errors, policies, isOffline, session?.email, allConnectionSyncProgresses, theme.textLight, policyRooms, navigateToWorkspace]); const getHeaderButton = () => (