From 071db619ab8063b42490765c1425e46832c190d8 Mon Sep 17 00:00:00 2001 From: Artem Makushov Date: Tue, 28 Nov 2023 17:54:56 +0100 Subject: [PATCH 01/15] refactor requiresAttentionFromCurrentUserfunction --- src/libs/ReportUtils.ts | 25 ++++++++++++++----------- tests/unit/ReportUtilsTest.js | 3 ++- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index d93661778b83..60177682b873 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1519,7 +1519,12 @@ function isUnreadWithMention(report: OnyxEntry | OptionData): boolean { // lastMentionedTime and lastReadTime are both datetime strings and can be compared directly const lastMentionedTime = report.lastMentionedTime ?? ''; const lastReadTime = report.lastReadTime ?? ''; - return lastReadTime < lastMentionedTime; + return Boolean('isUnreadWithMention' in report && report.isUnreadWithMention) || lastReadTime < lastMentionedTime; +} + +// Type guard to check the type of an object and it's an option +function isOption(option: OnyxEntry | OptionData): option is OptionData { + return (option as OptionData).isUnreadWithMention !== undefined; } /** @@ -1536,20 +1541,18 @@ function requiresAttentionFromCurrentUser(option: OnyxEntry | OptionData return false; } - if (isArchivedRoom(option)) { - return false; - } - - if (isArchivedRoom(getReport(option.parentReportID))) { + if (isArchivedRoom(option) || isArchivedRoom(getReport(option.parentReportID))) { return false; } - if (Boolean('isUnreadWithMention' in option && option.isUnreadWithMention) || isUnreadWithMention(option)) { - return true; - } + if (isOption(option)) { + if (isUnreadWithMention(option)) { + return true; + } - if (isWaitingForAssigneeToCompleteTask(option, parentReportAction)) { - return true; + if (isWaitingForAssigneeToCompleteTask(option, parentReportAction)) { + return true; + } } // Has a child report that is awaiting action (e.g. approve, pay, add bank account) from current user diff --git a/tests/unit/ReportUtilsTest.js b/tests/unit/ReportUtilsTest.js index e0c98b1793f1..0e3e144b5571 100644 --- a/tests/unit/ReportUtilsTest.js +++ b/tests/unit/ReportUtilsTest.js @@ -305,11 +305,12 @@ describe('ReportUtils', () => { }; expect(ReportUtils.requiresAttentionFromCurrentUser(report)).toBe(true); }); - it('returns true when the report is an outstanding task', () => { + it.only('returns true when the report is an outstanding task', () => { const report = { ...LHNTestUtils.getFakeReport(), type: CONST.REPORT.TYPE.TASK, managerID: currentUserAccountID, + isUnreadWithMention: false, stateNum: CONST.REPORT.STATE_NUM.OPEN, statusNum: CONST.REPORT.STATUS.OPEN, }; From 14c7e9b3d37e88cce11fc7a9ae7e28c5492134b0 Mon Sep 17 00:00:00 2001 From: Artem Makushov Date: Wed, 29 Nov 2023 14:28:58 +0100 Subject: [PATCH 02/15] fix --- tests/unit/ReportUtilsTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/ReportUtilsTest.js b/tests/unit/ReportUtilsTest.js index 0e3e144b5571..e6b06e2aff5b 100644 --- a/tests/unit/ReportUtilsTest.js +++ b/tests/unit/ReportUtilsTest.js @@ -305,7 +305,7 @@ describe('ReportUtils', () => { }; expect(ReportUtils.requiresAttentionFromCurrentUser(report)).toBe(true); }); - it.only('returns true when the report is an outstanding task', () => { + it('returns true when the report is an outstanding task', () => { const report = { ...LHNTestUtils.getFakeReport(), type: CONST.REPORT.TYPE.TASK, From ffe819adff52d61e5aa069cdc19df5bd0914bdf5 Mon Sep 17 00:00:00 2001 From: Artem Makushov Date: Mon, 4 Dec 2023 15:04:02 +0100 Subject: [PATCH 03/15] change --- src/libs/ReportUtils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 60177682b873..0608e1072f7f 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1545,11 +1545,11 @@ function requiresAttentionFromCurrentUser(option: OnyxEntry | OptionData return false; } - if (isOption(option)) { - if (isUnreadWithMention(option)) { - return true; - } + if (isUnreadWithMention(option)) { + return true; + } + if (isOption(option)) { if (isWaitingForAssigneeToCompleteTask(option, parentReportAction)) { return true; } From 127fb10cbebd8a6fa1f4849c295a3e500898c6ff Mon Sep 17 00:00:00 2001 From: Matt Moore <46995600+muttmuure@users.noreply.github.com> Date: Wed, 6 Dec 2023 19:06:15 +0000 Subject: [PATCH 04/15] Update Request-Money.md --- .../get-paid-back/Request-Money.md | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/docs/articles/new-expensify/get-paid-back/Request-Money.md b/docs/articles/new-expensify/get-paid-back/Request-Money.md index a2b765915af0..a2c63cf6f8f7 100644 --- a/docs/articles/new-expensify/get-paid-back/Request-Money.md +++ b/docs/articles/new-expensify/get-paid-back/Request-Money.md @@ -1,6 +1,35 @@ --- -title: Request Money -description: Request Money -redirect_from: articles/request-money/Request-and-Split-Bills/ +title: Request Money and Split Bills with Friends +description: Everything you need to know about Requesting Money and Splitting Bills with Friends! --- -## Resource Coming Soon! + + + +# How do these Payment Features work? +Our suite of money movement features enables you to request money owed by an individual or split a bill with a group. + +**Request Money** lets your friends pay you back directly in Expensify. When you send a payment request to a friend, Expensify will display the amount owed and the option to pay the corresponding request in a chat between you. + +**Split Bill** allows you to split payments between friends and ensures the person who settled the tab gets paid back. + +These two features ensure you can live in the moment and settle up afterward. + +# How to Request Money +- Select the Green **+** button and choose **Request Money** +- Enter the amount **$** they owe and click **Next** +- Search for the user or enter their email! +- Enter a reason for the request (optional) +- Click **Request!** +- If you change your mind, all you have to do is click **Cancel** +- The user will be able to **Settle up outside of Expensify** or pay you via **Venmo** or **PayPal.me** + +# How to Split a Bill +- Select the Green **+** button and choose **Split Bill** +- Enter the total amount for the bill and click **Next** +- Search for users or enter their emails and **Select** +- Enter a reason for the split +- The split is then shared equally between the attendees + +# FAQs +## Can I request money from more than one person at a time? +If you need to request money for more than one person at a time, you’ll want to use the Split Bill feature. The Request Money option is for one-to-one payments between two people. From 88bee57213f3f88e45ad12b3b2919762e258bbc0 Mon Sep 17 00:00:00 2001 From: Artem Makushov Date: Wed, 6 Dec 2023 22:02:21 +0100 Subject: [PATCH 05/15] updates --- src/libs/ReportUtils.ts | 11 ++--------- src/libs/SidebarUtils.ts | 3 ++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 1fdaa69b9a05..a2549e76d505 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1541,11 +1541,6 @@ function isUnreadWithMention(report: OnyxEntry | OptionData): boolean { return Boolean('isUnreadWithMention' in report && report.isUnreadWithMention) || lastReadTime < lastMentionedTime; } -// Type guard to check the type of an object and it's an option -function isOption(option: OnyxEntry | OptionData): option is OptionData { - return (option as OptionData).isUnreadWithMention !== undefined; -} - /** * Determines if the option requires action from the current user. This can happen when it: - is unread and the user was mentioned in one of the unread comments @@ -1568,10 +1563,8 @@ function requiresAttentionFromCurrentUser(option: OnyxEntry | OptionData return true; } - if (isOption(option)) { - if (isWaitingForAssigneeToCompleteTask(option, parentReportAction)) { - return true; - } + if (isWaitingForAssigneeToCompleteTask(option, parentReportAction)) { + return true; } // Has a child report that is awaiting action (e.g. approve, pay, add bank account) from current user diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index bace29e06d28..3e4d27fa9704 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -187,7 +187,8 @@ function getOrderedReportIDs( report.iouReportAmount = ReportUtils.getMoneyRequestReimbursableTotal(report, allReports); const isPinned = report.isPinned ?? false; - if (isPinned || ReportUtils.requiresAttentionFromCurrentUser(report)) { + const reportAction = ReportActionsUtils.getReportAction(report.parentReportID ?? '', report.parentReportActionID ?? ''); + if (isPinned || ReportUtils.requiresAttentionFromCurrentUser(report, reportAction)) { pinnedAndGBRReports.push(report); } else if (report.hasDraft) { draftReports.push(report); From 78f981aff896b0a9f1e198b24c1f120385fbd459 Mon Sep 17 00:00:00 2001 From: Matt Moore <46995600+muttmuure@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:27:25 +0000 Subject: [PATCH 06/15] Update docs/articles/new-expensify/get-paid-back/Request-Money.md Co-authored-by: Rushat Gabhane --- docs/articles/new-expensify/get-paid-back/Request-Money.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/articles/new-expensify/get-paid-back/Request-Money.md b/docs/articles/new-expensify/get-paid-back/Request-Money.md index a2c63cf6f8f7..43a72a075de7 100644 --- a/docs/articles/new-expensify/get-paid-back/Request-Money.md +++ b/docs/articles/new-expensify/get-paid-back/Request-Money.md @@ -1,6 +1,7 @@ --- title: Request Money and Split Bills with Friends description: Everything you need to know about Requesting Money and Splitting Bills with Friends! +redirect_from: articles/request-money/Request-and-Split-Bills/ --- From b12afa07839c8317624644fb390443a15eb875c4 Mon Sep 17 00:00:00 2001 From: s-alves10 Date: Mon, 11 Dec 2023 09:24:28 -0600 Subject: [PATCH 07/15] fix: getting unseelected participants --- .../MoneyTemporaryForRefactorRequestConfirmationList.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js index e622367cd6f9..d4b936930375 100755 --- a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js +++ b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js @@ -368,7 +368,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ const optionSelectorSections = useMemo(() => { const sections = []; - const unselectedParticipants = _.filter(selectedParticipantsFiltered, (participant) => !participant.selected); + const unselectedParticipants = _.filter(selectedParticipants, (participant) => !participant.selected); if (hasMultipleParticipants) { const formattedSelectedParticipants = getParticipantsWithAmount(selectedParticipantsFiltered); let formattedParticipantsList = _.union(formattedSelectedParticipants, unselectedParticipants); @@ -416,6 +416,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ return sections; }, [ selectedParticipantsFiltered, + selectedParticipants, hasMultipleParticipants, iouAmount, iouCurrencyCode, From 974f9b251beff4f49d17933f9f1c37d79f85f8b7 Mon Sep 17 00:00:00 2001 From: mkhutornyi Date: Mon, 11 Dec 2023 17:31:56 +0100 Subject: [PATCH 08/15] fix "Split scan - Unable to select workspace as recipient when creating split scan in WS chat" --- src/pages/iou/request/step/IOURequestStepScan/index.js | 4 +++- .../iou/request/step/IOURequestStepScan/index.native.js | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepScan/index.js b/src/pages/iou/request/step/IOURequestStepScan/index.js index e01e64be9bc0..5098401ddf79 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/index.js +++ b/src/pages/iou/request/step/IOURequestStepScan/index.js @@ -15,11 +15,13 @@ import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; import useLocalize from '@hooks/useLocalize'; import useWindowDimensions from '@hooks/useWindowDimensions'; import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; import * as FileUtils from '@libs/fileDownload/FileUtils'; import Navigation from '@libs/Navigation/Navigation'; import ReceiptDropUI from '@pages/iou/ReceiptDropUI'; import IOURequestStepRoutePropTypes from '@pages/iou/request/step/IOURequestStepRoutePropTypes'; import StepScreenDragAndDropWrapper from '@pages/iou/request/step/StepScreenDragAndDropWrapper'; +import withFullTransactionOrNotFound from '@pages/iou/request/step/withFullTransactionOrNotFound'; import withWritableReportOrNotFound from '@pages/iou/request/step/withWritableReportOrNotFound'; import reportPropTypes from '@pages/reportPropTypes'; import useTheme from '@styles/themes/useTheme'; @@ -341,4 +343,4 @@ IOURequestStepScan.defaultProps = defaultProps; IOURequestStepScan.propTypes = propTypes; IOURequestStepScan.displayName = 'IOURequestStepScan'; -export default withWritableReportOrNotFound(IOURequestStepScan); +export default compose(withWritableReportOrNotFound, withFullTransactionOrNotFound)(IOURequestStepScan); diff --git a/src/pages/iou/request/step/IOURequestStepScan/index.native.js b/src/pages/iou/request/step/IOURequestStepScan/index.native.js index 28ebe822941d..2faaa5632eb2 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/index.native.js +++ b/src/pages/iou/request/step/IOURequestStepScan/index.native.js @@ -11,10 +11,13 @@ import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; import * as FileUtils from '@libs/fileDownload/FileUtils'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; import IOURequestStepRoutePropTypes from '@pages/iou/request/step/IOURequestStepRoutePropTypes'; +import withFullTransactionOrNotFound from '@pages/iou/request/step/withFullTransactionOrNotFound'; +import withWritableReportOrNotFound from '@pages/iou/request/step/withWritableReportOrNotFound'; import reportPropTypes from '@pages/reportPropTypes'; import useTheme from '@styles/themes/useTheme'; import useThemeStyles from '@styles/useThemeStyles'; @@ -290,4 +293,4 @@ IOURequestStepScan.defaultProps = defaultProps; IOURequestStepScan.propTypes = propTypes; IOURequestStepScan.displayName = 'IOURequestStepScan'; -export default IOURequestStepScan; +export default compose(withWritableReportOrNotFound, withFullTransactionOrNotFound)(IOURequestStepScan); From a4dcc97d577b80ac9e2d6b36ea140e433eea1941 Mon Sep 17 00:00:00 2001 From: Artem Makushov Date: Mon, 11 Dec 2023 19:24:12 +0100 Subject: [PATCH 09/15] updated --- src/libs/ReportUtils.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index a2549e76d505..f6fe4ce8c661 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1531,14 +1531,14 @@ function isWaitingForAssigneeToCompleteTask(report: OnyxEntry, parentRep return isTaskReport(report) && isReportManager(report) && isOpenTaskReport(report, parentReportAction); } -function isUnreadWithMention(report: OnyxEntry | OptionData): boolean { - if (!report) { +function isUnreadWithMention(reportOrOption: OnyxEntry | OptionData): boolean { + if (!reportOrOption) { return false; } // lastMentionedTime and lastReadTime are both datetime strings and can be compared directly - const lastMentionedTime = report.lastMentionedTime ?? ''; - const lastReadTime = report.lastReadTime ?? ''; - return Boolean('isUnreadWithMention' in report && report.isUnreadWithMention) || lastReadTime < lastMentionedTime; + const lastMentionedTime = reportOrOption.lastMentionedTime ?? ''; + const lastReadTime = reportOrOption.lastReadTime ?? ''; + return Boolean('isUnreadWithMention' in reportOrOption && reportOrOption.isUnreadWithMention) || lastReadTime < lastMentionedTime; } /** @@ -1550,25 +1550,25 @@ function isUnreadWithMention(report: OnyxEntry | OptionData): boolean { * @param option (report or optionItem) * @param parentReportAction (the report action the current report is a thread of) */ -function requiresAttentionFromCurrentUser(option: OnyxEntry | OptionData, parentReportAction: EmptyObject | OnyxEntry = {}) { - if (!option) { +function requiresAttentionFromCurrentUser(optionOrReport: OnyxEntry | OptionData, parentReportAction: EmptyObject | OnyxEntry = {}) { + if (!optionOrReport) { return false; } - if (isArchivedRoom(option) || isArchivedRoom(getReport(option.parentReportID))) { + if (isArchivedRoom(optionOrReport) || isArchivedRoom(getReport(optionOrReport.parentReportID))) { return false; } - if (isUnreadWithMention(option)) { + if (isUnreadWithMention(optionOrReport)) { return true; } - if (isWaitingForAssigneeToCompleteTask(option, parentReportAction)) { + if (isWaitingForAssigneeToCompleteTask(optionOrReport, parentReportAction)) { return true; } // Has a child report that is awaiting action (e.g. approve, pay, add bank account) from current user - if (option.hasOutstandingChildRequest) { + if (optionOrReport.hasOutstandingChildRequest) { return true; } From 7e362f25f9ba01e2d609ccd84cb54228c25a7c2f Mon Sep 17 00:00:00 2001 From: s-alves10 Date: Mon, 11 Dec 2023 12:29:57 -0600 Subject: [PATCH 10/15] fix: rename participant variables --- ...oraryForRefactorRequestConfirmationList.js | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js index d4b936930375..a85322978b33 100755 --- a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js +++ b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js @@ -231,7 +231,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ receiptPath, reportActionID, reportID, - selectedParticipants, + selectedParticipants: pickedParticipants, session: {accountID}, shouldShowSmartScanFields, transaction, @@ -358,7 +358,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ ]; }, [isTypeSplit, isTypeRequest, iouType, iouAmount, receiptPath, formattedAmount, isDistanceRequestWithoutRoute, translate]); - const selectedParticipantsFiltered = useMemo(() => _.filter(selectedParticipants, (participant) => participant.selected), [selectedParticipants]); + const selectedParticipants = useMemo(() => _.filter(pickedParticipants, (participant) => participant.selected), [pickedParticipants]); const personalDetailsOfPayee = useMemo(() => payeePersonalDetails || currentUserPersonalDetails, [payeePersonalDetails, currentUserPersonalDetails]); const userCanModifyParticipants = useRef(!isReadOnly && canModifyParticipants && hasMultipleParticipants); useEffect(() => { @@ -368,9 +368,9 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ const optionSelectorSections = useMemo(() => { const sections = []; - const unselectedParticipants = _.filter(selectedParticipants, (participant) => !participant.selected); + const unselectedParticipants = _.filter(pickedParticipants, (participant) => !participant.selected); if (hasMultipleParticipants) { - const formattedSelectedParticipants = getParticipantsWithAmount(selectedParticipantsFiltered); + const formattedSelectedParticipants = getParticipantsWithAmount(selectedParticipants); let formattedParticipantsList = _.union(formattedSelectedParticipants, unselectedParticipants); if (!userCanModifyParticipants.current) { @@ -380,7 +380,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ })); } - const myIOUAmount = IOUUtils.calculateAmount(selectedParticipantsFiltered.length, iouAmount, iouCurrencyCode, true); + const myIOUAmount = IOUUtils.calculateAmount(selectedParticipants.length, iouAmount, iouCurrencyCode, true); const formattedPayeeOption = OptionsListUtils.getIOUConfirmationOptionsFromPayeePersonalDetail( personalDetailsOfPayee, iouAmount > 0 ? CurrencyUtils.convertToDisplayString(myIOUAmount, iouCurrencyCode) : '', @@ -402,7 +402,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ }, ); } else { - const formattedSelectedParticipants = _.map(selectedParticipantsFiltered, (participant) => ({ + const formattedSelectedParticipants = _.map(selectedParticipants, (participant) => ({ ...participant, isDisabled: ReportUtils.isOptimisticPersonalDetail(participant.accountID), })); @@ -415,8 +415,8 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ } return sections; }, [ - selectedParticipantsFiltered, selectedParticipants, + pickedParticipants, hasMultipleParticipants, iouAmount, iouCurrencyCode, @@ -431,8 +431,8 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ if (!hasMultipleParticipants) { return []; } - return [...selectedParticipantsFiltered, OptionsListUtils.getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetailsOfPayee)]; - }, [selectedParticipantsFiltered, hasMultipleParticipants, personalDetailsOfPayee]); + return [...selectedParticipants, OptionsListUtils.getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetailsOfPayee)]; + }, [selectedParticipants, hasMultipleParticipants, personalDetailsOfPayee]); useEffect(() => { if (!isDistanceRequest) { @@ -475,7 +475,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ */ const confirm = useCallback( (paymentMethod) => { - if (_.isEmpty(selectedParticipantsFiltered)) { + if (_.isEmpty(selectedParticipants)) { return; } @@ -503,10 +503,10 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ } setDidConfirm(true); - onConfirm(selectedParticipantsFiltered); + onConfirm(selectedParticipants); } }, - [selectedParticipantsFiltered, onSendMoney, onConfirm, isEditingSplitBill, iouType, isDistanceRequest, isDistanceRequestWithoutRoute, iouCurrencyCode, iouAmount, transaction], + [selectedParticipants, onSendMoney, onConfirm, isEditingSplitBill, iouType, isDistanceRequest, isDistanceRequestWithoutRoute, iouCurrencyCode, iouAmount, transaction], ); const footerContent = useMemo(() => { @@ -515,7 +515,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ } const shouldShowSettlementButton = iouType === CONST.IOU.TYPE.SEND; - const shouldDisableButton = selectedParticipantsFiltered.length === 0; + const shouldDisableButton = selectedParticipants.length === 0; const button = shouldShowSettlementButton ? ( ); - }, [confirm, bankAccountRoute, iouCurrencyCode, iouType, isReadOnly, policyID, selectedParticipantsFiltered, splitOrRequestOptions, translate, formError, styles.ph1, styles.mb2]); + }, [confirm, bankAccountRoute, iouCurrencyCode, iouType, isReadOnly, policyID, selectedParticipants, splitOrRequestOptions, translate, formError, styles.ph1, styles.mb2]); const {image: receiptImage, thumbnail: receiptThumbnail} = receiptPath && receiptFilename ? ReceiptUtils.getThumbnailAndImageURIs(transaction, receiptPath, receiptFilename) : {}; return ( From 2591354366a5d635647bc1ef242e6a966cead23a Mon Sep 17 00:00:00 2001 From: mkhutornyi Date: Mon, 11 Dec 2023 20:36:52 +0100 Subject: [PATCH 11/15] fix unable to scan receipt, the camera error display --- src/pages/iou/request/step/IOURequestStepScan/index.native.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepScan/index.native.js b/src/pages/iou/request/step/IOURequestStepScan/index.native.js index 28ebe822941d..cba808a36845 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/index.native.js +++ b/src/pages/iou/request/step/IOURequestStepScan/index.native.js @@ -40,7 +40,7 @@ const defaultProps = { function IOURequestStepScan({ report, route: { - params: {iouType, reportID, transactionID, pageIndex, backTo}, + params: {iouType, reportID, transactionID, backTo}, }, }) { const theme = useTheme(); @@ -207,7 +207,7 @@ function IOURequestStepScan({ style={[styles.cameraView]} zoom={device.neutralZoom} photo - cameraTabIndex={pageIndex} + cameraTabIndex={1} /> )} From c518c5e9bdec1edfae6381ae472192d2696ae849 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Mon, 11 Dec 2023 20:54:05 +0000 Subject: [PATCH 12/15] Update version to 1.4.11-4 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 6e8bc37768e6..26a632a4f4fc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -91,8 +91,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001041103 - versionName "1.4.11-3" + versionCode 1001041104 + versionName "1.4.11-4" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index a77d46a97c57..2dec76d323a5 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.11.3 + 1.4.11.4 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index ea8966b30f7d..c5ea5a48816d 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.11.3 + 1.4.11.4 diff --git a/package-lock.json b/package-lock.json index 8379b68f62a0..1c2a5708ab43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.11-3", + "version": "1.4.11-4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.11-3", + "version": "1.4.11-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 753f7016f575..537d6a94d066 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.11-3", + "version": "1.4.11-4", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 8df40f45ae821be4232c6604fadddbab20883279 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 11 Dec 2023 14:17:30 -0700 Subject: [PATCH 13/15] hide menu on split requests --- src/pages/iou/request/step/IOURequestStepConfirmation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.js b/src/pages/iou/request/step/IOURequestStepConfirmation.js index 81c153cb2320..9837a25fc826 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -292,7 +292,7 @@ function IOURequestStepConfirmation({ Date: Mon, 11 Dec 2023 21:57:57 +0000 Subject: [PATCH 14/15] Update version to 1.4.11-5 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 26a632a4f4fc..f1ca01cf8cbb 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -91,8 +91,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001041104 - versionName "1.4.11-4" + versionCode 1001041105 + versionName "1.4.11-5" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 2dec76d323a5..dfa1f2776aa9 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.11.4 + 1.4.11.5 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index c5ea5a48816d..7b9dfcb42051 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.11.4 + 1.4.11.5 diff --git a/package-lock.json b/package-lock.json index 1c2a5708ab43..9f4c67b2d0e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.11-4", + "version": "1.4.11-5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.11-4", + "version": "1.4.11-5", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 537d6a94d066..a3f5794a75c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.11-4", + "version": "1.4.11-5", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 165caf526ffcd2d00dbed4995d25981c7ab04b17 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Mon, 11 Dec 2023 22:16:14 +0000 Subject: [PATCH 15/15] Update version to 1.4.11-6 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index f1ca01cf8cbb..afa05a280390 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -91,8 +91,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001041105 - versionName "1.4.11-5" + versionCode 1001041106 + versionName "1.4.11-6" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index dfa1f2776aa9..de36428b1b37 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.11.5 + 1.4.11.6 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 7b9dfcb42051..e805f0e55da1 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.11.5 + 1.4.11.6 diff --git a/package-lock.json b/package-lock.json index 9f4c67b2d0e5..66b3fdc72cb8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.11-5", + "version": "1.4.11-6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.11-5", + "version": "1.4.11-6", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index a3f5794a75c3..addbb623f592 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.11-5", + "version": "1.4.11-6", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",