Skip to content

Commit

Permalink
Rename and reuse function
Browse files Browse the repository at this point in the history
  • Loading branch information
Beamanator committed Aug 29, 2024
1 parent 5fdb9bb commit 4395c98
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2524,11 +2524,12 @@ function getLastVisibleMessage(reportID: string | undefined, actionsToMerge: Rep
}

/**
* Checks if a report is an open task report assigned to current user.
* Checks if a report is waiting for the manager to complete an action.
* Example: the assignee of an open task report or the manager of a processing expense report.
*
* @param [parentReportAction] - The parent report action of the report (Used to check if the task has been canceled)
*/
function isWaitingForAssigneeToCompleteTask(report: OnyxEntry<Report>, parentReportAction: OnyxEntry<ReportAction>): boolean {
function isWaitingForAssigneeToCompleteAction(report: OnyxEntry<Report>, parentReportAction: OnyxEntry<ReportAction>): boolean {
if (report?.hasOutstandingChildTask) {
return true;
}
Expand Down Expand Up @@ -2586,7 +2587,7 @@ function requiresAttentionFromCurrentUser(optionOrReport: OnyxEntry<Report> | Op
return true;
}

if (isWaitingForAssigneeToCompleteTask(optionOrReport, parentReportAction)) {
if (isWaitingForAssigneeToCompleteAction(optionOrReport, parentReportAction)) {
return true;
}

Expand Down Expand Up @@ -7970,7 +7971,7 @@ export {
isUserCreatedPolicyRoom,
isValidReport,
isValidReportIDFromPath,
isWaitingForAssigneeToCompleteTask,
isWaitingForAssigneeToCompleteAction,
isInvoiceRoom,
isInvoiceRoomWithID,
isInvoiceReport,
Expand Down

0 comments on commit 4395c98

Please sign in to comment.