Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ import {
chatIncludesConcierge,
getParentReport,
getReportRecipientAccountIDs,
isChatRoom,
isGroupChat,
isReportApproved,
isReportTransactionThread,
isSelfDM,
Expand Down Expand Up @@ -236,8 +238,11 @@ function ReportActionCompose({
const shouldDisplayDualDropZone = useMemo(() => {
const parentReport = getParentReport(report);
const isSettledOrApproved = isSettled(report) || isSettled(parentReport) || isReportApproved({report}) || isReportApproved({report: parentReport});
return (shouldAddOrReplaceReceipt && !isSettledOrApproved) || !!temporary_getMoneyRequestOptions(report, policy, reportParticipantIDs, isReportArchived).length;
}, [shouldAddOrReplaceReceipt, report, policy, reportParticipantIDs, isReportArchived]);
const hasMoneyRequestOptions = !!temporary_getMoneyRequestOptions(report, policy, reportParticipantIDs, isReportArchived).length;
const canModifyReceipt = shouldAddOrReplaceReceipt && !isSettledOrApproved;
const isRoomOrGroupChat = isChatRoom(report) || isGroupChat(report);
return !isRoomOrGroupChat && (canModifyReceipt || hasMoneyRequestOptions);
}, [shouldAddOrReplaceReceipt, report, reportParticipantIDs, policy, isReportArchived]);

// Placeholder to display in the chat input.
const inputPlaceholder = useMemo(() => {
Expand Down