From 942b8de36ed80d3844bdaa4d064bc20f2d6f524e Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Tue, 4 Mar 2025 22:46:58 +0200 Subject: [PATCH 1/2] Don't ask for workspace address if public domain user can't enable Travel --- Mobile-Expensify | 2 +- src/components/BookTravelButton.tsx | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Mobile-Expensify b/Mobile-Expensify index f5a32c58ee74..6c3332f02d89 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit f5a32c58ee74259749beea05b7fd389594595cd4 +Subproject commit 6c3332f02d89f80810628882509cc4dcf44213d4 diff --git a/src/components/BookTravelButton.tsx b/src/components/BookTravelButton.tsx index eb4e04fefb80..0cb3acf7cc5e 100644 --- a/src/components/BookTravelButton.tsx +++ b/src/components/BookTravelButton.tsx @@ -57,12 +57,6 @@ function BookTravelButton({text}: BookTravelButtonProps) { return; } - // Spotnana requires an address anytime an entity is created for a policy - if (isEmptyObject(policy?.address)) { - Navigation.navigate(ROUTES.WORKSPACE_OVERVIEW_ADDRESS.getRoute(policy?.id, Navigation.getActiveRoute())); - return; - } - const isPolicyProvisioned = policy?.travelSettings?.spotnanaCompanyID ?? policy?.travelSettings?.associatedTravelDomainAccountID; if (policy?.travelSettings?.hasAcceptedTerms ?? (travelSettings?.hasAcceptedTerms && isPolicyProvisioned)) { openTravelDotLink(policy?.id) @@ -91,6 +85,9 @@ function BookTravelButton({text}: BookTravelButtonProps) { const adminDomains = getAdminsPrivateEmailDomains(policy); if (adminDomains.length === 0) { Navigation.navigate(ROUTES.TRAVEL_PUBLIC_DOMAIN_ERROR); + } else if (isEmptyObject(policy?.address)) { + // Spotnana requires an address anytime an entity is created for a policy + Navigation.navigate(ROUTES.WORKSPACE_OVERVIEW_ADDRESS.getRoute(policy?.id, Navigation.getActiveRoute())); } else if (adminDomains.length === 1) { navigateToAcceptTerms(adminDomains.at(0) ?? CONST.TRAVEL.DEFAULT_DOMAIN); } else { From f6240c789dd8fc987989e2e7789fce8c7eef9315 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Tue, 4 Mar 2025 22:56:37 +0200 Subject: [PATCH 2/2] Revert submodule Mobile-Expensify to f5a32c --- Mobile-Expensify | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mobile-Expensify b/Mobile-Expensify index 6c3332f02d89..f5a32c58ee74 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit 6c3332f02d89f80810628882509cc4dcf44213d4 +Subproject commit f5a32c58ee74259749beea05b7fd389594595cd4