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

(cherry picked from commit ed230ea)

(CP triggered by Julesssss)
  • Loading branch information
Julesssss authored and OSBotify committed Nov 11, 2024
1 parent 2a53805 commit 7be1d39
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 @@ -1632,8 +1632,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 7be1d39

Please sign in to comment.