File tree 1 file changed +3
-6
lines changed 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,6 @@ function BookTravelButton({text}: BookTravelButtonProps) {
58
58
return ;
59
59
}
60
60
61
- // Spotnana requires an address anytime an entity is created for a policy
62
- if ( isEmptyObject ( policy ?. address ) ) {
63
- Navigation . navigate ( ROUTES . WORKSPACE_OVERVIEW_ADDRESS . getRoute ( policy ?. id , Navigation . getActiveRoute ( ) ) ) ;
64
- return ;
65
- }
66
-
67
61
const isPolicyProvisioned = policy ?. travelSettings ?. spotnanaCompanyID ?? policy ?. travelSettings ?. associatedTravelDomainAccountID ;
68
62
if ( policy ?. travelSettings ?. hasAcceptedTerms ?? ( travelSettings ?. hasAcceptedTerms && isPolicyProvisioned ) ) {
69
63
openTravelDotLink ( policy ?. id )
@@ -92,6 +86,9 @@ function BookTravelButton({text}: BookTravelButtonProps) {
92
86
const adminDomains = getAdminsPrivateEmailDomains ( policy ) ;
93
87
if ( adminDomains . length === 0 ) {
94
88
Navigation . navigate ( ROUTES . TRAVEL_PUBLIC_DOMAIN_ERROR ) ;
89
+ } else if ( isEmptyObject ( policy ?. address ) ) {
90
+ // Spotnana requires an address anytime an entity is created for a policy
91
+ Navigation . navigate ( ROUTES . WORKSPACE_OVERVIEW_ADDRESS . getRoute ( policy ?. id , Navigation . getActiveRoute ( ) ) ) ;
95
92
} else if ( adminDomains . length === 1 ) {
96
93
navigateToAcceptTerms ( adminDomains . at ( 0 ) ?? CONST . TRAVEL . DEFAULT_DOMAIN ) ;
97
94
} else {
You can’t perform that action at this time.
0 commit comments