From 118d07e305766294a3ca152b1e3f56051bf2c8a1 Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Mon, 13 May 2024 17:03:27 +0530 Subject: [PATCH 1/7] Send invoice - workspace list should be in alphabetical order --- .../VerifyIdentity/VerifyIdentity.tsx | 2 +- src/pages/WorkspaceSwitcherPage/index.tsx | 13 ++------ .../request/step/IOURequestStepSendFrom.tsx | 32 +++++++++++-------- src/utils/sortWorkspacesBySelected.ts | 22 +++++++++++++ 4 files changed, 43 insertions(+), 26 deletions(-) create mode 100644 src/utils/sortWorkspacesBySelected.ts diff --git a/src/pages/ReimbursementAccount/VerifyIdentity/VerifyIdentity.tsx b/src/pages/ReimbursementAccount/VerifyIdentity/VerifyIdentity.tsx index 77bc26609bcd..b4d2fc86625e 100644 --- a/src/pages/ReimbursementAccount/VerifyIdentity/VerifyIdentity.tsx +++ b/src/pages/ReimbursementAccount/VerifyIdentity/VerifyIdentity.tsx @@ -66,7 +66,7 @@ function VerifyIdentity({reimbursementAccount, onBackButtonPress, onfidoApplican title={translate('onfidoStep.verifyIdentity')} onBackButtonPress={onBackButtonPress} /> - + { - if (workspace1.policyID === selectedWorkspaceID) { - return -1; - } - if (workspace2.policyID === selectedWorkspaceID) { - return 1; - } - return workspace1.text?.toLowerCase().localeCompare(workspace2.text?.toLowerCase() ?? '') ?? 0; -}; - const WorkspaceCardCreateAWorkspaceInstance = ; function WorkspaceSwitcherPage() { @@ -132,7 +123,7 @@ function WorkspaceSwitcherPage() { () => usersWorkspaces .filter((policy) => policy.text?.toLowerCase().includes(debouncedSearchTerm?.toLowerCase() ?? '')) - .sort((policy1, policy2) => sortWorkspacesBySelected(policy1, policy2, activeWorkspaceID)), + .sort((policy1, policy2) => sortWorkspacesBySelected({policyID: policy1.policyID, name: policy1.text}, {policyID: policy1.policyID, name: policy1.text}, activeWorkspaceID)), [debouncedSearchTerm, usersWorkspaces, activeWorkspaceID], ); diff --git a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx index a5def1072f7e..56717b429f1a 100644 --- a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx +++ b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx @@ -19,6 +19,7 @@ import withFullTransactionOrNotFound from './withFullTransactionOrNotFound'; import type {WithFullTransactionOrNotFoundProps} from './withFullTransactionOrNotFound'; import withWritableReportOrNotFound from './withWritableReportOrNotFound'; import type {WithWritableReportOrNotFoundProps} from './withWritableReportOrNotFound'; +import sortWorkspacesBySelected from "@src/utils/sortWorkspacesBySelected"; type WorkspaceListItem = ListItem & { value: string; @@ -41,20 +42,23 @@ function IOURequestStepSendFrom({route, transaction, allPolicies}: IOURequestSte const workspaceOptions: WorkspaceListItem[] = useMemo(() => { const activeAdminWorkspaces = PolicyUtils.getActiveAdminWorkspaces(allPolicies); - return activeAdminWorkspaces.map((policy) => ({ - text: policy.name, - value: policy.id, - keyForList: policy.id, - icons: [ - { - source: policy?.avatarURL ? policy.avatarURL : ReportUtils.getDefaultWorkspaceAvatar(policy.name), - fallbackIcon: Expensicons.FallbackWorkspaceAvatar, - name: policy.name, - type: CONST.ICON_TYPE_WORKSPACE, - }, - ], - isSelected: selectedWorkspace?.policyID === policy.id, - })); + + return activeAdminWorkspaces + .sort((policy1, policy2) => sortWorkspacesBySelected({policyID: policy1.id, name: policy1.name}, {policyID: policy2.id, name: policy2.name}, selectedWorkspace.policyID)) + .map((policy) => ({ + text: policy.name, + value: policy.id, + keyForList: policy.id, + icons: [ + { + source: policy?.avatarURL ? policy.avatarURL : ReportUtils.getDefaultWorkspaceAvatar(policy.name), + fallbackIcon: Expensicons.FallbackWorkspaceAvatar, + name: policy.name, + type: CONST.ICON_TYPE_WORKSPACE, + }, + ], + isSelected: selectedWorkspace?.policyID === policy.id, + })); }, [allPolicies, selectedWorkspace]); const navigateBack = () => { diff --git a/src/utils/sortWorkspacesBySelected.ts b/src/utils/sortWorkspacesBySelected.ts new file mode 100644 index 000000000000..1e00db87c3bc --- /dev/null +++ b/src/utils/sortWorkspacesBySelected.ts @@ -0,0 +1,22 @@ +type WorkspaceDetails = { + policyID: string, + name: string, +} + +/** + * Sort the workspaces by their name, while keeping the selected one at the beginning. + * @param workspace1 Details of the first workspace to be compared. + * @param workspace2 Details of the second workspace to be compared. + * @param selectedWorkspaceID ID of the selected workspace which needs to be at the beginning. + */ +const sortWorkspacesBySelected = (workspace1: WorkspaceDetails, workspace2: WorkspaceDetails, selectedWorkspaceID: string | undefined): number => { + if (workspace1.policyID === selectedWorkspaceID) { + return -1; + } + if (workspace2.policyID === selectedWorkspaceID) { + return 1; + } + return workspace1.name?.toLowerCase().localeCompare(workspace2.name?.toLowerCase() ?? '') ?? 0; +}; + +export default sortWorkspacesBySelected; From 0e7fc5e9da302d81684ab39954f0e20e1b0d3782 Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Mon, 13 May 2024 17:06:52 +0530 Subject: [PATCH 2/7] Update --- .../ReimbursementAccount/VerifyIdentity/VerifyIdentity.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ReimbursementAccount/VerifyIdentity/VerifyIdentity.tsx b/src/pages/ReimbursementAccount/VerifyIdentity/VerifyIdentity.tsx index b4d2fc86625e..77bc26609bcd 100644 --- a/src/pages/ReimbursementAccount/VerifyIdentity/VerifyIdentity.tsx +++ b/src/pages/ReimbursementAccount/VerifyIdentity/VerifyIdentity.tsx @@ -66,7 +66,7 @@ function VerifyIdentity({reimbursementAccount, onBackButtonPress, onfidoApplican title={translate('onfidoStep.verifyIdentity')} onBackButtonPress={onBackButtonPress} /> - + Date: Mon, 27 May 2024 17:52:06 +0530 Subject: [PATCH 3/7] Update --- src/pages/WorkspaceSwitcherPage/index.tsx | 4 ++-- src/pages/iou/request/step/IOURequestStepSendFrom.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/WorkspaceSwitcherPage/index.tsx b/src/pages/WorkspaceSwitcherPage/index.tsx index b31e6acfd7ed..a20cc652766e 100644 --- a/src/pages/WorkspaceSwitcherPage/index.tsx +++ b/src/pages/WorkspaceSwitcherPage/index.tsx @@ -19,8 +19,8 @@ import WorkspaceCardCreateAWorkspace from '@pages/workspace/card/WorkspaceCardCr import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -import WorkspacesSectionHeader from './WorkspacesSectionHeader'; import sortWorkspacesBySelected from "@src/utils/sortWorkspacesBySelected"; +import WorkspacesSectionHeader from './WorkspacesSectionHeader'; type WorkspaceListItem = { text: string; @@ -123,7 +123,7 @@ function WorkspaceSwitcherPage() { () => usersWorkspaces .filter((policy) => policy.text?.toLowerCase().includes(debouncedSearchTerm?.toLowerCase() ?? '')) - .sort((policy1, policy2) => sortWorkspacesBySelected({policyID: policy1.policyID, name: policy1.text}, {policyID: policy1.policyID, name: policy1.text}, activeWorkspaceID)), + .sort((policy1, policy2) => sortWorkspacesBySelected({policyID: policy1.policyID, name: policy1.text}, {policyID: policy2.policyID, name: policy2.text}, activeWorkspaceID)), [debouncedSearchTerm, usersWorkspaces, activeWorkspaceID], ); diff --git a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx index 56717b429f1a..d21c305fc913 100644 --- a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx +++ b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx @@ -14,12 +14,12 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; import type {Policy} from '@src/types/onyx'; +import sortWorkspacesBySelected from "@src/utils/sortWorkspacesBySelected"; import StepScreenWrapper from './StepScreenWrapper'; import withFullTransactionOrNotFound from './withFullTransactionOrNotFound'; import type {WithFullTransactionOrNotFoundProps} from './withFullTransactionOrNotFound'; import withWritableReportOrNotFound from './withWritableReportOrNotFound'; import type {WithWritableReportOrNotFoundProps} from './withWritableReportOrNotFound'; -import sortWorkspacesBySelected from "@src/utils/sortWorkspacesBySelected"; type WorkspaceListItem = ListItem & { value: string; @@ -44,7 +44,7 @@ function IOURequestStepSendFrom({route, transaction, allPolicies}: IOURequestSte const activeAdminWorkspaces = PolicyUtils.getActiveAdminWorkspaces(allPolicies); return activeAdminWorkspaces - .sort((policy1, policy2) => sortWorkspacesBySelected({policyID: policy1.id, name: policy1.name}, {policyID: policy2.id, name: policy2.name}, selectedWorkspace.policyID)) + .sort((policy1, policy2) => sortWorkspacesBySelected({policyID: policy1.id, name: policy1.name}, {policyID: policy2.id, name: policy2.name}, selectedWorkspace?.policyID)) .map((policy) => ({ text: policy.name, value: policy.id, From a4b625baf4fb23305abb0f17b67dcc0745533c7c Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Mon, 27 May 2024 19:58:35 +0530 Subject: [PATCH 4/7] Update --- src/pages/WorkspaceSwitcherPage/index.tsx | 2 +- src/pages/iou/request/step/IOURequestStepSendFrom.tsx | 2 +- src/utils/sortWorkspacesBySelected.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/WorkspaceSwitcherPage/index.tsx b/src/pages/WorkspaceSwitcherPage/index.tsx index 1b308c13fd0a..6e400610ddbf 100644 --- a/src/pages/WorkspaceSwitcherPage/index.tsx +++ b/src/pages/WorkspaceSwitcherPage/index.tsx @@ -19,7 +19,7 @@ import WorkspaceCardCreateAWorkspace from '@pages/workspace/card/WorkspaceCardCr import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -import sortWorkspacesBySelected from "@src/utils/sortWorkspacesBySelected"; +import sortWorkspacesBySelected from '@src/utils/sortWorkspacesBySelected'; import WorkspacesSectionHeader from './WorkspacesSectionHeader'; type WorkspaceListItem = { diff --git a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx index 5ee9381da49a..33b5b92df6d6 100644 --- a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx +++ b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx @@ -14,7 +14,7 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; import type {Policy} from '@src/types/onyx'; -import sortWorkspacesBySelected from "@src/utils/sortWorkspacesBySelected"; +import sortWorkspacesBySelected from '@src/utils/sortWorkspacesBySelected'; import StepScreenWrapper from './StepScreenWrapper'; import withFullTransactionOrNotFound from './withFullTransactionOrNotFound'; import type {WithFullTransactionOrNotFoundProps} from './withFullTransactionOrNotFound'; diff --git a/src/utils/sortWorkspacesBySelected.ts b/src/utils/sortWorkspacesBySelected.ts index 1e00db87c3bc..38531eaa5656 100644 --- a/src/utils/sortWorkspacesBySelected.ts +++ b/src/utils/sortWorkspacesBySelected.ts @@ -1,7 +1,7 @@ type WorkspaceDetails = { - policyID: string, - name: string, -} + policyID: string | undefined; + name: string; +}; /** * Sort the workspaces by their name, while keeping the selected one at the beginning. From e2a90844edd578b2ca2429e0591f76110ebb136e Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Fri, 31 May 2024 12:54:03 +0530 Subject: [PATCH 5/7] Update --- src/libs/PolicyUtils.ts | 22 +++++++++++++++++++ src/pages/WorkspaceSwitcherPage/index.tsx | 2 +- .../request/step/IOURequestStepSendFrom.tsx | 2 +- src/utils/sortWorkspacesBySelected.ts | 22 ------------------- 4 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 src/utils/sortWorkspacesBySelected.ts diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index 6a26b1a6cfc2..b11385a32c82 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -16,6 +16,11 @@ import {getAccountIDsByLogins, getLoginsByAccountIDs, getPersonalDetailByEmail} type MemberEmailsToAccountIDs = Record; +type WorkspaceDetails = { + policyID: string | undefined; + name: string; +}; + let allPolicies: OnyxCollection; Onyx.connect({ @@ -408,6 +413,22 @@ function getCurrentXeroOrganizationName(policy: Policy | undefined): string | un return findCurrentXeroOrganization(getXeroTenants(policy), policy?.connections?.xero?.config?.tenantID)?.name; } +/** + * Sort the workspaces by their name, while keeping the selected one at the beginning. + * @param workspace1 Details of the first workspace to be compared. + * @param workspace2 Details of the second workspace to be compared. + * @param selectedWorkspaceID ID of the selected workspace which needs to be at the beginning. + */ +const sortWorkspacesBySelected = (workspace1: WorkspaceDetails, workspace2: WorkspaceDetails, selectedWorkspaceID: string | undefined): number => { + if (workspace1.policyID === selectedWorkspaceID) { + return -1; + } + if (workspace2.policyID === selectedWorkspaceID) { + return 1; + } + return workspace1.name?.toLowerCase().localeCompare(workspace2.name?.toLowerCase() ?? '') ?? 0; +}; + export { canEditTaxRate, extractPolicyIDFromPath, @@ -456,6 +477,7 @@ export { getXeroTenants, findCurrentXeroOrganization, getCurrentXeroOrganizationName, + sortWorkspacesBySelected }; export type {MemberEmailsToAccountIDs}; diff --git a/src/pages/WorkspaceSwitcherPage/index.tsx b/src/pages/WorkspaceSwitcherPage/index.tsx index 6e400610ddbf..561d56c1637a 100644 --- a/src/pages/WorkspaceSwitcherPage/index.tsx +++ b/src/pages/WorkspaceSwitcherPage/index.tsx @@ -19,8 +19,8 @@ import WorkspaceCardCreateAWorkspace from '@pages/workspace/card/WorkspaceCardCr import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -import sortWorkspacesBySelected from '@src/utils/sortWorkspacesBySelected'; import WorkspacesSectionHeader from './WorkspacesSectionHeader'; +import {sortWorkspacesBySelected} from "@libs/PolicyUtils"; type WorkspaceListItem = { text: string; diff --git a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx index 33b5b92df6d6..68590b775af1 100644 --- a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx +++ b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx @@ -14,12 +14,12 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; import type {Policy} from '@src/types/onyx'; -import sortWorkspacesBySelected from '@src/utils/sortWorkspacesBySelected'; import StepScreenWrapper from './StepScreenWrapper'; import withFullTransactionOrNotFound from './withFullTransactionOrNotFound'; import type {WithFullTransactionOrNotFoundProps} from './withFullTransactionOrNotFound'; import withWritableReportOrNotFound from './withWritableReportOrNotFound'; import type {WithWritableReportOrNotFoundProps} from './withWritableReportOrNotFound'; +import {sortWorkspacesBySelected} from "@libs/PolicyUtils"; type WorkspaceListItem = ListItem & { value: string; diff --git a/src/utils/sortWorkspacesBySelected.ts b/src/utils/sortWorkspacesBySelected.ts deleted file mode 100644 index 38531eaa5656..000000000000 --- a/src/utils/sortWorkspacesBySelected.ts +++ /dev/null @@ -1,22 +0,0 @@ -type WorkspaceDetails = { - policyID: string | undefined; - name: string; -}; - -/** - * Sort the workspaces by their name, while keeping the selected one at the beginning. - * @param workspace1 Details of the first workspace to be compared. - * @param workspace2 Details of the second workspace to be compared. - * @param selectedWorkspaceID ID of the selected workspace which needs to be at the beginning. - */ -const sortWorkspacesBySelected = (workspace1: WorkspaceDetails, workspace2: WorkspaceDetails, selectedWorkspaceID: string | undefined): number => { - if (workspace1.policyID === selectedWorkspaceID) { - return -1; - } - if (workspace2.policyID === selectedWorkspaceID) { - return 1; - } - return workspace1.name?.toLowerCase().localeCompare(workspace2.name?.toLowerCase() ?? '') ?? 0; -}; - -export default sortWorkspacesBySelected; From 525d361b1879ccbd8514943ea8b1e10de0caa522 Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Fri, 31 May 2024 13:14:38 +0530 Subject: [PATCH 6/7] Update --- src/pages/WorkspaceSwitcherPage/index.tsx | 2 +- src/pages/iou/request/step/IOURequestStepSendFrom.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/WorkspaceSwitcherPage/index.tsx b/src/pages/WorkspaceSwitcherPage/index.tsx index 561d56c1637a..2d1782435ea0 100644 --- a/src/pages/WorkspaceSwitcherPage/index.tsx +++ b/src/pages/WorkspaceSwitcherPage/index.tsx @@ -19,8 +19,8 @@ import WorkspaceCardCreateAWorkspace from '@pages/workspace/card/WorkspaceCardCr import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -import WorkspacesSectionHeader from './WorkspacesSectionHeader'; import {sortWorkspacesBySelected} from "@libs/PolicyUtils"; +import WorkspacesSectionHeader from './WorkspacesSectionHeader'; type WorkspaceListItem = { text: string; diff --git a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx index 68590b775af1..f7419fa8cf71 100644 --- a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx +++ b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx @@ -14,12 +14,12 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; import type {Policy} from '@src/types/onyx'; +import {sortWorkspacesBySelected} from "@libs/PolicyUtils"; import StepScreenWrapper from './StepScreenWrapper'; import withFullTransactionOrNotFound from './withFullTransactionOrNotFound'; import type {WithFullTransactionOrNotFoundProps} from './withFullTransactionOrNotFound'; import withWritableReportOrNotFound from './withWritableReportOrNotFound'; import type {WithWritableReportOrNotFoundProps} from './withWritableReportOrNotFound'; -import {sortWorkspacesBySelected} from "@libs/PolicyUtils"; type WorkspaceListItem = ListItem & { value: string; From af3d50a659258435c75ad8cd2a97c591f81e7d81 Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Fri, 31 May 2024 16:24:39 +0530 Subject: [PATCH 7/7] Update --- src/pages/WorkspaceSwitcherPage/index.tsx | 2 +- src/pages/iou/request/step/IOURequestStepSendFrom.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/WorkspaceSwitcherPage/index.tsx b/src/pages/WorkspaceSwitcherPage/index.tsx index 6cbe17dc5356..e09d61664000 100644 --- a/src/pages/WorkspaceSwitcherPage/index.tsx +++ b/src/pages/WorkspaceSwitcherPage/index.tsx @@ -12,6 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import Navigation from '@libs/Navigation/Navigation'; import * as PolicyUtils from '@libs/PolicyUtils'; +import {sortWorkspacesBySelected} from '@libs/PolicyUtils'; import * as ReportUtils from '@libs/ReportUtils'; import {getWorkspacesBrickRoads, getWorkspacesUnreadStatuses} from '@libs/WorkspacesSettingsUtils'; import type {BrickRoad} from '@libs/WorkspacesSettingsUtils'; @@ -19,7 +20,6 @@ import WorkspaceCardCreateAWorkspace from '@pages/workspace/card/WorkspaceCardCr import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -import {sortWorkspacesBySelected} from "@libs/PolicyUtils"; import WorkspacesSectionHeader from './WorkspacesSectionHeader'; type WorkspaceListItem = { diff --git a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx index dd1531923e43..74a1370fb00c 100644 --- a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx +++ b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx @@ -8,13 +8,13 @@ import UserListItem from '@components/SelectionList/UserListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; import * as PolicyUtils from '@libs/PolicyUtils'; +import {sortWorkspacesBySelected} from '@libs/PolicyUtils'; import * as ReportUtils from '@libs/ReportUtils'; import * as IOU from '@userActions/IOU'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; import type {Policy} from '@src/types/onyx'; -import {sortWorkspacesBySelected} from "@libs/PolicyUtils"; import StepScreenWrapper from './StepScreenWrapper'; import withFullTransactionOrNotFound from './withFullTransactionOrNotFound'; import type {WithFullTransactionOrNotFoundProps} from './withFullTransactionOrNotFound';