From 4d9d193f09ef42b84d728615b1853993b7474b56 Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 5 Jan 2024 16:13:22 +0700 Subject: [PATCH 01/57] set default category for distance request --- src/pages/iou/request/step/IOURequestStepConfirmation.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.js b/src/pages/iou/request/step/IOURequestStepConfirmation.js index d41442edd670..3ff22ba218ab 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -115,6 +115,15 @@ function IOURequestStepConfirmation({ IOU.setMoneyRequestBillable_temporaryForRefactor(transactionID, defaultBillable); }, [transactionID, defaultBillable]); + const defaultCategory = _.chain(policy) + .get('customUnits') + .find((customUnit) => customUnit.name === CONST.CUSTOM_UNITS.NAME_DISTANCE) + .get('defaultCategory') + .value(); + useEffect(() => { + IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory); + }, [transactionID, defaultCategory]); + const navigateBack = useCallback(() => { // If there is not a report attached to the IOU with a reportID, then the participants were manually selected and the user needs taken // back to the participants step From 62f1fb19cf7f9c62ed0245876ba6f5551961ed5d Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 5 Jan 2024 16:26:21 +0700 Subject: [PATCH 02/57] use lodashGet instead --- .../iou/request/step/IOURequestStepConfirmation.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.js b/src/pages/iou/request/step/IOURequestStepConfirmation.js index 3ff22ba218ab..27d284eb4965 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -115,11 +115,11 @@ function IOURequestStepConfirmation({ IOU.setMoneyRequestBillable_temporaryForRefactor(transactionID, defaultBillable); }, [transactionID, defaultBillable]); - const defaultCategory = _.chain(policy) - .get('customUnits') - .find((customUnit) => customUnit.name === CONST.CUSTOM_UNITS.NAME_DISTANCE) - .get('defaultCategory') - .value(); + const defaultCategory = lodashGet( + _.find(lodashGet(policy, 'customUnits', {}), (customUnit) => customUnit.name === CONST.CUSTOM_UNITS.NAME_DISTANCE), + 'defaultCategory', + '', + ); useEffect(() => { IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory); }, [transactionID, defaultCategory]); From 556b831303bbc594b0c682f1bb993b2623fd0d27 Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 19 Jan 2024 01:36:30 +0700 Subject: [PATCH 03/57] set default category only when unset --- src/pages/iou/request/step/IOURequestStepConfirmation.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.js b/src/pages/iou/request/step/IOURequestStepConfirmation.js index ee2a151c7876..0f535cb60e14 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -121,6 +121,9 @@ function IOURequestStepConfirmation({ '', ); useEffect(() => { + if (!_.isEmpty(transaction.category)) { + return; + } IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory); }, [transactionID, defaultCategory]); From c7925f5820f36f06abd46bd3461f8cac70774355 Mon Sep 17 00:00:00 2001 From: tienifr Date: Tue, 23 Jan 2024 02:05:19 +0700 Subject: [PATCH 04/57] fix lint --- 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 0f535cb60e14..029836d0c654 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -125,7 +125,7 @@ function IOURequestStepConfirmation({ return; } IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory); - }, [transactionID, defaultCategory]); + }, [transactionID, transaction.category, defaultCategory]); const navigateBack = useCallback(() => { // If there is not a report attached to the IOU with a reportID, then the participants were manually selected and the user needs taken From 8c802edccf7f9221e06508086db22e94ba806afd Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Wed, 24 Jan 2024 11:32:22 +0700 Subject: [PATCH 05/57] refactor task preview for hidden case --- .../HTMLRenderers/MentionUserRenderer.js | 2 +- src/components/ReportActionItem/TaskPreview.tsx | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js index 11ffabe4fe6a..f31fd304d47f 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js @@ -41,7 +41,7 @@ function MentionUserRenderer(props) { if (!_.isEmpty(htmlAttribAccountID)) { const user = lodashGet(personalDetails, htmlAttribAccountID); accountID = parseInt(htmlAttribAccountID, 10); - displayNameOrLogin = LocalePhoneNumber.formatPhoneNumber(lodashGet(user, 'login', '')) || lodashGet(user, 'displayName', '') || translate('common.hidden'); + displayNameOrLogin = lodashGet(user, 'displayName', '') || LocalePhoneNumber.formatPhoneNumber(lodashGet(user, 'login', '')) || translate('common.hidden'); navigationRoute = ROUTES.PROFILE.getRoute(htmlAttribAccountID); } else if (!_.isEmpty(props.tnode.data)) { // We need to remove the LTR unicode and leading @ from data as it is not part of the login diff --git a/src/components/ReportActionItem/TaskPreview.tsx b/src/components/ReportActionItem/TaskPreview.tsx index cbd166d79d3a..bbf2525198be 100644 --- a/src/components/ReportActionItem/TaskPreview.tsx +++ b/src/components/ReportActionItem/TaskPreview.tsx @@ -8,7 +8,6 @@ import type {OnyxEntry} from 'react-native-onyx'; import Checkbox from '@components/Checkbox'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; -import {usePersonalDetails} from '@components/OnyxProvider'; import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; import RenderHTML from '@components/RenderHTML'; import {showContextMenuForReport} from '@components/ShowContextMenuContext'; @@ -20,7 +19,6 @@ import useThemeStyles from '@hooks/useThemeStyles'; import ControlSelection from '@libs/ControlSelection'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import getButtonState from '@libs/getButtonState'; -import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; import Navigation from '@libs/Navigation/Navigation'; import * as ReportUtils from '@libs/ReportUtils'; import * as TaskUtils from '@libs/TaskUtils'; @@ -84,7 +82,6 @@ function TaskPreview({ }: TaskPreviewProps) { const styles = useThemeStyles(); const StyleUtils = useStyleUtils(); - const personalDetails = usePersonalDetails() || CONST.EMPTY_OBJECT; const {translate} = useLocalize(); // The reportAction might not contain details regarding the taskReport @@ -95,13 +92,8 @@ function TaskPreview({ : action?.childStateNum === CONST.REPORT.STATE_NUM.APPROVED && action?.childStatusNum === CONST.REPORT.STATUS_NUM.APPROVED; const taskTitle = Str.htmlEncode(TaskUtils.getTaskTitle(taskReportID, action?.childReportName ?? '')); const taskAssigneeAccountID = Task.getTaskAssigneeAccountID(taskReport) ?? action?.childManagerAccountID ?? ''; - const assigneeLogin = personalDetails[taskAssigneeAccountID]?.login ?? ''; - const assigneeDisplayName = personalDetails[taskAssigneeAccountID]?.displayName ?? ''; - const taskAssignee = assigneeDisplayName || LocalePhoneNumber.formatPhoneNumber(assigneeLogin); const htmlForTaskPreview = - taskAssignee && taskAssigneeAccountID !== 0 - ? `@${taskAssignee} ${taskTitle}` - : `${taskTitle}`; + taskAssigneeAccountID !== 0 ? ` ${taskTitle}` : `${taskTitle}`; const isDeletedParentAction = ReportUtils.isCanceledTaskReport(taskReport, action); if (isDeletedParentAction) { From 6a8161a267ab1228f8735b0ef4dd557d9a5365ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20M=C3=B3rawski?= Date: Wed, 24 Jan 2024 14:30:14 +0100 Subject: [PATCH 06/57] delete the old component --- src/pages/SearchPage.js | 223 ---------------------------------------- 1 file changed, 223 deletions(-) delete mode 100755 src/pages/SearchPage.js diff --git a/src/pages/SearchPage.js b/src/pages/SearchPage.js deleted file mode 100755 index c420371f5a65..000000000000 --- a/src/pages/SearchPage.js +++ /dev/null @@ -1,223 +0,0 @@ -import PropTypes from 'prop-types'; -import React, {useCallback, useEffect, useRef, useState} from 'react'; -import {View} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; -import HeaderWithBackButton from '@components/HeaderWithBackButton'; -import OptionsSelector from '@components/OptionsSelector'; -import ScreenWrapper from '@components/ScreenWrapper'; -import useLocalize from '@hooks/useLocalize'; -import useNetwork from '@hooks/useNetwork'; -import useThemeStyles from '@hooks/useThemeStyles'; -import Navigation from '@libs/Navigation/Navigation'; -import * as OptionsListUtils from '@libs/OptionsListUtils'; -import Performance from '@libs/Performance'; -import * as ReportUtils from '@libs/ReportUtils'; -import * as Report from '@userActions/Report'; -import Timing from '@userActions/Timing'; -import CONST from '@src/CONST'; -import ONYXKEYS from '@src/ONYXKEYS'; -import personalDetailsPropType from './personalDetailsPropType'; -import reportPropTypes from './reportPropTypes'; - -const propTypes = { - /* Onyx Props */ - - /** Beta features list */ - betas: PropTypes.arrayOf(PropTypes.string), - - /** All of the personal details for everyone */ - personalDetails: PropTypes.objectOf(personalDetailsPropType), - - /** All reports shared with the user */ - reports: PropTypes.objectOf(reportPropTypes), - - /** Whether we are searching for reports in the server */ - isSearchingForReports: PropTypes.bool, - - /** - * The navigation prop passed by the navigator. - * - * This is required because transitionEnd event doesn't trigger in the automated testing environment. - */ - navigation: PropTypes.shape({}), -}; - -const defaultProps = { - betas: [], - personalDetails: {}, - reports: {}, - isSearchingForReports: false, - navigation: {}, -}; - -function SearchPage({betas, personalDetails, reports, isSearchingForReports, navigation}) { - const [searchValue, setSearchValue] = useState(''); - const [searchOptions, setSearchOptions] = useState({ - recentReports: {}, - personalDetails: {}, - userToInvite: {}, - }); - - const {isOffline} = useNetwork(); - const {translate} = useLocalize(); - const themeStyles = useThemeStyles(); - const isMounted = useRef(false); - - const updateOptions = useCallback(() => { - const { - recentReports: localRecentReports, - personalDetails: localPersonalDetails, - userToInvite: localUserToInvite, - } = OptionsListUtils.getSearchOptions(reports, personalDetails, searchValue.trim(), betas); - - setSearchOptions({ - recentReports: localRecentReports, - personalDetails: localPersonalDetails, - userToInvite: localUserToInvite, - }); - }, [reports, personalDetails, searchValue, betas]); - - useEffect(() => { - Timing.start(CONST.TIMING.SEARCH_RENDER); - Performance.markStart(CONST.TIMING.SEARCH_RENDER); - }, []); - - useEffect(() => { - updateOptions(); - }, [reports, personalDetails, betas, updateOptions]); - - useEffect(() => { - if (!isMounted.current) { - isMounted.current = true; - return; - } - - updateOptions(); - // Ignoring the rule intentionally, we want to run the code only when search Value changes to prevent additional runs. - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [searchValue]); - - /** - * Returns the sections needed for the OptionsSelector - * - * @returns {Array} - */ - const getSections = () => { - const sections = []; - let indexOffset = 0; - - if (searchOptions.recentReports.length > 0) { - sections.push({ - data: searchOptions.recentReports, - shouldShow: true, - indexOffset, - }); - indexOffset += searchOptions.recentReports.length; - } - - if (searchOptions.personalDetails.length > 0) { - sections.push({ - data: searchOptions.personalDetails, - shouldShow: true, - indexOffset, - }); - indexOffset += searchOptions.recentReports.length; - } - - if (searchOptions.userToInvite) { - sections.push({ - data: [searchOptions.userToInvite], - shouldShow: true, - indexOffset, - }); - } - - return sections; - }; - - const searchRendered = () => { - Timing.end(CONST.TIMING.SEARCH_RENDER); - Performance.markEnd(CONST.TIMING.SEARCH_RENDER); - }; - - const onChangeText = (value = '') => { - Report.searchInServer(searchValue); - setSearchValue(value); - }; - - /** - * Reset the search value and redirect to the selected report - * - * @param {Object} option - */ - const selectReport = (option) => { - if (!option) { - return; - } - if (option.reportID) { - Navigation.dismissModal(option.reportID); - } else { - Report.navigateToAndOpenReport([option.login]); - } - }; - - const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails); - const headerMessage = OptionsListUtils.getHeaderMessage( - searchOptions.recentReports.length + searchOptions.personalDetails.length !== 0, - Boolean(searchOptions.userToInvite), - searchValue, - ); - - return ( - - {({didScreenTransitionEnd, safeAreaPaddingBottomStyle}) => ( - <> - - - - - - )} - - ); -} - -SearchPage.propTypes = propTypes; -SearchPage.defaultProps = defaultProps; -SearchPage.displayName = 'SearchPage'; -export default withOnyx({ - reports: { - key: ONYXKEYS.COLLECTION.REPORT, - }, - personalDetails: { - key: ONYXKEYS.PERSONAL_DETAILS_LIST, - }, - betas: { - key: ONYXKEYS.BETAS, - }, - isSearchingForReports: { - key: ONYXKEYS.IS_SEARCHING_FOR_REPORTS, - initWithStoredValues: false, - }, -})(SearchPage); From c82dbc35ed0caac73b195339112bff99f65bf102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20M=C3=B3rawski?= Date: Wed, 24 Jan 2024 14:30:51 +0100 Subject: [PATCH 07/57] search debounce and loading indicator added --- .../SelectionList/BaseSelectionList.tsx | 2 ++ src/components/SelectionList/types.ts | 3 +++ src/pages/SearchPage/index.js | 16 ++++++++++------ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/SelectionList/BaseSelectionList.tsx b/src/components/SelectionList/BaseSelectionList.tsx index d97c47c84ee7..2c929d2f4f9c 100644 --- a/src/components/SelectionList/BaseSelectionList.tsx +++ b/src/components/SelectionList/BaseSelectionList.tsx @@ -58,6 +58,7 @@ function BaseSelectionList( shouldShowTooltips = true, shouldUseDynamicMaxToRenderPerBatch = false, rightHandSideComponent, + isLoadingNewOptions = false, }: BaseSelectionListProps, inputRef: ForwardedRef, ) { @@ -422,6 +423,7 @@ function BaseSelectionList( spellCheck={false} onSubmitEditing={selectFocusedOption} blurOnSubmit={!!flattenedSections.allOptions.length} + isLoading={isLoadingNewOptions} /> )} diff --git a/src/components/SelectionList/types.ts b/src/components/SelectionList/types.ts index a82ddef6febb..222c818dd66d 100644 --- a/src/components/SelectionList/types.ts +++ b/src/components/SelectionList/types.ts @@ -230,6 +230,9 @@ type BaseSelectionListProps = Partial ReactElement) | ReactElement | null; + + /** Whether to show the loading indicator for new options */ + isLoadingNewOptions?: boolean; }; type ItemLayout = { diff --git a/src/pages/SearchPage/index.js b/src/pages/SearchPage/index.js index 211f3622e06c..8a06d54a1f45 100644 --- a/src/pages/SearchPage/index.js +++ b/src/pages/SearchPage/index.js @@ -29,11 +29,15 @@ const propTypes = { /** All reports shared with the user */ reports: PropTypes.objectOf(reportPropTypes), + + /** Whether or not we are searching for reports on the server */ + isSearchingForReports: PropTypes.bool, }; const defaultProps = { betas: [], reports: {}, + isSearchingForReports: false, }; const setPerformanceTimersEnd = () => { @@ -43,7 +47,7 @@ const setPerformanceTimersEnd = () => { const SearchPageFooterInstance = ; -function SearchPage({betas, reports}) { +function SearchPage({betas, reports, isSearchingForReports}) { const [isScreenTransitionEnd, setIsScreenTransitionEnd] = useState(false); const {translate} = useLocalize(); const {isOffline} = useNetwork(); @@ -59,10 +63,9 @@ function SearchPage({betas, reports}) { Performance.markStart(CONST.TIMING.SEARCH_RENDER); }, []); - const onChangeText = (text = '') => { - Report.searchInServer(text); - setSearchValue(text); - }; + useEffect(() => { + Report.searchInServer(debouncedSearchValue.trim()); + }, [debouncedSearchValue]); const { recentReports, @@ -150,13 +153,14 @@ function SearchPage({betas, reports}) { textInputValue={searchValue} textInputLabel={translate('optionsSelector.nameEmailOrPhoneNumber')} textInputHint={offlineMessage} - onChangeText={onChangeText} + onChangeText={setSearchValue} headerMessage={headerMessage} onLayout={setPerformanceTimersEnd} autoFocus onSelectRow={selectReport} showLoadingPlaceholder={!didScreenTransitionEnd || !isOptionsDataReady} footerContent={SearchPageFooterInstance} + isLoadingNewOptions={isSearchingForReports} /> From ddbe75a9883b46112d2a0d7b42e19b2950c828ef Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 26 Jan 2024 18:26:08 +0700 Subject: [PATCH 08/57] fix: nvalid amount error displayed when value has more than 2 decimals --- .../ReimbursementAccount/ValidationStep.js | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/pages/ReimbursementAccount/ValidationStep.js b/src/pages/ReimbursementAccount/ValidationStep.js index 41f63b22f8f3..93230189b9d9 100644 --- a/src/pages/ReimbursementAccount/ValidationStep.js +++ b/src/pages/ReimbursementAccount/ValidationStep.js @@ -20,8 +20,11 @@ import TextLink from '@components/TextLink'; import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import getPermittedDecimalSeparator from '@libs/getPermittedDecimalSeparator'; import BankAccount from '@libs/models/BankAccount'; import * as ValidationUtils from '@libs/ValidationUtils'; +import withPolicy from '@pages/workspace/withPolicy'; import WorkspaceResetBankAccountModal from '@pages/workspace/WorkspaceResetBankAccountModal'; import * as BankAccounts from '@userActions/BankAccounts'; import * as Report from '@userActions/Report'; @@ -61,23 +64,20 @@ const defaultProps = { * Any dollar amount (e.g. 1.12) will be returned as 112 * * @param {String} amount field input + * @param {RegExp} amountRegex * @returns {String} */ -const filterInput = (amount) => { +const filterInput = (amount, amountRegex?: RegExp) => { let value = amount ? amount.toString().trim() : ''; - if (value === '' || _.isNaN(Number(value)) || !Math.abs(Str.fromUSDToNumber(value))) { + value = value.replace(/^0+|0+$/g, ''); + if (value === '' || _.isNaN(Number(value)) || !Math.abs(Str.fromUSDToNumber(value)) || (amountRegex && !amountRegex.test(value))) { return ''; } - // If the user enters the values in dollars, convert it to the respective cents amount - if (_.contains(value, '.')) { - value = Str.fromUSDToNumber(value); - } - return value; }; -function ValidationStep({reimbursementAccount, translate, onBackButtonPress, account, policyID}) { +function ValidationStep({reimbursementAccount, translate, onBackButtonPress, account, policyID, toLocaleDigit, policy}) { const styles = useThemeStyles(); /** * @param {Object} values - form input values passed by the Form component @@ -85,9 +85,13 @@ function ValidationStep({reimbursementAccount, translate, onBackButtonPress, acc */ const validate = (values) => { const errors = {}; + const decimalSeparator = toLocaleDigit('.'); + const outputCurrency = lodashGet(policy, 'outputCurrency', CONST.CURRENCY.USD); + + const amountRegex = RegExp(String.raw`^-?\d{0,8}([${getPermittedDecimalSeparator(decimalSeparator)}]\d{0,${CurrencyUtils.getCurrencyDecimals(outputCurrency)}})?$`, 'i'); _.each(values, (value, key) => { - const filteredValue = typeof value === 'string' ? filterInput(value) : value; + const filteredValue = typeof value === 'string' ? filterInput(value, amountRegex) : value; if (ValidationUtils.isRequiredFulfilled(filteredValue)) { return; } @@ -231,6 +235,7 @@ ValidationStep.displayName = 'ValidationStep'; export default compose( withLocalize, + withPolicy, withOnyx({ account: { key: ONYXKEYS.ACCOUNT, From 8cf2f20d097b97a7a97b4eba1e351d98a94723a2 Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 26 Jan 2024 18:35:28 +0700 Subject: [PATCH 09/57] fix remove type --- src/pages/ReimbursementAccount/ValidationStep.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ReimbursementAccount/ValidationStep.js b/src/pages/ReimbursementAccount/ValidationStep.js index 93230189b9d9..2bebb4689440 100644 --- a/src/pages/ReimbursementAccount/ValidationStep.js +++ b/src/pages/ReimbursementAccount/ValidationStep.js @@ -67,7 +67,7 @@ const defaultProps = { * @param {RegExp} amountRegex * @returns {String} */ -const filterInput = (amount, amountRegex?: RegExp) => { +const filterInput = (amount, amountRegex) => { let value = amount ? amount.toString().trim() : ''; value = value.replace(/^0+|0+$/g, ''); if (value === '' || _.isNaN(Number(value)) || !Math.abs(Str.fromUSDToNumber(value)) || (amountRegex && !amountRegex.test(value))) { From b758b32583faaa374ffcae91be46944642867665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20M=C3=B3rawski?= Date: Fri, 26 Jan 2024 14:36:55 +0100 Subject: [PATCH 10/57] referral cta bottom padding fix --- src/pages/SearchPage/SearchPageFooter.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/SearchPage/SearchPageFooter.tsx b/src/pages/SearchPage/SearchPageFooter.tsx index e0ef67ad9ec3..3d5ebfd2c193 100644 --- a/src/pages/SearchPage/SearchPageFooter.tsx +++ b/src/pages/SearchPage/SearchPageFooter.tsx @@ -8,7 +8,7 @@ function SearchPageFooter() { const themeStyles = useThemeStyles(); return ( - + ); From 357ef0cdfc7ad9ae20a67214631c2331a1a70521 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Sun, 28 Jan 2024 20:19:53 +0700 Subject: [PATCH 11/57] fix lint --- .../HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js index f5a8e79ae2b9..4da34cf7ba0c 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js @@ -11,7 +11,6 @@ import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalD import useLocalize from '@hooks/useLocalize'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; -import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; import Navigation from '@libs/Navigation/Navigation'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as ReportUtils from '@libs/ReportUtils'; @@ -31,7 +30,6 @@ const propTypes = { function MentionUserRenderer(props) { const styles = useThemeStyles(); const StyleUtils = useStyleUtils(); - const {translate} = useLocalize(); const defaultRendererProps = _.omit(props, ['TDefaultRenderer', 'style']); const htmlAttributeAccountID = lodashGet(props.tnode.attributes, 'accountid'); const personalDetails = usePersonalDetails() || CONST.EMPTY_OBJECT; From caaf8c1994f24a701033e8ab141caaf6a3575757 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Mon, 29 Jan 2024 14:33:58 +0700 Subject: [PATCH 12/57] fix lint --- .../HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js index 4da34cf7ba0c..744fd17d461f 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js @@ -8,7 +8,6 @@ import {ShowContextMenuContext, showContextMenuForReport} from '@components/Show import Text from '@components/Text'; import UserDetailsTooltip from '@components/UserDetailsTooltip'; import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; -import useLocalize from '@hooks/useLocalize'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; From c74a850bcf32d5e350deb2212ace63c94d27fde4 Mon Sep 17 00:00:00 2001 From: Abdelrahman Khattab Date: Thu, 1 Feb 2024 02:48:15 +0200 Subject: [PATCH 13/57] Show participant name in non reimbursable transactions --- src/components/ReportActionItem/ReportPreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 52e9d94eaefd..bb44f54640e8 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -201,7 +201,7 @@ function ReportPreview({ if (isApproved) { return translate('iou.managerApproved', {manager: payerOrApproverName}); } - const managerName = isPolicyExpenseChat ? ReportUtils.getPolicyName(chatReport) : ReportUtils.getDisplayNameForParticipant(managerID, true); + const managerName = isPolicyExpenseChat && !hasNonReimbursableTransactions ? ReportUtils.getPolicyName(chatReport) : ReportUtils.getDisplayNameForParticipant(managerID, true); let paymentVerb: TranslationPaths = hasNonReimbursableTransactions ? 'iou.payerSpent' : 'iou.payerOwes'; if (iouSettled || iouReport?.isWaitingOnBankAccount) { paymentVerb = 'iou.payerPaid'; From 53546d7fe370ccdb8eea240ca908d4d32f5abf6b Mon Sep 17 00:00:00 2001 From: Pavlo Tsimura Date: Thu, 1 Feb 2024 23:21:58 +0100 Subject: [PATCH 14/57] Hide smartScan fields for Scan requests only --- 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 0f1c2b27ad2e..22ff297c11ba 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -372,7 +372,7 @@ function IOURequestStepConfirmation({ iouMerchant={transaction.merchant} iouCreated={transaction.created} isDistanceRequest={requestType === CONST.IOU.REQUEST_TYPE.DISTANCE} - shouldShowSmartScanFields={_.isEmpty(lodashGet(transaction, 'receipt.source', ''))} + shouldShowSmartScanFields={requestType !== CONST.IOU.REQUEST_TYPE.SCAN} /> )} From 1296790702833467b0fd7b5f016afb6ab160957b Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 2 Feb 2024 16:56:01 +0700 Subject: [PATCH 15/57] set default category for distance request only --- 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 029836d0c654..6c3d40dc33ad 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -121,7 +121,7 @@ function IOURequestStepConfirmation({ '', ); useEffect(() => { - if (!_.isEmpty(transaction.category)) { + if (requestType !== CONST.IOU.REQUEST_TYPE.DISTANCE || !_.isEmpty(transaction.category)) { return; } IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory); From cbbc7a37cb7903fe7028ba170b86c06d4cdf736b Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 2 Feb 2024 17:01:13 +0700 Subject: [PATCH 16/57] fix lint --- 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 acd66fb1a3ed..560e87b6d802 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -125,7 +125,7 @@ function IOURequestStepConfirmation({ return; } IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory); - }, [transactionID, transaction.category, defaultCategory]); + }, [transactionID, transaction.category, requestType, defaultCategory]); const navigateBack = useCallback(() => { // If there is not a report attached to the IOU with a reportID, then the participants were manually selected and the user needs taken From 5a365b4d4c7de9aed418404d121927be699e97d8 Mon Sep 17 00:00:00 2001 From: Abdelrahman Khattab Date: Mon, 5 Feb 2024 10:06:48 +0200 Subject: [PATCH 17/57] changing the the report name in the search tab as well --- src/components/ReportActionItem/ReportPreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index bb44f54640e8..52e9d94eaefd 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -201,7 +201,7 @@ function ReportPreview({ if (isApproved) { return translate('iou.managerApproved', {manager: payerOrApproverName}); } - const managerName = isPolicyExpenseChat && !hasNonReimbursableTransactions ? ReportUtils.getPolicyName(chatReport) : ReportUtils.getDisplayNameForParticipant(managerID, true); + const managerName = isPolicyExpenseChat ? ReportUtils.getPolicyName(chatReport) : ReportUtils.getDisplayNameForParticipant(managerID, true); let paymentVerb: TranslationPaths = hasNonReimbursableTransactions ? 'iou.payerSpent' : 'iou.payerOwes'; if (iouSettled || iouReport?.isWaitingOnBankAccount) { paymentVerb = 'iou.payerPaid'; From 7accee559695113ae345fa83966984970c16a489 Mon Sep 17 00:00:00 2001 From: Abdelrahman Khattab Date: Mon, 5 Feb 2024 10:09:35 +0200 Subject: [PATCH 18/57] changing the the report name in the search tab as well --- src/libs/ReportUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 228db29aea6c..7738a4889a69 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1856,7 +1856,8 @@ function getPolicyExpenseChatName(report: OnyxEntry, policy: OnyxEntry

, policy: OnyxEntry | undefined = undefined): string { const moneyRequestTotal = getMoneyRequestSpendBreakdown(report).totalDisplaySpend; const formattedAmount = CurrencyUtils.convertToDisplayString(moneyRequestTotal, report?.currency, hasOnlyDistanceRequestTransactions(report?.reportID)); - const payerOrApproverName = isExpenseReport(report) ? getPolicyName(report, false, policy) : getDisplayNameForParticipant(report?.managerID) ?? ''; + const payerOrApproverName = + isExpenseReport(report) && !hasNonReimbursableTransactions(report?.reportID ?? '') ? getPolicyName(report, false, policy) : getDisplayNameForParticipant(report?.managerID) ?? ''; const payerPaidAmountMessage = Localize.translateLocal('iou.payerPaidAmount', { payer: payerOrApproverName, amount: formattedAmount, From 80f96216d3bef94ef4f3997293ccc9709756aeaf Mon Sep 17 00:00:00 2001 From: Abdelrahman Khattab Date: Mon, 5 Feb 2024 10:12:38 +0200 Subject: [PATCH 19/57] minor --- src/components/ReportActionItem/ReportPreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 52e9d94eaefd..bb44f54640e8 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -201,7 +201,7 @@ function ReportPreview({ if (isApproved) { return translate('iou.managerApproved', {manager: payerOrApproverName}); } - const managerName = isPolicyExpenseChat ? ReportUtils.getPolicyName(chatReport) : ReportUtils.getDisplayNameForParticipant(managerID, true); + const managerName = isPolicyExpenseChat && !hasNonReimbursableTransactions ? ReportUtils.getPolicyName(chatReport) : ReportUtils.getDisplayNameForParticipant(managerID, true); let paymentVerb: TranslationPaths = hasNonReimbursableTransactions ? 'iou.payerSpent' : 'iou.payerOwes'; if (iouSettled || iouReport?.isWaitingOnBankAccount) { paymentVerb = 'iou.payerPaid'; From b94b7d9ded24bbcae8cdf5d8575ce75b612f759f Mon Sep 17 00:00:00 2001 From: Jakub Butkiewicz Date: Mon, 5 Feb 2024 15:02:56 +0100 Subject: [PATCH 20/57] ref: move react-navigation mock to TS --- __mocks__/@react-navigation/native/{index.js => index.ts} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename __mocks__/@react-navigation/native/{index.js => index.ts} (69%) diff --git a/__mocks__/@react-navigation/native/index.js b/__mocks__/@react-navigation/native/index.ts similarity index 69% rename from __mocks__/@react-navigation/native/index.js rename to __mocks__/@react-navigation/native/index.ts index 09abd0d02bf9..4d0c63d28fce 100644 --- a/__mocks__/@react-navigation/native/index.js +++ b/__mocks__/@react-navigation/native/index.ts @@ -1,7 +1,7 @@ import {useIsFocused as realUseIsFocused} from '@react-navigation/native'; // We only want this mocked for storybook, not jest -const useIsFocused = process.env.NODE_ENV === 'test' ? realUseIsFocused : () => true; +const useIsFocused: () => boolean = process.env.NODE_ENV === 'test' ? realUseIsFocused : () => true; export * from '@react-navigation/core'; export * from '@react-navigation/native'; From 17b08301631205b41d9fe0f0236b5be29b8dc2fe Mon Sep 17 00:00:00 2001 From: Jakub Butkiewicz Date: Mon, 5 Feb 2024 15:25:28 +0100 Subject: [PATCH 21/57] fix: used better type --- __mocks__/@react-navigation/native/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__mocks__/@react-navigation/native/index.ts b/__mocks__/@react-navigation/native/index.ts index 4d0c63d28fce..aa8067a1c862 100644 --- a/__mocks__/@react-navigation/native/index.ts +++ b/__mocks__/@react-navigation/native/index.ts @@ -1,7 +1,7 @@ import {useIsFocused as realUseIsFocused} from '@react-navigation/native'; // We only want this mocked for storybook, not jest -const useIsFocused: () => boolean = process.env.NODE_ENV === 'test' ? realUseIsFocused : () => true; +const useIsFocused: typeof realUseIsFocused = process.env.NODE_ENV === 'test' ? realUseIsFocused : () => true; export * from '@react-navigation/core'; export * from '@react-navigation/native'; From 85f2dc1763c9f0b2defdabd451f082a9d6a67dba Mon Sep 17 00:00:00 2001 From: Abdelrahman Khattab Date: Mon, 5 Feb 2024 17:51:48 +0200 Subject: [PATCH 22/57] fix LHN titles to show the participant name for reimbursable transactions as well --- src/libs/ReportUtils.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index ad12339a4338..4e5aaf46cf86 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -2257,9 +2257,10 @@ function getReportPreviewMessage( } } + const containsNonReimbursable = hasNonReimbursableTransactions(report.reportID); const totalAmount = getMoneyRequestSpendBreakdown(report).totalDisplaySpend; const policyName = getPolicyName(report, false, policy); - const payerName = isExpenseReport(report) ? policyName : getDisplayNameForParticipant(report.managerID, !isPreviewMessageForParentChatReport); + const payerName = isExpenseReport(report) && !containsNonReimbursable ? policyName : getDisplayNameForParticipant(report.managerID, !isPreviewMessageForParentChatReport); const formattedAmount = CurrencyUtils.convertToDisplayString(totalAmount, report.currency); @@ -2303,8 +2304,6 @@ function getReportPreviewMessage( return Localize.translateLocal('iou.waitingOnBankAccount', {submitterDisplayName}); } - const containsNonReimbursable = hasNonReimbursableTransactions(report.reportID); - const lastActorID = reportAction?.actorAccountID; // if we have the amount in the originalMessage and lastActorID, we can use that to display the preview message for the latest request From 069e83e0abd8e46ab03427b7a959062bab7a3863 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 6 Feb 2024 01:13:59 +0700 Subject: [PATCH 23/57] revert change --- .../HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js index 744fd17d461f..e3718a7de960 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js @@ -57,7 +57,7 @@ function MentionUserRenderer(props) { if (!_.isEmpty(htmlAttributeAccountID)) { const user = lodashGet(personalDetails, htmlAttributeAccountID); accountID = parseInt(htmlAttributeAccountID, 10); - displayNameOrLogin = ReportUtils.getDisplayNameForParticipant(accountID); + displayNameOrLogin = lodashGet(user, 'displayName', '') || LocalePhoneNumber.formatPhoneNumber(lodashGet(user, 'login', '')) || translate('common.hidden'); displayNameOrLogin = getMentionDisplayText(displayNameOrLogin, htmlAttributeAccountID, lodashGet(user, 'login', '')); navigationRoute = ROUTES.PROFILE.getRoute(htmlAttributeAccountID); } else if (!_.isEmpty(tnode.data)) { From 03743f793a96b3ad60f21f0adb633174c8c90d6c Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 6 Feb 2024 08:04:32 +0700 Subject: [PATCH 24/57] fix lint --- .../HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js index e3718a7de960..cd6ada90b58b 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js @@ -8,8 +8,10 @@ import {ShowContextMenuContext, showContextMenuForReport} from '@components/Show import Text from '@components/Text'; import UserDetailsTooltip from '@components/UserDetailsTooltip'; import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; +import useLocalize from '@hooks/useLocalize'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; +import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; import Navigation from '@libs/Navigation/Navigation'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as ReportUtils from '@libs/ReportUtils'; @@ -29,6 +31,7 @@ const propTypes = { function MentionUserRenderer(props) { const styles = useThemeStyles(); const StyleUtils = useStyleUtils(); + const {translate} = useLocalize(); const defaultRendererProps = _.omit(props, ['TDefaultRenderer', 'style']); const htmlAttributeAccountID = lodashGet(props.tnode.attributes, 'accountid'); const personalDetails = usePersonalDetails() || CONST.EMPTY_OBJECT; From d7de25978c7c548ae3bfd515522a86f253f8b5ea Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 6 Feb 2024 10:00:33 +0700 Subject: [PATCH 25/57] fix back loop between expensify card and active card page --- src/pages/settings/Wallet/ActivatePhysicalCardPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Wallet/ActivatePhysicalCardPage.js b/src/pages/settings/Wallet/ActivatePhysicalCardPage.js index 947252649cc4..649e42bfffbe 100644 --- a/src/pages/settings/Wallet/ActivatePhysicalCardPage.js +++ b/src/pages/settings/Wallet/ActivatePhysicalCardPage.js @@ -133,7 +133,7 @@ function ActivatePhysicalCardPage({ return ( Navigation.navigate(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(domain))} + onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(domain))} backgroundColor={theme.PAGE_THEMES[SCREENS.SETTINGS.PREFERENCES.ROOT].backgroundColor} illustration={LottieAnimations.Magician} scrollViewContainerStyles={[styles.mnh100]} From 3aa35d27473f9cc671adc5dbac63cbc026c27ff3 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 6 Feb 2024 12:43:25 +0800 Subject: [PATCH 26/57] memoize the sections --- src/components/ValuePicker/ValueSelectorModal.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/ValuePicker/ValueSelectorModal.js b/src/components/ValuePicker/ValueSelectorModal.js index e45ba873d8a3..34a84d7595ea 100644 --- a/src/components/ValuePicker/ValueSelectorModal.js +++ b/src/components/ValuePicker/ValueSelectorModal.js @@ -1,6 +1,6 @@ import _ from 'lodash'; import PropTypes from 'prop-types'; -import React, {useEffect, useState} from 'react'; +import React, {useEffect, useMemo, useState} from 'react'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import Modal from '@components/Modal'; import ScreenWrapper from '@components/ScreenWrapper'; @@ -42,11 +42,9 @@ const defaultProps = { function ValueSelectorModal({items, selectedItem, label, isVisible, onClose, onItemSelected, shouldShowTooltips}) { const styles = useThemeStyles(); - const [sectionsData, setSectionsData] = useState([]); - - useEffect(() => { + const sections = useMemo(() => { const itemsData = _.map(items, (item) => ({value: item.value, alternateText: item.description, keyForList: item.value, text: item.label, isSelected: item === selectedItem})); - setSectionsData(itemsData); + return [{data: itemsData}]; }, [items, selectedItem]); return ( @@ -69,7 +67,7 @@ function ValueSelectorModal({items, selectedItem, label, isVisible, onClose, onI onBackButtonPress={onClose} /> Date: Tue, 6 Feb 2024 13:03:08 +0800 Subject: [PATCH 27/57] remove unused import --- src/components/ValuePicker/ValueSelectorModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ValuePicker/ValueSelectorModal.js b/src/components/ValuePicker/ValueSelectorModal.js index 34a84d7595ea..f93df86c9ab9 100644 --- a/src/components/ValuePicker/ValueSelectorModal.js +++ b/src/components/ValuePicker/ValueSelectorModal.js @@ -1,6 +1,6 @@ import _ from 'lodash'; import PropTypes from 'prop-types'; -import React, {useEffect, useMemo, useState} from 'react'; +import React, {useMemo} from 'react'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import Modal from '@components/Modal'; import ScreenWrapper from '@components/ScreenWrapper'; From e45d6e0865ccbfd814a7762bf7401938fa494a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20M=C3=B3rawski?= Date: Tue, 6 Feb 2024 12:58:31 +0100 Subject: [PATCH 28/57] simplifying referral CTA dismissing --- src/components/ReferralProgramCTA.tsx | 32 ++- src/pages/SearchPage.js | 227 ---------------------- src/pages/SearchPage/SearchPageFooter.tsx | 37 +--- 3 files changed, 31 insertions(+), 265 deletions(-) delete mode 100755 src/pages/SearchPage.js diff --git a/src/components/ReferralProgramCTA.tsx b/src/components/ReferralProgramCTA.tsx index f1c7539cc6b5..4e0ed1f573f9 100644 --- a/src/components/ReferralProgramCTA.tsx +++ b/src/components/ReferralProgramCTA.tsx @@ -1,32 +1,45 @@ import React from 'react'; +import {withOnyx} from 'react-native-onyx'; import useLocalize from '@hooks/useLocalize'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; +import * as User from '@userActions/User'; import CONST from '@src/CONST'; import Navigation from '@src/libs/Navigation/Navigation'; +import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; +import type {DismissedReferralBanners} from '@src/types/onyx/Account'; import Icon from './Icon'; import {Close} from './Icon/Expensicons'; import {PressableWithoutFeedback} from './Pressable'; import Text from './Text'; import Tooltip from './Tooltip'; -type ReferralProgramCTAProps = { +type ReferralProgramCTAOnyxProps = { + dismissedReferralBanners: DismissedReferralBanners; +}; + +type ReferralProgramCTAProps = ReferralProgramCTAOnyxProps & { referralContentType: | typeof CONST.REFERRAL_PROGRAM.CONTENT_TYPES.MONEY_REQUEST | typeof CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT | typeof CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SEND_MONEY | typeof CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND; - - /** Method to trigger when pressing close button of the banner */ - onCloseButtonPress?: () => void; }; -function ReferralProgramCTA({referralContentType, onCloseButtonPress = () => {}}: ReferralProgramCTAProps) { +function ReferralProgramCTA({referralContentType, dismissedReferralBanners}: ReferralProgramCTAProps) { const {translate} = useLocalize(); const styles = useThemeStyles(); const theme = useTheme(); + const handleDismissCallToAction = () => { + User.dismissReferralBanner(CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND); + }; + + if (!referralContentType || dismissedReferralBanners[referralContentType]) { + return null; + } + return ( { @@ -47,7 +60,7 @@ function ReferralProgramCTA({referralContentType, onCloseButtonPress = () => {}} { e.preventDefault(); }} @@ -67,4 +80,9 @@ function ReferralProgramCTA({referralContentType, onCloseButtonPress = () => {}} ); } -export default ReferralProgramCTA; +export default withOnyx({ + dismissedReferralBanners: { + key: ONYXKEYS.ACCOUNT, + selector: (data) => data?.dismissedReferralBanners ?? {}, + }, +})(ReferralProgramCTA); diff --git a/src/pages/SearchPage.js b/src/pages/SearchPage.js deleted file mode 100755 index d8eef6f447ae..000000000000 --- a/src/pages/SearchPage.js +++ /dev/null @@ -1,227 +0,0 @@ -import PropTypes from 'prop-types'; -import React, {useCallback, useEffect, useRef, useState} from 'react'; -import {View} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; -import HeaderWithBackButton from '@components/HeaderWithBackButton'; -import OptionsSelector from '@components/OptionsSelector'; -import ScreenWrapper from '@components/ScreenWrapper'; -import useLocalize from '@hooks/useLocalize'; -import useNetwork from '@hooks/useNetwork'; -import useThemeStyles from '@hooks/useThemeStyles'; -import Navigation from '@libs/Navigation/Navigation'; -import * as OptionsListUtils from '@libs/OptionsListUtils'; -import Performance from '@libs/Performance'; -import * as ReportUtils from '@libs/ReportUtils'; -import * as Report from '@userActions/Report'; -import Timing from '@userActions/Timing'; -import CONST from '@src/CONST'; -import ONYXKEYS from '@src/ONYXKEYS'; -import personalDetailsPropType from './personalDetailsPropType'; -import reportPropTypes from './reportPropTypes'; - -const propTypes = { - /* Onyx Props */ - - /** Beta features list */ - betas: PropTypes.arrayOf(PropTypes.string), - - /** All of the personal details for everyone */ - personalDetails: PropTypes.objectOf(personalDetailsPropType), - - /** All reports shared with the user */ - reports: PropTypes.objectOf(reportPropTypes), - - /** Whether we are searching for reports in the server */ - isSearchingForReports: PropTypes.bool, - - /** - * The navigation prop passed by the navigator. - * - * This is required because transitionEnd event doesn't trigger in the automated testing environment. - */ - navigation: PropTypes.shape({}), -}; - -const defaultProps = { - betas: [], - personalDetails: {}, - reports: {}, - isSearchingForReports: false, - navigation: {}, -}; - -function SearchPage({betas, personalDetails, reports, isSearchingForReports, navigation}) { - const [searchValue, setSearchValue] = useState(''); - const [searchOptions, setSearchOptions] = useState({ - recentReports: {}, - personalDetails: {}, - userToInvite: {}, - }); - - const {isOffline} = useNetwork(); - const {translate} = useLocalize(); - const themeStyles = useThemeStyles(); - const isMounted = useRef(false); - - const updateOptions = useCallback(() => { - const { - recentReports: localRecentReports, - personalDetails: localPersonalDetails, - userToInvite: localUserToInvite, - } = OptionsListUtils.getSearchOptions(reports, personalDetails, searchValue.trim(), betas); - - setSearchOptions({ - recentReports: localRecentReports, - personalDetails: localPersonalDetails, - userToInvite: localUserToInvite, - }); - }, [reports, personalDetails, searchValue, betas]); - - useEffect(() => { - Timing.start(CONST.TIMING.SEARCH_RENDER); - Performance.markStart(CONST.TIMING.SEARCH_RENDER); - }, []); - - useEffect(() => { - updateOptions(); - }, [reports, personalDetails, betas, updateOptions]); - - useEffect(() => { - if (!isMounted.current) { - isMounted.current = true; - return; - } - - updateOptions(); - // Ignoring the rule intentionally, we want to run the code only when search Value changes to prevent additional runs. - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [searchValue]); - - /** - * Returns the sections needed for the OptionsSelector - * - * @returns {Array} - */ - const getSections = () => { - const sections = []; - let indexOffset = 0; - - if (searchOptions.recentReports.length > 0) { - sections.push({ - data: searchOptions.recentReports, - shouldShow: true, - indexOffset, - }); - indexOffset += searchOptions.recentReports.length; - } - - if (searchOptions.personalDetails.length > 0) { - sections.push({ - data: searchOptions.personalDetails, - shouldShow: true, - indexOffset, - }); - indexOffset += searchOptions.recentReports.length; - } - - if (searchOptions.userToInvite) { - sections.push({ - data: [searchOptions.userToInvite], - shouldShow: true, - indexOffset, - }); - } - - return sections; - }; - - const searchRendered = () => { - Timing.end(CONST.TIMING.SEARCH_RENDER); - Performance.markEnd(CONST.TIMING.SEARCH_RENDER); - }; - - const onChangeText = (value = '') => { - Report.searchInServer(searchValue); - setSearchValue(value); - }; - - /** - * Reset the search value and redirect to the selected report - * - * @param {Object} option - */ - const selectReport = (option) => { - if (!option) { - return; - } - if (option.reportID) { - Navigation.dismissModal(option.reportID); - } else { - Report.navigateToAndOpenReport([option.login]); - } - }; - - const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails); - const headerMessage = OptionsListUtils.getHeaderMessage( - searchOptions.recentReports.length + searchOptions.personalDetails.length !== 0, - Boolean(searchOptions.userToInvite), - searchValue, - ); - - return ( - - {({didScreenTransitionEnd, safeAreaPaddingBottomStyle}) => ( - <> - - - - - - )} - - ); -} - -SearchPage.propTypes = propTypes; -SearchPage.defaultProps = defaultProps; -SearchPage.displayName = 'SearchPage'; -export default withOnyx({ - reports: { - key: ONYXKEYS.COLLECTION.REPORT, - }, - personalDetails: { - key: ONYXKEYS.PERSONAL_DETAILS_LIST, - }, - betas: { - key: ONYXKEYS.BETAS, - }, - isSearchingForReports: { - key: ONYXKEYS.IS_SEARCHING_FOR_REPORTS, - initWithStoredValues: false, - }, -})(SearchPage); diff --git a/src/pages/SearchPage/SearchPageFooter.tsx b/src/pages/SearchPage/SearchPageFooter.tsx index fcc04d8bc5af..3d5ebfd2c193 100644 --- a/src/pages/SearchPage/SearchPageFooter.tsx +++ b/src/pages/SearchPage/SearchPageFooter.tsx @@ -1,44 +1,19 @@ -import React, {useState} from 'react'; +import React from 'react'; import {View} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; import ReferralProgramCTA from '@components/ReferralProgramCTA'; import useThemeStyles from '@hooks/useThemeStyles'; -import * as User from '@userActions/User'; import CONST from '@src/CONST'; -import ONYXKEYS from '@src/ONYXKEYS'; -import type {DismissedReferralBanners} from '@src/types/onyx/Account'; -type SearchPageFooterOnyxProps = { - dismissedReferralBanners: DismissedReferralBanners; -}; -function SearchPageFooter({dismissedReferralBanners}: SearchPageFooterOnyxProps) { - const [shouldShowReferralCTA, setShouldShowReferralCTA] = useState(!dismissedReferralBanners[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]); +function SearchPageFooter() { const themeStyles = useThemeStyles(); - const closeCallToActionBanner = () => { - setShouldShowReferralCTA(false); - User.dismissReferralBanner(CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND); - }; - return ( - <> - {shouldShowReferralCTA && ( - - - - )} - + + + ); } SearchPageFooter.displayName = 'SearchPageFooter'; -export default withOnyx({ - dismissedReferralBanners: { - key: ONYXKEYS.ACCOUNT, - selector: (data) => data?.dismissedReferralBanners ?? {}, - }, -})(SearchPageFooter); +export default SearchPageFooter; From b19b85744b5627bf87181eb9be65c1ec813922a4 Mon Sep 17 00:00:00 2001 From: VickyStash Date: Tue, 6 Feb 2024 17:11:25 +0100 Subject: [PATCH 29/57] Fix crash on iOS if requestAmount is 0 --- src/components/ReportActionItem/MoneyRequestPreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview.tsx b/src/components/ReportActionItem/MoneyRequestPreview.tsx index f321c63375d0..70a313c77e9e 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview.tsx @@ -321,7 +321,7 @@ function MoneyRequestPreview({ {shouldShowDescription && } {shouldShowMerchant && {merchantOrDescription}} - {isBillSplit && participantAccountIDs.length > 0 && requestAmount && requestAmount > 0 && ( + {isBillSplit && participantAccountIDs.length > 0 && !!requestAmount && requestAmount > 0 && ( {translate('iou.amountEach', { amount: CurrencyUtils.convertToDisplayString( From e4d0d92a2293e21abf9a4d60cd3ccf7e1a0f17b6 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Tue, 6 Feb 2024 18:27:35 +0200 Subject: [PATCH 30/57] Fix warning on the server --- src/libs/actions/IOU.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index a7a82e642e62..4e43b16b6ccf 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -3071,7 +3071,7 @@ function getSendMoneyParams( paymentMethodType, transactionID: optimisticTransaction.transactionID, newIOUReportDetails, - createdReportActionID: isNewChat ? optimisticCreatedAction.reportActionID : '', + createdReportActionID: isNewChat ? optimisticCreatedAction.reportActionID : '0', reportPreviewReportActionID: reportPreviewAction.reportActionID, }, optimisticData, From cadc4967bf9d94884e5e0e31c0fb2eeb531b28c2 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 6 Feb 2024 11:43:11 -0500 Subject: [PATCH 31/57] fix lint on main --- src/components/MenuItem.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index 0bf649b54a6e..4d7089fb24bd 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -384,7 +384,11 @@ function MenuItem( onPress(event); return; } - singleExecution(waitForNavigate(() => onPress(event)))(); + singleExecution( + waitForNavigate(() => { + onPress(event); + }), + )(); } }; From 3199e7e225f1469f10c2447c158d5e04f42b1945 Mon Sep 17 00:00:00 2001 From: Filip Solecki Date: Tue, 6 Feb 2024 18:15:48 +0100 Subject: [PATCH 32/57] Fix after regression --- src/pages/ShareCodePage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/ShareCodePage.tsx b/src/pages/ShareCodePage.tsx index 831f0eb8f1d8..dcfb9f6861bf 100644 --- a/src/pages/ShareCodePage.tsx +++ b/src/pages/ShareCodePage.tsx @@ -109,7 +109,8 @@ function ShareCodePage({report, session, currentUserPersonalDetails}: ShareCodeP isAnonymousAction title={translate('common.download')} icon={Expensicons.Download} - onPress={qrCodeRef.current?.download} + // eslint-disable-next-line @typescript-eslint/no-misused-promises + onPress={() => qrCodeRef.current?.download?.()} /> )} From 6f8a5d555b0caa52135a2d7f2876fc74be6a7fd0 Mon Sep 17 00:00:00 2001 From: caitlinwhite1 Date: Tue, 6 Feb 2024 11:28:33 -0600 Subject: [PATCH 33/57] update Account Settings to Settings --- docs/_data/_routes.yml | 4 ++-- .../{account-settings => Settings}/Account-Details.md | 0 .../{account-settings => Settings}/Close-Account.md | 0 .../{account-settings => Settings}/Copilot.md | 0 .../{account-settings => Settings}/Merge-Accounts.md | 0 .../Notification-Troubleshooting.md | 0 .../{account-settings => Settings}/Preferences.md | 0 .../hubs/{account-settings => settings}/index.html | 0 8 files changed, 2 insertions(+), 2 deletions(-) rename docs/articles/expensify-classic/{account-settings => Settings}/Account-Details.md (100%) rename docs/articles/expensify-classic/{account-settings => Settings}/Close-Account.md (100%) rename docs/articles/expensify-classic/{account-settings => Settings}/Copilot.md (100%) rename docs/articles/expensify-classic/{account-settings => Settings}/Merge-Accounts.md (100%) rename docs/articles/expensify-classic/{account-settings => Settings}/Notification-Troubleshooting.md (100%) rename docs/articles/expensify-classic/{account-settings => Settings}/Preferences.md (100%) rename docs/expensify-classic/hubs/{account-settings => settings}/index.html (100%) diff --git a/docs/_data/_routes.yml b/docs/_data/_routes.yml index 33ef4ebcf0a8..d355e53d8a52 100644 --- a/docs/_data/_routes.yml +++ b/docs/_data/_routes.yml @@ -19,8 +19,8 @@ platforms: icon: /assets/images/accounting.svg description: From setting up your account to ensuring you get the most out of Expensify’s suite of features, click here to get started on streamlining your expense management journey. - - href: account-settings - title: Account Settings + - href: settings + title: Settings icon: /assets/images/gears.svg description: Discover how to personalize your profile, add secondary logins, and grant delegated access to employees with our comprehensive guide on Account Settings. diff --git a/docs/articles/expensify-classic/account-settings/Account-Details.md b/docs/articles/expensify-classic/Settings/Account-Details.md similarity index 100% rename from docs/articles/expensify-classic/account-settings/Account-Details.md rename to docs/articles/expensify-classic/Settings/Account-Details.md diff --git a/docs/articles/expensify-classic/account-settings/Close-Account.md b/docs/articles/expensify-classic/Settings/Close-Account.md similarity index 100% rename from docs/articles/expensify-classic/account-settings/Close-Account.md rename to docs/articles/expensify-classic/Settings/Close-Account.md diff --git a/docs/articles/expensify-classic/account-settings/Copilot.md b/docs/articles/expensify-classic/Settings/Copilot.md similarity index 100% rename from docs/articles/expensify-classic/account-settings/Copilot.md rename to docs/articles/expensify-classic/Settings/Copilot.md diff --git a/docs/articles/expensify-classic/account-settings/Merge-Accounts.md b/docs/articles/expensify-classic/Settings/Merge-Accounts.md similarity index 100% rename from docs/articles/expensify-classic/account-settings/Merge-Accounts.md rename to docs/articles/expensify-classic/Settings/Merge-Accounts.md diff --git a/docs/articles/expensify-classic/account-settings/Notification-Troubleshooting.md b/docs/articles/expensify-classic/Settings/Notification-Troubleshooting.md similarity index 100% rename from docs/articles/expensify-classic/account-settings/Notification-Troubleshooting.md rename to docs/articles/expensify-classic/Settings/Notification-Troubleshooting.md diff --git a/docs/articles/expensify-classic/account-settings/Preferences.md b/docs/articles/expensify-classic/Settings/Preferences.md similarity index 100% rename from docs/articles/expensify-classic/account-settings/Preferences.md rename to docs/articles/expensify-classic/Settings/Preferences.md diff --git a/docs/expensify-classic/hubs/account-settings/index.html b/docs/expensify-classic/hubs/settings/index.html similarity index 100% rename from docs/expensify-classic/hubs/account-settings/index.html rename to docs/expensify-classic/hubs/settings/index.html From 541d7ef6818f832e49836866e536fe45b925c0dc Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Tue, 6 Feb 2024 19:29:55 +0200 Subject: [PATCH 34/57] Fix 2 more fallback ids --- src/libs/actions/IOU.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index dd118c36a8a1..d23a52088642 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -918,7 +918,7 @@ function createDistanceRequest( // If the report is an iou or expense report, we should get the linked chat report to be passed to the getMoneyRequestInformation function const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report); const currentChatReport = isMoneyRequestReport ? ReportUtils.getReport(report.chatReportID) : report; - const moneyRequestReportID = isMoneyRequestReport ? report.reportID : ''; + const moneyRequestReportID = isMoneyRequestReport ? report.reportID : '0'; const currentCreated = DateUtils.enrichMoneyRequestTimestamp(created); const optimisticReceipt: Receipt = { @@ -1276,7 +1276,7 @@ function requestMoney( // If the report is iou or expense report, we should get the linked chat report to be passed to the getMoneyRequestInformation function const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report); const currentChatReport = isMoneyRequestReport ? ReportUtils.getReport(report.chatReportID) : report; - const moneyRequestReportID = isMoneyRequestReport ? report.reportID : ''; + const moneyRequestReportID = isMoneyRequestReport ? report.reportID : '0'; const currentCreated = DateUtils.enrichMoneyRequestTimestamp(created); const {payerAccountID, payerEmail, iouReport, chatReport, transaction, iouAction, createdChatReportActionID, createdIOUReportActionID, reportPreviewAction, onyxData} = getMoneyRequestInformation( From 0736a70e0ff318a527ced47c1c8436921b08e99a Mon Sep 17 00:00:00 2001 From: caitlinwhite1 Date: Tue, 6 Feb 2024 12:04:54 -0600 Subject: [PATCH 35/57] updating Settings to settings --- .../expensify-classic/{Settings => settings}/Account-Details.md | 0 .../expensify-classic/{Settings => settings}/Close-Account.md | 0 docs/articles/expensify-classic/{Settings => settings}/Copilot.md | 0 .../expensify-classic/{Settings => settings}/Merge-Accounts.md | 0 .../{Settings => settings}/Notification-Troubleshooting.md | 0 .../expensify-classic/{Settings => settings}/Preferences.md | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename docs/articles/expensify-classic/{Settings => settings}/Account-Details.md (100%) rename docs/articles/expensify-classic/{Settings => settings}/Close-Account.md (100%) rename docs/articles/expensify-classic/{Settings => settings}/Copilot.md (100%) rename docs/articles/expensify-classic/{Settings => settings}/Merge-Accounts.md (100%) rename docs/articles/expensify-classic/{Settings => settings}/Notification-Troubleshooting.md (100%) rename docs/articles/expensify-classic/{Settings => settings}/Preferences.md (100%) diff --git a/docs/articles/expensify-classic/Settings/Account-Details.md b/docs/articles/expensify-classic/settings/Account-Details.md similarity index 100% rename from docs/articles/expensify-classic/Settings/Account-Details.md rename to docs/articles/expensify-classic/settings/Account-Details.md diff --git a/docs/articles/expensify-classic/Settings/Close-Account.md b/docs/articles/expensify-classic/settings/Close-Account.md similarity index 100% rename from docs/articles/expensify-classic/Settings/Close-Account.md rename to docs/articles/expensify-classic/settings/Close-Account.md diff --git a/docs/articles/expensify-classic/Settings/Copilot.md b/docs/articles/expensify-classic/settings/Copilot.md similarity index 100% rename from docs/articles/expensify-classic/Settings/Copilot.md rename to docs/articles/expensify-classic/settings/Copilot.md diff --git a/docs/articles/expensify-classic/Settings/Merge-Accounts.md b/docs/articles/expensify-classic/settings/Merge-Accounts.md similarity index 100% rename from docs/articles/expensify-classic/Settings/Merge-Accounts.md rename to docs/articles/expensify-classic/settings/Merge-Accounts.md diff --git a/docs/articles/expensify-classic/Settings/Notification-Troubleshooting.md b/docs/articles/expensify-classic/settings/Notification-Troubleshooting.md similarity index 100% rename from docs/articles/expensify-classic/Settings/Notification-Troubleshooting.md rename to docs/articles/expensify-classic/settings/Notification-Troubleshooting.md diff --git a/docs/articles/expensify-classic/Settings/Preferences.md b/docs/articles/expensify-classic/settings/Preferences.md similarity index 100% rename from docs/articles/expensify-classic/Settings/Preferences.md rename to docs/articles/expensify-classic/settings/Preferences.md From 2831fef789dfab1114f965037243425650128b0d Mon Sep 17 00:00:00 2001 From: Youssef Lourayad Date: Tue, 6 Feb 2024 19:13:01 +0100 Subject: [PATCH 36/57] Fix condition evaluation to false due to param being a string --- src/components/ReportActionItem/MoneyRequestAction.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestAction.tsx b/src/components/ReportActionItem/MoneyRequestAction.tsx index ff29bf5b0ee8..82098b52f2c3 100644 --- a/src/components/ReportActionItem/MoneyRequestAction.tsx +++ b/src/components/ReportActionItem/MoneyRequestAction.tsx @@ -92,7 +92,7 @@ function MoneyRequestAction({ } // If the childReportID is not present, we need to create a new thread - const childReportID = action?.childReportID ?? '0'; + const childReportID = action?.childReportID ?? 0; if (!childReportID) { const thread = ReportUtils.buildTransactionThread(action, requestReportID); const userLogins = PersonalDetailsUtils.getLoginsByAccountIDs(thread.participantAccountIDs ?? []); From 19c11c852c3b06f0eeeacc62ed7f571da2f89a70 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Tue, 6 Feb 2024 20:29:16 +0200 Subject: [PATCH 37/57] Revert last change --- src/libs/actions/IOU.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index d23a52088642..dd118c36a8a1 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -918,7 +918,7 @@ function createDistanceRequest( // If the report is an iou or expense report, we should get the linked chat report to be passed to the getMoneyRequestInformation function const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report); const currentChatReport = isMoneyRequestReport ? ReportUtils.getReport(report.chatReportID) : report; - const moneyRequestReportID = isMoneyRequestReport ? report.reportID : '0'; + const moneyRequestReportID = isMoneyRequestReport ? report.reportID : ''; const currentCreated = DateUtils.enrichMoneyRequestTimestamp(created); const optimisticReceipt: Receipt = { @@ -1276,7 +1276,7 @@ function requestMoney( // If the report is iou or expense report, we should get the linked chat report to be passed to the getMoneyRequestInformation function const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report); const currentChatReport = isMoneyRequestReport ? ReportUtils.getReport(report.chatReportID) : report; - const moneyRequestReportID = isMoneyRequestReport ? report.reportID : '0'; + const moneyRequestReportID = isMoneyRequestReport ? report.reportID : ''; const currentCreated = DateUtils.enrichMoneyRequestTimestamp(created); const {payerAccountID, payerEmail, iouReport, chatReport, transaction, iouAction, createdChatReportActionID, createdIOUReportActionID, reportPreviewAction, onyxData} = getMoneyRequestInformation( From e7aeb33a2be77e1aade12dbef96dd73082017480 Mon Sep 17 00:00:00 2001 From: caitlinwhite1 Date: Tue, 6 Feb 2024 12:29:26 -0600 Subject: [PATCH 38/57] Update redirects.csv a link to expensify.com was breaking everything, updating to useDot link --- docs/redirects.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/redirects.csv b/docs/redirects.csv index 988b07d729f0..f30157e19916 100644 --- a/docs/redirects.csv +++ b/docs/redirects.csv @@ -48,5 +48,5 @@ https://community.expensify.com/discussion/4463/how-to-remove-or-manage-settings https://community.expensify.com/discussion/5793/how-to-connect-your-personal-card-to-import-expenses,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/Personal-Credit-Cards https://community.expensify.com/discussion/4826/how-to-set-your-annual-subscription-size,https://help.expensify.com/articles/expensify-classic/billing-and-subscriptions/Annual-Subscription https://community.expensify.com/discussion/5667/deep-dive-how-does-the-annual-subscription-billing-work,https://help.expensify.com/articles/expensify-classic/billing-and-subscriptions/Annual-Subscription -https://help.expensify.com/expensify-classic/hubs/getting-started/plan-types,https://www.expensify.com/pricing +https://help.expensify.com/expensify-classic/hubs/getting-started/plan-types,https://use.expensify.com/ https://help.expensify.com/articles/expensify-classic/getting-started/Employees,https://help.expensify.com/articles/expensify-classic/getting-started/Join-your-company's-workspace From 6c2abde357968c1d38730cd379b3fd654130e766 Mon Sep 17 00:00:00 2001 From: Youssef Lourayad Date: Tue, 6 Feb 2024 19:35:22 +0100 Subject: [PATCH 39/57] Update src/components/ReportActionItem/MoneyRequestAction.tsx Co-authored-by: Aldo Canepa Garay <87341702+aldo-expensify@users.noreply.github.com> --- src/components/ReportActionItem/MoneyRequestAction.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestAction.tsx b/src/components/ReportActionItem/MoneyRequestAction.tsx index 82098b52f2c3..9e169b23391a 100644 --- a/src/components/ReportActionItem/MoneyRequestAction.tsx +++ b/src/components/ReportActionItem/MoneyRequestAction.tsx @@ -92,7 +92,7 @@ function MoneyRequestAction({ } // If the childReportID is not present, we need to create a new thread - const childReportID = action?.childReportID ?? 0; + const childReportID = action?.childReportID; if (!childReportID) { const thread = ReportUtils.buildTransactionThread(action, requestReportID); const userLogins = PersonalDetailsUtils.getLoginsByAccountIDs(thread.participantAccountIDs ?? []); From 7a2a2b07bab6ca1e7ebd5e7ae0807cdff0786a2d Mon Sep 17 00:00:00 2001 From: OSBotify Date: Tue, 6 Feb 2024 19:47:06 +0000 Subject: [PATCH 40/57] Update version to 1.4.37-3 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- ios/NotificationServiceExtension/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index e179b59f4b30..a21e96eda07f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -98,8 +98,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001043702 - versionName "1.4.37-2" + versionCode 1001043703 + versionName "1.4.37-3" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index b529bbbcd100..214073033436 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.37.2 + 1.4.37.3 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index af5704061df2..232a81f62818 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.37.2 + 1.4.37.3 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index 8209491d19ff..d9fab01ad34a 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 1.4.37 CFBundleVersion - 1.4.37.2 + 1.4.37.3 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index 072684aa77c2..4142f3e2367b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.37-2", + "version": "1.4.37-3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.37-2", + "version": "1.4.37-3", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index e08a8bdcb70a..2548bed5c625 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.37-2", + "version": "1.4.37-3", "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 c556c5bbaa08277bbe45bfedd133df53b6518c6c Mon Sep 17 00:00:00 2001 From: codinggeek2023 Date: Wed, 7 Feb 2024 01:38:57 +0530 Subject: [PATCH 41/57] Add ShouldShowSubscriptionsMenu to settings^C --- src/libs/ShouldShowSubscriptionsMenu/index.native.ts | 6 ++++++ src/libs/ShouldShowSubscriptionsMenu/index.ts | 6 ++++++ src/pages/home/sidebar/AllSettingsScreen.tsx | 5 +++-- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/libs/ShouldShowSubscriptionsMenu/index.native.ts create mode 100644 src/libs/ShouldShowSubscriptionsMenu/index.ts diff --git a/src/libs/ShouldShowSubscriptionsMenu/index.native.ts b/src/libs/ShouldShowSubscriptionsMenu/index.native.ts new file mode 100644 index 000000000000..b9f28d42e0a0 --- /dev/null +++ b/src/libs/ShouldShowSubscriptionsMenu/index.native.ts @@ -0,0 +1,6 @@ +/** + * Indicates whether the subscription menu should show in the all settings screen + */ +const ShouldShowSubscriptionsMenu = (): boolean => false; + +export default ShouldShowSubscriptionsMenu; \ No newline at end of file diff --git a/src/libs/ShouldShowSubscriptionsMenu/index.ts b/src/libs/ShouldShowSubscriptionsMenu/index.ts new file mode 100644 index 000000000000..28ed3ee6092b --- /dev/null +++ b/src/libs/ShouldShowSubscriptionsMenu/index.ts @@ -0,0 +1,6 @@ +/** + * Indicates whether the subscription menu should show in the all settings screen + */ +const ShouldShowSubscriptionsMenu = (): boolean => true; + +export default ShouldShowSubscriptionsMenu; \ No newline at end of file diff --git a/src/pages/home/sidebar/AllSettingsScreen.tsx b/src/pages/home/sidebar/AllSettingsScreen.tsx index aa308d523db4..c3f2ab281c34 100644 --- a/src/pages/home/sidebar/AllSettingsScreen.tsx +++ b/src/pages/home/sidebar/AllSettingsScreen.tsx @@ -18,6 +18,7 @@ import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {Policy, PolicyMembers} from '@src/types/onyx'; +import ShouldShowSubscriptionsMenu from '@libs/ShouldShowSubscriptionsMenu'; type AllSettingsScreenOnyxProps = { policies: OnyxCollection; @@ -49,7 +50,7 @@ function AllSettingsScreen({policies, policyMembers}: AllSettingsScreenProps) { focused: !isSmallScreenWidth, brickRoadIndicator: hasGlobalWorkspaceSettingsRBR(policies, policyMembers) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, }, - { + ...(ShouldShowSubscriptionsMenu() ? [{ translationKey: 'allSettingsScreen.subscriptions', icon: Expensicons.MoneyBag, action: () => { @@ -58,7 +59,7 @@ function AllSettingsScreen({policies, policyMembers}: AllSettingsScreenProps) { shouldShowRightIcon: true, iconRight: Expensicons.NewWindow, link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL, - }, + }] : []), { translationKey: 'allSettingsScreen.cardsAndDomains', icon: Expensicons.CardsAndDomains, From 52f6753b6ffa3d55447a7ba3db3ab00697865148 Mon Sep 17 00:00:00 2001 From: Ben Limpich Date: Tue, 6 Feb 2024 12:26:59 -0800 Subject: [PATCH 42/57] fix typo and remove url fragments --- .github/scripts/createHelpRedirects.sh | 2 +- docs/redirects.csv | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/createHelpRedirects.sh b/.github/scripts/createHelpRedirects.sh index 1ae2220253c4..14ed9de953fc 100755 --- a/.github/scripts/createHelpRedirects.sh +++ b/.github/scripts/createHelpRedirects.sh @@ -19,7 +19,7 @@ function checkCloudflareResult { if ! [[ "$RESULT_MESSAGE" == "true" ]]; then ERROR_MESSAGE=$(echo "$RESULTS" | jq .errors) - error "Error calling Cloudfalre API: $ERROR_MESSAGE" + error "Error calling Cloudflare API: $ERROR_MESSAGE" exit 1 fi } diff --git a/docs/redirects.csv b/docs/redirects.csv index 988b07d729f0..cabd76deaf1f 100644 --- a/docs/redirects.csv +++ b/docs/redirects.csv @@ -34,8 +34,8 @@ https://help.expensify.com/articles/expensify-classic/expensify-card/Expensify-C https://help.expensify.com/articles/expensify-classic/expensify-partner-program/How-to-Join-the-ExpensifyApproved!-Partner-Program.html,https://use.expensify.com/accountants-program https://help.expensify.com/articles/expensify-classic/getting-started/approved-accountants/Card-Revenue-Share-For-Expensify-Approved-Partners, https://use.expensify.com/blog/maximizing-rewards-expensifyapproved-accounting-partners-now-earn-0-5-revenue-share https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/International-Reimbursements,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/Global-Reimbursements -https://community.expensify.com/discussion/4452/how-to-merge-accounts,https://help.expensify.com/articles/expensify-classic/account-settings/Merge-Accounts#gsc.tab=0 -https://community.expensify.com/discussion/4783/how-to-add-or-remove-a-copilot#latest,https://help.expensify.com/articles/expensify-classic/account-settings/Copilot#gsc.tab=0 +https://community.expensify.com/discussion/4452/how-to-merge-accounts,https://help.expensify.com/articles/expensify-classic/account-settings/Merge-Accounts +https://community.expensify.com/discussion/4783/how-to-add-or-remove-a-copilot,https://help.expensify.com/articles/expensify-classic/account-settings/Copilot https://community.expensify.com/discussion/4343/expensify-anz-partnership-announcement,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/company-cards/Connect-ANZ https://community.expensify.com/discussion/7318/deep-dive-company-credit-card-import-options,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/company-cards https://community.expensify.com/discussion/2673/personalize-your-commercial-card-feed-name,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/company-cards/Commercial-Card-Feeds From 1c6a312f26d85e4e201f2b7020de40a42a0ff4e6 Mon Sep 17 00:00:00 2001 From: codinggeek2023 Date: Wed, 7 Feb 2024 02:13:23 +0530 Subject: [PATCH 43/57] Add types --- src/libs/ShouldShowSubscriptionsMenu/index.native.ts | 6 ++++-- src/libs/ShouldShowSubscriptionsMenu/index.ts | 6 ++++-- src/libs/ShouldShowSubscriptionsMenu/types.tsx | 3 +++ src/pages/home/sidebar/AllSettingsScreen.tsx | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 src/libs/ShouldShowSubscriptionsMenu/types.tsx diff --git a/src/libs/ShouldShowSubscriptionsMenu/index.native.ts b/src/libs/ShouldShowSubscriptionsMenu/index.native.ts index b9f28d42e0a0..c495ead79a12 100644 --- a/src/libs/ShouldShowSubscriptionsMenu/index.native.ts +++ b/src/libs/ShouldShowSubscriptionsMenu/index.native.ts @@ -1,6 +1,8 @@ +import type ShouldShowSubscriptionsMenu from './types'; + /** * Indicates whether the subscription menu should show in the all settings screen */ -const ShouldShowSubscriptionsMenu = (): boolean => false; +const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = () => false; -export default ShouldShowSubscriptionsMenu; \ No newline at end of file +export default shouldShowSubscriptionsMenu; \ No newline at end of file diff --git a/src/libs/ShouldShowSubscriptionsMenu/index.ts b/src/libs/ShouldShowSubscriptionsMenu/index.ts index 28ed3ee6092b..24dfa231cae9 100644 --- a/src/libs/ShouldShowSubscriptionsMenu/index.ts +++ b/src/libs/ShouldShowSubscriptionsMenu/index.ts @@ -1,6 +1,8 @@ +import type ShouldShowSubscriptionsMenu from './types'; + /** * Indicates whether the subscription menu should show in the all settings screen */ -const ShouldShowSubscriptionsMenu = (): boolean => true; +const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = () => true; -export default ShouldShowSubscriptionsMenu; \ No newline at end of file +export default shouldShowSubscriptionsMenu; \ No newline at end of file diff --git a/src/libs/ShouldShowSubscriptionsMenu/types.tsx b/src/libs/ShouldShowSubscriptionsMenu/types.tsx new file mode 100644 index 000000000000..9694a57310d5 --- /dev/null +++ b/src/libs/ShouldShowSubscriptionsMenu/types.tsx @@ -0,0 +1,3 @@ +type ShouldShowSubscriptionsMenu = () => boolean; + +export default ShouldShowSubscriptionsMenu; \ No newline at end of file diff --git a/src/pages/home/sidebar/AllSettingsScreen.tsx b/src/pages/home/sidebar/AllSettingsScreen.tsx index c3f2ab281c34..9b09878ef9da 100644 --- a/src/pages/home/sidebar/AllSettingsScreen.tsx +++ b/src/pages/home/sidebar/AllSettingsScreen.tsx @@ -18,7 +18,7 @@ import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {Policy, PolicyMembers} from '@src/types/onyx'; -import ShouldShowSubscriptionsMenu from '@libs/ShouldShowSubscriptionsMenu'; +import shouldShowSubscriptionsMenu from '@libs/ShouldShowSubscriptionsMenu'; type AllSettingsScreenOnyxProps = { policies: OnyxCollection; @@ -50,7 +50,7 @@ function AllSettingsScreen({policies, policyMembers}: AllSettingsScreenProps) { focused: !isSmallScreenWidth, brickRoadIndicator: hasGlobalWorkspaceSettingsRBR(policies, policyMembers) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, }, - ...(ShouldShowSubscriptionsMenu() ? [{ + ...(shouldShowSubscriptionsMenu() ? [{ translationKey: 'allSettingsScreen.subscriptions', icon: Expensicons.MoneyBag, action: () => { From 6afffdc31bd82cfa44a98bb278c6576cbfd14c71 Mon Sep 17 00:00:00 2001 From: Riya Shete <156463907+codinggeek2023@users.noreply.github.com> Date: Wed, 7 Feb 2024 02:23:58 +0530 Subject: [PATCH 44/57] Update src/libs/ShouldShowSubscriptionsMenu/index.native.ts Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com> --- src/libs/ShouldShowSubscriptionsMenu/index.native.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ShouldShowSubscriptionsMenu/index.native.ts b/src/libs/ShouldShowSubscriptionsMenu/index.native.ts index c495ead79a12..d5aa2c1c0ea7 100644 --- a/src/libs/ShouldShowSubscriptionsMenu/index.native.ts +++ b/src/libs/ShouldShowSubscriptionsMenu/index.native.ts @@ -3,6 +3,6 @@ import type ShouldShowSubscriptionsMenu from './types'; /** * Indicates whether the subscription menu should show in the all settings screen */ -const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = () => false; +const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = false; export default shouldShowSubscriptionsMenu; \ No newline at end of file From 317543e6c6b91a54469e633bbab2f64711320ce5 Mon Sep 17 00:00:00 2001 From: Riya Shete <156463907+codinggeek2023@users.noreply.github.com> Date: Wed, 7 Feb 2024 02:24:14 +0530 Subject: [PATCH 45/57] Update src/libs/ShouldShowSubscriptionsMenu/types.tsx Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com> --- src/libs/ShouldShowSubscriptionsMenu/types.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ShouldShowSubscriptionsMenu/types.tsx b/src/libs/ShouldShowSubscriptionsMenu/types.tsx index 9694a57310d5..4d02442a9421 100644 --- a/src/libs/ShouldShowSubscriptionsMenu/types.tsx +++ b/src/libs/ShouldShowSubscriptionsMenu/types.tsx @@ -1,3 +1,3 @@ -type ShouldShowSubscriptionsMenu = () => boolean; +type ShouldShowSubscriptionsMenu = boolean; export default ShouldShowSubscriptionsMenu; \ No newline at end of file From f483d64c64a66e17be39f89cb3a84087a1afd88a Mon Sep 17 00:00:00 2001 From: Riya Shete <156463907+codinggeek2023@users.noreply.github.com> Date: Wed, 7 Feb 2024 02:24:36 +0530 Subject: [PATCH 46/57] Update src/pages/home/sidebar/AllSettingsScreen.tsx Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com> --- src/pages/home/sidebar/AllSettingsScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/sidebar/AllSettingsScreen.tsx b/src/pages/home/sidebar/AllSettingsScreen.tsx index 9b09878ef9da..c761c5ad2bdf 100644 --- a/src/pages/home/sidebar/AllSettingsScreen.tsx +++ b/src/pages/home/sidebar/AllSettingsScreen.tsx @@ -50,7 +50,7 @@ function AllSettingsScreen({policies, policyMembers}: AllSettingsScreenProps) { focused: !isSmallScreenWidth, brickRoadIndicator: hasGlobalWorkspaceSettingsRBR(policies, policyMembers) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, }, - ...(shouldShowSubscriptionsMenu() ? [{ + ...(shouldShowSubscriptionsMenu ? [{ translationKey: 'allSettingsScreen.subscriptions', icon: Expensicons.MoneyBag, action: () => { From 90334c2646537e8f752a8ce907345141c98f6736 Mon Sep 17 00:00:00 2001 From: Riya Shete <156463907+codinggeek2023@users.noreply.github.com> Date: Wed, 7 Feb 2024 02:24:43 +0530 Subject: [PATCH 47/57] Update src/libs/ShouldShowSubscriptionsMenu/index.ts Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com> --- src/libs/ShouldShowSubscriptionsMenu/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ShouldShowSubscriptionsMenu/index.ts b/src/libs/ShouldShowSubscriptionsMenu/index.ts index 24dfa231cae9..9632ff707249 100644 --- a/src/libs/ShouldShowSubscriptionsMenu/index.ts +++ b/src/libs/ShouldShowSubscriptionsMenu/index.ts @@ -3,6 +3,6 @@ import type ShouldShowSubscriptionsMenu from './types'; /** * Indicates whether the subscription menu should show in the all settings screen */ -const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = () => true; +const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = true; export default shouldShowSubscriptionsMenu; \ No newline at end of file From 18fe488b2b31da036b5b28dccc10ee91f9baf200 Mon Sep 17 00:00:00 2001 From: codinggeek2023 Date: Wed, 7 Feb 2024 02:30:29 +0530 Subject: [PATCH 48/57] Rename folder --- .../index.native.ts | 0 .../index.ts | 0 .../types.tsx | 0 src/pages/home/sidebar/AllSettingsScreen.tsx | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) rename src/libs/{ShouldShowSubscriptionsMenu => shouldShowSubscriptionsMenu}/index.native.ts (100%) rename src/libs/{ShouldShowSubscriptionsMenu => shouldShowSubscriptionsMenu}/index.ts (100%) rename src/libs/{ShouldShowSubscriptionsMenu => shouldShowSubscriptionsMenu}/types.tsx (100%) diff --git a/src/libs/ShouldShowSubscriptionsMenu/index.native.ts b/src/libs/shouldShowSubscriptionsMenu/index.native.ts similarity index 100% rename from src/libs/ShouldShowSubscriptionsMenu/index.native.ts rename to src/libs/shouldShowSubscriptionsMenu/index.native.ts diff --git a/src/libs/ShouldShowSubscriptionsMenu/index.ts b/src/libs/shouldShowSubscriptionsMenu/index.ts similarity index 100% rename from src/libs/ShouldShowSubscriptionsMenu/index.ts rename to src/libs/shouldShowSubscriptionsMenu/index.ts diff --git a/src/libs/ShouldShowSubscriptionsMenu/types.tsx b/src/libs/shouldShowSubscriptionsMenu/types.tsx similarity index 100% rename from src/libs/ShouldShowSubscriptionsMenu/types.tsx rename to src/libs/shouldShowSubscriptionsMenu/types.tsx diff --git a/src/pages/home/sidebar/AllSettingsScreen.tsx b/src/pages/home/sidebar/AllSettingsScreen.tsx index c761c5ad2bdf..c4a3319b0c15 100644 --- a/src/pages/home/sidebar/AllSettingsScreen.tsx +++ b/src/pages/home/sidebar/AllSettingsScreen.tsx @@ -18,7 +18,7 @@ import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {Policy, PolicyMembers} from '@src/types/onyx'; -import shouldShowSubscriptionsMenu from '@libs/ShouldShowSubscriptionsMenu'; +import shouldShowSubscriptionsMenu from '@libs/shouldShowSubscriptionsMenu'; type AllSettingsScreenOnyxProps = { policies: OnyxCollection; From 1a90974f20e7dd2245d5ad882af88ee437563e1d Mon Sep 17 00:00:00 2001 From: codinggeek2023 Date: Wed, 7 Feb 2024 02:48:10 +0530 Subject: [PATCH 49/57] Fix Lint --- .../index.native.ts | 2 +- src/libs/shouldShowSubscriptionsMenu/index.ts | 2 +- .../shouldShowSubscriptionsMenu/types.tsx | 2 +- src/pages/home/sidebar/AllSettingsScreen.tsx | 46 ++++++++++--------- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/libs/shouldShowSubscriptionsMenu/index.native.ts b/src/libs/shouldShowSubscriptionsMenu/index.native.ts index d5aa2c1c0ea7..c98302e9a87d 100644 --- a/src/libs/shouldShowSubscriptionsMenu/index.native.ts +++ b/src/libs/shouldShowSubscriptionsMenu/index.native.ts @@ -5,4 +5,4 @@ import type ShouldShowSubscriptionsMenu from './types'; */ const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = false; -export default shouldShowSubscriptionsMenu; \ No newline at end of file +export default shouldShowSubscriptionsMenu; diff --git a/src/libs/shouldShowSubscriptionsMenu/index.ts b/src/libs/shouldShowSubscriptionsMenu/index.ts index 9632ff707249..2f2b7f17c2c5 100644 --- a/src/libs/shouldShowSubscriptionsMenu/index.ts +++ b/src/libs/shouldShowSubscriptionsMenu/index.ts @@ -5,4 +5,4 @@ import type ShouldShowSubscriptionsMenu from './types'; */ const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = true; -export default shouldShowSubscriptionsMenu; \ No newline at end of file +export default shouldShowSubscriptionsMenu; diff --git a/src/libs/shouldShowSubscriptionsMenu/types.tsx b/src/libs/shouldShowSubscriptionsMenu/types.tsx index 4d02442a9421..e72b55234639 100644 --- a/src/libs/shouldShowSubscriptionsMenu/types.tsx +++ b/src/libs/shouldShowSubscriptionsMenu/types.tsx @@ -1,3 +1,3 @@ type ShouldShowSubscriptionsMenu = boolean; -export default ShouldShowSubscriptionsMenu; \ No newline at end of file +export default ShouldShowSubscriptionsMenu; diff --git a/src/pages/home/sidebar/AllSettingsScreen.tsx b/src/pages/home/sidebar/AllSettingsScreen.tsx index c4a3319b0c15..8897a26e0b6b 100644 --- a/src/pages/home/sidebar/AllSettingsScreen.tsx +++ b/src/pages/home/sidebar/AllSettingsScreen.tsx @@ -1,7 +1,7 @@ -import React, {useMemo} from 'react'; -import {ScrollView} from 'react-native'; -import type {OnyxCollection} from 'react-native-onyx'; -import {withOnyx} from 'react-native-onyx'; +import React, { useMemo } from 'react'; +import { ScrollView } from 'react-native'; +import type { OnyxCollection } from 'react-native-onyx'; +import { withOnyx } from 'react-native-onyx'; import Breadcrumbs from '@components/Breadcrumbs'; import * as Expensicons from '@components/Icon/Expensicons'; import MenuItemList from '@components/MenuItemList'; @@ -11,14 +11,14 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWaitForNavigation from '@hooks/useWaitForNavigation'; import useWindowDimensions from '@hooks/useWindowDimensions'; import Navigation from '@libs/Navigation/Navigation'; -import {hasGlobalWorkspaceSettingsRBR} from '@libs/WorkspacesSettingsUtils'; +import shouldShowSubscriptionsMenu from '@libs/shouldShowSubscriptionsMenu'; +import { hasGlobalWorkspaceSettingsRBR } from '@libs/WorkspacesSettingsUtils'; import * as Link from '@userActions/Link'; import CONST from '@src/CONST'; -import type {TranslationPaths} from '@src/languages/types'; +import type { TranslationPaths } from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; -import type {Policy, PolicyMembers} from '@src/types/onyx'; -import shouldShowSubscriptionsMenu from '@libs/shouldShowSubscriptionsMenu'; +import type { Policy, PolicyMembers } from '@src/types/onyx'; type AllSettingsScreenOnyxProps = { policies: OnyxCollection; @@ -27,11 +27,11 @@ type AllSettingsScreenOnyxProps = { type AllSettingsScreenProps = AllSettingsScreenOnyxProps; -function AllSettingsScreen({policies, policyMembers}: AllSettingsScreenProps) { +function AllSettingsScreen({ policies, policyMembers }: AllSettingsScreenProps) { const styles = useThemeStyles(); const waitForNavigate = useWaitForNavigation(); - const {translate} = useLocalize(); - const {isSmallScreenWidth} = useWindowDimensions(); + const { translate } = useLocalize(); + const { isSmallScreenWidth } = useWindowDimensions(); /** * Retuns a list of menu items data for All workspaces settings @@ -50,16 +50,20 @@ function AllSettingsScreen({policies, policyMembers}: AllSettingsScreenProps) { focused: !isSmallScreenWidth, brickRoadIndicator: hasGlobalWorkspaceSettingsRBR(policies, policyMembers) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, }, - ...(shouldShowSubscriptionsMenu ? [{ - translationKey: 'allSettingsScreen.subscriptions', - icon: Expensicons.MoneyBag, - action: () => { - Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL); - }, - shouldShowRightIcon: true, - iconRight: Expensicons.NewWindow, - link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL, - }] : []), + ...(shouldShowSubscriptionsMenu + ? [ + { + translationKey: 'allSettingsScreen.subscriptions', + icon: Expensicons.MoneyBag, + action: () => { + Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL); + }, + shouldShowRightIcon: true, + iconRight: Expensicons.NewWindow, + link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL, + }, + ] + : []), { translationKey: 'allSettingsScreen.cardsAndDomains', icon: Expensicons.CardsAndDomains, From c12daf25d78aa4967b7515d09a01392806a536cf Mon Sep 17 00:00:00 2001 From: codinggeek2023 Date: Wed, 7 Feb 2024 02:55:40 +0530 Subject: [PATCH 50/57] revert lint --- .../index.native.ts | 2 +- src/libs/shouldShowSubscriptionsMenu/index.ts | 2 +- .../shouldShowSubscriptionsMenu/types.tsx | 2 +- src/pages/home/sidebar/AllSettingsScreen.tsx | 46 +++++++++---------- 4 files changed, 24 insertions(+), 28 deletions(-) diff --git a/src/libs/shouldShowSubscriptionsMenu/index.native.ts b/src/libs/shouldShowSubscriptionsMenu/index.native.ts index c98302e9a87d..d5aa2c1c0ea7 100644 --- a/src/libs/shouldShowSubscriptionsMenu/index.native.ts +++ b/src/libs/shouldShowSubscriptionsMenu/index.native.ts @@ -5,4 +5,4 @@ import type ShouldShowSubscriptionsMenu from './types'; */ const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = false; -export default shouldShowSubscriptionsMenu; +export default shouldShowSubscriptionsMenu; \ No newline at end of file diff --git a/src/libs/shouldShowSubscriptionsMenu/index.ts b/src/libs/shouldShowSubscriptionsMenu/index.ts index 2f2b7f17c2c5..9632ff707249 100644 --- a/src/libs/shouldShowSubscriptionsMenu/index.ts +++ b/src/libs/shouldShowSubscriptionsMenu/index.ts @@ -5,4 +5,4 @@ import type ShouldShowSubscriptionsMenu from './types'; */ const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = true; -export default shouldShowSubscriptionsMenu; +export default shouldShowSubscriptionsMenu; \ No newline at end of file diff --git a/src/libs/shouldShowSubscriptionsMenu/types.tsx b/src/libs/shouldShowSubscriptionsMenu/types.tsx index e72b55234639..4d02442a9421 100644 --- a/src/libs/shouldShowSubscriptionsMenu/types.tsx +++ b/src/libs/shouldShowSubscriptionsMenu/types.tsx @@ -1,3 +1,3 @@ type ShouldShowSubscriptionsMenu = boolean; -export default ShouldShowSubscriptionsMenu; +export default ShouldShowSubscriptionsMenu; \ No newline at end of file diff --git a/src/pages/home/sidebar/AllSettingsScreen.tsx b/src/pages/home/sidebar/AllSettingsScreen.tsx index 8897a26e0b6b..c4a3319b0c15 100644 --- a/src/pages/home/sidebar/AllSettingsScreen.tsx +++ b/src/pages/home/sidebar/AllSettingsScreen.tsx @@ -1,7 +1,7 @@ -import React, { useMemo } from 'react'; -import { ScrollView } from 'react-native'; -import type { OnyxCollection } from 'react-native-onyx'; -import { withOnyx } from 'react-native-onyx'; +import React, {useMemo} from 'react'; +import {ScrollView} from 'react-native'; +import type {OnyxCollection} from 'react-native-onyx'; +import {withOnyx} from 'react-native-onyx'; import Breadcrumbs from '@components/Breadcrumbs'; import * as Expensicons from '@components/Icon/Expensicons'; import MenuItemList from '@components/MenuItemList'; @@ -11,14 +11,14 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWaitForNavigation from '@hooks/useWaitForNavigation'; import useWindowDimensions from '@hooks/useWindowDimensions'; import Navigation from '@libs/Navigation/Navigation'; -import shouldShowSubscriptionsMenu from '@libs/shouldShowSubscriptionsMenu'; -import { hasGlobalWorkspaceSettingsRBR } from '@libs/WorkspacesSettingsUtils'; +import {hasGlobalWorkspaceSettingsRBR} from '@libs/WorkspacesSettingsUtils'; import * as Link from '@userActions/Link'; import CONST from '@src/CONST'; -import type { TranslationPaths } from '@src/languages/types'; +import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; -import type { Policy, PolicyMembers } from '@src/types/onyx'; +import type {Policy, PolicyMembers} from '@src/types/onyx'; +import shouldShowSubscriptionsMenu from '@libs/shouldShowSubscriptionsMenu'; type AllSettingsScreenOnyxProps = { policies: OnyxCollection; @@ -27,11 +27,11 @@ type AllSettingsScreenOnyxProps = { type AllSettingsScreenProps = AllSettingsScreenOnyxProps; -function AllSettingsScreen({ policies, policyMembers }: AllSettingsScreenProps) { +function AllSettingsScreen({policies, policyMembers}: AllSettingsScreenProps) { const styles = useThemeStyles(); const waitForNavigate = useWaitForNavigation(); - const { translate } = useLocalize(); - const { isSmallScreenWidth } = useWindowDimensions(); + const {translate} = useLocalize(); + const {isSmallScreenWidth} = useWindowDimensions(); /** * Retuns a list of menu items data for All workspaces settings @@ -50,20 +50,16 @@ function AllSettingsScreen({ policies, policyMembers }: AllSettingsScreenProps) focused: !isSmallScreenWidth, brickRoadIndicator: hasGlobalWorkspaceSettingsRBR(policies, policyMembers) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, }, - ...(shouldShowSubscriptionsMenu - ? [ - { - translationKey: 'allSettingsScreen.subscriptions', - icon: Expensicons.MoneyBag, - action: () => { - Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL); - }, - shouldShowRightIcon: true, - iconRight: Expensicons.NewWindow, - link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL, - }, - ] - : []), + ...(shouldShowSubscriptionsMenu ? [{ + translationKey: 'allSettingsScreen.subscriptions', + icon: Expensicons.MoneyBag, + action: () => { + Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL); + }, + shouldShowRightIcon: true, + iconRight: Expensicons.NewWindow, + link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL, + }] : []), { translationKey: 'allSettingsScreen.cardsAndDomains', icon: Expensicons.CardsAndDomains, From 208ada51f20ea34e06ec8b2905fa76e97a03807e Mon Sep 17 00:00:00 2001 From: codinggeek2023 Date: Wed, 7 Feb 2024 02:56:59 +0530 Subject: [PATCH 51/57] push suggested lint --- src/pages/home/sidebar/AllSettingsScreen.tsx | 26 +++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/pages/home/sidebar/AllSettingsScreen.tsx b/src/pages/home/sidebar/AllSettingsScreen.tsx index c4a3319b0c15..0406c38cf659 100644 --- a/src/pages/home/sidebar/AllSettingsScreen.tsx +++ b/src/pages/home/sidebar/AllSettingsScreen.tsx @@ -11,6 +11,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWaitForNavigation from '@hooks/useWaitForNavigation'; import useWindowDimensions from '@hooks/useWindowDimensions'; import Navigation from '@libs/Navigation/Navigation'; +import shouldShowSubscriptionsMenu from '@libs/shouldShowSubscriptionsMenu'; import {hasGlobalWorkspaceSettingsRBR} from '@libs/WorkspacesSettingsUtils'; import * as Link from '@userActions/Link'; import CONST from '@src/CONST'; @@ -18,7 +19,6 @@ import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {Policy, PolicyMembers} from '@src/types/onyx'; -import shouldShowSubscriptionsMenu from '@libs/shouldShowSubscriptionsMenu'; type AllSettingsScreenOnyxProps = { policies: OnyxCollection; @@ -50,16 +50,20 @@ function AllSettingsScreen({policies, policyMembers}: AllSettingsScreenProps) { focused: !isSmallScreenWidth, brickRoadIndicator: hasGlobalWorkspaceSettingsRBR(policies, policyMembers) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, }, - ...(shouldShowSubscriptionsMenu ? [{ - translationKey: 'allSettingsScreen.subscriptions', - icon: Expensicons.MoneyBag, - action: () => { - Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL); - }, - shouldShowRightIcon: true, - iconRight: Expensicons.NewWindow, - link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL, - }] : []), + ...(shouldShowSubscriptionsMenu + ? [ + { + translationKey: 'allSettingsScreen.subscriptions', + icon: Expensicons.MoneyBag, + action: () => { + Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL); + }, + shouldShowRightIcon: true, + iconRight: Expensicons.NewWindow, + link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL, + }, + ] + : []), { translationKey: 'allSettingsScreen.cardsAndDomains', icon: Expensicons.CardsAndDomains, From 5e59bee371d79abfe790fc801c9545d20bdec3f1 Mon Sep 17 00:00:00 2001 From: codinggeek2023 Date: Wed, 7 Feb 2024 02:57:27 +0530 Subject: [PATCH 52/57] push suggested lint --- src/libs/shouldShowSubscriptionsMenu/index.native.ts | 2 +- src/libs/shouldShowSubscriptionsMenu/index.ts | 2 +- src/libs/shouldShowSubscriptionsMenu/types.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/shouldShowSubscriptionsMenu/index.native.ts b/src/libs/shouldShowSubscriptionsMenu/index.native.ts index d5aa2c1c0ea7..c98302e9a87d 100644 --- a/src/libs/shouldShowSubscriptionsMenu/index.native.ts +++ b/src/libs/shouldShowSubscriptionsMenu/index.native.ts @@ -5,4 +5,4 @@ import type ShouldShowSubscriptionsMenu from './types'; */ const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = false; -export default shouldShowSubscriptionsMenu; \ No newline at end of file +export default shouldShowSubscriptionsMenu; diff --git a/src/libs/shouldShowSubscriptionsMenu/index.ts b/src/libs/shouldShowSubscriptionsMenu/index.ts index 9632ff707249..2f2b7f17c2c5 100644 --- a/src/libs/shouldShowSubscriptionsMenu/index.ts +++ b/src/libs/shouldShowSubscriptionsMenu/index.ts @@ -5,4 +5,4 @@ import type ShouldShowSubscriptionsMenu from './types'; */ const shouldShowSubscriptionsMenu: ShouldShowSubscriptionsMenu = true; -export default shouldShowSubscriptionsMenu; \ No newline at end of file +export default shouldShowSubscriptionsMenu; diff --git a/src/libs/shouldShowSubscriptionsMenu/types.tsx b/src/libs/shouldShowSubscriptionsMenu/types.tsx index 4d02442a9421..e72b55234639 100644 --- a/src/libs/shouldShowSubscriptionsMenu/types.tsx +++ b/src/libs/shouldShowSubscriptionsMenu/types.tsx @@ -1,3 +1,3 @@ type ShouldShowSubscriptionsMenu = boolean; -export default ShouldShowSubscriptionsMenu; \ No newline at end of file +export default ShouldShowSubscriptionsMenu; From acf03b5c7102f914fb3d015c9e8ad3d6df9b7b72 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Tue, 6 Feb 2024 22:10:56 +0000 Subject: [PATCH 53/57] Update version to 1.4.37-4 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- ios/NotificationServiceExtension/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index a21e96eda07f..bd795fb84af5 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -98,8 +98,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001043703 - versionName "1.4.37-3" + versionCode 1001043704 + versionName "1.4.37-4" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 214073033436..6c8c96bb9f4a 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.37.3 + 1.4.37.4 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 232a81f62818..8c73a6cece43 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.37.3 + 1.4.37.4 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index d9fab01ad34a..2b88b0375075 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 1.4.37 CFBundleVersion - 1.4.37.3 + 1.4.37.4 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index 4142f3e2367b..520373fbfd6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.37-3", + "version": "1.4.37-4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.37-3", + "version": "1.4.37-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 2548bed5c625..08120fa0f902 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.37-3", + "version": "1.4.37-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 0389ac7ddba21f906710637a0864dcc79b65ae65 Mon Sep 17 00:00:00 2001 From: Youssef Lourayad Date: Tue, 6 Feb 2024 23:28:47 +0100 Subject: [PATCH 54/57] Fix variable declared twice --- src/libs/ReportUtils.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index bc91f74f3fdc..64d79a3cd812 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -2312,8 +2312,6 @@ function getReportPreviewMessage( return `${requestorName ? `${requestorName}: ` : ''}${Localize.translateLocal('iou.requestedAmount', {formattedAmount: amountToDisplay})}`; } - const containsNonReimbursable = hasNonReimbursableTransactions(report.reportID); - return Localize.translateLocal(containsNonReimbursable ? 'iou.payerSpentAmount' : 'iou.payerOwesAmount', {payer: payerName ?? '', amount: formattedAmount}); } From d94353f5d7cd5e980b5e33e73d53c792e325039c Mon Sep 17 00:00:00 2001 From: OSBotify Date: Tue, 6 Feb 2024 22:46:12 +0000 Subject: [PATCH 55/57] Update version to 1.4.37-5 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- ios/NotificationServiceExtension/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index bd795fb84af5..990ef0ff5af0 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -98,8 +98,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001043704 - versionName "1.4.37-4" + versionCode 1001043705 + versionName "1.4.37-5" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 6c8c96bb9f4a..c247501da949 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.37.4 + 1.4.37.5 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 8c73a6cece43..3af0459775a7 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.37.4 + 1.4.37.5 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index 2b88b0375075..48aecefa5974 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 1.4.37 CFBundleVersion - 1.4.37.4 + 1.4.37.5 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index 520373fbfd6c..ac352c7ec6f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.37-4", + "version": "1.4.37-5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.37-4", + "version": "1.4.37-5", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 08120fa0f902..e7862fb463c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.37-4", + "version": "1.4.37-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 ff622a4ae568171569e62d9b50ffb49203d87f8f Mon Sep 17 00:00:00 2001 From: OSBotify Date: Tue, 6 Feb 2024 22:56:52 +0000 Subject: [PATCH 56/57] Update version to 1.4.37-6 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- ios/NotificationServiceExtension/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 990ef0ff5af0..5dd4858fe0d7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -98,8 +98,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001043705 - versionName "1.4.37-5" + versionCode 1001043706 + versionName "1.4.37-6" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index c247501da949..e01da07d28b7 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.37.5 + 1.4.37.6 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 3af0459775a7..f2004108628c 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.37.5 + 1.4.37.6 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index 48aecefa5974..6d85c5af21a5 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 1.4.37 CFBundleVersion - 1.4.37.5 + 1.4.37.6 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index ac352c7ec6f0..5d63067adc81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.37-5", + "version": "1.4.37-6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.37-5", + "version": "1.4.37-6", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index e7862fb463c7..e7b8631496bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.37-5", + "version": "1.4.37-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.", From 7f4cdce48d7246380da7bf860fa928bae89bfa89 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Tue, 6 Feb 2024 23:54:16 +0000 Subject: [PATCH 57/57] Update version to 1.4.37-7 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- ios/NotificationServiceExtension/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5dd4858fe0d7..1301f18d7e8f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -98,8 +98,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001043706 - versionName "1.4.37-6" + versionCode 1001043707 + versionName "1.4.37-7" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index e01da07d28b7..a2effb8de0b1 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.37.6 + 1.4.37.7 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index f2004108628c..02b01e7153d0 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.37.6 + 1.4.37.7 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index 6d85c5af21a5..69e1e7d6e9d9 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 1.4.37 CFBundleVersion - 1.4.37.6 + 1.4.37.7 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index 5d63067adc81..11099886bfb0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.37-6", + "version": "1.4.37-7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.37-6", + "version": "1.4.37-7", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index e7b8631496bf..71983e0e1679 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.37-6", + "version": "1.4.37-7", "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.",