Skip to content

Commit

Permalink
Merge pull request #52274 from nkdengineer/fix/52240
Browse files Browse the repository at this point in the history
[CP Staging] Prevent showing track expense option for submitted track expense
  • Loading branch information
Julesssss authored Nov 11, 2024
2 parents ba543d7 + 4a1bd3e commit ed230ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1634,8 +1634,9 @@ function isIOURequest(report: OnyxInputOrEntry<Report>): boolean {
*/
function isTrackExpenseReport(report: OnyxInputOrEntry<Report>): boolean {
if (isThread(report)) {
const selfDMReportID = findSelfDMReportID();
const parentReportAction = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.parentReportID}`]?.[report.parentReportActionID];
return !isEmptyObject(parentReportAction) && ReportActionsUtils.isTrackExpenseAction(parentReportAction);
return !isEmptyObject(parentReportAction) && selfDMReportID === report.parentReportID && ReportActionsUtils.isTrackExpenseAction(parentReportAction);
}
return false;
}
Expand Down

0 comments on commit ed230ea

Please sign in to comment.