Skip to content

Commit

Permalink
Merge pull request #27830 from ginsuma/fix/26235
Browse files Browse the repository at this point in the history
Fix 25% opacity in MoneyRequestView and TaskView
  • Loading branch information
stitesExpensify authored Sep 26, 2023
2 parents a63199e + 6f2fbfc commit a32e668
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
26 changes: 15 additions & 11 deletions src/components/ReportActionItem/MoneyRequestView.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ function MoneyRequestView({report, betas, parentReport, policyCategories, should
}

const isDistanceRequest = TransactionUtils.isDistanceRequest(transaction);
const pendingAction = lodashGet(transaction, 'pendingAction');
const getPendingFieldAction = (fieldPath) => lodashGet(transaction, fieldPath) || pendingAction;

return (
<View>
Expand All @@ -139,15 +141,17 @@ function MoneyRequestView({report, betas, parentReport, policyCategories, should
</View>

{hasReceipt && (
<View style={styles.moneyRequestViewImage}>
<ReportActionItemImage
thumbnail={receiptURIs.thumbnail}
image={receiptURIs.image}
enablePreviewModal
/>
</View>
<OfflineWithFeedback pendingAction={pendingAction}>
<View style={styles.moneyRequestViewImage}>
<ReportActionItemImage
thumbnail={receiptURIs.thumbnail}
image={receiptURIs.image}
enablePreviewModal
/>
</View>
</OfflineWithFeedback>
)}
<OfflineWithFeedback pendingAction={lodashGet(transaction, 'pendingFields.amount') || lodashGet(transaction, 'pendingAction')}>
<OfflineWithFeedback pendingAction={getPendingFieldAction('pendingFields.amount')}>
<MenuItemWithTopDescription
title={formattedTransactionAmount ? formattedTransactionAmount.toString() : ''}
shouldShowTitleIcon={isSettled}
Expand All @@ -162,7 +166,7 @@ function MoneyRequestView({report, betas, parentReport, policyCategories, should
subtitleTextStyle={styles.textLabelError}
/>
</OfflineWithFeedback>
<OfflineWithFeedback pendingAction={lodashGet(transaction, 'pendingFields.comment') || lodashGet(transaction, 'pendingAction')}>
<OfflineWithFeedback pendingAction={getPendingFieldAction('pendingFields.comment')}>
<MenuItemWithTopDescription
description={translate('common.description')}
shouldParseTitle
Expand All @@ -175,7 +179,7 @@ function MoneyRequestView({report, betas, parentReport, policyCategories, should
numberOfLinesTitle={0}
/>
</OfflineWithFeedback>
<OfflineWithFeedback pendingAction={lodashGet(transaction, 'pendingFields.created') || lodashGet(transaction, 'pendingAction')}>
<OfflineWithFeedback pendingAction={getPendingFieldAction('pendingFields.created')}>
<MenuItemWithTopDescription
description={translate('common.date')}
title={transactionDate}
Expand All @@ -188,7 +192,7 @@ function MoneyRequestView({report, betas, parentReport, policyCategories, should
subtitleTextStyle={styles.textLabelError}
/>
</OfflineWithFeedback>
<OfflineWithFeedback pendingAction={lodashGet(transaction, 'pendingFields.merchant') || lodashGet(transaction, 'pendingAction')}>
<OfflineWithFeedback pendingAction={getPendingFieldAction('pendingFields.merchant')}>
<MenuItemWithTopDescription
description={isDistanceRequest ? translate('common.distance') : translate('common.merchant')}
title={transactionMerchant}
Expand Down
20 changes: 8 additions & 12 deletions src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,12 +511,10 @@ function ReportActionItem(props) {
checkIfContextMenuActive: toggleContextMenuFromActiveReportAction,
}}
>
<OfflineWithFeedback pendingAction={props.action.pendingAction}>
<MoneyRequestView
report={props.report}
shouldShowHorizontalRule={!props.shouldHideThreadDividerLine}
/>
</OfflineWithFeedback>
<MoneyRequestView
report={props.report}
shouldShowHorizontalRule={!props.shouldHideThreadDividerLine}
/>
</ShowContextMenuContext.Provider>
);
}
Expand All @@ -538,12 +536,10 @@ function ReportActionItem(props) {
}

return (
<OfflineWithFeedback pendingAction={props.action.pendingAction}>
<TaskView
report={props.report}
shouldShowHorizontalRule={!props.shouldHideThreadDividerLine}
/>
</OfflineWithFeedback>
<TaskView
report={props.report}
shouldShowHorizontalRule={!props.shouldHideThreadDividerLine}
/>
);
}
if (ReportUtils.isExpenseReport(props.report) || ReportUtils.isIOUReport(props.report)) {
Expand Down

0 comments on commit a32e668

Please sign in to comment.