Skip to content

Commit 7afdf8f

Browse files
author
Christoph Pader
committed
ReportUtils
1 parent 263dd3c commit 7afdf8f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libs/ReportActionsUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ function isTrackExpenseAction(reportAction: OnyxEntry<ReportAction | OptimisticI
857857
return reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && (reportAction.originalMessage as IOUMessage).type === CONST.IOU.REPORT_ACTION_TYPE.TRACK;
858858
}
859859

860-
function isPayAction(reportAction: OnyxEntry<ReportAction | OptimisticIOUReportAction>): boolean {
860+
function isPayAction(reportAction: OnyxInputOrEntry<ReportAction | OptimisticIOUReportAction>): boolean {
861861
return reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && (reportAction.originalMessage as IOUMessage).type === CONST.IOU.REPORT_ACTION_TYPE.PAY;
862862
}
863863

src/libs/ReportUtils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,7 @@ function getTransactionCommentObject(transaction: OnyxEntry<Transaction>): Comme
26182618
* This is used in conjunction with canEditRestrictedField to control editing of specific fields like amount, currency, created, receipt, and distance.
26192619
* On its own, it only controls allowing/disallowing navigating to the editing pages or showing/hiding the 'Edit' icon on report actions
26202620
*/
2621-
function canEditMoneyRequest(reportAction: OnyxEntry<ReportAction>): boolean {
2621+
function canEditMoneyRequest(reportAction: OnyxInputOrEntry<ReportAction>): boolean {
26222622
const isDeleted = ReportActionsUtils.isDeletedAction(reportAction);
26232623

26242624
if (isDeleted) {
@@ -2669,7 +2669,7 @@ function canEditMoneyRequest(reportAction: OnyxEntry<ReportAction>): boolean {
26692669
* Checks if the current user can edit the provided property of an expense
26702670
*
26712671
*/
2672-
function canEditFieldOfMoneyRequest(reportAction: OnyxEntry<ReportAction>, fieldToEdit: ValueOf<typeof CONST.EDIT_REQUEST_FIELD>): boolean {
2672+
function canEditFieldOfMoneyRequest(reportAction: OnyxInputOrEntry<ReportAction>, fieldToEdit: ValueOf<typeof CONST.EDIT_REQUEST_FIELD>): boolean {
26732673
// A list of fields that cannot be edited by anyone, once an expense has been settled
26742674
const restrictedFields: string[] = [
26752675
CONST.EDIT_REQUEST_FIELD.AMOUNT,

0 commit comments

Comments
 (0)