From a9843d933cb22b6e1bb17a8d12a7f0be61cebe42 Mon Sep 17 00:00:00 2001 From: NJ-2020 Date: Tue, 29 Oct 2024 05:33:35 -0700 Subject: [PATCH] fix no required action header does not display --- src/libs/actions/IOU.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 7ce9b9dfb272..15382e750b7e 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -2183,7 +2183,8 @@ function getMoneyRequestInformation( } : {}; - const optimisticNextStep = NextStepUtils.buildNextStep(iouReport, CONST.REPORT.STATUS_NUM.OPEN); + const predictedNextStatus = policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO ? CONST.REPORT.STATUS_NUM.CLOSED : CONST.REPORT.STATUS_NUM.OPEN; + const optimisticNextStep = NextStepUtils.buildNextStep(iouReport, predictedNextStatus); // STEP 5: Build Onyx Data const [optimisticData, successData, failureData] = buildOnyxDataForMoneyRequest(