Skip to content

Commit

Permalink
make submitted expense review crossed out when deleting offline
Browse files Browse the repository at this point in the history
  • Loading branch information
nyomanjyotisa committed Jul 17, 2024
1 parent d739580 commit b240aef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function ReportPreview({

const shouldShowSubmitButton = isOpenExpenseReport && reimbursableSpend !== 0 && !showRTERViolationMessage;
const shouldDisableSubmitButton = shouldShowSubmitButton && !ReportUtils.isAllowedToSubmitDraftExpenseReport(iouReport);
const isDeleted = action?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;

// The submit button should be success green colour only if the user is submitter and the policy does not have Scheduled Submit turned on
const isWaitingForSubmissionFromCurrentUser = useMemo(
Expand Down Expand Up @@ -395,7 +396,7 @@ function ReportPreview({
<View style={styles.reportPreviewAmountSubtitleContainer}>
<View style={styles.flexRow}>
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}>
<Text style={styles.textHeadlineH1}>{getDisplayAmount()}</Text>
<Text style={[styles.textHeadlineH1, isDeleted && styles.lineThrough]}>{getDisplayAmount()}</Text>
{iouSettled && (
<View style={styles.defaultCheckmarkWrapper}>
<Icon
Expand Down

0 comments on commit b240aef

Please sign in to comment.