Skip to content

Commit

Permalink
Merge pull request Expensify#37178 from Krishna2323/krishna2323/issue…
Browse files Browse the repository at this point in the history
…/37060

feat: Remove Add receipt from the three dot overflow menu.
  • Loading branch information
Hayata Suenaga authored Feb 26, 2024
2 parents 9bfe961 + 72bcc49 commit 88a3ffe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 25 deletions.
30 changes: 6 additions & 24 deletions src/components/MoneyRequestHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,30 +148,12 @@ function MoneyRequestHeader({session, parentReport, report, parentReportAction,
IOU.setShownHoldUseExplanation();
};

if (canModifyRequest) {
if (!TransactionUtils.hasReceipt(transaction)) {
threeDotsMenuItems.push({
icon: Expensicons.Receipt,
text: translate('receipt.addReceipt'),
onSelected: () =>
Navigation.navigate(
ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute(
CONST.IOU.ACTION.EDIT,
CONST.IOU.TYPE.REQUEST,
transaction?.transactionID ?? '',
report.reportID,
Navigation.getActiveRouteWithoutParams(),
),
),
});
}
if (canDeleteRequest) {
threeDotsMenuItems.push({
icon: Expensicons.Trashcan,
text: translate('reportActionContextMenu.deleteAction', {action: parentReportAction}),
onSelected: () => setIsDeleteModalVisible(true),
});
}
if (canDeleteRequest) {
threeDotsMenuItems.push({
icon: Expensicons.Trashcan,
text: translate('reportActionContextMenu.deleteAction', {action: parentReportAction}),
onSelected: () => setIsDeleteModalVisible(true),
});
}

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function MoneyRequestView({
</View>
</OfflineWithFeedback>
)}
{!hasReceipt && canEditReceipt && canUseViolations && (
{!hasReceipt && canEditReceipt && (
<ReceiptEmptyState
hasError={hasErrors}
onPress={() =>
Expand Down

0 comments on commit 88a3ffe

Please sign in to comment.