, policies: OnyxCollection | EmptyObject): boolean {
*
* - It was written by someone else and isn't a whisper
* - It's a welcome message whisper
- * - It's an ADDCOMMENT that is not an attachment
+ * - It's an ADD_COMMENT that is not an attachment
*/
function canFlagReportAction(reportAction: OnyxEntry, reportID: string | undefined): boolean {
let report = getReport(reportID);
@@ -4873,9 +4854,9 @@ function canFlagReportAction(reportAction: OnyxEntry, reportID: st
}
const isCurrentUserAction = reportAction?.actorAccountID === currentUserAccountID;
const isOriginalMessageHaveHtml =
- reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT ||
+ reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT ||
reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.RENAMED ||
- reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.CHRONOSOOOLIST;
+ reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.CHRONOS_OOO_LIST;
if (ReportActionsUtils.isWhisperAction(reportAction)) {
// Allow flagging welcome message whispers as they can be set by any room creator
if (report?.description && !isCurrentUserAction && isOriginalMessageHaveHtml && reportAction?.originalMessage?.html === report.description) {
@@ -4888,7 +4869,7 @@ function canFlagReportAction(reportAction: OnyxEntry, reportID: st
return Boolean(
!isCurrentUserAction &&
- reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT &&
+ reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT &&
!ReportActionsUtils.isDeletedAction(reportAction) &&
!ReportActionsUtils.isCreatedTaskReportAction(reportAction) &&
!isEmptyObject(report) &&
@@ -5939,7 +5920,7 @@ function isAllowedToSubmitDraftExpenseReport(report: OnyxEntry): boolean
*/
function getIndicatedMissingPaymentMethod(userWallet: OnyxEntry, reportId: string, reportAction: ReportAction): MissingPaymentMethod | undefined {
const isSubmitterOfUnsettledReport = isCurrentUserSubmitter(reportId) && !isSettled(reportId);
- if (!isSubmitterOfUnsettledReport || reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENTQUEUED) {
+ if (!isSubmitterOfUnsettledReport || reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_QUEUED) {
return undefined;
}
const paymentType = reportAction.originalMessage?.paymentType;
@@ -5983,7 +5964,7 @@ function canLeavePolicyExpenseChat(report: OnyxEntry, policy: OnyxEntry<
function getReportActionActorAccountID(reportAction: OnyxEntry, iouReport: OnyxEntry | undefined): number | undefined {
switch (reportAction?.actionName) {
- case CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW:
+ case CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW:
return iouReport ? iouReport.managerID : reportAction?.actorAccountID;
case CONST.REPORT.ACTIONS.TYPE.SUBMITTED:
diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts
index 9fc83d50f1e1..7b0c28b76653 100644
--- a/src/libs/SidebarUtils.ts
+++ b/src/libs/SidebarUtils.ts
@@ -321,7 +321,7 @@ function getOptionData({
const lastAction = visibleReportActionItems[report.reportID];
const isThreadMessage =
- ReportUtils.isThread(report) && lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && lastAction?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
+ ReportUtils.isThread(report) && lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT && lastAction?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage) && !result.isArchivedRoom) {
if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.RENAMED) {
@@ -330,14 +330,14 @@ function getOptionData({
} else if (ReportActionsUtils.isTaskAction(lastAction)) {
result.alternateText = ReportUtils.formatReportLastMessageText(TaskUtils.getTaskReportActionMessage(lastAction).text);
} else if (
- lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ROOMCHANGELOG.INVITE_TO_ROOM ||
- lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ROOMCHANGELOG.REMOVE_FROM_ROOM ||
- lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.INVITE_TO_ROOM ||
- lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.REMOVE_FROM_ROOM
+ lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM ||
+ lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.REMOVE_FROM_ROOM ||
+ lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.INVITE_TO_ROOM ||
+ lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.REMOVE_FROM_ROOM
) {
const targetAccountIDs = lastAction?.originalMessage?.targetAccountIDs ?? [];
const verb =
- lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.ROOMCHANGELOG.INVITE_TO_ROOM || lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.INVITE_TO_ROOM
+ lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM || lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.INVITE_TO_ROOM
? Localize.translate(preferredLocale, 'workspace.invite.invited')
: Localize.translate(preferredLocale, 'workspace.invite.removed');
const users = Localize.translate(preferredLocale, targetAccountIDs.length > 1 ? 'workspace.invite.users' : 'workspace.invite.user');
@@ -346,14 +346,14 @@ function getOptionData({
const roomName = lastAction?.originalMessage?.roomName ?? '';
if (roomName) {
const preposition =
- lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.ROOMCHANGELOG.INVITE_TO_ROOM || lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.INVITE_TO_ROOM
+ lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM || lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.INVITE_TO_ROOM
? ` ${Localize.translate(preferredLocale, 'workspace.invite.to')}`
: ` ${Localize.translate(preferredLocale, 'workspace.invite.from')}`;
result.alternateText += `${preposition} ${roomName}`;
}
- } else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.LEAVE_POLICY) {
+ } else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.LEAVE_POLICY) {
result.alternateText = Localize.translateLocal('workspace.invite.leftWorkspace');
- } else if (lastAction?.actionName !== CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && lastActorDisplayName && lastMessageTextFromReport) {
+ } else if (lastAction?.actionName !== CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && lastActorDisplayName && lastMessageTextFromReport) {
result.alternateText = `${lastActorDisplayName}: ${lastMessageText}`;
} else {
result.alternateText = lastMessageTextFromReport.length > 0 ? lastMessageText : ReportActionsUtils.getLastVisibleMessage(report.reportID, {}, lastAction)?.lastMessageText;
diff --git a/src/libs/TaskUtils.ts b/src/libs/TaskUtils.ts
index 19e1025a09c8..17d724472611 100644
--- a/src/libs/TaskUtils.ts
+++ b/src/libs/TaskUtils.ts
@@ -21,13 +21,13 @@ Onyx.connect({
*/
function getTaskReportActionMessage(action: OnyxEntry): Pick {
switch (action?.actionName) {
- case CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED:
+ case CONST.REPORT.ACTIONS.TYPE.TASK_COMPLETED:
return {text: Localize.translateLocal('task.messages.completed')};
- case CONST.REPORT.ACTIONS.TYPE.TASKCANCELLED:
+ case CONST.REPORT.ACTIONS.TYPE.TASK_CANCELLED:
return {text: Localize.translateLocal('task.messages.canceled')};
- case CONST.REPORT.ACTIONS.TYPE.TASKREOPENED:
+ case CONST.REPORT.ACTIONS.TYPE.TASK_REOPENED:
return {text: Localize.translateLocal('task.messages.reopened')};
- case CONST.REPORT.ACTIONS.TYPE.TASKEDITED:
+ case CONST.REPORT.ACTIONS.TYPE.TASK_EDITED:
return {
text: action?.message?.[0]?.text ?? '',
html: action?.message?.[0]?.html,
diff --git a/src/libs/WorkspacesSettingsUtils.ts b/src/libs/WorkspacesSettingsUtils.ts
index 8205a9473e1b..6c57c2a6f99d 100644
--- a/src/libs/WorkspacesSettingsUtils.ts
+++ b/src/libs/WorkspacesSettingsUtils.ts
@@ -54,11 +54,11 @@ Onyx.connect({
});
/**
- * @param report
- * @returns BrickRoad for the policy passed as a param
+ * @param altReportActions Replaces (local) allReportActions used within (local) function getWorkspacesBrickRoads
+ * @returns BrickRoad for the policy passed as a param and optionally actionsByReport (if passed)
*/
-const getBrickRoadForPolicy = (report: Report): BrickRoad => {
- const reportActions = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`] ?? {};
+const getBrickRoadForPolicy = (report: Report, altReportActions?: OnyxCollection): BrickRoad => {
+ const reportActions = (altReportActions ?? allReportActions)?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`] ?? {};
const reportErrors = OptionsListUtils.getAllReportErrors(report, reportActions);
const doesReportContainErrors = Object.keys(reportErrors ?? {}).length !== 0 ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined;
if (doesReportContainErrors) {
@@ -144,14 +144,14 @@ function checkIfWorkspaceSettingsTabHasRBR(policyID?: string) {
/**
* @returns a map where the keys are policyIDs and the values are BrickRoads for each policy
*/
-function getWorkspacesBrickRoads(): Record {
- if (!allReports) {
+function getWorkspacesBrickRoads(reports: OnyxCollection, policies: OnyxCollection, reportActions: OnyxCollection): Record {
+ if (!reports) {
return {};
}
// The key in this map is the workspace id
const workspacesBrickRoadsMap: Record = {};
- Object.values(allPolicies ?? {}).forEach((policy) => {
+ Object.values(policies ?? {}).forEach((policy) => {
// Only policies which user has access to on the list should be checked. Policies that don't have an ID and contain only information about the errors aren't displayed anywhere.
if (!policy?.id) {
return;
@@ -162,12 +162,12 @@ function getWorkspacesBrickRoads(): Record {
}
});
- Object.values(allReports).forEach((report) => {
+ Object.values(reports).forEach((report) => {
const policyID = report?.policyID ?? CONST.POLICY.EMPTY;
if (!report || workspacesBrickRoadsMap[policyID] === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR) {
return;
}
- const workspaceBrickRoad = getBrickRoadForPolicy(report);
+ const workspaceBrickRoad = getBrickRoadForPolicy(report, reportActions);
if (!workspaceBrickRoad && !!workspacesBrickRoadsMap[policyID]) {
return;
@@ -182,14 +182,14 @@ function getWorkspacesBrickRoads(): Record {
/**
* @returns a map where the keys are policyIDs and the values are truthy booleans if policy has unread content
*/
-function getWorkspacesUnreadStatuses(): Record {
- if (!allReports) {
+function getWorkspacesUnreadStatuses(reports: OnyxCollection): Record {
+ if (!reports) {
return {};
}
const workspacesUnreadStatuses: Record = {};
- Object.values(allReports).forEach((report) => {
+ Object.values(reports).forEach((report) => {
const policyID = report?.policyID;
if (!policyID || workspacesUnreadStatuses[policyID]) {
return;
diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts
index 806832013a4d..7fed15335e2a 100644
--- a/src/libs/actions/IOU.ts
+++ b/src/libs/actions/IOU.ts
@@ -290,7 +290,7 @@ function getReportPreviewAction(chatReportID: string, iouReportID: string): Onyx
// Find the report preview action from the chat report
return (
Object.values(reportActions).find(
- (reportAction) => reportAction && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && reportAction.originalMessage.linkedReportID === iouReportID,
+ (reportAction) => reportAction && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && reportAction.originalMessage.linkedReportID === iouReportID,
) ?? null
);
}
@@ -398,7 +398,7 @@ function startMoneyRequest(iouType: ValueOf, reportID: st
}
// eslint-disable-next-line @typescript-eslint/naming-convention
-function setMoneyRequestAmount_temporaryForRefactor(transactionID: string, amount: number, currency: string) {
+function setMoneyRequestAmount(transactionID: string, amount: number, currency: string) {
Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {amount, currency});
}
@@ -1434,7 +1434,7 @@ function getMoneyRequestInformation(
// 2. CREATED action for the iouReport
// 3. IOU action for the iouReport
// 4. The transaction thread, which requires the iouAction, and CREATED action for the transaction thread
- // 5. REPORTPREVIEW action for the chatReport
+ // 5. REPORT_PREVIEW action for the chatReport
// Note: The CREATED action for the IOU report must be optimistically generated before the IOU action so there's no chance that it appears after the IOU action in the chat
const [optimisticCreatedActionForChat, optimisticCreatedActionForIOUReport, iouAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] =
ReportUtils.buildOptimisticMoneyRequestEntities(
@@ -1641,7 +1641,7 @@ function getTrackExpenseInformation(
// 1. CREATED action for the iouReport (if tracking in the Expense chat)
// 2. IOU action for the iouReport (if tracking in the Expense chat), otherwise – for chatReport
// 3. The transaction thread, which requires the iouAction, and CREATED action for the transaction thread
- // 4. REPORTPREVIEW action for the chatReport (if tracking in the Expense chat)
+ // 4. REPORT_PREVIEW action for the chatReport (if tracking in the Expense chat)
const [, optimisticCreatedActionForIOUReport, iouAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] = ReportUtils.buildOptimisticMoneyRequestEntities(
shouldUseMoneyReport && iouReport ? iouReport : chatReport,
CONST.IOU.REPORT_ACTION_TYPE.TRACK,
@@ -2489,6 +2489,7 @@ const getConvertTrackedExpenseInformation = (
linkedTrackedExpenseReportAction: OnyxTypes.ReportAction,
linkedTrackedExpenseReportID: string,
transactionThreadReportID: string,
+ resolution: IOUAction,
) => {
const optimisticData: OnyxUpdate[] = [];
const successData: OnyxUpdate[] = [];
@@ -2540,7 +2541,7 @@ const getConvertTrackedExpenseInformation = (
value: {
[actionableWhisperReportActionID]: {
originalMessage: {
- resolution: CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING,
+ resolution,
},
},
},
@@ -2596,6 +2597,7 @@ function convertTrackedExpenseToRequest(
linkedTrackedExpenseReportAction,
linkedTrackedExpenseReportID,
transactionThreadReportID,
+ CONST.IOU.ACTION.REQUEST,
);
optimisticData?.push(...moveTransactionOptimisticData);
@@ -2662,6 +2664,7 @@ function categorizeTrackedExpense(
linkedTrackedExpenseReportAction,
linkedTrackedExpenseReportID,
transactionThreadReportID,
+ CONST.IOU.ACTION.CATEGORIZE,
);
optimisticData?.push(...moveTransactionOptimisticData);
@@ -2731,6 +2734,7 @@ function shareTrackedExpense(
linkedTrackedExpenseReportAction,
linkedTrackedExpenseReportID,
transactionThreadReportID,
+ CONST.IOU.ACTION.SHARE,
);
optimisticData?.push(...moveTransactionOptimisticData);
@@ -2834,7 +2838,7 @@ function requestMoney(
const activeReportID = isMoneyRequestReport ? report?.reportID : chatReport.reportID;
switch (action) {
- case CONST.IOU.ACTION.MOVE: {
+ case CONST.IOU.ACTION.REQUEST: {
if (!linkedTrackedExpenseReportAction || !actionableWhisperReportActionID || !linkedTrackedExpenseReportID) {
return;
}
@@ -3389,7 +3393,7 @@ function createSplitsAndOnyxData(
// 2. CREATED action for the iouReport
// 3. IOU action for the iouReport
// 4. Transaction Thread and the CREATED action for it
- // 5. REPORTPREVIEW action for the chatReport
+ // 5. REPORT_PREVIEW action for the chatReport
const [oneOnOneCreatedActionForChat, oneOnOneCreatedActionForIOU, oneOnOneIOUAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] =
ReportUtils.buildOptimisticMoneyRequestEntities(
oneOnOneIOUReport,
@@ -5353,7 +5357,7 @@ function hasIOUToApproveOrPay(chatReport: OnyxEntry | EmptyObj
const iouReport = ReportUtils.getReport(action.childReportID ?? '');
const policy = getPolicy(iouReport?.policyID);
const shouldShowSettlementButton = canIOUBePaid(iouReport, chatReport, policy) || canApproveIOU(iouReport, chatReport, policy);
- return action.childReportID?.toString() !== excludedIOUReportID && action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && shouldShowSettlementButton;
+ return action.childReportID?.toString() !== excludedIOUReportID && action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && shouldShowSettlementButton;
});
}
@@ -5820,10 +5824,6 @@ function setMoneyRequestId(id: string) {
Onyx.merge(ONYXKEYS.IOU, {id});
}
-function setMoneyRequestAmount(amount: number) {
- Onyx.merge(ONYXKEYS.IOU, {amount});
-}
-
function setMoneyRequestCurrency(currency: string) {
Onyx.merge(ONYXKEYS.IOU, {currency});
}
@@ -6026,7 +6026,6 @@ export {
sendMoneyWithWallet,
setDraftSplitTransaction,
setMoneyRequestAmount,
- setMoneyRequestAmount_temporaryForRefactor,
setMoneyRequestBillable,
setMoneyRequestBillable_temporaryForRefactor,
setMoneyRequestCategory,
diff --git a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.ts b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.ts
index a1f0e070fcb3..41fa0a4ccbd0 100644
--- a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.ts
+++ b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.ts
@@ -1,4 +1,4 @@
-import type {OnyxEntry} from 'react-native-onyx';
+import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';
import Onyx from 'react-native-onyx';
import * as API from '@libs/API';
import {WRITE_COMMANDS} from '@libs/API/types';
@@ -10,6 +10,13 @@ import ONYXKEYS from '@src/ONYXKEYS';
import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
import type * as OnyxTypes from '@src/types/onyx';
+let allPolicies: OnyxCollection;
+Onyx.connect({
+ key: ONYXKEYS.COLLECTION.POLICY,
+ waitForCollectionCallback: true,
+ callback: (value) => (allPolicies = value),
+});
+
/**
* Reset user's reimbursement account. This will delete the bank account.
*/
@@ -21,6 +28,8 @@ function resetFreePlanBankAccount(bankAccountID: number | undefined, session: On
throw new Error('Missing credentials when attempting to reset free plan bank account');
}
+ const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${policyID}`] ?? ({} as OnyxTypes.Policy);
+
API.write(
WRITE_COMMANDS.RESTART_BANK_ACCOUNT_SETUP,
{
@@ -40,6 +49,13 @@ function resetFreePlanBankAccount(bankAccountID: number | undefined, session: On
achData: null,
},
},
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
+ value: {
+ achAccount: null,
+ },
+ },
],
successData: [
{
@@ -119,6 +135,13 @@ function resetFreePlanBankAccount(bankAccountID: number | undefined, session: On
key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
value: {isLoading: false, pendingAction: null},
},
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
+ value: {
+ achAccount: policy?.achAccount,
+ },
+ },
],
},
);
diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts
index 9f6a6cfb7468..4ac7d28d1ac4 100644
--- a/src/libs/actions/Report.ts
+++ b/src/libs/actions/Report.ts
@@ -1096,7 +1096,7 @@ function markCommentAsUnread(reportID: string, reportActionCreated: string) {
current.actorAccountID !== currentUserAccountID &&
(!latest || current.created > latest.created) &&
// Whisper action doesn't affect lastVisibleActionCreated, so skip whisper action except actionable mention whisper
- (!ReportActionsUtils.isWhisperAction(current) || current.actionName === CONST.REPORT.ACTIONS.TYPE.ACTIONABLEMENTIONWHISPER)
+ (!ReportActionsUtils.isWhisperAction(current) || current.actionName === CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_WHISPER)
) {
return current;
}
@@ -2241,7 +2241,7 @@ function showReportActionNotification(reportID: string, reportAction: ReportActi
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(reportID));
});
- if (reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE) {
+ if (reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE) {
LocalNotification.showModifiedExpenseNotification(report, reportAction, onClick);
} else {
LocalNotification.showCommentNotification(report, reportAction, onClick);
diff --git a/src/libs/actions/Task.ts b/src/libs/actions/Task.ts
index fa0d04343321..2a37b900ddd4 100644
--- a/src/libs/actions/Task.ts
+++ b/src/libs/actions/Task.ts
@@ -301,7 +301,7 @@ function createTaskAndNavigate(
function completeTask(taskReport: OnyxEntry) {
const taskReportID = taskReport?.reportID ?? '';
const message = `marked as complete`;
- const completedTaskReportAction = ReportUtils.buildOptimisticTaskReportAction(taskReportID, CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED, message);
+ const completedTaskReportAction = ReportUtils.buildOptimisticTaskReportAction(taskReportID, CONST.REPORT.ACTIONS.TYPE.TASK_COMPLETED, message);
const optimisticData: OnyxUpdate[] = [
{
@@ -368,7 +368,7 @@ function completeTask(taskReport: OnyxEntry) {
function reopenTask(taskReport: OnyxEntry) {
const taskReportID = taskReport?.reportID ?? '';
const message = `marked as incomplete`;
- const reopenedTaskReportAction = ReportUtils.buildOptimisticTaskReportAction(taskReportID, CONST.REPORT.ACTIONS.TYPE.TASKREOPENED, message);
+ const reopenedTaskReportAction = ReportUtils.buildOptimisticTaskReportAction(taskReportID, CONST.REPORT.ACTIONS.TYPE.TASK_REOPENED, message);
const optimisticData: OnyxUpdate[] = [
{
@@ -819,7 +819,7 @@ function deleteTask(report: OnyxEntry) {
return;
}
const message = `deleted task: ${report.reportName}`;
- const optimisticCancelReportAction = ReportUtils.buildOptimisticTaskReportAction(report.reportID ?? '', CONST.REPORT.ACTIONS.TYPE.TASKCANCELLED, message);
+ const optimisticCancelReportAction = ReportUtils.buildOptimisticTaskReportAction(report.reportID ?? '', CONST.REPORT.ACTIONS.TYPE.TASK_CANCELLED, message);
const optimisticReportActionID = optimisticCancelReportAction.reportActionID;
const parentReportAction = getParentReportAction(report);
const parentReport = getParentReport(report);
diff --git a/src/pages/ErrorPage/NotFoundPage.tsx b/src/pages/ErrorPage/NotFoundPage.tsx
index 4327b2cafbb7..a324b048119a 100644
--- a/src/pages/ErrorPage/NotFoundPage.tsx
+++ b/src/pages/ErrorPage/NotFoundPage.tsx
@@ -4,18 +4,15 @@ import ScreenWrapper from '@components/ScreenWrapper';
type NotFoundPageProps = {
onBackButtonPress?: () => void;
-
- shouldForceFullScreen?: boolean;
};
// eslint-disable-next-line rulesdir/no-negated-variables
-function NotFoundPage({onBackButtonPress, shouldForceFullScreen}: NotFoundPageProps) {
+function NotFoundPage({onBackButtonPress}: NotFoundPageProps) {
return (
);
diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
index 04254bbe1559..5950cc796e48 100644
--- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
+++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
@@ -198,18 +198,16 @@ function ReimbursementAccountPage({
}
/**
- When this page is first opened, `reimbursementAccount` prop might not yet be fully loaded from Onyx
- or could be partially loaded such that `reimbursementAccount.achData.currentStep` is unavailable.
+ When this page is first opened, `reimbursementAccount` prop might not yet be fully loaded from Onyx.
Calculating `shouldShowContinueSetupButton` immediately on initial render doesn't make sense as
it relies on complete data. Thus, we should wait to calculate it until we have received
the full `reimbursementAccount` data from the server. This logic is handled within the useEffect hook,
which acts similarly to `componentDidUpdate` when the `reimbursementAccount` dependency changes.
*/
- const [hasACHDataBeenLoaded, setHasACHDataBeenLoaded] = useState(
- reimbursementAccount !== ReimbursementAccountProps.reimbursementAccountDefaultProps && reimbursementAccount?.achData && 'currentStep' in reimbursementAccount.achData,
- );
+ const [hasACHDataBeenLoaded, setHasACHDataBeenLoaded] = useState(reimbursementAccount !== ReimbursementAccountProps.reimbursementAccountDefaultProps);
const [shouldShowContinueSetupButton, setShouldShowContinueSetupButton] = useState(hasACHDataBeenLoaded ? getShouldShowContinueSetupButtonInitialValue() : false);
+ const [isReimbursementAccountLoading, setIsReimbursementAccountLoading] = useState(true);
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const currentStep = achData?.currentStep || CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT;
@@ -219,6 +217,7 @@ function ReimbursementAccountPage({
const {translate} = useLocalize();
const {isOffline} = useNetwork();
const requestorStepRef = useRef(null);
+ const prevIsReimbursementAccountLoading = usePrevious(reimbursementAccount?.isLoading);
const prevReimbursementAccount = usePrevious(reimbursementAccount);
const prevIsOffline = usePrevious(isOffline);
@@ -240,12 +239,16 @@ function ReimbursementAccountPage({
useEffect(() => {
fetchData();
- return () => {
- BankAccounts.clearReimbursementAccount();
- };
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []); // The empty dependency array ensures this runs only once after the component mounts.
+ useEffect(() => {
+ if (typeof reimbursementAccount?.isLoading !== 'boolean' || reimbursementAccount.isLoading === prevIsReimbursementAccountLoading) {
+ return;
+ }
+ setIsReimbursementAccountLoading(reimbursementAccount.isLoading);
+ }, [prevIsReimbursementAccountLoading, reimbursementAccount?.isLoading]);
+
useEffect(
() => {
// Check for network change from offline to online
@@ -254,7 +257,7 @@ function ReimbursementAccountPage({
}
if (!hasACHDataBeenLoaded) {
- if (reimbursementAccount !== ReimbursementAccountProps.reimbursementAccountDefaultProps && reimbursementAccount?.isLoading === false) {
+ if (reimbursementAccount !== ReimbursementAccountProps.reimbursementAccountDefaultProps && isReimbursementAccountLoading === false) {
setShouldShowContinueSetupButton(getShouldShowContinueSetupButtonInitialValue());
setHasACHDataBeenLoaded(true);
}
@@ -366,7 +369,7 @@ function ReimbursementAccountPage({
}
};
- const isLoading = (!!isLoadingApp || !!account?.isLoading || reimbursementAccount?.isLoading) && (!plaidCurrentEvent || plaidCurrentEvent === CONST.BANK_ACCOUNT.PLAID.EVENTS_NAME.EXIT);
+ const isLoading = (!!isLoadingApp || !!account?.isLoading || isReimbursementAccountLoading) && (!plaidCurrentEvent || plaidCurrentEvent === CONST.BANK_ACCOUNT.PLAID.EVENTS_NAME.EXIT);
const shouldShowOfflineLoader = !(
isOffline &&
diff --git a/src/pages/ReportParticipantsPage.tsx b/src/pages/ReportParticipantsPage.tsx
index f6415ae9fa7d..827c4dd06db0 100755
--- a/src/pages/ReportParticipantsPage.tsx
+++ b/src/pages/ReportParticipantsPage.tsx
@@ -309,7 +309,6 @@ function ReportParticipantsPage({report, personalDetails, session}: ReportPartic
includeSafeAreaPaddingBottom={false}
style={[styles.defaultModalContainer]}
testID={ReportParticipantsPage.displayName}
- shouldShowOfflineIndicatorInWideScreen
>
;
-};
-
-type WorkspaceSwitcherPageProps = WorkspaceSwitcherPageOnyxProps;
-
const WorkspaceCardCreateAWorkspaceInstance = ;
-function WorkspaceSwitcherPage({policies}: WorkspaceSwitcherPageProps) {
+function WorkspaceSwitcherPage() {
const {isOffline} = useNetwork();
const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState('');
const {translate} = useLocalize();
const {activeWorkspaceID, setActiveWorkspaceID} = useActiveWorkspace();
- const brickRoadsForPolicies = useMemo(() => getWorkspacesBrickRoads(), []);
- const unreadStatusesForPolicies = useMemo(() => getWorkspacesUnreadStatuses(), []);
+ const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT);
+ const [reportActions] = useOnyx(ONYXKEYS.COLLECTION.REPORT_ACTIONS);
+ const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);
+
+ const brickRoadsForPolicies = useMemo(() => getWorkspacesBrickRoads(reports, policies, reportActions), [reports, policies, reportActions]);
+ const unreadStatusesForPolicies = useMemo(() => getWorkspacesUnreadStatuses(reports), [reports]);
const getIndicatorTypeForPolicy = useCallback(
(policyId?: string) => {
@@ -125,7 +120,7 @@ function WorkspaceSwitcherPage({policies}: WorkspaceSwitcherPageProps) {
type: CONST.ICON_TYPE_WORKSPACE,
},
],
- boldStyle: hasUnreadData(policy?.id),
+ isBold: hasUnreadData(policy?.id),
keyForList: policy?.id,
isPolicyAdmin: PolicyUtils.isPolicyAdmin(policy),
isSelected: activeWorkspaceID === policy?.id,
@@ -201,8 +196,4 @@ function WorkspaceSwitcherPage({policies}: WorkspaceSwitcherPageProps) {
WorkspaceSwitcherPage.displayName = 'WorkspaceSwitcherPage';
-export default withOnyx({
- policies: {
- key: ONYXKEYS.COLLECTION.POLICY,
- },
-})(WorkspaceSwitcherPage);
+export default WorkspaceSwitcherPage;
diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx
index cdd843f65fb3..cbd388d0f7dc 100644
--- a/src/pages/home/ReportScreen.tsx
+++ b/src/pages/home/ReportScreen.tsx
@@ -12,6 +12,7 @@ import BlockingView from '@components/BlockingViews/BlockingView';
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
import DragAndDropProvider from '@components/DragAndDrop/Provider';
import * as Illustrations from '@components/Icon/Illustrations';
+import MenuItemGroup from '@components/MenuItemGroup';
import MoneyReportHeader from '@components/MoneyReportHeader';
import MoneyRequestHeader from '@components/MoneyRequestHeader';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
@@ -628,85 +629,87 @@ function ReportScreen({
return (
-
-
+
-
- {headerView}
- {ReportUtils.isTaskReport(report) && isSmallScreenWidth && ReportUtils.isOpenTaskReport(report, parentReportAction) && (
-
-
-
-
+
+ {headerView}
+ {ReportUtils.isTaskReport(report) && isSmallScreenWidth && ReportUtils.isOpenTaskReport(report, parentReportAction) && (
+
+
+
+
+
-
- )}
-
- {!!accountManagerReportID && ReportUtils.isConciergeChatReport(report) && isBannerVisible && (
-
- )}
-
-
- {shouldShowReportActionList && (
-
)}
-
- {/* Note: The ReportActionsSkeletonView should be allowed to mount even if the initial report actions are not loaded.
- If we prevent rendering the report while they are loading then
- we'll unnecessarily unmount the ReportActionsView which will clear the new marker lines initial state. */}
- {shouldShowSkeleton && }
-
- {isCurrentReportLoadedFromOnyx ? (
- setIsComposerFocus(true)}
- onComposerBlur={() => setIsComposerFocus(false)}
- report={report}
- pendingAction={reportPendingAction}
- isComposerFullSize={!!isComposerFullSize}
- listHeight={listHeight}
- isEmptyChat={isEmptyChat}
- lastReportAction={lastReportAction}
- />
- ) : null}
-
-
-
-
+
+ {!!accountManagerReportID && ReportUtils.isConciergeChatReport(report) && isBannerVisible && (
+
+ )}
+
+
+ {shouldShowReportActionList && (
+
+ )}
+
+ {/* Note: The ReportActionsSkeletonView should be allowed to mount even if the initial report actions are not loaded.
+ If we prevent rendering the report while they are loading then
+ we'll unnecessarily unmount the ReportActionsView which will clear the new marker lines initial state. */}
+ {shouldShowSkeleton && }
+
+ {isCurrentReportLoadedFromOnyx ? (
+ setIsComposerFocus(true)}
+ onComposerBlur={() => setIsComposerFocus(false)}
+ report={report}
+ pendingAction={reportPendingAction}
+ isComposerFullSize={!!isComposerFullSize}
+ listHeight={listHeight}
+ isEmptyChat={isEmptyChat}
+ lastReportAction={lastReportAction}
+ />
+ ) : null}
+
+
+
+
+
);
diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
index d4497b983465..eb1e60461005 100644
--- a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
+++ b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
@@ -200,6 +200,7 @@ const ContextMenuActions: ContextMenuAction[] = [
return !ReportUtils.shouldDisableThread(reportAction, reportID);
},
onPress: (closePopover, {reportAction, reportID}) => {
+ const originalReportID = ReportUtils.getOriginalReportID(reportID, reportAction);
if (closePopover) {
hideContextMenu(false, () => {
InteractionManager.runAfterInteractions(() => {
@@ -207,12 +208,11 @@ const ContextMenuActions: ContextMenuAction[] = [
// is false, so we need to pass true here to override this condition.
ReportActionComposeFocusManager.focus(true);
});
- Report.navigateToAndOpenChildReport(reportAction?.childReportID ?? '0', reportAction, reportID);
+ Report.navigateToAndOpenChildReport(reportAction?.childReportID ?? '0', reportAction, originalReportID);
});
return;
}
-
- Report.navigateToAndOpenChildReport(reportAction?.childReportID ?? '0', reportAction, reportID);
+ Report.navigateToAndOpenChildReport(reportAction?.childReportID ?? '0', reportAction, originalReportID);
},
getDescription: () => {},
},
@@ -290,7 +290,7 @@ const ContextMenuActions: ContextMenuAction[] = [
const isDeletedAction = ReportActionsUtils.isDeletedAction(reportAction);
const shouldDisplayThreadReplies = ReportUtils.shouldDisplayThreadReplies(reportAction, reportID);
const subscribed = childReportNotificationPreference !== 'hidden';
- const isCommentAction = reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID);
+ const isCommentAction = reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID);
const isWhisperAction = ReportActionsUtils.isWhisperAction(reportAction);
return !subscribed && !isWhisperAction && isCommentAction && (!isDeletedAction || shouldDisplayThreadReplies);
},
diff --git a/src/pages/home/report/ReportActionItem.tsx b/src/pages/home/report/ReportActionItem.tsx
index 4b87ca6e7eea..8d11744740bd 100644
--- a/src/pages/home/report/ReportActionItem.tsx
+++ b/src/pages/home/report/ReportActionItem.tsx
@@ -279,7 +279,7 @@ function ReportActionItem({
// Removed messages should not be shown anyway and should not need this flow
const latestDecision = action.message?.[0]?.moderationDecision?.decision ?? '';
useEffect(() => {
- if (action.actionName !== CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT) {
+ if (action.actionName !== CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT) {
return;
}
@@ -393,7 +393,7 @@ function ReportActionItem({
text: 'actionableMentionTrackExpense.submit',
key: `${action.reportActionID}-actionableMentionTrackExpense-submit`,
onPress: () => {
- ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(transactionID, report.reportID, CONST.IOU.ACTION.MOVE, action.reportActionID);
+ ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(transactionID, report.reportID, CONST.IOU.ACTION.REQUEST, action.reportActionID);
},
isMediumSized: true,
},
@@ -491,7 +491,7 @@ function ReportActionItem({
isWhisper={isWhisper}
/>
);
- } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW) {
+ } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW) {
children = ReportUtils.isClosedExpenseReportWithNoExpenses(iouReport) ? (
${translate('parentReportAction.deletedReport')}`} />
) : (
@@ -513,7 +513,7 @@ function ReportActionItem({
children = (
);
- } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENTQUEUED) {
+ } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_QUEUED) {
const linkedReport = ReportUtils.isChatThread(report) ? ReportUtils.getReport(report.parentReportID) : report;
const submitterDisplayName = PersonalDetailsUtils.getDisplayNameOrDefault(personalDetails[linkedReport?.ownerAccountID ?? -1]);
const paymentType = action.originalMessage.paymentType ?? '';
@@ -568,16 +568,16 @@ function ReportActionItem({
>
);
- } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENTDEQUEUED) {
+ } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_DEQUEUED) {
children = ;
- } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE) {
+ } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE) {
children = ;
} else if (ReportActionsUtils.isOldDotReportAction(action)) {
// This handles all historical actions from OldDot that we just want to display the message text
children = ;
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.HOLD) {
children = ;
- } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.HOLDCOMMENT) {
+ } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.HOLD_COMMENT) {
children = ;
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.UNHOLD) {
children = ;
@@ -840,7 +840,7 @@ function ReportActionItem({
if (action.actionName === CONST.REPORT.ACTIONS.TYPE.RENAMED) {
return ;
}
- if (action.actionName === CONST.REPORT.ACTIONS.TYPE.CHRONOSOOOLIST) {
+ if (action.actionName === CONST.REPORT.ACTIONS.TYPE.CHRONOS_OOO_LIST) {
return (
action?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && iouReport, [action?.actionName, iouReport]);
+ const displayAllActors = useMemo(() => action?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && iouReport, [action?.actionName, iouReport]);
const isWorkspaceActor = ReportUtils.isPolicyExpenseChat(report) && (!actorAccountID || displayAllActors);
let avatarSource = UserUtils.getAvatar(avatar ?? '', actorAccountID);
diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx
index 19204958dd5f..206f7558baac 100644
--- a/src/pages/home/report/ReportActionsList.tsx
+++ b/src/pages/home/report/ReportActionsList.tsx
@@ -430,7 +430,7 @@ function ReportActionsList({
shouldDisplay = isCurrentMessageUnread && (!nextMessage || !isMessageUnread(nextMessage, lastReadTimeRef.current)) && !ReportActionsUtils.shouldHideNewMarker(reportAction);
if (shouldDisplay && !messageManuallyMarkedUnread) {
const isWithinVisibleThreshold = scrollingVerticalOffset.current < MSG_VISIBLE_THRESHOLD ? reportAction.created < (userActiveSince.current ?? '') : true;
- // Prevent displaying a new marker line when report action is of type "REPORTPREVIEW" and last actor is the current user
+ // Prevent displaying a new marker line when report action is of type "REPORT_PREVIEW" and last actor is the current user
shouldDisplay =
(ReportActionsUtils.isReportPreviewAction(reportAction) ? !reportAction.childLastActorAccountID : reportAction.actorAccountID) !== Report.getCurrentUserAccountID() &&
isWithinVisibleThreshold;
diff --git a/src/pages/home/report/ReportActionsListItemRenderer.tsx b/src/pages/home/report/ReportActionsListItemRenderer.tsx
index 879f567762dd..7b0dea06eb45 100644
--- a/src/pages/home/report/ReportActionsListItemRenderer.tsx
+++ b/src/pages/home/report/ReportActionsListItemRenderer.tsx
@@ -154,7 +154,7 @@ function ReportActionsListItemRenderer({
shouldDisplayNewMarker={shouldDisplayNewMarker}
shouldShowSubscriptAvatar={
(ReportUtils.isPolicyExpenseChat(report) || ReportUtils.isExpenseReport(report)) &&
- [CONST.REPORT.ACTIONS.TYPE.IOU, CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW, CONST.REPORT.ACTIONS.TYPE.SUBMITTED, CONST.REPORT.ACTIONS.TYPE.APPROVED].some(
+ [CONST.REPORT.ACTIONS.TYPE.IOU, CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW, CONST.REPORT.ACTIONS.TYPE.SUBMITTED, CONST.REPORT.ACTIONS.TYPE.APPROVED].some(
(type) => type === reportAction.actionName,
)
}
diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx
index 1af93186d133..3e3ebf1a9cc3 100755
--- a/src/pages/home/report/ReportActionsView.tsx
+++ b/src/pages/home/report/ReportActionsView.tsx
@@ -367,11 +367,11 @@ function ReportActionsView({
}, [hasCachedActionOnFirstRender]);
useEffect(() => {
- // Temporary solution for handling REPORTPREVIEW. More details: https://expensify.slack.com/archives/C035J5C9FAP/p1705417778466539?thread_ts=1705035404.136629&cid=C035J5C9FAP
- // This code should be removed once REPORTPREVIEW is no longer repositioned.
- // We need to call openReport for gaps created by moving REPORTPREVIEW, which causes mismatches in previousReportActionID and reportActionID of adjacent reportActions. The server returns the correct sequence, allowing us to overwrite incorrect data with the correct one.
+ // Temporary solution for handling REPORT_PREVIEW. More details: https://expensify.slack.com/archives/C035J5C9FAP/p1705417778466539?thread_ts=1705035404.136629&cid=C035J5C9FAP
+ // This code should be removed once REPORT_PREVIEW is no longer repositioned.
+ // We need to call openReport for gaps created by moving REPORT_PREVIEW, which causes mismatches in previousReportActionID and reportActionID of adjacent reportActions. The server returns the correct sequence, allowing us to overwrite incorrect data with the correct one.
const shouldOpenReport =
- newestReportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW &&
+ newestReportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW &&
!hasCreatedAction &&
isReadyForCommentLinking &&
reportActions.length < 24 &&
diff --git a/src/pages/home/report/reportActionPropTypes.js b/src/pages/home/report/reportActionPropTypes.js
index 4d4809cd781f..f40e86aa7a7b 100644
--- a/src/pages/home/report/reportActionPropTypes.js
+++ b/src/pages/home/report/reportActionPropTypes.js
@@ -5,7 +5,7 @@ export default {
/** The ID of the reportAction. It is the string representation of the a 64-bit integer. */
reportActionID: PropTypes.string,
- /** Name of the action e.g. ADDCOMMENT */
+ /** Name of the action e.g. ADD_COMMENT */
actionName: PropTypes.string,
/** Person who created the action */
diff --git a/src/pages/iou/SplitBillDetailsPage.tsx b/src/pages/iou/SplitBillDetailsPage.tsx
index 8253eb503289..157f14d1dde5 100644
--- a/src/pages/iou/SplitBillDetailsPage.tsx
+++ b/src/pages/iou/SplitBillDetailsPage.tsx
@@ -85,7 +85,6 @@ function SplitBillDetailsPage({personalDetails, report, route, reportActions, tr
merchant: splitMerchant,
created: splitCreated,
category: splitCategory,
- tag: splitTag,
billable: splitBillable,
} = ReportUtils.getTransactionDetails(isEditingSplitBill && draftTransaction ? draftTransaction : transaction) ?? {};
@@ -117,7 +116,6 @@ function SplitBillDetailsPage({personalDetails, report, route, reportActions, tr
iouCreated={splitCreated}
iouMerchant={splitMerchant}
iouCategory={splitCategory}
- iouTag={splitTag}
iouIsBillable={splitBillable}
iouType={CONST.IOU.TYPE.SPLIT}
isReadOnly={!isEditingSplitBill}
@@ -132,6 +130,7 @@ function SplitBillDetailsPage({personalDetails, report, route, reportActions, tr
onConfirm={onConfirm}
isPolicyExpenseChat={ReportUtils.isPolicyExpenseChat(report)}
policyID={ReportUtils.isPolicyExpenseChat(report) ? report?.policyID : undefined}
+ action={isEditingSplitBill ? CONST.IOU.ACTION.EDIT : CONST.IOU.ACTION.CREATE}
/>
)}
diff --git a/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js b/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js
index 95cb043122d4..3f2526506555 100644
--- a/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js
+++ b/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js
@@ -109,7 +109,7 @@ function MoneyTemporaryForRefactorRequestParticipantsSelector({participants, onF
// If we are using this component in the "Submit expense" flow then we pass the includeOwnedWorkspaceChats argument so that the current user
// sees the option to submit an expense from their admin on their own Workspace Chat.
- iouType === CONST.IOU.TYPE.REQUEST && action !== CONST.IOU.ACTION.MOVE,
+ iouType === CONST.IOU.TYPE.REQUEST && action !== CONST.IOU.ACTION.REQUEST,
(canUseP2PDistanceRequests || iouRequestType !== CONST.IOU.REQUEST_TYPE.DISTANCE) && ![CONST.IOU.ACTION.CATEGORIZE, CONST.IOU.ACTION.SHARE].includes(action),
false,
@@ -267,7 +267,7 @@ function MoneyTemporaryForRefactorRequestParticipantsSelector({participants, onF
(canUseP2PDistanceRequests || iouRequestType !== CONST.IOU.REQUEST_TYPE.DISTANCE) &&
iouType !== CONST.IOU.TYPE.SEND &&
iouType !== CONST.IOU.TYPE.TRACK_EXPENSE &&
- ![CONST.IOU.ACTION.SHARE, CONST.IOU.ACTION.MOVE, CONST.IOU.ACTION.CATEGORIZE].includes(action);
+ ![CONST.IOU.ACTION.SHARE, CONST.IOU.ACTION.REQUEST, CONST.IOU.ACTION.CATEGORIZE].includes(action);
const handleConfirmSelection = useCallback(
(keyEvent, option) => {
diff --git a/src/pages/iou/request/step/IOURequestStepAmount.tsx b/src/pages/iou/request/step/IOURequestStepAmount.tsx
index acdd160ac013..2cc59bf0af14 100644
--- a/src/pages/iou/request/step/IOURequestStepAmount.tsx
+++ b/src/pages/iou/request/step/IOURequestStepAmount.tsx
@@ -137,7 +137,7 @@ function IOURequestStepAmount({
const amountInSmallestCurrencyUnits = CurrencyUtils.convertToBackendAmount(Number.parseFloat(amount));
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
- IOU.setMoneyRequestAmount_temporaryForRefactor(transactionID, amountInSmallestCurrencyUnits, currency || CONST.CURRENCY.USD);
+ IOU.setMoneyRequestAmount(transactionID, amountInSmallestCurrencyUnits, currency || CONST.CURRENCY.USD);
if (backTo) {
Navigation.goBack(backTo);
diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx
index 1d84bff8747b..057b3e027243 100644
--- a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx
+++ b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx
@@ -4,7 +4,7 @@ import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import * as Expensicons from '@components/Icon/Expensicons';
-import MoneyRequestConfirmationList from '@components/MoneyTemporaryForRefactorRequestConfirmationList';
+import MoneyRequestConfirmationList from '@components/MoneyRequestConfirmationList';
import {usePersonalDetails} from '@components/OnyxProvider';
import ScreenWrapper from '@components/ScreenWrapper';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
@@ -77,7 +77,7 @@ function IOURequestStepConfirmation({
const transactionTaxAmount = transaction?.taxAmount;
const isSharingTrackExpense = action === CONST.IOU.ACTION.SHARE;
const isCategorizingTrackExpense = action === CONST.IOU.ACTION.CATEGORIZE;
- const isRequestingFromTrackExpense = action === CONST.IOU.ACTION.MOVE;
+ const isRequestingFromTrackExpense = action === CONST.IOU.ACTION.REQUEST;
const requestType = TransactionUtils.getRequestType(transaction);
diff --git a/src/pages/iou/request/step/IOURequestStepParticipants.tsx b/src/pages/iou/request/step/IOURequestStepParticipants.tsx
index ff4c715223c1..7ad8ac21b200 100644
--- a/src/pages/iou/request/step/IOURequestStepParticipants.tsx
+++ b/src/pages/iou/request/step/IOURequestStepParticipants.tsx
@@ -48,7 +48,7 @@ function IOURequestStepParticipants({
if (action === CONST.IOU.ACTION.CATEGORIZE) {
return translate('iou.categorize');
}
- if (action === CONST.IOU.ACTION.MOVE) {
+ if (action === CONST.IOU.ACTION.REQUEST) {
return translate('iou.submitExpense');
}
if (action === CONST.IOU.ACTION.SHARE) {
diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
deleted file mode 100644
index 88d03727d6ca..000000000000
--- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
+++ /dev/null
@@ -1,169 +0,0 @@
-import _ from 'lodash';
-import lodashGet from 'lodash/get';
-import lodashSize from 'lodash/size';
-import PropTypes from 'prop-types';
-import React, {useCallback, useEffect, useMemo, useRef} from 'react';
-import {withOnyx} from 'react-native-onyx';
-import HeaderWithBackButton from '@components/HeaderWithBackButton';
-import ScreenWrapper from '@components/ScreenWrapper';
-import transactionPropTypes from '@components/transactionPropTypes';
-import useInitialValue from '@hooks/useInitialValue';
-import useLocalize from '@hooks/useLocalize';
-import compose from '@libs/compose';
-import * as DeviceCapabilities from '@libs/DeviceCapabilities';
-import * as MoneyRequestUtils from '@libs/MoneyRequestUtils';
-import Navigation from '@libs/Navigation/Navigation';
-import * as TransactionUtils from '@libs/TransactionUtils';
-import {iouDefaultProps, iouPropTypes} from '@pages/iou/propTypes';
-import * as IOU from '@userActions/IOU';
-import CONST from '@src/CONST';
-import ONYXKEYS from '@src/ONYXKEYS';
-import ROUTES from '@src/ROUTES';
-import MoneyRequestParticipantsSelector from './MoneyRequestParticipantsSelector';
-
-const propTypes = {
- /** React Navigation route */
- route: PropTypes.shape({
- /** Params from the route */
- params: PropTypes.shape({
- /** The type of IOU report, i.e. bill, request, send */
- iouType: PropTypes.string,
-
- /** The report ID of the IOU */
- reportID: PropTypes.string,
- }),
- }).isRequired,
-
- /** Holds data related to Money Request view state, rather than the underlying Money Request data. */
- iou: iouPropTypes,
-
- /** The current tab we have navigated to in the request modal. String that corresponds to the request type. */
- selectedTab: PropTypes.oneOf(_.values(CONST.TAB_REQUEST)),
-
- /** Transaction that stores the distance request data */
- transaction: transactionPropTypes,
-};
-
-const defaultProps = {
- iou: iouDefaultProps,
- transaction: {},
- selectedTab: undefined,
-};
-
-function MoneyRequestParticipantsPage({iou, selectedTab, route, transaction}) {
- const {translate} = useLocalize();
- const prevMoneyRequestId = useRef(iou.id);
- const iouType = useInitialValue(() => lodashGet(route, 'params.iouType', ''));
- const reportID = useInitialValue(() => lodashGet(route, 'params.reportID', ''));
- const isDistanceRequest = MoneyRequestUtils.isDistanceRequest(iouType, selectedTab);
- const isSendRequest = iouType === CONST.IOU.TYPE.SEND;
- const isScanRequest = MoneyRequestUtils.isScanRequest(selectedTab);
- const isSplitRequest = iou.id === CONST.IOU.TYPE.SPLIT;
- const waypoints = lodashGet(transaction, 'comment.waypoints', {});
- const validatedWaypoints = TransactionUtils.getValidWaypoints(waypoints);
- const isInvalidWaypoint = lodashSize(validatedWaypoints) < 2;
- const headerTitle = useMemo(() => {
- if (isDistanceRequest) {
- return translate('common.distance');
- }
-
- if (isSendRequest) {
- return translate('common.send');
- }
-
- if (isScanRequest) {
- return translate('tabSelector.scan');
- }
-
- if (iou.isSplitRequest) {
- return translate('iou.split');
- }
-
- return translate('tabSelector.manual');
- }, [iou, isDistanceRequest, translate, isScanRequest, isSendRequest]);
-
- const navigateToConfirmationStep = (moneyRequestType) => {
- IOU.setMoneyRequestId(moneyRequestType);
- Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(CONST.IOU.ACTION.CREATE, moneyRequestType, lodashGet(transaction, 'transactionID', 1), reportID));
- };
-
- const navigateBack = useCallback((forceFallback = false) => {
- Navigation.goBack(ROUTES.MONEY_REQUEST.getRoute(iouType, reportID), forceFallback);
- // eslint-disable-next-line react-hooks/exhaustive-deps -- no deps as we use only initial values
- }, []);
-
- useEffect(() => {
- const isInvalidDistanceRequest = !isDistanceRequest || isInvalidWaypoint;
-
- // ID in Onyx could change by initiating a new request in a separate browser tab or completing a request
- if (prevMoneyRequestId.current !== iou.id) {
- // The ID is cleared on completing a request. In that case, we will do nothing
- if (iou.id && isInvalidDistanceRequest && !isSplitRequest) {
- navigateBack(true);
- }
- return;
- }
-
- // Reset the money request Onyx if the ID in Onyx does not match the ID from params
- const moneyRequestId = `${iouType}${reportID}`;
- const shouldReset = iou.id !== moneyRequestId && !_.isEmpty(reportID);
- if (shouldReset) {
- IOU.resetMoneyRequestInfo(moneyRequestId);
- }
- if (isInvalidDistanceRequest && ((iou.amount === 0 && !iou.receiptPath) || shouldReset)) {
- navigateBack(true);
- }
-
- return () => {
- prevMoneyRequestId.current = iou.id;
- };
- }, [iou.amount, iou.id, iou.receiptPath, isDistanceRequest, isSplitRequest, iouType, reportID, navigateBack, isInvalidWaypoint]);
-
- return (
-
- {({didScreenTransitionEnd}) => (
- <>
-
- navigateToConfirmationStep(iouType)}
- navigateToSplit={() => navigateToConfirmationStep(CONST.IOU.TYPE.SPLIT)}
- iouType={iouType}
- isDistanceRequest={isDistanceRequest}
- isScanRequest={isScanRequest}
- didScreenTransitionEnd={didScreenTransitionEnd}
- />
- >
- )}
-
- );
-}
-
-MoneyRequestParticipantsPage.displayName = 'MoneyRequestParticipantsPage';
-MoneyRequestParticipantsPage.propTypes = propTypes;
-MoneyRequestParticipantsPage.defaultProps = defaultProps;
-
-export default compose(
- withOnyx({
- iou: {
- key: ONYXKEYS.IOU,
- },
- selectedTab: {
- key: `${ONYXKEYS.COLLECTION.SELECTED_TAB}${CONST.TAB.RECEIPT_TAB_ID}`,
- },
- }),
- // eslint-disable-next-line rulesdir/no-multiple-onyx-in-file
- withOnyx({
- transaction: {
- key: ({iou}) => `${ONYXKEYS.COLLECTION.TRANSACTION}${lodashGet(iou, 'transactionID', 0)}`,
- },
- }),
-)(MoneyRequestParticipantsPage);
diff --git a/src/pages/settings/InitialSettingsPage.tsx b/src/pages/settings/InitialSettingsPage.tsx
index b4d962c0181a..2dfeb1841a74 100755
--- a/src/pages/settings/InitialSettingsPage.tsx
+++ b/src/pages/settings/InitialSettingsPage.tsx
@@ -484,7 +484,7 @@ function InitialSettingsPage({session, userWallet, bankAccountList, fundList, wa
ref={scrollViewRef}
onScroll={onScroll}
scrollEventThrottle={16}
- style={[styles.w100, styles.pt4]}
+ contentContainerStyle={[styles.w100, styles.pt4]}
>
{headerContent}
{accountMenuItems}
diff --git a/src/pages/settings/Profile/ProfilePage.tsx b/src/pages/settings/Profile/ProfilePage.tsx
index 4c5ed88e6898..f33a86ed2d46 100755
--- a/src/pages/settings/Profile/ProfilePage.tsx
+++ b/src/pages/settings/Profile/ProfilePage.tsx
@@ -1,11 +1,11 @@
-import React, {useEffect} from 'react';
+import React, {useContext, useEffect} from 'react';
import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import * as Illustrations from '@components/Icon/Illustrations';
-import MenuItemGroup from '@components/MenuItemGroup';
+import MenuItemGroup, {MenuItemGroupContext} from '@components/MenuItemGroup';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import ScreenWrapper from '@components/ScreenWrapper';
import ScrollView from '@components/ScrollView';
@@ -61,6 +61,7 @@ function ProfilePage({
const StyleUtils = useStyleUtils();
const {translate} = useLocalize();
const {isSmallScreenWidth} = useWindowDimensions();
+ const {waitForNavigate} = useContext(MenuItemGroupContext) ?? {};
const getPronouns = (): string => {
const pronounsKey = currentUserPersonalDetails?.pronouns?.replace(CONST.PRONOUNS.PREFIX, '') ?? '';
@@ -179,7 +180,7 @@ function ProfilePage({
title={detail.title}
description={detail.description}
wrapperStyle={styles.sectionMenuItemTopDescription}
- onPress={() => Navigation.navigate(detail.pageRoute)}
+ onPress={waitForNavigate ? waitForNavigate(() => Navigation.navigate(detail.pageRoute)) : () => Navigation.navigate(detail.pageRoute)}
/>
))}
>
diff --git a/src/pages/workspace/AdminPolicyAccessOrNotFoundWrapper.tsx b/src/pages/workspace/AdminPolicyAccessOrNotFoundWrapper.tsx
index 4e74ef3b4b20..5c8456366c6b 100644
--- a/src/pages/workspace/AdminPolicyAccessOrNotFoundWrapper.tsx
+++ b/src/pages/workspace/AdminPolicyAccessOrNotFoundWrapper.tsx
@@ -50,12 +50,7 @@ function AdminPolicyAccessOrNotFoundComponent(props: AdminPolicyAccessOrNotFound
}
if (shouldShowNotFoundPage) {
- return (
- Navigation.goBack(ROUTES.WORKSPACE_PROFILE.getRoute(props.policyID))}
- shouldForceFullScreen
- />
- );
+ return Navigation.goBack(ROUTES.WORKSPACE_PROFILE.getRoute(props.policyID))} />;
}
return typeof props.children === 'function' ? props.children(props) : props.children;
diff --git a/src/pages/workspace/PaidPolicyAccessOrNotFoundWrapper.tsx b/src/pages/workspace/PaidPolicyAccessOrNotFoundWrapper.tsx
index 7361fc77536b..9b6047493561 100644
--- a/src/pages/workspace/PaidPolicyAccessOrNotFoundWrapper.tsx
+++ b/src/pages/workspace/PaidPolicyAccessOrNotFoundWrapper.tsx
@@ -50,12 +50,7 @@ function PaidPolicyAccessOrNotFoundComponent(props: PaidPolicyAccessOrNotFoundCo
}
if (shouldShowNotFoundPage) {
- return (
- Navigation.goBack(ROUTES.WORKSPACE_PROFILE.getRoute(props.policyID))}
- shouldForceFullScreen
- />
- );
+ return Navigation.goBack(ROUTES.WORKSPACE_PROFILE.getRoute(props.policyID))} />;
}
return typeof props.children === 'function' ? props.children(props) : props.children;
diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx
index 4d03eb655896..cbdacf66c548 100644
--- a/src/pages/workspace/WorkspaceInitialPage.tsx
+++ b/src/pages/workspace/WorkspaceInitialPage.tsx
@@ -262,20 +262,6 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, reimbursementAcc
// We check isPendingDelete for both policy and prevPolicy to prevent the NotFound view from showing right after we delete the workspace
(PolicyUtils.isPendingDeletePolicy(policy) && PolicyUtils.isPendingDeletePolicy(prevPolicy));
- // We are checking if the user can access the route.
- // If user can't access the route, we are dismissing any modals that are open when the NotFound view is shown
- const canAccessRoute = activeRoute && menuItems.some((item) => item.routeName === activeRoute);
-
- useEffect(() => {
- if (!shouldShowNotFoundPage && canAccessRoute) {
- return;
- }
- // We are dismissing any modals that are open when the NotFound view is shown
- Navigation.isNavigationReady().then(() => {
- Navigation.dismissRHP();
- });
- }, [canAccessRoute, policy, shouldShowNotFoundPage]);
-
const policyAvatar = useMemo(() => {
if (!policy) {
return {source: Expensicons.ExpensifyAppIcon, name: CONST.WORKSPACE_SWITCHER.NAME, type: CONST.ICON_TYPE_AVATAR};
diff --git a/src/pages/workspace/WorkspaceInviteMessagePage.tsx b/src/pages/workspace/WorkspaceInviteMessagePage.tsx
index dd2ab151b658..30d66662b996 100644
--- a/src/pages/workspace/WorkspaceInviteMessagePage.tsx
+++ b/src/pages/workspace/WorkspaceInviteMessagePage.tsx
@@ -96,9 +96,6 @@ function WorkspaceInviteMessagePage({
setWelcomeNote(parser.htmlToMarkdown(getDefaultWelcomeNote()));
return;
}
- if (isEmptyObject(policy)) {
- return;
- }
Navigation.goBack(ROUTES.WORKSPACE_INVITE.getRoute(route.params.policyID), true);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
diff --git a/src/pages/workspace/WorkspaceMembersPage.tsx b/src/pages/workspace/WorkspaceMembersPage.tsx
index d475a916e0d4..619dcc54a031 100644
--- a/src/pages/workspace/WorkspaceMembersPage.tsx
+++ b/src/pages/workspace/WorkspaceMembersPage.tsx
@@ -7,13 +7,16 @@ import {InteractionManager, View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import Badge from '@components/Badge';
+import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
import Button from '@components/Button';
import ButtonWithDropdownMenu from '@components/ButtonWithDropdownMenu';
import type {DropdownOption, WorkspaceMemberBulkActionType} from '@components/ButtonWithDropdownMenu/types';
import ConfirmModal from '@components/ConfirmModal';
+import HeaderWithBackButton from '@components/HeaderWithBackButton';
import * as Expensicons from '@components/Icon/Expensicons';
import * as Illustrations from '@components/Icon/Illustrations';
import MessagesRow from '@components/MessagesRow';
+import ScreenWrapper from '@components/ScreenWrapper';
import SelectionList from '@components/SelectionList';
import TableListItem from '@components/SelectionList/TableListItem';
import type {ListItem, SelectionListHandle} from '@components/SelectionList/types';
@@ -44,7 +47,6 @@ import type {Errors, PendingAction} from '@src/types/onyx/OnyxCommon';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import type {WithPolicyAndFullscreenLoadingProps} from './withPolicyAndFullscreenLoading';
import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading';
-import WorkspacePageWithSections from './WorkspacePageWithSections';
type WorkspaceMembersPageOnyxProps = {
/** Session info for the currently logged in user. */
@@ -57,6 +59,7 @@ type WorkspaceMembersPageProps = WithPolicyAndFullscreenLoadingProps &
WithCurrentUserPersonalDetailsProps &
WorkspaceMembersPageOnyxProps &
StackScreenProps;
+
/**
* Inverts an object, equivalent of _.invert
*/
@@ -68,7 +71,7 @@ function invertObject(object: Record): Record {
type MemberOption = Omit & {accountID: number};
-function WorkspaceMembersPage({personalDetails, invitedEmailsToAccountIDsDraft, route, policy, session, currentUserPersonalDetails}: WorkspaceMembersPageProps) {
+function WorkspaceMembersPage({personalDetails, invitedEmailsToAccountIDsDraft, route, policy, session, currentUserPersonalDetails, isLoadingReportData = true}: WorkspaceMembersPageProps) {
const policyMemberEmailsToAccountIDs = useMemo(() => PolicyUtils.getMemberAccountIDsForWorkspace(policy?.employeeList), [policy?.employeeList]);
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
@@ -531,63 +534,71 @@ function WorkspaceMembersPage({personalDetails, invitedEmailsToAccountIDsDraft,
};
return (
-
- {() => (
- <>
- {isSmallScreenWidth && {getHeaderButtons()}}
- setRemoveMembersConfirmModalVisible(false)}
- prompt={translate('workspace.people.removeMembersPrompt')}
- confirmText={translate('common.remove')}
- cancelText={translate('common.cancel')}
- onModalHide={() => {
- InteractionManager.runAfterInteractions(() => {
- if (!textInputRef.current) {
- return;
- }
- textInputRef.current.focus();
- });
- }}
+
+ {
+ Navigation.goBack();
+ }}
+ shouldShowBackButton={isSmallScreenWidth}
+ guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_MEMBERS}
+ >
+ {!isSmallScreenWidth && getHeaderButtons()}
+
+ {isSmallScreenWidth && {getHeaderButtons()}}
+ setRemoveMembersConfirmModalVisible(false)}
+ prompt={translate('workspace.people.removeMembersPrompt')}
+ confirmText={translate('common.remove')}
+ cancelText={translate('common.cancel')}
+ onModalHide={() => {
+ InteractionManager.runAfterInteractions(() => {
+ if (!textInputRef.current) {
+ return;
+ }
+ textInputRef.current.focus();
+ });
+ }}
+ />
+
+ toggleUser(item.accountID)}
+ onSelectAll={() => toggleAllUsers(data)}
+ onDismissError={dismissError}
+ showLoadingPlaceholder={isLoading}
+ showScrollIndicator
+ shouldPreventDefaultFocusOnSelectRow={!DeviceCapabilities.canUseTouchScreen()}
+ textInputRef={textInputRef}
+ customListHeader={getCustomListHeader()}
+ listHeaderWrapperStyle={[styles.ph9, styles.pv3, styles.pb5]}
/>
-
-
- toggleUser(item.accountID)}
- onSelectAll={() => toggleAllUsers(data)}
- onDismissError={dismissError}
- showLoadingPlaceholder={isLoading}
- showScrollIndicator
- shouldPreventDefaultFocusOnSelectRow={!DeviceCapabilities.canUseTouchScreen()}
- textInputRef={textInputRef}
- customListHeader={getCustomListHeader()}
- listHeaderWrapperStyle={[styles.ph9, styles.pv3, styles.pb5]}
- />
-
- >
- )}
-
+
+
+
);
}
diff --git a/src/pages/workspace/WorkspacePageWithSections.tsx b/src/pages/workspace/WorkspacePageWithSections.tsx
index 4b9b39458312..4889c1dbe350 100644
--- a/src/pages/workspace/WorkspacePageWithSections.tsx
+++ b/src/pages/workspace/WorkspacePageWithSections.tsx
@@ -82,12 +82,6 @@ type WorkspacePageWithSectionsProps = WithPolicyAndFullscreenLoadingProps &
* */
icon?: IconAsset;
- /** Content to be added to the header */
- headerContent?: ReactNode;
-
- /** TestID of the component */
- testID?: string;
-
/** Whether the page is loading, example any other API call in progres */
isLoading?: boolean;
};
@@ -118,8 +112,6 @@ function WorkspacePageWithSections({
shouldShowLoading = true,
shouldShowOfflineIndicatorInWideScreen = false,
shouldShowNonAdmin = false,
- headerContent,
- testID,
shouldShowNotFoundPage = false,
isLoading: isPageLoading = false,
}: WorkspacePageWithSectionsProps) {
@@ -168,7 +160,7 @@ function WorkspacePageWithSections({
includeSafeAreaPaddingBottom={false}
shouldEnablePickerAvoiding={false}
shouldEnableMaxHeight
- testID={testID ?? WorkspacePageWithSections.displayName}
+ testID={WorkspacePageWithSections.displayName}
shouldShowOfflineIndicatorInWideScreen={shouldShowOfflineIndicatorInWideScreen && !shouldShow}
>
Navigation.goBack(backButtonRoute)}
icon={icon ?? undefined}
style={styles.headerBarDesktopHeight}
- >
- {headerContent}
-
+ />
{(isLoading || firstRender.current) && shouldShowLoading && isFocused ? (
) : (
diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeCheck.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeCheck.tsx
index 83bc3a1d1b4d..1ec928158a59 100644
--- a/src/pages/workspace/members/WorkspaceOwnerChangeCheck.tsx
+++ b/src/pages/workspace/members/WorkspaceOwnerChangeCheck.tsx
@@ -64,6 +64,7 @@ function WorkspaceOwnerChangeCheck({personalDetails, policy, accountID, error}:
if (error === CONST.POLICY.OWNERSHIP_ERRORS.HAS_FAILED_SETTLEMENTS || error === CONST.POLICY.OWNERSHIP_ERRORS.FAILED_TO_CLEAR_BALANCE) {
// cannot transfer ownership if there are failed settlements, or we cannot clear the balance
PolicyActions.clearWorkspaceOwnerChangeFlow(policyID);
+ Navigation.goBack();
Navigation.navigate(ROUTES.WORKSPACE_MEMBER_DETAILS.getRoute(policyID, accountID));
return;
}
diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx
index 81c43f6ab818..8604ba23fc92 100644
--- a/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx
+++ b/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx
@@ -31,6 +31,7 @@ function WorkspaceOwnerChangeErrorPage({route}: WorkspaceOwnerChangeSuccessPageP
const closePage = useCallback(() => {
PolicyActions.clearWorkspaceOwnerChangeFlow(policyID);
+ Navigation.goBack();
Navigation.navigate(ROUTES.WORKSPACE_MEMBER_DETAILS.getRoute(policyID, accountID));
}, [accountID, policyID]);
diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx
index 856a852037b4..c4968128df06 100644
--- a/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx
+++ b/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx
@@ -25,6 +25,7 @@ function WorkspaceOwnerChangeSuccessPage({route}: WorkspaceOwnerChangeSuccessPag
const closePage = useCallback(() => {
PolicyActions.clearWorkspaceOwnerChangeFlow(policyID);
+ Navigation.goBack();
Navigation.navigate(ROUTES.WORKSPACE_MEMBER_DETAILS.getRoute(policyID, accountID));
}, [accountID, policyID]);
diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx
index 9f9540327c53..6eda891a8fc9 100644
--- a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx
+++ b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx
@@ -62,6 +62,7 @@ function WorkspaceOwnerChangeWrapperPage({route, policy}: WorkspaceOwnerChangeWr
title={translate('workspace.changeOwner.changeOwnerPageTitle')}
onBackButtonPress={() => {
PolicyActions.clearWorkspaceOwnerChangeFlow(policyID);
+ Navigation.goBack();
Navigation.navigate(ROUTES.WORKSPACE_MEMBER_DETAILS.getRoute(policyID, accountID));
}}
/>
diff --git a/src/types/onyx/OriginalMessage.ts b/src/types/onyx/OriginalMessage.ts
index 7ae580006b84..f22edd423c0d 100644
--- a/src/types/onyx/OriginalMessage.ts
+++ b/src/types/onyx/OriginalMessage.ts
@@ -26,7 +26,7 @@ type OriginalMessageActionName =
| 'ACTIONABLEJOINREQUEST'
| 'ACTIONABLEMENTIONWHISPER'
| 'ACTIONABLETRACKEXPENSEWHISPER'
- | ValueOf;
+ | ValueOf;
type OriginalMessageApproved = {
actionName: typeof CONST.REPORT.ACTIONS.TYPE.APPROVED;
originalMessage: unknown;
@@ -39,7 +39,7 @@ type OriginalMessageHold = {
};
type OriginalMessageHoldComment = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.HOLDCOMMENT;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.HOLD_COMMENT;
originalMessage: unknown;
};
@@ -124,7 +124,7 @@ type Closed = {
};
type OriginalMessageAddComment = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT;
originalMessage: {
html: string;
source?: OriginalMessageSource;
@@ -141,7 +141,7 @@ type OriginalMessageAddComment = {
};
type OriginalMessageActionableMentionWhisper = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.ACTIONABLEMENTIONWHISPER;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_WHISPER;
originalMessage: {
inviteeAccountIDs: number[];
inviteeEmails: string;
@@ -168,7 +168,7 @@ type OriginalMessageCreated = {
};
type OriginalMessageMarkedReimbursed = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED;
originalMessage?: unknown;
};
@@ -204,7 +204,7 @@ type ChronosOOOEvent = {
};
type OriginalMessageChronosOOOList = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.CHRONOSOOOLIST;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.CHRONOS_OOO_LIST;
originalMessage: {
edits: string[];
events: ChronosOOOEvent[];
@@ -214,7 +214,7 @@ type OriginalMessageChronosOOOList = {
};
type OriginalMessageReportPreview = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW;
originalMessage: {
linkedReportID: string;
lastModified?: string;
@@ -222,12 +222,12 @@ type OriginalMessageReportPreview = {
};
type OriginalMessagePolicyChangeLog = {
- actionName: ValueOf;
+ actionName: ValueOf;
originalMessage: ChangeLog;
};
type OriginalMessageJoinPolicyChangeLog = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.ACTIONABLEJOINREQUEST;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_JOIN_REQUEST;
originalMessage: {
choice: string;
email: string;
@@ -238,22 +238,22 @@ type OriginalMessageJoinPolicyChangeLog = {
};
type OriginalMessageRoomChangeLog = {
- actionName: ValueOf;
+ actionName: ValueOf;
originalMessage: ChangeLog;
};
type OriginalMessagePolicyTask = {
actionName:
- | typeof CONST.REPORT.ACTIONS.TYPE.TASKEDITED
- | typeof CONST.REPORT.ACTIONS.TYPE.TASKCANCELLED
- | typeof CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED
- | typeof CONST.REPORT.ACTIONS.TYPE.TASKREOPENED
- | typeof CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE;
+ | typeof CONST.REPORT.ACTIONS.TYPE.TASK_EDITED
+ | typeof CONST.REPORT.ACTIONS.TYPE.TASK_CANCELLED
+ | typeof CONST.REPORT.ACTIONS.TYPE.TASK_COMPLETED
+ | typeof CONST.REPORT.ACTIONS.TYPE.TASK_REOPENED
+ | typeof CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE;
originalMessage: unknown;
};
type OriginalMessageModifiedExpense = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE;
originalMessage: {
oldMerchant?: string;
merchant?: string;
@@ -279,14 +279,14 @@ type OriginalMessageModifiedExpense = {
};
type OriginalMessageReimbursementQueued = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENTQUEUED;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_QUEUED;
originalMessage: {
paymentType: DeepValueOf;
};
};
type OriginalMessageActionableTrackedExpenseWhisper = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.ACTIONABLETRACKEXPENSEWHISPER;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_TRACK_EXPENSE_WHISPER;
originalMessage: {
transactionID: string;
lastModified: string;
@@ -295,7 +295,7 @@ type OriginalMessageActionableTrackedExpenseWhisper = {
};
type OriginalMessageReimbursementDequeued = {
- actionName: typeof CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENTDEQUEUED;
+ actionName: typeof CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_DEQUEUED;
originalMessage: {
expenseReportID: string;
};
diff --git a/tests/actions/IOUTest.ts b/tests/actions/IOUTest.ts
index aa0af7e5f037..45bdc5fe743a 100644
--- a/tests/actions/IOUTest.ts
+++ b/tests/actions/IOUTest.ts
@@ -2121,7 +2121,7 @@ describe('actions/IOU', () => {
let IOU_REPORT_ID: string;
let reportActionID;
const REPORT_ACTION: OnyxEntry = {
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
actorAccountID: TEST_USER_ACCOUNT_ID,
automatic: false,
avatar: 'https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/avatar_3.png',
@@ -2370,7 +2370,7 @@ describe('actions/IOU', () => {
await waitForBatchedUpdates();
// Then verify that the comment is correctly added
- const resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT);
+ const resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT);
reportActionID = resultAction?.reportActionID ?? '';
expect(resultAction?.message).toEqual(REPORT_ACTION.message);
@@ -2519,7 +2519,7 @@ describe('actions/IOU', () => {
expect(report).toBeFalsy();
});
- it('delete the transaction thread if there are only changelogs (i.e. MODIFIEDEXPENSE actions) in the thread', async () => {
+ it('delete the transaction thread if there are only changelogs (i.e. MODIFIED_EXPENSE actions) in the thread', async () => {
// Given all promises are resolved
await waitForBatchedUpdates();
jest.advanceTimersByTime(10);
@@ -2656,7 +2656,7 @@ describe('actions/IOU', () => {
await waitForBatchedUpdates();
// Then comment details should match the expected report action
- const resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT);
+ const resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT);
reportActionID = resultAction?.reportActionID ?? '';
expect(resultAction?.message).toEqual(REPORT_ACTION.message);
expect(resultAction?.person).toEqual(REPORT_ACTION.person);
@@ -2766,7 +2766,7 @@ describe('actions/IOU', () => {
});
});
- let resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT);
+ let resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT);
reportActionID = resultAction?.reportActionID ?? '';
expect(resultAction?.message).toEqual(REPORT_ACTION.message);
@@ -2798,7 +2798,7 @@ describe('actions/IOU', () => {
Report.addComment(IOU_REPORT_ID, 'Testing a comment');
await waitForBatchedUpdates();
- resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT);
+ resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT);
reportActionID = resultAction?.reportActionID ?? '';
expect(resultAction?.message).toEqual(REPORT_ACTION.message);
@@ -2931,7 +2931,7 @@ describe('actions/IOU', () => {
Report.addComment(IOU_REPORT_ID, 'Testing a comment');
await waitForBatchedUpdates();
- const resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT);
+ const resultAction = Object.values(reportActions ?? {}).find((reportAction) => reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT);
reportActionID = resultAction?.reportActionID;
expect(resultAction?.message).toEqual(REPORT_ACTION.message);
diff --git a/tests/actions/ReportTest.ts b/tests/actions/ReportTest.ts
index 6f1ea2c5ee7f..28aa84babfb5 100644
--- a/tests/actions/ReportTest.ts
+++ b/tests/actions/ReportTest.ts
@@ -60,7 +60,7 @@ describe('actions/Report', () => {
const REPORT_ID = '1';
let reportActionID: string;
const REPORT_ACTION = {
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
actorAccountID: TEST_USER_ACCOUNT_ID,
automatic: false,
avatar: 'https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/avatar_3.png',
@@ -246,7 +246,7 @@ describe('actions/Report', () => {
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${REPORT_ID}`,
value: {
1: {
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
actorAccountID: USER_2_ACCOUNT_ID,
automatic: false,
avatar: 'https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/avatar_3.png',
@@ -333,7 +333,7 @@ describe('actions/Report', () => {
expect(report?.lastMessageText).toBe('Current User Comment 3');
const USER_1_BASE_ACTION = {
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
actorAccountID: USER_1_ACCOUNT_ID,
automatic: false,
avatar: 'https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/avatar_3.png',
@@ -514,7 +514,7 @@ describe('actions/Report', () => {
const TEST_USER_ACCOUNT_ID = 1;
const REPORT_ID = '1';
const REPORT_ACTION = {
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
};
// Setup user and pusher listeners
diff --git a/tests/perf-test/ModifiedExpenseMessage.perf-test.ts b/tests/perf-test/ModifiedExpenseMessage.perf-test.ts
index df9ffca59b7d..1711badd8c05 100644
--- a/tests/perf-test/ModifiedExpenseMessage.perf-test.ts
+++ b/tests/perf-test/ModifiedExpenseMessage.perf-test.ts
@@ -44,7 +44,7 @@ test('[ModifiedExpenseMessage] getForReportAction on 1k reports and policies', a
const report = createRandomReport(1);
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
amount: randAmount(),
currency: CONST.CURRENCY.USD,
diff --git a/tests/perf-test/ReportUtils.perf-test.ts b/tests/perf-test/ReportUtils.perf-test.ts
index ae3429bb9c01..40098d00ee6f 100644
--- a/tests/perf-test/ReportUtils.perf-test.ts
+++ b/tests/perf-test/ReportUtils.perf-test.ts
@@ -66,7 +66,7 @@ describe('ReportUtils', () => {
test('[ReportUtils] canDeleteReportAction on 1k reports and policies', async () => {
const reportID = '1';
- const reportAction = {...createRandomReportAction(1), actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT} as unknown as ReportAction;
+ const reportAction = {...createRandomReportAction(1), actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT} as unknown as ReportAction;
await waitForBatchedUpdates();
await measureFunction(() => ReportUtils.canDeleteReportAction(reportAction, reportID));
diff --git a/tests/ui/UnreadIndicatorsTest.tsx b/tests/ui/UnreadIndicatorsTest.tsx
index 2aeee2cc77bf..a7f689036d05 100644
--- a/tests/ui/UnreadIndicatorsTest.tsx
+++ b/tests/ui/UnreadIndicatorsTest.tsx
@@ -405,7 +405,7 @@ describe('Unread Indicators', () => {
reportActionID: createdReportActionID,
},
[commentReportActionID]: {
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
actorAccountID: USER_C_ACCOUNT_ID,
person: [{type: 'TEXT', style: 'strong', text: 'User C'}],
created: format(NEW_REPORT_FIST_MESSAGE_CREATED_DATE, CONST.DATE.FNS_DB_FORMAT_STRING),
diff --git a/tests/unit/MigrationTest.ts b/tests/unit/MigrationTest.ts
index e50c7bdcee55..69e0e80e589a 100644
--- a/tests/unit/MigrationTest.ts
+++ b/tests/unit/MigrationTest.ts
@@ -42,10 +42,10 @@ describe('Migrations', () => {
1: {
reportActionID: '1',
created: '',
- actionName: CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
reportID: '1',
},
- 2: {reportActionID: '2', created: '', actionName: CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED, reportID: '1'},
+ 2: {reportActionID: '2', created: '', actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED, reportID: '1'},
},
],
(item) => item[1].reportID ?? '',
@@ -78,14 +78,14 @@ describe('Migrations', () => {
reportActionID: '1',
previousReportActionID: '0',
created: '',
- actionName: CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
reportID: '1',
},
2: {
reportActionID: '2',
previousReportActionID: '1',
created: '',
- actionName: CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
reportID: '1',
},
},
@@ -126,13 +126,13 @@ describe('Migrations', () => {
1: {
reportActionID: '1',
created: '',
- actionName: CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
reportID: '4',
},
2: {
reportActionID: '2',
created: '',
- actionName: CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
reportID: '4',
},
},
@@ -175,14 +175,14 @@ describe('Migrations', () => {
reportActionID: '1',
previousReportActionID: '10',
created: '',
- actionName: CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
reportID: '4',
},
2: {
reportActionID: '2',
previousReportActionID: '23',
created: '',
- actionName: CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
reportID: '4',
},
},
diff --git a/tests/unit/ModifiedExpenseMessageTest.ts b/tests/unit/ModifiedExpenseMessageTest.ts
index dd4e4368ed55..d7fe10bc0507 100644
--- a/tests/unit/ModifiedExpenseMessageTest.ts
+++ b/tests/unit/ModifiedExpenseMessageTest.ts
@@ -9,7 +9,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the amount is changed', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
amount: 1800,
currency: CONST.CURRENCY.USD,
@@ -30,7 +30,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the amount is changed while the original value was partial', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
amount: 1800,
currency: CONST.CURRENCY.USD,
@@ -51,7 +51,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the amount is changed and the description is removed', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
amount: 1800,
currency: CONST.CURRENCY.USD,
@@ -74,7 +74,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the amount is changed, the description is removed, and category is set', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
amount: 1800,
currency: CONST.CURRENCY.USD,
@@ -99,7 +99,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the amount and merchant are changed', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
merchant: 'Taco Bell',
oldMerchant: 'Big Belly',
@@ -122,7 +122,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the amount and merchant are changed, the description is removed, and category is set', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
merchant: 'Taco Bell',
oldMerchant: 'Big Belly',
@@ -150,7 +150,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the amount, comment and merchant are changed', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
merchant: 'Taco Bell',
oldMerchant: 'Big Belly',
@@ -176,7 +176,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the merchant is removed', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
merchant: '',
oldMerchant: 'Big Belly',
@@ -195,7 +195,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the merchant is changed while the previous merchant was partial', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
merchant: 'KFC',
oldMerchant: CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT,
@@ -214,7 +214,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the merchant and the description are removed', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
merchant: '',
oldMerchant: 'Big Belly',
@@ -235,7 +235,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the merchant, the category and the description are removed', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
merchant: '',
oldMerchant: 'Big Belly',
@@ -258,7 +258,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the merchant is set', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
oldMerchant: '',
merchant: 'Big Belly',
@@ -277,7 +277,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the merchant and the description are set', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
oldMerchant: '',
merchant: 'Big Belly',
@@ -298,7 +298,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the merchant, the category and the description are set', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
oldMerchant: '',
merchant: 'Big Belly',
@@ -321,7 +321,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the created date is changed', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
created: '2023-12-27',
oldCreated: '2023-12-26',
@@ -340,7 +340,7 @@ describe('ModifiedExpenseMessage', () => {
describe('when the created date was not changed', () => {
const reportAction = {
...createRandomReportAction(1),
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
originalMessage: {
created: '2023-12-27',
},
diff --git a/tests/unit/ReportActionsUtilsTest.ts b/tests/unit/ReportActionsUtilsTest.ts
index a926d0589e80..05fe50fe78b7 100644
--- a/tests/unit/ReportActionsUtilsTest.ts
+++ b/tests/unit/ReportActionsUtilsTest.ts
@@ -35,7 +35,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:27:01.825',
reportActionID: '8401445780099176',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -44,7 +44,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:27:01.600',
reportActionID: '6401435781022176',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -55,7 +55,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:26:48.789',
reportActionID: '2962390724708756',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -64,7 +64,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:26:48.789',
reportActionID: '1609646094152486',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -73,7 +73,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:26:48.789',
reportActionID: '1661970171066218',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -84,7 +84,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:26:48.789',
reportActionID: '1609646094152486',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -93,7 +93,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:26:48.789',
reportActionID: '1661970171066218',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -102,7 +102,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:26:48.789',
reportActionID: '2962390724708756',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -111,7 +111,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:27:01.600',
reportActionID: '6401435781022176',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -120,7 +120,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:27:01.825',
reportActionID: '8401445780099176',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -134,7 +134,7 @@ describe('ReportActionsUtils', () => {
{
created: '2023-01-10 22:25:47.132',
reportActionID: '3',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -152,7 +152,7 @@ describe('ReportActionsUtils', () => {
{
created: '2023-01-10 22:25:47.132',
reportActionID: '1',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -173,7 +173,7 @@ describe('ReportActionsUtils', () => {
{
created: '2023-01-10 22:25:47.132',
reportActionID: '1',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -182,7 +182,7 @@ describe('ReportActionsUtils', () => {
{
created: '2023-01-10 22:25:47.132',
reportActionID: '3',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -209,7 +209,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-13 22:27:01.825',
reportActionID: '8401445780099176',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -276,14 +276,14 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-09 22:27:01.825',
reportActionID: '8049485084562457',
- actionName: CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.UPDATE_FIELD,
+ actionName: CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_FIELD,
originalMessage: {},
message: [{html: 'updated the Approval Mode from "Submit and Approve" to "Submit and Close"', type: 'Action type', text: 'Action text'}],
},
{
created: '2022-11-08 22:27:06.825',
reportActionID: '1661970171066216',
- actionName: CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENTQUEUED,
+ actionName: CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_QUEUED,
originalMessage: {
paymentType: 'ACH',
},
@@ -292,7 +292,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-06 22:27:08.825',
reportActionID: '1661970171066220',
- actionName: CONST.REPORT.ACTIONS.TYPE.TASKEDITED,
+ actionName: CONST.REPORT.ACTIONS.TYPE.TASK_EDITED,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -310,7 +310,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-13 22:27:01.825',
reportActionID: '8401445780099176',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -401,7 +401,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-13 22:27:01.825',
reportActionID: '8401445780099176',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -417,7 +417,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-12 22:27:01.825',
reportActionID: '8401445780099175',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -428,7 +428,7 @@ describe('ReportActionsUtils', () => {
{
created: '2022-11-11 22:27:01.825',
reportActionID: '8401445780099174',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -449,7 +449,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '1',
previousReportActionID: undefined,
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -466,7 +466,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '2',
previousReportActionID: '1',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -483,7 +483,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '3',
previousReportActionID: '2',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -500,7 +500,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '4',
previousReportActionID: '3',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -517,7 +517,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '5',
previousReportActionID: '4',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -534,7 +534,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '6',
previousReportActionID: '5',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -551,7 +551,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '7',
previousReportActionID: '6',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -570,7 +570,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '9',
previousReportActionID: '8',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -587,7 +587,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '10',
previousReportActionID: '9',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -604,7 +604,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '11',
previousReportActionID: '10',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -621,7 +621,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '12',
previousReportActionID: '11',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -640,7 +640,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '14',
previousReportActionID: '13',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -657,7 +657,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '15',
previousReportActionID: '14',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -674,7 +674,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '16',
previousReportActionID: '15',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -691,7 +691,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '17',
previousReportActionID: '16',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -711,7 +711,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '1',
previousReportActionID: undefined,
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -728,7 +728,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '2',
previousReportActionID: '1',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -745,7 +745,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '3',
previousReportActionID: '2',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -762,7 +762,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '4',
previousReportActionID: '3',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -779,7 +779,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '5',
previousReportActionID: '4',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -796,7 +796,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '6',
previousReportActionID: '5',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -813,7 +813,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '7',
previousReportActionID: '6',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -840,7 +840,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '1',
previousReportActionID: undefined,
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -857,7 +857,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '2',
previousReportActionID: '1',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -874,7 +874,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '3',
previousReportActionID: '2',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -891,7 +891,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '4',
previousReportActionID: '3',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -908,7 +908,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '5',
previousReportActionID: '4',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -925,7 +925,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '6',
previousReportActionID: '5',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -942,7 +942,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '7',
previousReportActionID: '6',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -961,7 +961,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '9',
previousReportActionID: '8',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -978,7 +978,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '10',
previousReportActionID: '9',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -995,7 +995,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '11',
previousReportActionID: '10',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1012,7 +1012,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '12',
previousReportActionID: '11',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1031,7 +1031,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '14',
previousReportActionID: '13',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1048,7 +1048,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '15',
previousReportActionID: '14',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1065,7 +1065,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '16',
previousReportActionID: '15',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1082,7 +1082,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '17',
previousReportActionID: '16',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1102,7 +1102,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '9',
previousReportActionID: '8',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1119,7 +1119,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '10',
previousReportActionID: '9',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1136,7 +1136,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '11',
previousReportActionID: '10',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1153,7 +1153,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '12',
previousReportActionID: '11',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1180,7 +1180,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '1',
previousReportActionID: undefined,
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1197,7 +1197,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '2',
previousReportActionID: '1',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1214,7 +1214,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '3',
previousReportActionID: '2',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1231,7 +1231,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '4',
previousReportActionID: '3',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1248,7 +1248,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '5',
previousReportActionID: '4',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1265,7 +1265,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '6',
previousReportActionID: '5',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1282,7 +1282,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '7',
previousReportActionID: '6',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1301,7 +1301,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '9',
previousReportActionID: '8',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1318,7 +1318,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '10',
previousReportActionID: '9',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1335,7 +1335,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '11',
previousReportActionID: '10',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1352,7 +1352,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '12',
previousReportActionID: '11',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1371,7 +1371,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '14',
previousReportActionID: '13',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1388,7 +1388,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '15',
previousReportActionID: '14',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1405,7 +1405,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '16',
previousReportActionID: '15',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1422,7 +1422,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '17',
previousReportActionID: '16',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1442,7 +1442,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '14',
previousReportActionID: '13',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1459,7 +1459,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '15',
previousReportActionID: '14',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1476,7 +1476,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '16',
previousReportActionID: '15',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1493,7 +1493,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '17',
previousReportActionID: '16',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1520,7 +1520,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '1',
previousReportActionID: undefined,
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1537,7 +1537,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '2',
previousReportActionID: '1',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1554,7 +1554,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '3',
previousReportActionID: '2',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1571,7 +1571,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '4',
previousReportActionID: '3',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1588,7 +1588,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '5',
previousReportActionID: '4',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1605,7 +1605,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '6',
previousReportActionID: '5',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1622,7 +1622,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '7',
previousReportActionID: '6',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1641,7 +1641,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '9',
previousReportActionID: '8',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1658,7 +1658,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '10',
previousReportActionID: '9',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1675,7 +1675,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '11',
previousReportActionID: '10',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1692,7 +1692,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '12',
previousReportActionID: '11',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1711,7 +1711,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '14',
previousReportActionID: '13',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1728,7 +1728,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '15',
previousReportActionID: '14',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1745,7 +1745,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '16',
previousReportActionID: '15',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1762,7 +1762,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '17',
previousReportActionID: '16',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1791,7 +1791,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '1',
previousReportActionID: undefined,
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1809,7 +1809,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '2',
previousReportActionID: '1',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1827,7 +1827,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '3',
previousReportActionID: '2',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1845,7 +1845,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '4',
previousReportActionID: '3',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1863,7 +1863,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '5',
previousReportActionID: '4',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1881,7 +1881,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '6',
previousReportActionID: '5',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
@@ -1899,7 +1899,7 @@ describe('ReportActionsUtils', () => {
reportActionID: '7',
previousReportActionID: '6',
created: '2022-11-13 22:27:01.825',
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts
index 63f83a03e022..0ed28ea84fcb 100644
--- a/tests/unit/ReportUtilsTest.ts
+++ b/tests/unit/ReportUtilsTest.ts
@@ -768,7 +768,7 @@ describe('ReportUtils', () => {
it("should disable on a whisper action and it's neither a report preview nor IOU action", () => {
const reportAction = {
- actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE,
+ actionName: CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE,
whisperedToAccountIDs: [123456],
} as ReportAction;
expect(ReportUtils.shouldDisableThread(reportAction, reportID)).toBeTruthy();
diff --git a/tests/unit/SidebarOrderTest.ts b/tests/unit/SidebarOrderTest.ts
index 2758d43fb81e..868630a8f7d2 100644
--- a/tests/unit/SidebarOrderTest.ts
+++ b/tests/unit/SidebarOrderTest.ts
@@ -122,7 +122,7 @@ describe('Sidebar', () => {
const report2 = LHNTestUtils.getFakeReport([3, 4], 2);
const report3 = LHNTestUtils.getFakeReport([5, 6], 1);
- // Each report has at least one ADDCOMMENT action so should be rendered in the LNH
+ // Each report has at least one ADD_COMMENT action so should be rendered in the LNH
Report.addComment(report1.reportID, 'Hi, this is a comment');
Report.addComment(report2.reportID, 'Hi, this is a comment');
Report.addComment(report3.reportID, 'Hi, this is a comment');
@@ -168,7 +168,7 @@ describe('Sidebar', () => {
const report2 = LHNTestUtils.getFakeReport([3, 4], 2);
const report3 = LHNTestUtils.getFakeReport([5, 6], 1);
- // Each report has at least one ADDCOMMENT action so should be rendered in the LNH
+ // Each report has at least one ADD_COMMENT action so should be rendered in the LNH
Report.addComment(report1.reportID, 'Hi, this is a comment');
Report.addComment(report2.reportID, 'Hi, this is a comment');
Report.addComment(report3.reportID, 'Hi, this is a comment');
@@ -219,7 +219,7 @@ describe('Sidebar', () => {
const report2 = LHNTestUtils.getFakeReport([3, 4], 2);
const report3 = LHNTestUtils.getFakeReport([5, 6], 1);
- // Each report has at least one ADDCOMMENT action so should be rendered in the LNH
+ // Each report has at least one ADD_COMMENT action so should be rendered in the LNH
Report.addComment(report1.reportID, 'Hi, this is a comment');
Report.addComment(report2.reportID, 'Hi, this is a comment');
Report.addComment(report3.reportID, 'Hi, this is a comment');
@@ -278,7 +278,7 @@ describe('Sidebar', () => {
statusNum: CONST.REPORT.STATUS_NUM.OPEN,
};
- // Each report has at least one ADDCOMMENT action so should be rendered in the LNH
+ // Each report has at least one ADD_COMMENT action so should be rendered in the LNH
Report.addComment(report1.reportID, 'Hi, this is a comment');
Report.addComment(report2.reportID, 'Hi, this is a comment');
Report.addComment(report3.reportID, 'Hi, this is a comment');
@@ -342,7 +342,7 @@ describe('Sidebar', () => {
};
report3.iouReportID = iouReport.reportID;
- // Each report has at least one ADDCOMMENT action so should be rendered in the LNH
+ // Each report has at least one ADD_COMMENT action so should be rendered in the LNH
Report.addComment(report1.reportID, 'Hi, this is a comment');
Report.addComment(report2.reportID, 'Hi, this is a comment');
Report.addComment(report3.reportID, 'Hi, this is a comment');
@@ -409,7 +409,7 @@ describe('Sidebar', () => {
};
report3.iouReportID = expenseReport.reportID;
- // Each report has at least one ADDCOMMENT action so should be rendered in the LNH
+ // Each report has at least one ADD_COMMENT action so should be rendered in the LNH
Report.addComment(report1.reportID, 'Hi, this is a comment');
Report.addComment(report2.reportID, 'Hi, this is a comment');
Report.addComment(report3.reportID, 'Hi, this is a comment');
@@ -459,7 +459,7 @@ describe('Sidebar', () => {
};
const report3 = LHNTestUtils.getFakeReport([5, 6], 1);
- // Each report has at least one ADDCOMMENT action so should be rendered in the LNH
+ // Each report has at least one ADD_COMMENT action so should be rendered in the LNH
Report.addComment(report1.reportID, 'Hi, this is a comment');
Report.addComment(report2.reportID, 'Hi, this is a comment');
Report.addComment(report3.reportID, 'Hi, this is a comment');
@@ -815,7 +815,7 @@ describe('Sidebar', () => {
const report2 = LHNTestUtils.getFakeReport([3, 4]);
const report3 = LHNTestUtils.getFakeReport([5, 6]);
- // Each report has at least one ADDCOMMENT action so should be rendered in the LNH
+ // Each report has at least one ADD_COMMENT action so should be rendered in the LNH
Report.addComment(report1.reportID, 'Hi, this is a comment');
Report.addComment(report2.reportID, 'Hi, this is a comment');
Report.addComment(report3.reportID, 'Hi, this is a comment');
@@ -1117,7 +1117,7 @@ describe('Sidebar', () => {
lastVisibleActionCreated,
};
- // Each report has at least one ADDCOMMENT action so should be rendered in the LNH
+ // Each report has at least one ADD_COMMENT action so should be rendered in the LNH
Report.addComment(report1.reportID, 'Hi, this is a comment');
Report.addComment(report2.reportID, 'Hi, this is a comment');
Report.addComment(report3.reportID, 'Hi, this is a comment');
diff --git a/tests/utils/TestHelper.ts b/tests/utils/TestHelper.ts
index 9f3b28973923..562176288565 100644
--- a/tests/utils/TestHelper.ts
+++ b/tests/utils/TestHelper.ts
@@ -203,7 +203,7 @@ function setPersonalDetails(login: string, accountID: number) {
function buildTestReportComment(created: string, actorAccountID: number, actionID: string | null = null, previousReportActionID: string | null = null) {
const reportActionID = actionID ?? NumberUtils.rand64().toString();
return {
- actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
+ actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
person: [{type: 'TEXT', style: 'strong', text: 'User B'}],
created,
message: [{type: 'COMMENT', html: `Comment ${actionID}`, text: `Comment ${actionID}`}],