Skip to content

Commit 6a9854f

Browse files
rever PR 52117
1 parent 64eaf2f commit 6a9854f

19 files changed

+28
-345
lines changed

src/CONST.ts

-1
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,6 @@ const CONST = {
934934
CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/workspaces/Configure-Reimbursement-Settings',
935935
COPILOT_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/copilots-and-delegates/Assign-or-remove-a-Copilot',
936936
DELAYED_SUBMISSION_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/reports/Automatically-submit-employee-reports',
937-
PLAN_TYPES_AND_PRICING_HELP_URL: 'https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Plan-types-and-pricing',
938937
// Use Environment.getEnvironmentURL to get the complete URL with port number
939938
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',
940939
NAVATTIC: {

src/ROUTES.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -711,10 +711,6 @@ const ROUTES = {
711711
route: 'settings/workspaces/:policyID/profile/address',
712712
getRoute: (policyID: string, backTo?: string) => getUrlWithBackToParam(`settings/workspaces/${policyID}/profile/address` as const, backTo),
713713
},
714-
WORKSPACE_PROFILE_PLAN: {
715-
route: 'settings/workspaces/:policyID/profile/plan',
716-
getRoute: (policyID: string, backTo?: string) => getUrlWithBackToParam(`settings/workspaces/${policyID}/profile/plan` as const, backTo),
717-
},
718714
WORKSPACE_ACCOUNTING: {
719715
route: 'settings/workspaces/:policyID/accounting',
720716
getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting` as const,
@@ -978,9 +974,9 @@ const ROUTES = {
978974
getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}` as const,
979975
},
980976
WORKSPACE_UPGRADE: {
981-
route: 'settings/workspaces/:policyID/upgrade/:featureName?',
982-
getRoute: (policyID: string, featureName?: string, backTo?: string) =>
983-
getUrlWithBackToParam(`settings/workspaces/${policyID}/upgrade/${encodeURIComponent(featureName ?? '')}` as const, backTo),
977+
route: 'settings/workspaces/:policyID/upgrade/:featureName',
978+
getRoute: (policyID: string, featureName: string, backTo?: string) =>
979+
getUrlWithBackToParam(`settings/workspaces/${policyID}/upgrade/${encodeURIComponent(featureName)}` as const, backTo),
984980
},
985981
WORKSPACE_DOWNGRADE: {
986982
route: 'settings/workspaces/:policyID/downgrade/',

src/SCREENS.ts

-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,6 @@ const SCREENS = {
498498
TAG_GL_CODE: 'Tag_GL_Code',
499499
CURRENCY: 'Workspace_Profile_Currency',
500500
ADDRESS: 'Workspace_Profile_Address',
501-
PLAN: 'Workspace_Profile_Plan_Type',
502501
WORKFLOWS: 'Workspace_Workflows',
503502
WORKFLOWS_PAYER: 'Workspace_Workflows_Payer',
504503
WORKFLOWS_APPROVALS_NEW: 'Workspace_Approvals_New',

src/languages/en.ts

-32
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ import type {
191191
WelcomeNoteParams,
192192
WelcomeToRoomParams,
193193
WeSentYouMagicSignInLinkParams,
194-
WorkspaceLockedPlanTypeParams,
195194
WorkspaceOwnerWillNeedToAddOrUpdatePaymentCardParams,
196195
YourPlanPriceParams,
197196
ZipCodeExampleFormatParams,
@@ -2539,7 +2538,6 @@ const translations = {
25392538
return 'Member';
25402539
}
25412540
},
2542-
planType: 'Plan type',
25432541
submitExpense: 'Submit expenses using your workspace chat below:',
25442542
defaultCategory: 'Default category',
25452543
},
@@ -4282,19 +4280,6 @@ const translations = {
42824280
moreDetails: 'for more details.',
42834281
gotIt: 'Got it, thanks',
42844282
},
4285-
commonFeatures: {
4286-
title: 'Upgrade Workspace to Control',
4287-
note: 'Get access to all our most advanced functionality, including:',
4288-
benefits: {
4289-
note: 'The Control plan starts at $9 per active member per month.',
4290-
learnMore: 'Learn more',
4291-
pricing: 'about our plans and pricing.',
4292-
benefit1: 'Advanced accounting connections (NetSuite, Sage Intacct and more)',
4293-
benefit2: 'Expense rules',
4294-
benefit3: 'Multiple approval workflows',
4295-
benefit4: 'Enhanced security controls',
4296-
},
4297-
},
42984283
},
42994284
restrictedAction: {
43004285
restricted: 'Restricted',
@@ -4398,23 +4383,6 @@ const translations = {
43984383
andEnableWorkflows: 'and enable workflows, then add approvals to unlock this feature.',
43994384
},
44004385
},
4401-
planTypePage: {
4402-
planTypes: {
4403-
team: {
4404-
label: 'Collect',
4405-
description: 'For teams looking to automate their processes.',
4406-
},
4407-
corporate: {
4408-
label: 'Control',
4409-
description: 'For organizations with advanced requirements.',
4410-
},
4411-
},
4412-
description: "Choose a plan that's right for you. For a detailed list of features and pricing, check out our",
4413-
subscriptionLink: 'plan types and pricing help page',
4414-
lockedPlanDescription: ({subscriptionUsersCount, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) =>
4415-
`You've committed to ${subscriptionUsersCount} active users on the Control plan until your annual subscription ends on ${annualSubscriptionEndDate}. You can switch to pay-per-use subscription and downgrade to the Collect plan starting ${annualSubscriptionEndDate} by disabling auto-renew in`,
4416-
subscriptions: 'Subscriptions',
4417-
},
44184386
},
44194387
getAssistancePage: {
44204388
title: 'Get assistance',

src/languages/es.ts

-32
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ import type {
191191
WelcomeNoteParams,
192192
WelcomeToRoomParams,
193193
WeSentYouMagicSignInLinkParams,
194-
WorkspaceLockedPlanTypeParams,
195194
WorkspaceOwnerWillNeedToAddOrUpdatePaymentCardParams,
196195
YourPlanPriceParams,
197196
ZipCodeExampleFormatParams,
@@ -2563,7 +2562,6 @@ const translations = {
25632562
return 'Miembro';
25642563
}
25652564
},
2566-
planType: 'Tipo de plan',
25672565
submitExpense: 'Envíe los gastos utilizando el chat de su espacio de trabajo:',
25682566
defaultCategory: 'Categoría predeterminada',
25692567
},
@@ -4249,23 +4247,6 @@ const translations = {
42494247
confirmText: 'Sí, exportar de nuevo',
42504248
cancelText: 'Cancelar',
42514249
},
4252-
planTypePage: {
4253-
planTypes: {
4254-
team: {
4255-
label: 'Collect',
4256-
description: 'Para equipos que buscan automatizar sus procesos.',
4257-
},
4258-
corporate: {
4259-
label: 'Recolectar',
4260-
description: 'Para organizaciones con requisitos avanzados.',
4261-
},
4262-
},
4263-
description: 'Elige el plan adecuado para ti. Para ver una lista detallada de funciones y precios, consulta nuestra',
4264-
subscriptionLink: 'página de ayuda sobre tipos de planes y precios',
4265-
lockedPlanDescription: ({subscriptionUsersCount, annualSubscriptionEndDate}: WorkspaceLockedPlanTypeParams) =>
4266-
`Tienes un compromiso anual de ${subscriptionUsersCount} miembros activos en el plan Control hasta el ${annualSubscriptionEndDate}. Puedes cambiar a una suscripción de pago por uso y desmejorar al plan Recopilar a partir del ${annualSubscriptionEndDate} desactivando la renovación automática en`,
4267-
subscriptions: 'Suscripciones',
4268-
},
42694250
upgrade: {
42704251
reportFields: {
42714252
title: 'Los campos',
@@ -4347,19 +4328,6 @@ const translations = {
43474328
moreDetails: 'para obtener más información.',
43484329
gotIt: 'Entendido, gracias.',
43494330
},
4350-
commonFeatures: {
4351-
title: 'Actualiza tu espacio de trabajo al plan Controlar',
4352-
note: 'Obtén acceso a todas nuestras funciones más avanzadas, incluyendo:',
4353-
benefits: {
4354-
note: 'El plan Controlar comienza en $9 por miembro activo al mes.',
4355-
learnMore: 'Obtén más información',
4356-
pricing: 'sobre nuestros planes y precios.',
4357-
benefit1: 'Conexiones contables avanzadas (NetSuite, Sage Intacct y más)',
4358-
benefit2: 'Reglas de gastos',
4359-
benefit3: 'Flujos de aprobación múltiples',
4360-
benefit4: 'Controles de seguridad mejorados',
4361-
},
4362-
},
43634331
},
43644332
restrictedAction: {
43654333
restricted: 'Restringido',

src/languages/params.ts

-5
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,6 @@ type CurrencyCodeParams = {
559559
currencyCode: string;
560560
};
561561

562-
type WorkspaceLockedPlanTypeParams = {
563-
subscriptionUsersCount: number;
564-
annualSubscriptionEndDate: string;
565-
};
566562
type CompanyNameParams = {
567563
companyName: string;
568564
};
@@ -773,7 +769,6 @@ export type {
773769
ImportedTypesParams,
774770
ImportPerDiemRatesSuccessfullDescriptionParams,
775771
CurrencyCodeParams,
776-
WorkspaceLockedPlanTypeParams,
777772
CompanyNameParams,
778773
ChatWithAccountManagerParams,
779774
};
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
type UpgradeToCorporateParams = {
22
policyID: string;
3-
featureName?: string;
3+
featureName: string;
44
};
55

66
export default UpgradeToCorporateParams;

src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ const SettingsModalStackNavigator = createModalStackNavigator<SettingsNavigatorP
270270
[SCREENS.WORKSPACE.CURRENCY]: () => require<ReactComponentModule>('../../../../pages/workspace/WorkspaceProfileCurrencyPage').default,
271271
[SCREENS.WORKSPACE.CATEGORY_SETTINGS]: () => require<ReactComponentModule>('../../../../pages/workspace/categories/CategorySettingsPage').default,
272272
[SCREENS.WORKSPACE.ADDRESS]: () => require<ReactComponentModule>('../../../../pages/workspace/WorkspaceProfileAddressPage').default,
273-
[SCREENS.WORKSPACE.PLAN]: () => require<ReactComponentModule>('../../../../pages/workspace/WorkspaceProfilePlanTypePage').default,
274273
[SCREENS.WORKSPACE.CATEGORIES_SETTINGS]: () => require<ReactComponentModule>('../../../../pages/workspace/categories/WorkspaceCategoriesSettingsPage').default,
275274
[SCREENS.WORKSPACE.CATEGORIES_IMPORT]: () => require<ReactComponentModule>('../../../../pages/workspace/categories/ImportCategoriesPage').default,
276275
[SCREENS.WORKSPACE.CATEGORIES_IMPORTED]: () => require<ReactComponentModule>('../../../../pages/workspace/categories/ImportedCategoriesPage').default,

src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const FULL_SCREEN_TO_RHP_MAPPING: Partial<Record<FullScreenName, string[]>> = {
55
[SCREENS.WORKSPACE.PROFILE]: [
66
SCREENS.WORKSPACE.NAME,
77
SCREENS.WORKSPACE.ADDRESS,
8-
SCREENS.WORKSPACE.PLAN,
98
SCREENS.WORKSPACE.CURRENCY,
109
SCREENS.WORKSPACE.DESCRIPTION,
1110
SCREENS.WORKSPACE.SHARE,

src/libs/Navigation/linkingConfig/config.ts

-3
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,6 @@ const config: LinkingOptions<RootStackParamList>['config'] = {
347347
[SCREENS.WORKSPACE.ADDRESS]: {
348348
path: ROUTES.WORKSPACE_PROFILE_ADDRESS.route,
349349
},
350-
[SCREENS.WORKSPACE.PLAN]: {
351-
path: ROUTES.WORKSPACE_PROFILE_PLAN.route,
352-
},
353350
[SCREENS.WORKSPACE.ACCOUNTING.QUICKBOOKS_ONLINE_IMPORT]: {path: ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_IMPORT.route},
354351
[SCREENS.WORKSPACE.ACCOUNTING.QUICKBOOKS_ONLINE_CHART_OF_ACCOUNTS]: {path: ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_CHART_OF_ACCOUNTS.route},
355352
[SCREENS.WORKSPACE.ACCOUNTING.QUICKBOOKS_ONLINE_CLASSES]: {path: ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_CLASSES.route},

src/libs/Navigation/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ type SettingsNavigatorParamList = {
246246
};
247247
[SCREENS.WORKSPACE.UPGRADE]: {
248248
policyID: string;
249-
featureName?: string;
249+
featureName: string;
250250
backTo?: Routes;
251251
categoryId?: string;
252252
};

src/libs/PolicyUtils.ts

-12
Original file line numberDiff line numberDiff line change
@@ -1114,17 +1114,6 @@ function getActivePolicy(): OnyxEntry<Policy> {
11141114
return getPolicy(activePolicyId);
11151115
}
11161116

1117-
function getUserFriendlyWorkspaceType(workspaceType: ValueOf<typeof CONST.POLICY.TYPE>) {
1118-
switch (workspaceType) {
1119-
case CONST.POLICY.TYPE.CORPORATE:
1120-
return Localize.translateLocal('workspace.type.control');
1121-
case CONST.POLICY.TYPE.TEAM:
1122-
return Localize.translateLocal('workspace.type.collect');
1123-
default:
1124-
return Localize.translateLocal('workspace.type.free');
1125-
}
1126-
}
1127-
11281117
function isPolicyAccessible(policy: OnyxEntry<Policy>): boolean {
11291118
return !isEmptyObject(policy) && (Object.keys(policy).length !== 1 || isEmptyObject(policy.errors)) && !!policy?.id;
11301119
}
@@ -1257,7 +1246,6 @@ export {
12571246
getNetSuiteImportCustomFieldLabel,
12581247
getAllPoliciesLength,
12591248
getActivePolicy,
1260-
getUserFriendlyWorkspaceType,
12611249
isPolicyAccessible,
12621250
areAllGroupPoliciesExpenseChatDisabled,
12631251
};

src/libs/actions/Policy/Policy.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,6 @@ function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName
16631663
outputCurrency: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
16641664
address: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
16651665
description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
1666-
type: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
16671666
},
16681667
},
16691668
},
@@ -1736,7 +1735,6 @@ function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName
17361735
outputCurrency: null,
17371736
address: null,
17381737
description: null,
1739-
type: null,
17401738
},
17411739
},
17421740
},
@@ -3326,7 +3324,7 @@ function setForeignCurrencyDefault(policyID: string, taxCode: string) {
33263324
API.write(WRITE_COMMANDS.SET_POLICY_TAXES_FOREIGN_CURRENCY_DEFAULT, parameters, onyxData);
33273325
}
33283326

3329-
function upgradeToCorporate(policyID: string, featureName?: string) {
3327+
function upgradeToCorporate(policyID: string, featureName: string) {
33303328
const policy = getPolicy(policyID);
33313329
const optimisticData: OnyxUpdate[] = [
33323330
{
@@ -3378,7 +3376,7 @@ function upgradeToCorporate(policyID: string, featureName?: string) {
33783376
},
33793377
];
33803378

3381-
const parameters: UpgradeToCorporateParams = {policyID, ...(featureName ? {featureName} : {})};
3379+
const parameters: UpgradeToCorporateParams = {policyID, featureName};
33823380

33833381
API.write(WRITE_COMMANDS.UPGRADE_TO_CORPORATE, parameters, {optimisticData, successData, failureData});
33843382
}

src/pages/workspace/WorkspaceProfilePage.tsx

-17
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac
7777
const onPressName = useCallback(() => Navigation.navigate(ROUTES.WORKSPACE_PROFILE_NAME.getRoute(policy?.id ?? '-1')), [policy?.id]);
7878
const onPressDescription = useCallback(() => Navigation.navigate(ROUTES.WORKSPACE_PROFILE_DESCRIPTION.getRoute(policy?.id ?? '-1')), [policy?.id]);
7979
const onPressShare = useCallback(() => Navigation.navigate(ROUTES.WORKSPACE_PROFILE_SHARE.getRoute(policy?.id ?? '-1')), [policy?.id]);
80-
const onPressPlanType = useCallback(() => Navigation.navigate(ROUTES.WORKSPACE_PROFILE_PLAN.getRoute(policy?.id ?? '-1')), [policy?.id]);
8180

8281
const policyName = policy?.name ?? '';
8382
const policyDescription =
@@ -268,22 +267,6 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac
268267
</View>
269268
</OfflineWithFeedback>
270269
)}
271-
{!readOnly && !!policy?.type && (
272-
<OfflineWithFeedback pendingAction={policy?.pendingFields?.type}>
273-
<View>
274-
<MenuItemWithTopDescription
275-
title={PolicyUtils.getUserFriendlyWorkspaceType(policy.type)}
276-
description={translate('workspace.common.planType')}
277-
shouldShowRightIcon={!readOnly}
278-
disabled={readOnly}
279-
wrapperStyle={styles.sectionMenuItemTopDescription}
280-
onPress={onPressPlanType}
281-
shouldGreyOutWhenDisabled={false}
282-
shouldUseDefaultCursorWhenDisabled
283-
/>
284-
</View>
285-
</OfflineWithFeedback>
286-
)}
287270
{!readOnly && (
288271
<View style={[styles.flexRow, styles.mt6, styles.mnw120]}>
289272
<Button

0 commit comments

Comments
 (0)