Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Jan 13, 2025
1 parent 6e688e1 commit 7b22d11
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import {
hasWarningTypeViolations,
isAllowedToApproveExpenseReport,
isAllowedToSubmitDraftExpenseReport,
isArchivedRoomWithID,
isArchivedReport,
isInvoiceReport as isInvoiceReportUtils,
isInvoiceRoom as isInvoiceRoomReportUtils,
isOpenExpenseReport as isOpenExpenseReportUtils,
Expand Down Expand Up @@ -242,12 +242,12 @@ function ReportPreview({
formattedMerchant = null;
}

const isArchivedReport = ReportUtils.isArchivedReport(iouReport);
const isArchived = isArchivedReport(iouReport);
const currentUserAccountID = getCurrentUserAccountID();
const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN;
const shouldShowSubmitButton =
isOpenExpenseReport &&
!isArchivedReport &&
!isArchived &&
reimbursableSpend !== 0 &&
!showRTERViolationMessage &&
!shouldShowBrokenConnectionViolation &&
Expand Down Expand Up @@ -432,10 +432,10 @@ function ReportPreview({

const getPendingMessageProps: () => PendingMessageProps = () => {
if (isPayAtEndExpense) {
if (!isArchivedReport) {
if (!isArchived) {
return {shouldShow: true, messageIcon: Expensicons.Hourglass, messageDescription: translate('iou.bookingPending')};
}
if (isArchivedReport && archiveReason === CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED) {
if (isArchived && archiveReason === CONST.REPORT.ARCHIVE_REASON.BOOKING_END_DATE_HAS_PASSED) {
return {
shouldShow: true,
messageIcon: Expensicons.Box,
Expand Down

0 comments on commit 7b22d11

Please sign in to comment.