Skip to content

Commit

Permalink
prevent showing track expense option for submitted track expense
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Nov 8, 2024
1 parent f053272 commit 4a1bd3e
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 4a1bd3e

Please sign in to comment.