@@ -4181,6 +4181,17 @@ function getReasonAndReportActionThatRequiresAttention(
41814181
41824182 const reportActions = getAllReportActions(optionOrReport.reportID);
41834183
4184+ if (optionOrReport.statusNum === CONST.REPORT.STATUS_NUM.SUBMITTED) {
4185+ const reportActionsArray = Object.values(reportActions ?? {});
4186+ const mostRecentActiveDEWApproveAction = getMostRecentActiveDEWApproveFailedAction(reportActionsArray);
4187+ if (mostRecentActiveDEWApproveAction) {
4188+ return {
4189+ reason: CONST.REQUIRES_ATTENTION_REASONS.HAS_DEW_APPROVE_FAILED,
4190+ reportAction: mostRecentActiveDEWApproveAction,
4191+ };
4192+ }
4193+ }
4194+
41844195 if (hasUnresolvedCardFraudAlert(optionOrReport)) {
41854196 return {
41864197 reason: CONST.REQUIRES_ATTENTION_REASONS.HAS_UNRESOLVED_CARD_FRAUD_ALERT,
@@ -4205,17 +4216,6 @@ function getReasonAndReportActionThatRequiresAttention(
42054216 };
42064217 }
42074218
4208- if (optionOrReport.statusNum === CONST.REPORT.STATUS_NUM.SUBMITTED) {
4209- const reportActionsArray = Object.values(reportActions ?? {});
4210- const mostRecentActiveDEWApproveAction = getMostRecentActiveDEWApproveFailedAction(reportActionsArray);
4211- if (mostRecentActiveDEWApproveAction) {
4212- return {
4213- reason: CONST.REQUIRES_ATTENTION_REASONS.HAS_DEW_APPROVE_FAILED,
4214- reportAction: mostRecentActiveDEWApproveAction,
4215- };
4216- }
4217- }
4218-
42194219 if (isWaitingForAssigneeToCompleteAction(optionOrReport, parentReportAction)) {
42204220 return {
42214221 reason: CONST.REQUIRES_ATTENTION_REASONS.IS_WAITING_FOR_ASSIGNEE_TO_COMPLETE_ACTION,
0 commit comments