From 109421eb954a76c78db04abe1e4ac216a433d94c Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 25 May 2023 17:26:43 -0600 Subject: [PATCH 001/117] ask to change currency to USD --- src/pages/workspace/WorkspaceInitialPage.js | 22 ++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index 775898670c46..7fd39bc29cff 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -66,6 +66,7 @@ function dismissError(policyID) { const WorkspaceInitialPage = (props) => { const policy = props.policy; const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false); + const [isUpdateCurrencyModalOpen, setIsUpdateCurrencyModalOpen] = useState(false); const hasPolicyCreationError = Boolean(policy.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD && policy.errors); /** @@ -78,6 +79,15 @@ const WorkspaceInitialPage = (props) => { Navigation.navigate(ROUTES.SETTINGS_WORKSPACES); }, [props.reports, policy]); + /** + * Call the delete policy and hide the modal + */ + const confirmCurrencyChangeAndHideModal = useCallback(() => { + Policy.updateGeneralSettings(policy.id, policy.name, CONST.CURRENCY.USD); + setIsUpdateCurrencyModalOpen(false); + ReimbursementAccount.navigateToBankAccountRoute(policy.id) + }, [policy]); + const policyName = lodashGet(policy, 'name', ''); const hasMembersError = PolicyUtils.hasPolicyMemberError(props.policyMemberList); const hasGeneralSettingsError = !_.isEmpty(lodashGet(policy, 'errorFields.generalSettings', {})) || !_.isEmpty(lodashGet(policy, 'errorFields.avatar', {})); @@ -124,7 +134,7 @@ const WorkspaceInitialPage = (props) => { { translationKey: 'workspace.common.bankAccount', icon: Expensicons.Bank, - action: () => ReimbursementAccount.navigateToBankAccountRoute(policy.id), + action: () => policy.outputCurrency === CONST.CURRENCY.USD ? ReimbursementAccount.navigateToBankAccountRoute(policy.id) : setIsUpdateCurrencyModalOpen(true), brickRoadIndicator: !_.isEmpty(props.reimbursementAccount.errors) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : '', }, ]; @@ -214,6 +224,16 @@ const WorkspaceInitialPage = (props) => { + setIsUpdateCurrencyModalOpen(false)} + prompt={`Adding a bank account is currently limited to Workspaces using USD as a default currency. Would you like you update ${policy.name}'s default currency to USD?`} + confirmText="Update currency" + cancelText={props.translate('common.cancel')} + danger + /> Date: Tue, 30 May 2023 10:32:55 -0600 Subject: [PATCH 002/117] create WorkspaceUpdateCurrencyModal --- .../workspace/WorkspaceUpdateCurrencyModal.js | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/pages/workspace/WorkspaceUpdateCurrencyModal.js diff --git a/src/pages/workspace/WorkspaceUpdateCurrencyModal.js b/src/pages/workspace/WorkspaceUpdateCurrencyModal.js new file mode 100644 index 000000000000..7ad589661094 --- /dev/null +++ b/src/pages/workspace/WorkspaceUpdateCurrencyModal.js @@ -0,0 +1,48 @@ +import React from 'react'; +import {withOnyx} from 'react-native-onyx'; +import PropTypes from 'prop-types'; +import compose from '../../libs/compose'; +import ONYXKEYS from '../../ONYXKEYS'; +import ConfirmModal from '../../components/ConfirmModal'; +import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; + +const propTypes = { + /** Reimbursement account data */ + policy: PropTypes.shape({ + outputCurrency: PropTypes.string, + }), + + ...withLocalizePropTypes, +}; + +const defaultProps = { + policy: { + outputCurrency: 'USD', + }, +}; + +const WorkspaceUpdateCurrencyModal = (props) => ( + setIsDeleteModalOpen(false)} + prompt={props.translate('workspace.common.deleteConfirmation')} + confirmText={props.translate('common.delete')} + cancelText={props.translate('common.cancel')} + danger + /> +); + +WorkspaceUpdateCurrencyModal.displayName = 'WorkspaceUpdateCurrencyModal'; +WorkspaceUpdateCurrencyModal.propTypes = propTypes; +WorkspaceUpdateCurrencyModal.defaultProps = defaultProps; + +export default compose( + withLocalize, + withOnyx({ + policy: { + key: ({route}) => `${ONYXKEYS.COLLECTION.POLICY}${route.params.policyID}`, + }, + }), +)(WorkspaceUpdateCurrencyModal); From 742936a2c252e70a3e2534ed3ecc30b7138a7c2d Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 30 May 2023 10:38:35 -0600 Subject: [PATCH 003/117] add state, callback methods --- .../workspace/WorkspaceUpdateCurrencyModal.js | 44 ++++++++++++++----- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/src/pages/workspace/WorkspaceUpdateCurrencyModal.js b/src/pages/workspace/WorkspaceUpdateCurrencyModal.js index 7ad589661094..25e4d2201169 100644 --- a/src/pages/workspace/WorkspaceUpdateCurrencyModal.js +++ b/src/pages/workspace/WorkspaceUpdateCurrencyModal.js @@ -1,14 +1,19 @@ -import React from 'react'; +import React, {useState, useCallback} from 'react'; import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; import compose from '../../libs/compose'; import ONYXKEYS from '../../ONYXKEYS'; +import CONST from '../../CONST'; import ConfirmModal from '../../components/ConfirmModal'; import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; +import * as Policy from '../../libs/actions/Policy'; +import * as ReimbursementAccount from '../../libs/actions/ReimbursementAccount'; const propTypes = { /** Reimbursement account data */ policy: PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string, outputCurrency: PropTypes.string, }), @@ -17,22 +22,37 @@ const propTypes = { const defaultProps = { policy: { + id: '', + name: '', outputCurrency: 'USD', }, }; -const WorkspaceUpdateCurrencyModal = (props) => ( +const WorkspaceUpdateCurrencyModal = (props) => { + const [isVisible, setIsVisible] = useState(props.policy.outputCurrency !== CONST.CURRENCY.USD); + + /** + * Call update workspace currency and hide the modal + */ + const confirmCurrencyChangeAndHideModal = useCallback(() => { + Policy.updateGeneralSettings(props.policy.id, props.policy.name, CONST.CURRENCY.USD); + setIsVisible(false); + ReimbursementAccount.navigateToBankAccountRoute(props.policy.id) + }, [props.policy]); + + return ( setIsDeleteModalOpen(false)} - prompt={props.translate('workspace.common.deleteConfirmation')} - confirmText={props.translate('common.delete')} - cancelText={props.translate('common.cancel')} - danger - /> -); + title={props.translate('workspace.common.delete')} + isVisible={isVisible} + onConfirm={confirmCurrencyChangeAndHideModal} + onCancel={() => setIsVisible(false)} + prompt={props.translate('workspace.common.deleteConfirmation')} + confirmText={props.translate('common.delete')} + cancelText={props.translate('common.cancel')} + danger + /> + ) +}; WorkspaceUpdateCurrencyModal.displayName = 'WorkspaceUpdateCurrencyModal'; WorkspaceUpdateCurrencyModal.propTypes = propTypes; From 852597f50cc04248c3c43a4972725ee5e60f20a0 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 30 May 2023 10:39:29 -0600 Subject: [PATCH 004/117] rename method --- src/pages/workspace/WorkspaceUpdateCurrencyModal.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pages/workspace/WorkspaceUpdateCurrencyModal.js b/src/pages/workspace/WorkspaceUpdateCurrencyModal.js index 25e4d2201169..942c7e5d0c9f 100644 --- a/src/pages/workspace/WorkspaceUpdateCurrencyModal.js +++ b/src/pages/workspace/WorkspaceUpdateCurrencyModal.js @@ -31,10 +31,7 @@ const defaultProps = { const WorkspaceUpdateCurrencyModal = (props) => { const [isVisible, setIsVisible] = useState(props.policy.outputCurrency !== CONST.CURRENCY.USD); - /** - * Call update workspace currency and hide the modal - */ - const confirmCurrencyChangeAndHideModal = useCallback(() => { + const confirmUpdateCurrencyAndHideModal = useCallback(() => { Policy.updateGeneralSettings(props.policy.id, props.policy.name, CONST.CURRENCY.USD); setIsVisible(false); ReimbursementAccount.navigateToBankAccountRoute(props.policy.id) @@ -44,7 +41,7 @@ const WorkspaceUpdateCurrencyModal = (props) => { setIsVisible(false)} prompt={props.translate('workspace.common.deleteConfirmation')} confirmText={props.translate('common.delete')} From ea7b72bbfe1dd567881e0730cb2b7fc2f3c8ff91 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 30 May 2023 12:39:52 -0600 Subject: [PATCH 005/117] redirect to workspace page --- .../ReimbursementAccount/ReimbursementAccountPage.js | 11 +++++++++++ src/pages/workspace/WorkspaceUpdateCurrencyModal.js | 5 ----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 5ec8159d6761..20f5b5e1c230 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -100,6 +100,7 @@ class ReimbursementAccountPage extends React.Component { this.continue = this.continue.bind(this); this.getDefaultStateForField = this.getDefaultStateForField.bind(this); this.goBack = this.goBack.bind(this); + this.isNavigating = false; // The first time we open this page, the props.reimbursementAccount has not been loaded from the server. // Calculating shouldShowContinueSetupButton on the default data doesn't make sense, and we should recalculate @@ -112,10 +113,20 @@ class ReimbursementAccountPage extends React.Component { } componentDidMount() { + if (this.props.policy.outputCurrency !== CONST.CURRENCY.USD) { + Navigation.navigate(ROUTES.getWorkspaceInitialRoute(this.props.policy.id)); + this.isNavigating = true; + return; + } + this.fetchData(); } componentDidUpdate(prevProps) { + if (this.isNavigating) { + return; + } + if (prevProps.network.isOffline && !this.props.network.isOffline && prevProps.reimbursementAccount.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) { this.fetchData(); } diff --git a/src/pages/workspace/WorkspaceUpdateCurrencyModal.js b/src/pages/workspace/WorkspaceUpdateCurrencyModal.js index 942c7e5d0c9f..ec6bcad34940 100644 --- a/src/pages/workspace/WorkspaceUpdateCurrencyModal.js +++ b/src/pages/workspace/WorkspaceUpdateCurrencyModal.js @@ -57,9 +57,4 @@ WorkspaceUpdateCurrencyModal.defaultProps = defaultProps; export default compose( withLocalize, - withOnyx({ - policy: { - key: ({route}) => `${ONYXKEYS.COLLECTION.POLICY}${route.params.policyID}`, - }, - }), )(WorkspaceUpdateCurrencyModal); From cac93b30dea1b2030205199ed48bc914741687c0 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 30 May 2023 13:25:38 -0600 Subject: [PATCH 006/117] add error message --- src/languages/en.js | 1 + src/languages/es.js | 1 + .../ReimbursementAccountPage.js | 39 ++++++------------- 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index cf01a68cb37a..184b04784f76 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -812,6 +812,7 @@ export default { 'In order to finish setting up your bank account, you must validate your account. Please check your email to validate your account, and return here to finish up!', hasPhoneLoginError: 'To add a verified bank account please ensure your primary login is a valid email and try again. You can add your phone number as a secondary login.', hasBeenThrottledError: 'There was an error adding your bank account. Please wait a few minutes and try again.', + hasCurrencyError: 'Unsupported currency', error: { noBankAccountAvailable: 'Sorry, no bank account is available', noBankAccountSelected: 'Please choose an account', diff --git a/src/languages/es.js b/src/languages/es.js index b845ed6b8a63..b196f189574f 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -814,6 +814,7 @@ export default { hasPhoneLoginError: 'Para agregar una cuenta bancaria verificada, asegúrate de que tu nombre de usuario principal sea un correo electrónico válido y vuelve a intentarlo. Puedes agregar tu número de teléfono como nombre de usuario secundario.', hasBeenThrottledError: 'Se produjo un error al intentar agregar tu cuenta bancaria. Por favor, espera unos minutos e inténtalo de nuevo.', + hasCurrencyError: 'Unsupported currency', error: { noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', noBankAccountSelected: 'Por favor, elige una cuenta bancaria', diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 20f5b5e1c230..9f55f6dbe105 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -113,20 +113,10 @@ class ReimbursementAccountPage extends React.Component { } componentDidMount() { - if (this.props.policy.outputCurrency !== CONST.CURRENCY.USD) { - Navigation.navigate(ROUTES.getWorkspaceInitialRoute(this.props.policy.id)); - this.isNavigating = true; - return; - } - this.fetchData(); } componentDidUpdate(prevProps) { - if (this.isNavigating) { - return; - } - if (prevProps.network.isOffline && !this.props.network.isOffline && prevProps.reimbursementAccount.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) { this.fetchData(); } @@ -364,27 +354,20 @@ class ReimbursementAccountPage extends React.Component { ); } - let errorComponent; + let errorText; const userHasPhonePrimaryEmail = Str.endsWith(this.props.session.email, CONST.SMS.DOMAIN); + const throttledDate = lodashGet(this.props.reimbursementAccount, 'throttledDate'); + const hasUnsupportedCurrency = lodashGet(this.props.policy, 'outputCurrency', '') !== CONST.CURRENCY.USD; if (userHasPhonePrimaryEmail) { - errorComponent = ( - - {this.props.translate('bankAccount.hasPhoneLoginError')} - - ); - } - - const throttledDate = lodashGet(this.props.reimbursementAccount, 'throttledDate'); - if (throttledDate) { - errorComponent = ( - - {this.props.translate('bankAccount.hasBeenThrottledError')} - - ); + errorText = this.props.translate('bankAccount.hasPhoneLoginError'); + } else if (throttledDate) { + errorText = this.props.translate('bankAccount.hasPhoneLoginError'); + } else if (hasUnsupportedCurrency) { + errorText = this.props.translate('bankAccount.hasCurrencyError'); } - if (errorComponent) { + if (errorText) { return ( - {errorComponent} + + {errorText} + ); } From d408b8cea070fb85af2bdb271d71ad9d469745f5 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 30 May 2023 13:33:58 -0600 Subject: [PATCH 007/117] update translate --- src/languages/en.js | 5 +++-- src/languages/es.js | 5 +++-- .../ReimbursementAccountPage.js | 1 - src/pages/workspace/WorkspaceInitialPage.js | 14 +++++++------- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 184b04784f76..4622bb39dfec 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -1067,8 +1067,6 @@ export default { reconcileCards: 'Reconcile cards', settlementFrequency: 'Settlement frequency', deleteConfirmation: 'Are you sure you want to delete this workspace?', - growlMessageOnDelete: 'Workspace deleted', - growlMessageOnDeleteError: 'This workspace cannot be deleted right now because reports are actively being processed', unavailable: 'Unavailable workspace', memberNotFound: 'Member not found. To invite a new member to the workspace, please use the Invite button above.', goToRoom: ({roomName}) => `Go to ${roomName} room`, @@ -1200,6 +1198,9 @@ export default { bankAccountAnyTransactions: ' bank account. Any outstanding transactions for this account will still complete.', clearProgress: 'Starting over will clear the progress you have made so far.', areYouSure: 'Are you sure?', + updateCurrency: 'Update currency title', + updateCurrencyPrompt: 'Update currency prompt', + confirmUpdateCurrency: 'Update currency button', }, }, getAssistancePage: { diff --git a/src/languages/es.js b/src/languages/es.js index b196f189574f..f0452d5c3118 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -1071,9 +1071,7 @@ export default { issueAndManageCards: 'Emitir y gestionar tarjetas', reconcileCards: 'Reconciliar tarjetas', settlementFrequency: 'Frecuencia de liquidación', - growlMessageOnDelete: 'Espacio de trabajo eliminado', deleteConfirmation: '¿Estás seguro de que quieres eliminar este espacio de trabajo?', - growlMessageOnDeleteError: 'No se puede eliminar el espacio de trabajo porque tiene informes que están siendo procesados', unavailable: 'Espacio de trabajo no disponible', memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro al espacio de trabajo, por favor, utiliza el botón Invitar que está arriba.', goToRoom: ({roomName}) => `Ir a la sala ${roomName}`, @@ -1206,6 +1204,9 @@ export default { bankAccountAnyTransactions: '. Los reembolsos pendientes serán completados sin problemas.', clearProgress: 'Empezar de nuevo descartará lo completado hasta ahora.', areYouSure: '¿Estás seguro?', + updateCurrency: 'Update currency title', + updateCurrencyPrompt: 'Update currency prompt', + confirmUpdateCurrency: 'Update currency button', }, }, getAssistancePage: { diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 9f55f6dbe105..3c51853ea9bb 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -100,7 +100,6 @@ class ReimbursementAccountPage extends React.Component { this.continue = this.continue.bind(this); this.getDefaultStateForField = this.getDefaultStateForField.bind(this); this.goBack = this.goBack.bind(this); - this.isNavigating = false; // The first time we open this page, the props.reimbursementAccount has not been loaded from the server. // Calculating shouldShowContinueSetupButton on the default data doesn't make sense, and we should recalculate diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index 6b66880333db..3b3252a987ec 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -66,7 +66,7 @@ function dismissError(policyID) { const WorkspaceInitialPage = (props) => { const policy = props.policy; const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false); - const [isUpdateCurrencyModalOpen, setIsUpdateCurrencyModalOpen] = useState(false); + const [isCurrencyModalOpen, setIsCurrencyModalOpen] = useState(false); const hasPolicyCreationError = Boolean(policy.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD && policy.errors); /** @@ -84,7 +84,7 @@ const WorkspaceInitialPage = (props) => { */ const confirmCurrencyChangeAndHideModal = useCallback(() => { Policy.updateGeneralSettings(policy.id, policy.name, CONST.CURRENCY.USD); - setIsUpdateCurrencyModalOpen(false); + setIsCurrencyModalOpen(false); ReimbursementAccount.navigateToBankAccountRoute(policy.id) }, [policy]); @@ -249,12 +249,12 @@ const WorkspaceInitialPage = (props) => { setIsUpdateCurrencyModalOpen(false)} - prompt={`Adding a bank account is currently limited to Workspaces using USD as a default currency. Would you like you update ${policy.name}'s default currency to USD?`} - confirmText="Update currency" + onCancel={() => setIsCurrencyModalOpen(false)} + prompt={props.translate('workspace.bankAccount.updateCurrencyPrompt')} + confirmText={props.translate('workspace.bankAccount.confirmUpdateCurrency')} cancelText={props.translate('common.cancel')} danger /> From 6e3b32caec0d21c8e2f8832b44360881cde9625c Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 30 May 2023 13:35:19 -0600 Subject: [PATCH 008/117] fix callback type --- src/pages/workspace/WorkspaceInitialPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index 3b3252a987ec..e319fb61beed 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -146,7 +146,7 @@ const WorkspaceInitialPage = (props) => { { translationKey: 'workspace.common.bankAccount', icon: Expensicons.Bank, - action: () => policy.outputCurrency === CONST.CURRENCY.USD ? ReimbursementAccount.navigateToBankAccountRoute(policy.id) : setIsUpdateCurrencyModalOpen(true), + action: () => policy.outputCurrency === CONST.CURRENCY.USD ? ReimbursementAccount.navigateToBankAccountRoute(policy.id) : setIsCurrencyModalOpen(true), brickRoadIndicator: !_.isEmpty(props.reimbursementAccount.errors) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : '', }, ]; From f091adf2594049682f7e3ae04a8a5b825257dce9 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 30 May 2023 13:37:51 -0600 Subject: [PATCH 009/117] update copy path --- src/pages/workspace/WorkspaceInitialPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index e319fb61beed..4daa6ce3dc56 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -249,7 +249,7 @@ const WorkspaceInitialPage = (props) => { setIsCurrencyModalOpen(false)} From c31bed2850323bd47497c3099d67163f89709913 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 30 May 2023 13:38:35 -0600 Subject: [PATCH 010/117] rm WorkspaceUpdateCurrencyModal --- .../workspace/WorkspaceUpdateCurrencyModal.js | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/pages/workspace/WorkspaceUpdateCurrencyModal.js diff --git a/src/pages/workspace/WorkspaceUpdateCurrencyModal.js b/src/pages/workspace/WorkspaceUpdateCurrencyModal.js deleted file mode 100644 index ec6bcad34940..000000000000 --- a/src/pages/workspace/WorkspaceUpdateCurrencyModal.js +++ /dev/null @@ -1,60 +0,0 @@ -import React, {useState, useCallback} from 'react'; -import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import ConfirmModal from '../../components/ConfirmModal'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import * as Policy from '../../libs/actions/Policy'; -import * as ReimbursementAccount from '../../libs/actions/ReimbursementAccount'; - -const propTypes = { - /** Reimbursement account data */ - policy: PropTypes.shape({ - id: PropTypes.string, - name: PropTypes.string, - outputCurrency: PropTypes.string, - }), - - ...withLocalizePropTypes, -}; - -const defaultProps = { - policy: { - id: '', - name: '', - outputCurrency: 'USD', - }, -}; - -const WorkspaceUpdateCurrencyModal = (props) => { - const [isVisible, setIsVisible] = useState(props.policy.outputCurrency !== CONST.CURRENCY.USD); - - const confirmUpdateCurrencyAndHideModal = useCallback(() => { - Policy.updateGeneralSettings(props.policy.id, props.policy.name, CONST.CURRENCY.USD); - setIsVisible(false); - ReimbursementAccount.navigateToBankAccountRoute(props.policy.id) - }, [props.policy]); - - return ( - setIsVisible(false)} - prompt={props.translate('workspace.common.deleteConfirmation')} - confirmText={props.translate('common.delete')} - cancelText={props.translate('common.cancel')} - danger - /> - ) -}; - -WorkspaceUpdateCurrencyModal.displayName = 'WorkspaceUpdateCurrencyModal'; -WorkspaceUpdateCurrencyModal.propTypes = propTypes; -WorkspaceUpdateCurrencyModal.defaultProps = defaultProps; - -export default compose( - withLocalize, -)(WorkspaceUpdateCurrencyModal); From f5fe5f93baf02aa8c00fd613134b6a5e86a6ab2c Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 30 May 2023 13:47:45 -0600 Subject: [PATCH 011/117] fix style --- src/languages/en.js | 2 +- src/pages/workspace/WorkspaceInitialPage.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 4622bb39dfec..480150eebe74 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -812,7 +812,7 @@ export default { 'In order to finish setting up your bank account, you must validate your account. Please check your email to validate your account, and return here to finish up!', hasPhoneLoginError: 'To add a verified bank account please ensure your primary login is a valid email and try again. You can add your phone number as a secondary login.', hasBeenThrottledError: 'There was an error adding your bank account. Please wait a few minutes and try again.', - hasCurrencyError: 'Unsupported currency', + hasCurrencyError: 'Unsupported currency', error: { noBankAccountAvailable: 'Sorry, no bank account is available', noBankAccountSelected: 'Please choose an account', diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index 4daa6ce3dc56..b8783b15c81f 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -85,9 +85,9 @@ const WorkspaceInitialPage = (props) => { const confirmCurrencyChangeAndHideModal = useCallback(() => { Policy.updateGeneralSettings(policy.id, policy.name, CONST.CURRENCY.USD); setIsCurrencyModalOpen(false); - ReimbursementAccount.navigateToBankAccountRoute(policy.id) + ReimbursementAccount.navigateToBankAccountRoute(policy.id); }, [policy]); - + /** * Navigates to workspace rooms * @param {String} chatType @@ -146,7 +146,7 @@ const WorkspaceInitialPage = (props) => { { translationKey: 'workspace.common.bankAccount', icon: Expensicons.Bank, - action: () => policy.outputCurrency === CONST.CURRENCY.USD ? ReimbursementAccount.navigateToBankAccountRoute(policy.id) : setIsCurrencyModalOpen(true), + action: () => (policy.outputCurrency === CONST.CURRENCY.USD ? ReimbursementAccount.navigateToBankAccountRoute(policy.id) : setIsCurrencyModalOpen(true)), brickRoadIndicator: !_.isEmpty(props.reimbursementAccount.errors) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : '', }, ]; From f42e37ee1255ab724ed53842b37db354fe70d449 Mon Sep 17 00:00:00 2001 From: Robert Kozik Date: Mon, 5 Jun 2023 19:34:04 +0200 Subject: [PATCH 012/117] migrate PressableWithotFocus to GenericPressable --- .../HTMLEngineProvider/HTMLRenderers/ImageRenderer.js | 7 +++++-- src/components/PressableWithoutFocus.js | 6 +++--- src/pages/DetailsPage.js | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js index eb23efdfe58e..53b625e6f05c 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js @@ -8,6 +8,7 @@ import CONST from '../../../CONST'; import {ShowContextMenuContext, showContextMenuForReport} from '../../ShowContextMenuContext'; import tryResolveUrlFromApiRoot from '../../../libs/tryResolveUrlFromApiRoot'; import * as ReportUtils from '../../../libs/ReportUtils'; +import withLocalize, {withLocalizePropTypes} from '../../withLocalize'; const ImageRenderer = (props) => { const htmlAttribs = props.tnode.attributes; @@ -63,6 +64,8 @@ const ImageRenderer = (props) => { styles={[styles.noOutline, styles.alignItemsStart]} onPress={show} onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))} + accessibilityRole="button" + accessibilityLabel={props.translate('common.attachment')} > { ); }; -ImageRenderer.propTypes = htmlRendererPropTypes; +ImageRenderer.propTypes = {...htmlRendererPropTypes, ...withLocalizePropTypes}; ImageRenderer.displayName = 'ImageRenderer'; -export default ImageRenderer; +export default withLocalize(ImageRenderer); diff --git a/src/components/PressableWithoutFocus.js b/src/components/PressableWithoutFocus.js index 5b441f4ee9f4..9953c4834101 100644 --- a/src/components/PressableWithoutFocus.js +++ b/src/components/PressableWithoutFocus.js @@ -1,6 +1,6 @@ import React from 'react'; -import {Pressable} from 'react-native'; import PropTypes from 'prop-types'; +import GenericPressable from './Pressable/GenericPressable'; const propTypes = { /** Element that should be clickable */ @@ -42,14 +42,14 @@ class PressableWithoutFocus extends React.Component { render() { return ( - (this.pressableRef = el)} style={this.props.styles} > {this.props.children} - + ); } } diff --git a/src/pages/DetailsPage.js b/src/pages/DetailsPage.js index 3c1f124aca1a..2315dbc3860e 100755 --- a/src/pages/DetailsPage.js +++ b/src/pages/DetailsPage.js @@ -144,6 +144,8 @@ class DetailsPage extends React.PureComponent { Date: Tue, 6 Jun 2023 23:42:53 +0200 Subject: [PATCH 013/117] hoist GenericPressable proptypes to PressableWithoutFocus --- src/components/PressableWithoutFocus.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/PressableWithoutFocus.js b/src/components/PressableWithoutFocus.js index 9953c4834101..45d60eb6892a 100644 --- a/src/components/PressableWithoutFocus.js +++ b/src/components/PressableWithoutFocus.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import GenericPressable from './Pressable/GenericPressable'; +import genericPressablePropTypes from './Pressable/GenericPressable/PropTypes'; const propTypes = { /** Element that should be clickable */ @@ -15,6 +16,9 @@ const propTypes = { /** Styles that should be passed to touchable container */ // eslint-disable-next-line react/forbid-prop-types styles: PropTypes.arrayOf(PropTypes.object), + + /** Proptypes of pressable component used for implementation */ + ...genericPressablePropTypes.pressablePropTypes, }; const defaultProps = { From e64e2ec7e69de9cf3d4cb0ca714e255830a3ae62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Wed, 7 Jun 2023 10:49:32 +0200 Subject: [PATCH 014/117] migrate ReportActionItemSingle to PressableWithoutFeedback --- src/pages/home/report/ReportActionItemSingle.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 96fd6be6ad26..dc0dbb069774 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -1,6 +1,6 @@ import lodashGet from 'lodash/get'; import React from 'react'; -import {View, Pressable} from 'react-native'; +import {View} from 'react-native'; import PropTypes from 'prop-types'; import _ from 'underscore'; import reportActionPropTypes from './reportActionPropTypes'; @@ -22,6 +22,7 @@ import CONST from '../../../CONST'; import SubscriptAvatar from '../../../components/SubscriptAvatar'; import reportPropTypes from '../../reportPropTypes'; import * as UserUtils from '../../../libs/UserUtils'; +import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; const propTypes = { /** All the data of the action */ @@ -84,11 +85,13 @@ const ReportActionItemSingle = (props) => { return ( - showUserDetails(actorEmail)} + accessibilityLabel={actorEmail} + accessibilityRole="image" > {props.shouldShowSubscriptAvatar ? ( @@ -110,15 +113,17 @@ const ReportActionItemSingle = (props) => { )} - + {props.showHeader ? ( - showUserDetails(actorEmail)} + accessibilityLabel={actorEmail} + accessibilityRole="text" > {_.map(personArray, (fragment, index) => ( { isSingleLine /> ))} - + ) : null} From c1d7329eab59eea5f9ef0e20c488eac38181d4c1 Mon Sep 17 00:00:00 2001 From: Robert Kozik Date: Thu, 8 Jun 2023 00:04:57 +0200 Subject: [PATCH 015/117] move PressableWithoutFoucs to Pressable folder --- .../HTMLEngineProvider/HTMLRenderers/ImageRenderer.js | 2 +- src/components/{ => Pressable}/PressableWithoutFocus.js | 8 ++++++-- src/pages/DetailsPage.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) rename src/components/{ => Pressable}/PressableWithoutFocus.js (84%) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js index 53b625e6f05c..c2e8615a834f 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js @@ -3,7 +3,7 @@ import htmlRendererPropTypes from './htmlRendererPropTypes'; import AttachmentModal from '../../AttachmentModal'; import styles from '../../../styles/styles'; import ThumbnailImage from '../../ThumbnailImage'; -import PressableWithoutFocus from '../../PressableWithoutFocus'; +import PressableWithoutFocus from '../../Pressable/PressableWithoutFocus'; import CONST from '../../../CONST'; import {ShowContextMenuContext, showContextMenuForReport} from '../../ShowContextMenuContext'; import tryResolveUrlFromApiRoot from '../../../libs/tryResolveUrlFromApiRoot'; diff --git a/src/components/PressableWithoutFocus.js b/src/components/Pressable/PressableWithoutFocus.js similarity index 84% rename from src/components/PressableWithoutFocus.js rename to src/components/Pressable/PressableWithoutFocus.js index 45d60eb6892a..fb31e8faaed7 100644 --- a/src/components/PressableWithoutFocus.js +++ b/src/components/Pressable/PressableWithoutFocus.js @@ -1,7 +1,8 @@ import React from 'react'; +import _ from 'underscore'; import PropTypes from 'prop-types'; -import GenericPressable from './Pressable/GenericPressable'; -import genericPressablePropTypes from './Pressable/GenericPressable/PropTypes'; +import GenericPressable from './GenericPressable'; +import genericPressablePropTypes from './GenericPressable/PropTypes'; const propTypes = { /** Element that should be clickable */ @@ -45,12 +46,15 @@ class PressableWithoutFocus extends React.Component { } render() { + const restProps = _.omit(this.props, ['children', 'onPress', 'onLongPress', 'styles']); return ( (this.pressableRef = el)} style={this.props.styles} + // eslint-disable-next-line react/jsx-props-no-spreading + {...restProps} > {this.props.children} diff --git a/src/pages/DetailsPage.js b/src/pages/DetailsPage.js index 2315dbc3860e..b51d6081b16d 100755 --- a/src/pages/DetailsPage.js +++ b/src/pages/DetailsPage.js @@ -23,7 +23,7 @@ import * as ReportUtils from '../libs/ReportUtils'; import * as Expensicons from '../components/Icon/Expensicons'; import MenuItem from '../components/MenuItem'; import AttachmentModal from '../components/AttachmentModal'; -import PressableWithoutFocus from '../components/PressableWithoutFocus'; +import PressableWithoutFocus from '../components/Pressable/PressableWithoutFocus'; import * as Report from '../libs/actions/Report'; import OfflineWithFeedback from '../components/OfflineWithFeedback'; import AutoUpdateTime from '../components/AutoUpdateTime'; From bcea8ea507c73c520c25e129f286ff86076dca15 Mon Sep 17 00:00:00 2001 From: Robert Kozik Date: Thu, 8 Jun 2023 00:05:46 +0200 Subject: [PATCH 016/117] fix propTypes of PressableWithFeedback - add missing propTypes --- src/components/Pressable/PressableWithFeedback.js | 11 +++++++++-- src/components/Pressable/PressableWithoutFocus.js | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/Pressable/PressableWithFeedback.js b/src/components/Pressable/PressableWithFeedback.js index 281492568867..630e2b5b4946 100644 --- a/src/components/Pressable/PressableWithFeedback.js +++ b/src/components/Pressable/PressableWithFeedback.js @@ -7,11 +7,12 @@ import GenericPressablePropTypes from './GenericPressable/PropTypes'; import OpacityView from '../OpacityView'; import variables from '../../styles/variables'; import * as StyleUtils from '../../styles/StyleUtils'; +import stylePropType from '../../styles/stylePropTypes'; const omittedProps = ['style', 'pressStyle', 'hoverStyle', 'focusStyle', 'wrapperStyle']; const PressableWithFeedbackPropTypes = { - ..._.omit(GenericPressablePropTypes.pressablePropTypes, omittedProps), + ...GenericPressablePropTypes.pressablePropTypes, /** * Determines what opacity value should be applied to the underlaying view when Pressable is pressed. * To disable dimming, pass 1 as pressDimmingValue @@ -24,10 +25,16 @@ const PressableWithFeedbackPropTypes = { * @default variables.hoverDimValue */ hoverDimmingValue: propTypes.number, + + /** + * Style to apply for wrapper pressable component + * @default [] + */ + wrapperStyle: stylePropType, }; const PressableWithFeedbackDefaultProps = { - ..._.omit(GenericPressablePropTypes.defaultProps, omittedProps), + ...GenericPressablePropTypes.defaultProps, pressDimmingValue: variables.pressDimValue, hoverDimmingValue: variables.hoverDimValue, wrapperStyle: [], diff --git a/src/components/Pressable/PressableWithoutFocus.js b/src/components/Pressable/PressableWithoutFocus.js index fb31e8faaed7..c5c858b52ee2 100644 --- a/src/components/Pressable/PressableWithoutFocus.js +++ b/src/components/Pressable/PressableWithoutFocus.js @@ -17,7 +17,7 @@ const propTypes = { /** Styles that should be passed to touchable container */ // eslint-disable-next-line react/forbid-prop-types styles: PropTypes.arrayOf(PropTypes.object), - + /** Proptypes of pressable component used for implementation */ ...genericPressablePropTypes.pressablePropTypes, }; From 0f9bc390ef138b7df56c84d9a182f802cf454192 Mon Sep 17 00:00:00 2001 From: Robert Kozik Date: Thu, 8 Jun 2023 01:39:23 +0200 Subject: [PATCH 017/117] hoist propTypes of ImageRenderer to the top of the file as stated in guidelines --- .../HTMLEngineProvider/HTMLRenderers/ImageRenderer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js index c2e8615a834f..cc492ac1a830 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js @@ -10,6 +10,8 @@ import tryResolveUrlFromApiRoot from '../../../libs/tryResolveUrlFromApiRoot'; import * as ReportUtils from '../../../libs/ReportUtils'; import withLocalize, {withLocalizePropTypes} from '../../withLocalize'; +const propTypes = {...htmlRendererPropTypes, ...withLocalizePropTypes}; + const ImageRenderer = (props) => { const htmlAttribs = props.tnode.attributes; @@ -82,7 +84,7 @@ const ImageRenderer = (props) => { ); }; -ImageRenderer.propTypes = {...htmlRendererPropTypes, ...withLocalizePropTypes}; +ImageRenderer.propTypes = propTypes; ImageRenderer.displayName = 'ImageRenderer'; export default withLocalize(ImageRenderer); From 0b49f6c8b5ac235479a73badd4e3ca94a5f13e67 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 8 Jun 2023 12:39:28 -0600 Subject: [PATCH 018/117] update modal copy --- src/languages/en.js | 6 +++--- src/languages/es.js | 6 +++--- src/pages/workspace/WorkspaceInitialPage.js | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 9c5d03879291..51126b0eac17 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -1203,9 +1203,9 @@ export default { bankAccountAnyTransactions: ' bank account. Any outstanding transactions for this account will still complete.', clearProgress: 'Starting over will clear the progress you have made so far.', areYouSure: 'Are you sure?', - updateCurrency: 'Update currency title', - updateCurrencyPrompt: 'Update currency prompt', - confirmUpdateCurrency: 'Update currency button', + workspaceCurrency: 'Workspace currency', + updateCurrencyPrompt: 'It looks like your Workspace is currently set to a different currency than USD. Please click the button below to update your currency to USD now.', + updateToUSD: 'Update to USD', }, }, getAssistancePage: { diff --git a/src/languages/es.js b/src/languages/es.js index 68255899c218..3197eb2ffc54 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -1209,9 +1209,9 @@ export default { bankAccountAnyTransactions: '. Los reembolsos pendientes serán completados sin problemas.', clearProgress: 'Empezar de nuevo descartará lo completado hasta ahora.', areYouSure: '¿Estás seguro?', - updateCurrency: 'Update currency title', - updateCurrencyPrompt: 'Update currency prompt', - confirmUpdateCurrency: 'Update currency button', + workspaceCurrency: 'Moneda del espacio de trabajo', + updateCurrencyPrompt: 'Parece que tu espacio de trabajo está configurado actualmente en una moneda diferente a USD. Por favor, haz clic en el botón de abajo para actualizar tu moneda a USD ahora.', + updateToUSD: 'Actualizar a USD', }, }, getAssistancePage: { diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index b38e2d255813..825546aab0d4 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -248,12 +248,12 @@ const WorkspaceInitialPage = (props) => { setIsCurrencyModalOpen(false)} prompt={props.translate('workspace.bankAccount.updateCurrencyPrompt')} - confirmText={props.translate('workspace.bankAccount.confirmUpdateCurrency')} + confirmText={props.translate('workspace.bankAccount.updateToUSD')} cancelText={props.translate('common.cancel')} danger /> From e8af5b0e1449fa52e670be165cb6a190a21085ea Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 8 Jun 2023 12:56:47 -0600 Subject: [PATCH 019/117] update error copy --- src/languages/en.js | 2 +- src/languages/es.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 51126b0eac17..6fe593d1dae2 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -816,7 +816,7 @@ export default { 'In order to finish setting up your bank account, you must validate your account. Please check your email to validate your account, and return here to finish up!', hasPhoneLoginError: 'To add a verified bank account please ensure your primary login is a valid email and try again. You can add your phone number as a secondary login.', hasBeenThrottledError: 'There was an error adding your bank account. Please wait a few minutes and try again.', - hasCurrencyError: 'Unsupported currency', + hasCurrencyError: 'Oops! It appears that your workspace currency is set to a different currency than USD. To proceed, please update your workspace currency and try again', error: { noBankAccountAvailable: 'Sorry, no bank account is available', noBankAccountSelected: 'Please choose an account', diff --git a/src/languages/es.js b/src/languages/es.js index 3197eb2ffc54..fd3bf6afce93 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -818,7 +818,7 @@ export default { hasPhoneLoginError: 'Para agregar una cuenta bancaria verificada, asegúrate de que tu nombre de usuario principal sea un correo electrónico válido y vuelve a intentarlo. Puedes agregar tu número de teléfono como nombre de usuario secundario.', hasBeenThrottledError: 'Se produjo un error al intentar agregar tu cuenta bancaria. Por favor, espera unos minutos e inténtalo de nuevo.', - hasCurrencyError: 'Unsupported currency', + hasCurrencyError: '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente a USD. Para continuar, por favor actualiza la moneda de tu espacio de trabajo e inténtalo nuevamente.', error: { noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', noBankAccountSelected: 'Por favor, elige una cuenta bancaria', From 1841745ff082f5449948ff2bc903dc03becb9361 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 8 Jun 2023 13:01:25 -0600 Subject: [PATCH 020/117] use more explicit copy --- src/languages/en.js | 2 +- src/languages/es.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 6fe593d1dae2..8b0c7362c78d 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -816,7 +816,7 @@ export default { 'In order to finish setting up your bank account, you must validate your account. Please check your email to validate your account, and return here to finish up!', hasPhoneLoginError: 'To add a verified bank account please ensure your primary login is a valid email and try again. You can add your phone number as a secondary login.', hasBeenThrottledError: 'There was an error adding your bank account. Please wait a few minutes and try again.', - hasCurrencyError: 'Oops! It appears that your workspace currency is set to a different currency than USD. To proceed, please update your workspace currency and try again', + hasCurrencyError: 'Oops! It appears that your workspace currency is set to a different currency than USD. To proceed, please set it to USD and try again', error: { noBankAccountAvailable: 'Sorry, no bank account is available', noBankAccountSelected: 'Please choose an account', diff --git a/src/languages/es.js b/src/languages/es.js index fd3bf6afce93..289d8d5cf1d0 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -818,7 +818,7 @@ export default { hasPhoneLoginError: 'Para agregar una cuenta bancaria verificada, asegúrate de que tu nombre de usuario principal sea un correo electrónico válido y vuelve a intentarlo. Puedes agregar tu número de teléfono como nombre de usuario secundario.', hasBeenThrottledError: 'Se produjo un error al intentar agregar tu cuenta bancaria. Por favor, espera unos minutos e inténtalo de nuevo.', - hasCurrencyError: '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente a USD. Para continuar, por favor actualiza la moneda de tu espacio de trabajo e inténtalo nuevamente.', + hasCurrencyError: '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente al USD. Para continuar, por favor configúrala en USD e inténtalo nuevamente.', error: { noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', noBankAccountSelected: 'Por favor, elige una cuenta bancaria', From 23e5c97308ded3a26452dd118cb2c1c2ffeec005 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 8 Jun 2023 13:02:00 -0600 Subject: [PATCH 021/117] fix typo --- src/languages/es.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.js b/src/languages/es.js index 289d8d5cf1d0..cedfa0acce91 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -818,7 +818,7 @@ export default { hasPhoneLoginError: 'Para agregar una cuenta bancaria verificada, asegúrate de que tu nombre de usuario principal sea un correo electrónico válido y vuelve a intentarlo. Puedes agregar tu número de teléfono como nombre de usuario secundario.', hasBeenThrottledError: 'Se produjo un error al intentar agregar tu cuenta bancaria. Por favor, espera unos minutos e inténtalo de nuevo.', - hasCurrencyError: '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente al USD. Para continuar, por favor configúrala en USD e inténtalo nuevamente.', + hasCurrencyError: '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente a USD. Para continuar, por favor configúrala en USD e inténtalo nuevamente.', error: { noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', noBankAccountSelected: 'Por favor, elige una cuenta bancaria', From 96dee89a9d5af57f6d8ae59df894622f99a91f8b Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 8 Jun 2023 13:23:44 -0600 Subject: [PATCH 022/117] fix style --- src/languages/es.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/languages/es.js b/src/languages/es.js index cedfa0acce91..8ea21ca65800 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -818,7 +818,8 @@ export default { hasPhoneLoginError: 'Para agregar una cuenta bancaria verificada, asegúrate de que tu nombre de usuario principal sea un correo electrónico válido y vuelve a intentarlo. Puedes agregar tu número de teléfono como nombre de usuario secundario.', hasBeenThrottledError: 'Se produjo un error al intentar agregar tu cuenta bancaria. Por favor, espera unos minutos e inténtalo de nuevo.', - hasCurrencyError: '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente a USD. Para continuar, por favor configúrala en USD e inténtalo nuevamente.', + hasCurrencyError: + '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente a USD. Para continuar, por favor configúrala en USD e inténtalo nuevamente.', error: { noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', noBankAccountSelected: 'Por favor, elige una cuenta bancaria', @@ -1210,7 +1211,8 @@ export default { clearProgress: 'Empezar de nuevo descartará lo completado hasta ahora.', areYouSure: '¿Estás seguro?', workspaceCurrency: 'Moneda del espacio de trabajo', - updateCurrencyPrompt: 'Parece que tu espacio de trabajo está configurado actualmente en una moneda diferente a USD. Por favor, haz clic en el botón de abajo para actualizar tu moneda a USD ahora.', + updateCurrencyPrompt: + 'Parece que tu espacio de trabajo está configurado actualmente en una moneda diferente a USD. Por favor, haz clic en el botón de abajo para actualizar tu moneda a USD ahora.', updateToUSD: 'Actualizar a USD', }, }, From 4517b50aedcdb2eb9ddd243aa9584339587e31c5 Mon Sep 17 00:00:00 2001 From: Thiago Brezinski Date: Fri, 9 Jun 2023 16:10:20 +0100 Subject: [PATCH 023/117] fix: CodesPage buttons overlapping --- .../Security/TwoFactorAuth/CodesPage.js | 20 +++++++++---------- src/styles/styles.js | 6 +++--- src/styles/utilities/spacing.js | 4 ++++ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/pages/settings/Security/TwoFactorAuth/CodesPage.js b/src/pages/settings/Security/TwoFactorAuth/CodesPage.js index 02911676d430..65309624404d 100644 --- a/src/pages/settings/Security/TwoFactorAuth/CodesPage.js +++ b/src/pages/settings/Security/TwoFactorAuth/CodesPage.js @@ -67,7 +67,7 @@ function CodesPage(props) { onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_SECURITY)} /> - +
))} - +
- -