Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/KYCWall/BaseKYCWall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ function KYCWall({
if (iouReport && isIOUReport(iouReport)) {
const adminPolicy = policies?.[`${ONYXKEYS.COLLECTION.POLICY}${policy?.id}`];
if (adminPolicy) {
const inviteResult = moveIOUReportToPolicyAndInviteSubmitter(iouReport?.reportID, adminPolicy.id, formatPhoneNumber);
const inviteResult = moveIOUReportToPolicyAndInviteSubmitter(iouReport?.reportID, adminPolicy, formatPhoneNumber);
Comment thread
luacmartins marked this conversation as resolved.
Comment thread
luacmartins marked this conversation as resolved.
if (inviteResult?.policyExpenseChatReportID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(inviteResult.policyExpenseChatReportID));
} else {
const moveResult = moveIOUReportToPolicy(iouReport?.reportID, adminPolicy.id, true);
const moveResult = moveIOUReportToPolicy(iouReport?.reportID, adminPolicy, true);
savePreferredPaymentMethod(iouReport.policyID, adminPolicy.id, CONST.LAST_PAYMENT_METHOD.IOU, lastPaymentMethod?.[adminPolicy.id]);
if (moveResult?.policyExpenseChatReportID && !moveResult.useTemporaryOptimisticExpenseChatReportID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(moveResult.policyExpenseChatReportID));
Expand Down
240 changes: 59 additions & 181 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
let currentUserAccountID = -1;
let currentUserEmail: string | undefined;

Onyx.connect({

Check warning on line 285 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.SESSION,
callback: (value) => {
// When signed out, val is undefined
Expand All @@ -295,13 +295,13 @@
},
});

Onyx.connect({

Check warning on line 298 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.CONCIERGE_REPORT_ID,
callback: (value) => (conciergeReportID = value),
});

let preferredSkinTone: number = CONST.EMOJI_DEFAULT_SKIN_TONE;
Onyx.connect({

Check warning on line 304 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE,
callback: (value) => {
preferredSkinTone = EmojiUtils.getPreferredSkinToneIndex(value);
Expand All @@ -311,7 +311,7 @@
// map of reportID to all reportActions for that report
const allReportActions: OnyxCollection<ReportActions> = {};

Onyx.connect({

Check warning on line 314 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT_ACTIONS,
callback: (actions, key) => {
if (!key || !actions) {
Expand All @@ -323,14 +323,14 @@
});

let allTransactionViolations: OnyxCollection<TransactionViolations> = {};
Onyx.connect({

Check warning on line 326 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS,
waitForCollectionCallback: true,
callback: (value) => (allTransactionViolations = value),
});

let allReports: OnyxCollection<Report>;
Onyx.connect({

Check warning on line 333 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -340,7 +340,7 @@

let isNetworkOffline = false;
let networkStatus: NetworkStatus;
Onyx.connect({

Check warning on line 343 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.NETWORK,
callback: (value) => {
isNetworkOffline = value?.isOffline ?? false;
Expand All @@ -349,7 +349,7 @@
});

let allPersonalDetails: OnyxEntry<PersonalDetailsList> = {};
Onyx.connect({

Check warning on line 352 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (value) => {
allPersonalDetails = value ?? {};
Expand All @@ -357,7 +357,7 @@
});

let account: OnyxEntry<Account> = {};
Onyx.connect({

Check warning on line 360 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.ACCOUNT,
callback: (value) => {
account = value ?? {};
Expand All @@ -365,7 +365,7 @@
});

const draftNoteMap: OnyxCollection<string> = {};
Onyx.connect({

Check warning on line 368 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.PRIVATE_NOTES_DRAFT,
callback: (value, key) => {
if (!key) {
Expand Down Expand Up @@ -5207,18 +5207,15 @@
/**
* Moves an IOU report to a policy by converting it to an expense report
* @param reportID - The ID of the IOU report to move
* @param policyID - The ID of the policy to move the report to
* @param policy - The policy to move the report to
* @param isFromSettlementButton - Whether the action is from report preview
*/
function moveIOUReportToPolicy(
reportID: string,
policyID: string,
policy: Policy,
isFromSettlementButton?: boolean,
): {policyExpenseChatReportID?: string; useTemporaryOptimisticExpenseChatReportID: boolean} | undefined {
const iouReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
// This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850
// eslint-disable-next-line deprecation/deprecation
const policy = getPolicy(policyID);

// This flow only works for IOU reports
if (!policy || !iouReport || !isIOUReportUsingReport(iouReport)) {
Expand All @@ -5231,163 +5228,19 @@
return;
}

// Generate new variables for the policy
const policyName = policy.name ?? '';
const policyID = policy.id;
Comment thread
luacmartins marked this conversation as resolved.
const iouReportID = iouReport.reportID;
const employeeAccountID = iouReport.ownerAccountID;
const expenseChatReportId = getPolicyExpenseChat(employeeAccountID, policyID)?.reportID;
const useTemporaryOptimisticExpenseChatReportID = !expenseChatReportId;
const optimisticExpenseChatReportID = expenseChatReportId ?? generateReportID();

const optimisticData: OnyxUpdate[] = [];

const successData: OnyxUpdate[] = [];

const failureData: OnyxUpdate[] = [];

// Next we need to convert the IOU report to Expense report.
// We need to change:
// - report type
// - change the sign of the report total
// - update its policyID and policyName
// - update the chatReportID to point to the expense chat if the policy has policy expense chat enabled
const expenseReport = {
...iouReport,
chatReportID: policy.isPolicyExpenseChatEnabled ? expenseChatReportId : undefined,
const {optimisticData, successData, failureData, movedExpenseReportAction, movedReportAction} = convertIOUReportToExpenseReport(
iouReport,
policy,
policyID,
policyName,
parentReportID: iouReport.parentReportID,
type: CONST.REPORT.TYPE.EXPENSE,
total: -(iouReport?.total ?? 0),
};

const titleReportField = getTitleReportField(getReportFieldsByPolicyID(policyID) ?? {});
if (!!titleReportField && isPaidGroupPolicy(policy)) {
expenseReport.reportName = populateOptimisticReportFormula(titleReportField.defaultValue, expenseReport, policy);
}

optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${iouReportID}`,
value: expenseReport,
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${iouReportID}`,
value: iouReport,
});

// The expense report transactions need to have the amount reversed to negative values
const reportTransactions = getReportTransactions(iouReportID);

// For performance reasons, we are going to compose a merge collection data for transactions
const transactionsOptimisticData: Record<string, Transaction> = {};
const transactionFailureData: Record<string, Transaction> = {};
reportTransactions.forEach((transaction) => {
transactionsOptimisticData[`${ONYXKEYS.COLLECTION.TRANSACTION}${transaction.transactionID}`] = {
...transaction,
amount: -transaction.amount,
modifiedAmount: transaction.modifiedAmount ? -transaction.modifiedAmount : 0,
};

transactionFailureData[`${ONYXKEYS.COLLECTION.TRANSACTION}${transaction.transactionID}`] = transaction;
});

optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE_COLLECTION,
key: `${ONYXKEYS.COLLECTION.TRANSACTION}`,
value: transactionsOptimisticData,
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE_COLLECTION,
key: `${ONYXKEYS.COLLECTION.TRANSACTION}`,
value: transactionFailureData,
});

// We need to move the report preview action from the DM to the expense chat.
const parentReportActions = iouReport?.parentReportID ? allReportActions?.[iouReport.parentReportID] : undefined;
const parentReportActionID = iouReport.parentReportActionID;
const reportPreview = iouReport?.parentReportID && parentReportActionID ? parentReportActions?.[parentReportActionID] : undefined;
const oldChatReportID = iouReport.chatReportID;

if (reportPreview?.reportActionID) {
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${oldChatReportID}`,
value: {[reportPreview.reportActionID]: null},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${oldChatReportID}`,
value: {[reportPreview.reportActionID]: reportPreview},
});

// Add the reportPreview action to expense chat
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${optimisticExpenseChatReportID}`,
value: {[reportPreview.reportActionID]: {...reportPreview, childReportName: expenseReport.reportName, created: DateUtils.getDBTime()}},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${optimisticExpenseChatReportID}`,
value: {[reportPreview.reportActionID]: null},
});
}

// Create MOVED report action and add it to the expense report which indicates to the user where the report has been moved
const movedExpenseReportAction = buildOptimisticMovedReportAction(iouReport.policyID, policyID, expenseChatReportId ?? '', iouReportID, policyName, true);
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`,
value: {[movedExpenseReportAction.reportActionID]: movedExpenseReportAction},
});
successData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`,
value: {
[movedExpenseReportAction.reportActionID]: {
...movedExpenseReportAction,
pendingAction: null,
},
},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`,
value: {[movedExpenseReportAction.reportActionID]: null},
});

// To optimistically remove the GBR from the DM we need to update the hasOutstandingChildRequest param to false
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${oldChatReportID}`,
value: {
hasOutstandingChildRequest: false,
iouReportID: null,
},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${oldChatReportID}`,
value: {
hasOutstandingChildRequest: true,
iouReportID,
},
});

// Create the MOVED report action and add it to the DM chat which indicates to the user where the report has been moved
const movedReportAction = buildOptimisticMovedReportAction(iouReport.policyID, policyID, optimisticExpenseChatReportID, iouReportID, policyName);
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${oldChatReportID}`,
value: {[movedReportAction.reportActionID]: movedReportAction},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${oldChatReportID}`,
value: {[movedReportAction.reportActionID]: null},
});
optimisticExpenseChatReportID,
);

const parameters: MoveIOUReportToExistingPolicyParams = {
iouReportID,
Expand All @@ -5404,17 +5257,13 @@
/**
* Moves an IOU report to a policy by converting it to an expense report
* @param reportID - The ID of the IOU report to move
* @param policyID - The ID of the policy to move the report to
*/
function moveIOUReportToPolicyAndInviteSubmitter(
reportID: string,
policyID: string,
policy: Policy,
formatPhoneNumber: LocaleContextProps['formatPhoneNumber'],
): {policyExpenseChatReportID?: string} | undefined {
const iouReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
// This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850
// eslint-disable-next-line deprecation/deprecation
const policy = getPolicy(policyID);

if (!policy || !iouReport) {
return;
Expand All @@ -5424,7 +5273,7 @@
const submitterAccountID = iouReport.ownerAccountID;
const submitterEmail = PersonalDetailsUtils.getLoginByAccountID(submitterAccountID ?? CONST.DEFAULT_NUMBER_ID);
const submitterLogin = PhoneNumber.addSMSDomainIfPhoneNumber(submitterEmail);
const iouReportID = iouReport.reportID;
const policyID = policy.id;

// This flow only works for admins moving an IOU report to a policy where the submitter is NOT yet a member of the policy
if (!isPolicyAdmin || !isIOUReportUsingReport(iouReport) || !submitterAccountID || !submitterEmail || isPolicyMember(policy, submitterLogin)) {
Expand Down Expand Up @@ -5511,12 +5360,36 @@
successData.push(...newPersonalDetailsOnyxData.finallyData, ...policyExpenseChats.onyxSuccessData, ...announceRoomMembers.successData);
failureData.push(...policyExpenseChats.onyxFailureData, ...announceRoomMembers.failureData);

// Next we need to convert the IOU report to Expense report.
// We need to change:
// - report type
// - change the sign of the report total
// - update its policyID and policyName
// - update the chatReportID to point to the expense chat if the policy has policy expense chat enabled
const {
optimisticData: convertedOptimisticData,
successData: convertedSuccessData,
failureData: convertedFailureData,
movedExpenseReportAction,
movedReportAction,
} = convertIOUReportToExpenseReport(iouReport, policy, policyID, optimisticPolicyExpenseChatReportID);

optimisticData.push(...convertedOptimisticData);
successData.push(...convertedSuccessData);
failureData.push(...convertedFailureData);

const parameters: MoveIOUReportToPolicyAndInviteSubmitterParams = {
iouReportID: reportID,
policyID,
policyExpenseChatReportID: optimisticPolicyExpenseChatReportID ?? String(CONST.DEFAULT_NUMBER_ID),
policyExpenseCreatedReportActionID: optimisticPolicyExpenseChatCreatedReportActionID ?? String(CONST.DEFAULT_NUMBER_ID),
changePolicyReportActionID: movedExpenseReportAction.reportActionID,
dmMovedReportActionID: movedReportAction.reportActionID,
};

API.write(WRITE_COMMANDS.MOVE_IOU_REPORT_TO_POLICY_AND_INVITE_SUBMITTER, parameters, {optimisticData, successData, failureData});
return {policyExpenseChatReportID: optimisticPolicyExpenseChatReportID};
}

function convertIOUReportToExpenseReport(iouReport: Report, policy: Policy, policyID: string, optimisticPolicyExpenseChatReportID: string) {
const optimisticData: OnyxUpdate[] = [];
const successData: OnyxUpdate[] = [];
const failureData: OnyxUpdate[] = [];

const expenseReport = {
Comment thread
luacmartins marked this conversation as resolved.
...iouReport,
chatReportID: optimisticPolicyExpenseChatReportID,
Expand All @@ -5526,6 +5399,21 @@
type: CONST.REPORT.TYPE.EXPENSE,
total: -(iouReport?.total ?? 0),
};

const nextApproverAccountID = getNextApproverAccountID(iouReport, true);
if (iouReport.managerID !== nextApproverAccountID) {
expenseReport.stateNum = CONST.REPORT.STATE_NUM.OPEN;
expenseReport.statusNum = CONST.REPORT.STATUS_NUM.OPEN;
expenseReport.managerID = nextApproverAccountID;
}
Comment thread
luacmartins marked this conversation as resolved.

const titleReportField = getTitleReportField(getReportFieldsByPolicyID(policyID) ?? {});
if (!!titleReportField && isPaidGroupPolicy(policy)) {
expenseReport.reportName = populateOptimisticReportFormula(titleReportField.defaultValue, expenseReport, policy);
}

const reportID = iouReport.reportID;

optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
Expand Down Expand Up @@ -5585,7 +5473,7 @@
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${optimisticPolicyExpenseChatReportID}`,
value: {[reportPreview.reportActionID]: {...reportPreview, created: DateUtils.getDBTime()}},
value: {[reportPreview.reportActionID]: {...reportPreview, childReportName: expenseReport.reportName, created: DateUtils.getDBTime()}},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
Expand All @@ -5595,7 +5483,7 @@
}

// Create MOVED report action and add it to the expense report which indicates to the user where the report has been moved
const movedExpenseReportAction = buildOptimisticMovedReportAction(iouReport.policyID, policyID, optimisticPolicyExpenseChatReportID, iouReportID, policy.name, true);
const movedExpenseReportAction = buildOptimisticMovedReportAction(iouReport.policyID, policyID, optimisticPolicyExpenseChatReportID, reportID, policy.name, true);
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`,
Expand Down Expand Up @@ -5636,7 +5524,7 @@
});

// Create the MOVED report action and add it to the DM chat which indicates to the user where the report has been moved
const movedReportAction = buildOptimisticMovedReportAction(iouReport.policyID, policyID, optimisticPolicyExpenseChatReportID, iouReportID, policy.name);
const movedReportAction = buildOptimisticMovedReportAction(iouReport.policyID, policyID, optimisticPolicyExpenseChatReportID, reportID, policy.name);
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${oldChatReportID}`,
Expand All @@ -5648,17 +5536,7 @@
value: {[movedReportAction.reportActionID]: null},
});

const parameters: MoveIOUReportToPolicyAndInviteSubmitterParams = {
iouReportID: reportID,
policyID,
policyExpenseChatReportID: optimisticPolicyExpenseChatReportID ?? String(CONST.DEFAULT_NUMBER_ID),
policyExpenseCreatedReportActionID: optimisticPolicyExpenseChatCreatedReportActionID ?? String(CONST.DEFAULT_NUMBER_ID),
changePolicyReportActionID: movedExpenseReportAction.reportActionID,
dmMovedReportActionID: movedReportAction.reportActionID,
};

API.write(WRITE_COMMANDS.MOVE_IOU_REPORT_TO_POLICY_AND_INVITE_SUBMITTER, parameters, {optimisticData, successData, failureData});
return {policyExpenseChatReportID: optimisticPolicyExpenseChatReportID};
return {optimisticData, successData, failureData, movedExpenseReportAction, movedReportAction};
}

/**
Expand Down
11 changes: 7 additions & 4 deletions src/pages/ReportChangeWorkspacePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ function ReportChangeWorkspacePage({report, route}: ReportChangeWorkspacePagePro
const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false});
const [isLoadingApp] = useOnyx(ONYXKEYS.IS_LOADING_APP, {canBeMissing: false});
const isReportLastVisibleArchived = useReportIsArchived(report?.parentReportID);
const [submitterEmail] = useOnyx(
ONYXKEYS.PERSONAL_DETAILS_LIST,
{canBeMissing: false, selector: (personalDetailsList) => personalDetailsList?.[report?.ownerAccountID ?? CONST.DEFAULT_NUMBER_ID]?.login},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luacmartins Small Note: We don't use the inline selectors now as it is slower in performance.

[report?.ownerAccountID],
);
const shouldShowLoadingIndicator = isLoadingApp && !isOffline;

const selectPolicy = useCallback(
Expand All @@ -51,9 +56,9 @@ function ReportChangeWorkspacePage({report, route}: ReportChangeWorkspacePagePro
const {backTo} = route.params;
Navigation.goBack(backTo);
if (isIOUReport(reportID)) {
const invite = moveIOUReportToPolicyAndInviteSubmitter(reportID, policy?.id, formatPhoneNumber);
const invite = moveIOUReportToPolicyAndInviteSubmitter(reportID, policy, formatPhoneNumber);
if (!invite?.policyExpenseChatReportID) {
moveIOUReportToPolicy(reportID, policy?.id);
moveIOUReportToPolicy(reportID, policy);
}
// This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850
// eslint-disable-next-line deprecation/deprecation
Expand All @@ -67,8 +72,6 @@ function ReportChangeWorkspacePage({report, route}: ReportChangeWorkspacePagePro
[route.params, report, reportID, reportNextStep, policies, formatPhoneNumber, isReportLastVisibleArchived],
);

const submitterEmail = getLoginByAccountID(report?.ownerAccountID ?? CONST.DEFAULT_NUMBER_ID);

const {sections, shouldShowNoResultsFoundMessage, shouldShowSearchInput} = useWorkspaceList({
policies,
currentUserLogin: session?.email,
Expand Down
Loading
Loading