Skip to content

Commit 2e4c4f6

Browse files
authored
Merge pull request Expensify#66588 from Expensify/chirag-11-50-cohort-update
Keeping 11-50 company size in newdot
2 parents c97352a + 45576ad commit 2e4c4f6

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

src/libs/OnboardingUtils.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,22 @@ const supportedIntegrationsInNewDot = ['quickbooksOnline', 'quickbooksDesktop',
1212
* @returns boolean - True if user should be redirected to old dot
1313
*/
1414
function shouldOnboardingRedirectToOldDot(companySize: OnboardingCompanySize | undefined, userReportedIntegration: OnboardingAccounting | undefined): boolean {
15+
// Desktop users should never be redirected to old dot
16+
if (getPlatform() === CONST.PLATFORM.DESKTOP) {
17+
return false;
18+
}
19+
20+
// Check if the integration is supported in NewDot
1521
const isSupportedIntegration = (!!userReportedIntegration && supportedIntegrationsInNewDot.includes(userReportedIntegration)) || userReportedIntegration === null;
16-
return getPlatform() !== CONST.PLATFORM.DESKTOP && (!isSupportedIntegration || companySize !== CONST.ONBOARDING_COMPANY_SIZE.MICRO);
22+
23+
// Don't redirect if integration is supported and company size is MICRO or SMALL
24+
const isMicroOrSmallCompany = companySize === CONST.ONBOARDING_COMPANY_SIZE.MICRO || companySize === CONST.ONBOARDING_COMPANY_SIZE.SMALL;
25+
if (isSupportedIntegration && isMicroOrSmallCompany) {
26+
return false;
27+
}
28+
29+
// Redirect to old dot in all other cases (unsupported integration or larger company size)
30+
return true;
1731
}
1832

1933
// eslint-disable-next-line import/prefer-default-export

0 commit comments

Comments
 (0)