diff --git a/src/libs/DebugUtils.ts b/src/libs/DebugUtils.ts index d63758761c3c..6b3b2a70ede0 100644 --- a/src/libs/DebugUtils.ts +++ b/src/libs/DebugUtils.ts @@ -44,14 +44,12 @@ type PropertyTypes = Array<'string' | 'number' | 'object' | 'boolean' | 'undefin const OPTIONAL_BOOLEAN_STRINGS = ['true', 'false', 'undefined']; const REPORT_NUMBER_PROPERTIES: Array = [ - 'lastMessageTimestamp', 'lastReadSequenceNumber', 'managerID', 'lastActorAccountID', 'ownerAccountID', 'total', 'unheldTotal', - 'iouReportAmount', 'nonReimbursableTotal', ] satisfies Array; @@ -63,20 +61,16 @@ const REPORT_BOOLEAN_PROPERTIES: Array = [ 'isPinned', 'hasParentAccess', 'isDeletedParentAction', - 'openOnAdminRoom', 'isOptimisticReport', 'isWaitingOnBankAccount', 'isCancelledIOU', - 'isLastMessageDeletedParentAction', 'isHidden', 'isChatRoom', 'isLoadingPrivateNotes', 'selected', ] satisfies Array; -const REPORT_DATE_PROPERTIES: Array = ['lastVisibleActionCreated', 'lastReadCreated', 'lastReadTime', 'lastMentionedTime', 'lastVisibleActionLastModified'] satisfies Array< - keyof Report ->; +const REPORT_DATE_PROPERTIES: Array = ['lastVisibleActionCreated', 'lastReadTime', 'lastMentionedTime', 'lastVisibleActionLastModified'] satisfies Array; const REPORT_REQUIRED_PROPERTIES: Array = ['reportID'] satisfies Array; @@ -502,9 +496,6 @@ function validateReportDraftProperty(key: keyof Report, value: string) { if (key === 'pendingFields') { return validateObject(value, {}); } - if (key === 'visibleChatMemberAccountIDs') { - return validateArray(value, 'number'); - } if (key === 'participantAccountIDs') { return validateArray(value, 'number'); } diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index fa91ca1235cf..a104b98175c4 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -520,6 +520,8 @@ type OptionData = { isConciergeChat?: boolean; isBold?: boolean; lastIOUCreationDate?: string; + icons?: Icon[]; + iouReportAmount?: number; } & Report; type OnyxDataTaskAssigneeChat = { diff --git a/src/types/form/DebugReportForm.ts b/src/types/form/DebugReportForm.ts index c3308de02122..b16f3b93f7f0 100644 --- a/src/types/form/DebugReportForm.ts +++ b/src/types/form/DebugReportForm.ts @@ -44,7 +44,6 @@ const INPUT_IDS = { TOTAL: 'total', TYPE: 'type', UNHELD_TOTAL: 'unheldTotal', - VISIBLE_CHAT_MEMBER_ACCOUNT_IDS: 'visibleChatMemberAccountIDs', WELCOME_MESSAGE: 'welcomeMessage', WRITE_CAPABILITY: 'writeCapability', } as const; @@ -94,7 +93,6 @@ type DebugReportForm = Form< [INPUT_IDS.TOTAL]: string; [INPUT_IDS.TYPE]: ValueOf; [INPUT_IDS.UNHELD_TOTAL]: string; - [INPUT_IDS.VISIBLE_CHAT_MEMBER_ACCOUNT_IDS]: string; [INPUT_IDS.WELCOME_MESSAGE]: string; [INPUT_IDS.WRITE_CAPABILITY]: ValueOf; } diff --git a/src/types/onyx/Report.ts b/src/types/onyx/Report.ts index 43c82cfdc227..1dffac0701ea 100644 --- a/src/types/onyx/Report.ts +++ b/src/types/onyx/Report.ts @@ -83,9 +83,6 @@ type Report = OnyxCommon.OnyxValueWithOfflineFeedback< /** Whether the report has a child task that is awaiting action from the current user */ hasOutstandingChildTask?: boolean; - /** List of icons for report participants */ - icons?: OnyxCommon.Icon[]; - /** Whether the user is not an admin of policyExpenseChat chat */ isOwnPolicyExpenseChat?: boolean; @@ -98,15 +95,9 @@ type Report = OnyxCommon.OnyxValueWithOfflineFeedback< /** The text of the last message on the report */ lastMessageText?: string; - /** The timestamp of the last message on the report */ - lastMessageTimestamp?: number; - /** The time of the last message on the report */ lastVisibleActionCreated?: string; - /** The time of the last read of the report */ - lastReadCreated?: string; - /** The time when user read the last message */ lastReadTime?: string; @@ -161,9 +152,6 @@ type Report = OnyxCommon.OnyxValueWithOfflineFeedback< /** The report type */ type?: string; - /** If the admin room should be opened */ - openOnAdminRoom?: boolean; - /** The report visibility */ visibility?: RoomVisibility; @@ -233,15 +221,9 @@ type Report = OnyxCommon.OnyxValueWithOfflineFeedback< /** Whether the report is cancelled */ isCancelledIOU?: boolean; - /** Whether the last message was deleted */ - isLastMessageDeletedParentAction?: boolean; - /** The ID of the IOU report */ iouReportID?: string; - /** Total amount of money owed for IOU report */ - iouReportAmount?: number; - /** The ID of the preexisting report (it is possible that we optimistically created a Report for which a report already exists) */ preexistingReportID?: string; @@ -299,9 +281,6 @@ type Report = OnyxCommon.OnyxValueWithOfflineFeedback< /** Participant account id's */ participantAccountIDs?: number[]; - - /** Visible chat member account id's */ - visibleChatMemberAccountIDs?: number[]; }, PolicyReportField['fieldID'] >; diff --git a/tests/utils/collections/optionData.ts b/tests/utils/collections/optionData.ts index a589daf8a913..2bf0c841b985 100644 --- a/tests/utils/collections/optionData.ts +++ b/tests/utils/collections/optionData.ts @@ -26,9 +26,7 @@ export default function createRandomOptionData(index: number): OptionData { hasOutstandingChildRequest: randBoolean(), isOwnPolicyExpenseChat: randBoolean(), lastMessageText: randWord(), - lastMessageTimestamp: Date.now(), lastVisibleActionCreated: new Date().toISOString(), - lastReadCreated: new Date().toISOString(), lastReadTime: new Date().toISOString(), lastReadSequenceNumber: randNumber(), lastMentionedTime: randBoolean() ? new Date().toISOString() : null, @@ -44,10 +42,8 @@ export default function createRandomOptionData(index: number): OptionData { statusNum: rand(Object.values(CONST.REPORT.STATUS_NUM)), type: rand(Object.values(CONST.REPORT.TYPE)), visibility: rand(Object.values(CONST.REPORT.VISIBILITY)), - isLastMessageDeletedParentAction: randBoolean(), isCancelledIOU: randBoolean(), iouReportID: `iou_${index}`, - iouReportAmount: randNumber({min: 0, max: 1000}), currency: randWord(), isWaitingOnBankAccount: randBoolean(), lastVisibleActionLastModified: new Date().toISOString(), diff --git a/tests/utils/collections/reports.ts b/tests/utils/collections/reports.ts index 60908e72c2de..cf8e85893996 100644 --- a/tests/utils/collections/reports.ts +++ b/tests/utils/collections/reports.ts @@ -13,7 +13,6 @@ export default function createRandomReport(index: number): Report { isOptimisticReport: randBoolean(), isOwnPolicyExpenseChat: randBoolean(), isWaitingOnBankAccount: randBoolean(), - isLastMessageDeletedParentAction: randBoolean(), policyID: index.toString(), reportName: randWord(), };