From de66ccd0a8c1357226ca2806ba24a82ec0e950ca Mon Sep 17 00:00:00 2001 From: madmax330 Date: Mon, 11 Jul 2022 20:48:12 +0200 Subject: [PATCH 01/16] Refactor RestartBankAccountSetup --- .../resetFreePlanBankAccount.js | 56 +++++++++---------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js index 4f54352169ff..a2c49a735448 100644 --- a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js +++ b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js @@ -1,12 +1,10 @@ -import Onyx from 'react-native-onyx'; import lodashGet from 'lodash/get'; import ONYXKEYS from '../../../ONYXKEYS'; -import * as DeprecatedAPI from '../../deprecatedAPI'; import CONST from '../../../CONST'; import * as store from './store'; -import Growl from '../../Growl'; import Navigation from '../../Navigation/Navigation'; import ROUTES from '../../../ROUTES'; +import API from '../../API'; /** * Reset user's reimbursement account. This will delete the bank account. @@ -20,35 +18,33 @@ function resetFreePlanBankAccount() { throw new Error('Missing credentials when attempting to reset free plan bank account'); } - // Create a copy of the reimbursementAccount data since we are going to optimistically wipe it so the UI changes quickly. - // If the API request fails we will set this data back into Onyx. - const previousACHData = {...store.getReimbursementAccountInSetup()}; - Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {achData: null, shouldShowResetModal: false}); - DeprecatedAPI.DeleteBankAccount({bankAccountID, ownerEmail: store.getCredentials().login}) - .then((response) => { - if (response.jsonCode !== 200) { - // Unable to delete bank account so we restore the bank account details - Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {achData: previousACHData}); - Growl.error('Sorry we were unable to delete this bank account. Please try again later'); - return; - } + const achData = { + useOnfido: true, + policyID: '', + isInSetup: true, + domainLimit: 0, + currentStep: CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT, + }; - // Reset reimbursement account, and clear draft user input - const achData = { - useOnfido: true, - policyID: '', - isInSetup: true, - domainLimit: 0, - currentStep: CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT, - }; - - Onyx.set(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {achData}); - Onyx.set(ONYXKEYS.REIMBURSEMENT_ACCOUNT_DRAFT, null); - - // Clear the NVP for the bank account so the user can add a new one and navigate back to bank account page - DeprecatedAPI.SetNameValuePair({name: CONST.NVP.FREE_PLAN_BANK_ACCOUNT_ID, value: ''}); - Navigation.navigate(ROUTES.getBankAccountRoute()); + API.write('RestartBankAccountSetup', + { + bankAccountID, + ownerEmail: store.getCredentials().login, + }, + { + optimisticData: [{ + onyxMethod: 'merge', + key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, + value: {achData: achData, shouldShowResetModal: false}, + }, + { + onyxMethod: 'set', + key: ONYXKEYS.REIMBURSEMENT_ACCOUNT_DRAFT, + value: null, + }], }); + + Navigation.navigate(ROUTES.getBankAccountRoute()); } export default resetFreePlanBankAccount; From af321b2a0449df00fe424e6c21d578ce582d788f Mon Sep 17 00:00:00 2001 From: madmax330 Date: Mon, 11 Jul 2022 22:04:36 +0200 Subject: [PATCH 02/16] small fixes --- .../actions/ReimbursementAccount/resetFreePlanBankAccount.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js index a2c49a735448..3ef61cef0885 100644 --- a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js +++ b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js @@ -4,7 +4,7 @@ import CONST from '../../../CONST'; import * as store from './store'; import Navigation from '../../Navigation/Navigation'; import ROUTES from '../../../ROUTES'; -import API from '../../API'; +import * as API from '../../API'; /** * Reset user's reimbursement account. This will delete the bank account. @@ -26,7 +26,7 @@ function resetFreePlanBankAccount() { currentStep: CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT, }; - API.write('RestartBankAccountSetup', + API.write('RestartBankAccountSetup', { bankAccountID, ownerEmail: store.getCredentials().login, From aa1590729fba2d9db071ee5f26cd758ab02c5c7c Mon Sep 17 00:00:00 2001 From: madmax330 Date: Mon, 11 Jul 2022 22:15:24 +0200 Subject: [PATCH 03/16] style --- .../actions/ReimbursementAccount/resetFreePlanBankAccount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js index 3ef61cef0885..3ef49fbc854f 100644 --- a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js +++ b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js @@ -35,7 +35,7 @@ function resetFreePlanBankAccount() { optimisticData: [{ onyxMethod: 'merge', key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, - value: {achData: achData, shouldShowResetModal: false}, + value: {achData, shouldShowResetModal: false}, }, { onyxMethod: 'set', From c718743efb8c707bfc130b10134fd77e17445e9b Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Mon, 25 Jul 2022 10:37:48 -0700 Subject: [PATCH 04/16] add method to check for policy member error --- src/libs/actions/Policy.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index fc9b6088228d..0b902f8f6042 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -539,6 +539,15 @@ function subscribeToPolicyEvents() { }); } +/** + * Checks if we have any errors stored within the POLICY_MEMBER_LIST. Determines whether we should show a red brick road error or not + * @param {Array} policyMemberList + * @returns {Boolean} + */ +function hasPolicyMemberError(policyMemberList) { + return _.chain(policyMemberList).some(member => !_.isEmpty(member.errors)).value(); +} + export { getPolicyList, loadFullPolicy, From 50100ddf5337351db9972e9d0ccda3addd04cc73 Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Mon, 25 Jul 2022 10:38:04 -0700 Subject: [PATCH 05/16] Update Policy.js --- src/libs/actions/Policy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index 0b902f8f6042..5dbc1f25f043 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -566,4 +566,5 @@ export { setCustomUnitRate, updateLastAccessedWorkspace, subscribeToPolicyEvents, + hasPolicyMemberError, }; From 3d6f8681dc4a5dd3ac6046b46e8792d51ff0040d Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Mon, 25 Jul 2022 11:18:27 -0700 Subject: [PATCH 06/16] add brickroad indicator --- src/components/MenuItem.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index 0be18a83a916..08b3085c0be3 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -14,6 +14,8 @@ import Badge from './Badge'; import CONST from '../CONST'; import menuItemPropTypes from './menuItemPropTypes'; import SelectCircle from './SelectCircle'; +import colors from '../styles/colors'; +import variables from '../styles/variables'; const propTypes = { ...menuItemPropTypes, @@ -40,6 +42,7 @@ const defaultProps = { onPress: () => {}, interactive: true, fallbackIcon: Expensicons.FallbackAvatar, + brickRoadIndicator: undefined, }; const MenuItem = props => ( @@ -119,7 +122,6 @@ const MenuItem = props => ( {props.badgeText && } - {/* Since subtitle can be of type number, we should allow 0 to be shown */} {(props.subtitle || props.subtitle === 0) && ( @@ -130,6 +132,16 @@ const MenuItem = props => ( )} + {props.brickRoadIndicator && ( + + + + )} {props.shouldShowRightIcon && ( Date: Mon, 25 Jul 2022 11:18:36 -0700 Subject: [PATCH 07/16] pass in errors --- src/ONYXKEYS.js | 1 + src/pages/settings/InitialSettingsPage.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/ONYXKEYS.js b/src/ONYXKEYS.js index 40675a1a6a89..867447e1b530 100755 --- a/src/ONYXKEYS.js +++ b/src/ONYXKEYS.js @@ -104,6 +104,7 @@ export default { REPORTS_WITH_DRAFT: 'reportWithDraft_', REPORT_IS_COMPOSER_FULL_SIZE: 'reportIsComposerFullSize_', IS_LOADING_REPORT_ACTIONS: 'isLoadingReportActions_', + POLICY_MEMBER_LIST: 'policyMemberList_', }, // Indicates which locale should be used diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index 6d1996630d5c..e1ab9487575b 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -135,6 +135,7 @@ const InitialSettingsPage = (props) => { iconStyles: policy.avatarURL ? [] : [styles.popoverMenuIconEmphasized], iconFill: themeColors.iconReversed, fallbackIcon: Expensicons.FallbackWorkspaceAvatar, + brickRoadIndicator: 'error', })) .value(); menuItems.push(...defaultMenuItems); @@ -190,6 +191,7 @@ const InitialSettingsPage = (props) => { shouldShowRightIcon badgeText={(isPaymentItem && Permissions.canUseWallet(props.betas)) ? walletBalance : undefined} fallbackIcon={item.fallbackIcon} + brickRoadIndicator={item.brickRoadIndicator} /> ); })} From 6fddadeca2bdfb2c41a48b94acd7a705772eebe7 Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Mon, 25 Jul 2022 12:14:14 -0700 Subject: [PATCH 08/16] update to check policyMembers onyx key --- src/pages/settings/InitialSettingsPage.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index e1ab9487575b..54c483b99b9c 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -52,6 +52,12 @@ const propTypes = { role: PropTypes.string, })), + /** List of policy members */ + policyMembers: PropTypes.objectOf(PropTypes.shape({ + /** ID of the policy */ + policyID: PropTypes.string, + })), + /** The user's wallet account */ userWallet: PropTypes.shape({ /** The user's current wallet balance */ @@ -135,7 +141,7 @@ const InitialSettingsPage = (props) => { iconStyles: policy.avatarURL ? [] : [styles.popoverMenuIconEmphasized], iconFill: themeColors.iconReversed, fallbackIcon: Expensicons.FallbackWorkspaceAvatar, - brickRoadIndicator: 'error', + brickRoadIndicator: hasPolicyMemberError(allPolicyMembers.policyID.members) ? 'error' : null, })) .value(); menuItems.push(...defaultMenuItems); @@ -216,6 +222,9 @@ export default compose( policies: { key: ONYXKEYS.COLLECTION.POLICY, }, + policyMembers: { + key: ONYXKEYS.COLLECTION.POLICY_MEMBER_LIST, + }, userWallet: { key: ONYXKEYS.USER_WALLET, }, From 809fcb3611728a70d1ddfd67d5fc5d11397eb641 Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Mon, 25 Jul 2022 16:59:49 -0700 Subject: [PATCH 09/16] adjust lint --- src/pages/settings/InitialSettingsPage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index 54c483b99b9c..e8ea6dc2f7ff 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -2,6 +2,7 @@ import React from 'react'; import {View, ScrollView, Pressable} from 'react-native'; import PropTypes from 'prop-types'; import _ from 'underscore'; +import lodashGet from 'lodash/get'; import {withOnyx} from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; import styles from '../../styles/styles'; @@ -24,6 +25,7 @@ import Permissions from '../../libs/Permissions'; import networkPropTypes from '../../components/networkPropTypes'; import {withNetwork} from '../../components/OnyxProvider'; import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../components/withCurrentUserPersonalDetails'; +import * as Policy from '../../libs/actions/Policy'; const propTypes = { /* Onyx Props */ @@ -141,7 +143,7 @@ const InitialSettingsPage = (props) => { iconStyles: policy.avatarURL ? [] : [styles.popoverMenuIconEmphasized], iconFill: themeColors.iconReversed, fallbackIcon: Expensicons.FallbackWorkspaceAvatar, - brickRoadIndicator: hasPolicyMemberError(allPolicyMembers.policyID.members) ? 'error' : null, + brickRoadIndicator: Policy.hasPolicyMemberError(lodashGet(props.policyMembers, [policy.id, 'members'], [])) ? 'error' : null, })) .value(); menuItems.push(...defaultMenuItems); From 648b939142065bccb3415c3c2320a4572b155cbf Mon Sep 17 00:00:00 2001 From: Andrew Lor Date: Wed, 27 Jul 2022 12:21:10 -0600 Subject: [PATCH 10/16] issue 9485 - set dropEffect when hanlding dragover event in Composer --- src/components/Composer/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Composer/index.js b/src/components/Composer/index.js index c0a606f32958..f64f9b082c36 100755 --- a/src/components/Composer/index.js +++ b/src/components/Composer/index.js @@ -11,6 +11,8 @@ import CONST from '../../CONST'; import updateIsFullComposerAvailable from '../../libs/ComposerUtils/updateIsFullComposerAvailable'; import getNumberOfLines from '../../libs/ComposerUtils/index'; +const COPY_DROP_EFFECT = 'copy'; + const propTypes = { /** Maximum number of lines in the text input */ maxLines: PropTypes.number, @@ -197,13 +199,15 @@ class Composer extends React.Component { dragNDropListener(e) { let isOriginComposer = false; const handler = () => { + // Setting dropEffect for dragover is required for '+' icon on certain platforms/browsers (eg. Safari) switch (e.type) { case 'dragover': e.preventDefault(); + e.dataTransfer.dropEffect = COPY_DROP_EFFECT; this.props.onDragOver(e, isOriginComposer); break; case 'dragenter': - e.dataTransfer.dropEffect = 'copy'; + e.dataTransfer.dropEffect = COPY_DROP_EFFECT; this.props.onDragEnter(e, isOriginComposer); break; case 'dragleave': From b6273e44ddaf61f685155b3aebf7ec2549d66282 Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Wed, 27 Jul 2022 13:10:03 -0700 Subject: [PATCH 11/16] review comments --- src/libs/actions/Policy.js | 3 ++- src/pages/settings/InitialSettingsPage.js | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index 5dbc1f25f043..02db8ba7e3d6 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -541,7 +541,8 @@ function subscribeToPolicyEvents() { /** * Checks if we have any errors stored within the POLICY_MEMBER_LIST. Determines whether we should show a red brick road error or not - * @param {Array} policyMemberList + * Data structure: {email: {role:'bla', errors: []}, email2: {role:'bla', errors: [{1231312313: 'Unable to do X'}]}, ...} + * @param {Object} policyMemberList * @returns {Boolean} */ function hasPolicyMemberError(policyMemberList) { diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index e8ea6dc2f7ff..da05c7555cc8 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -55,10 +55,10 @@ const propTypes = { })), /** List of policy members */ - policyMembers: PropTypes.objectOf(PropTypes.shape({ - /** ID of the policy */ - policyID: PropTypes.string, - })), + policyMembers: PropTypes.objectOf(PropTypes.shape( + /** The members list is keyed by email which is dynamic so we just check that it's a string */ + PropTypes.objectOf(PropTypes.string), + )), /** The user's wallet account */ userWallet: PropTypes.shape({ @@ -80,6 +80,7 @@ const defaultProps = { currentBalance: 0, }, betas: [], + policyMembers: {}, ...withCurrentUserPersonalDetailsDefaultProps, }; @@ -143,7 +144,7 @@ const InitialSettingsPage = (props) => { iconStyles: policy.avatarURL ? [] : [styles.popoverMenuIconEmphasized], iconFill: themeColors.iconReversed, fallbackIcon: Expensicons.FallbackWorkspaceAvatar, - brickRoadIndicator: Policy.hasPolicyMemberError(lodashGet(props.policyMembers, [policy.id, 'members'], [])) ? 'error' : null, + brickRoadIndicator: Policy.hasPolicyMemberError(lodashGet(props.policyMembers, `${ONYXKEYS.COLLECTION.POLICY_MEMBER_LIST}${policy.id}`, {})) ? 'error' : null, })) .value(); menuItems.push(...defaultMenuItems); From 9ced1c61271e73fb6622f36eb2e301209d42cc4b Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Wed, 27 Jul 2022 13:23:25 -0700 Subject: [PATCH 12/16] lint js --- src/pages/settings/InitialSettingsPage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index da05c7555cc8..0cdee44e53f5 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -56,6 +56,7 @@ const propTypes = { /** List of policy members */ policyMembers: PropTypes.objectOf(PropTypes.shape( + /** The members list is keyed by email which is dynamic so we just check that it's a string */ PropTypes.objectOf(PropTypes.string), )), From 09de6664aa5ba7625e0e4b73ee689a3fd7870fc6 Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Wed, 27 Jul 2022 16:13:24 -0700 Subject: [PATCH 13/16] remove chainz --- src/libs/actions/Policy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index 02db8ba7e3d6..84232695c8e4 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -546,7 +546,7 @@ function subscribeToPolicyEvents() { * @returns {Boolean} */ function hasPolicyMemberError(policyMemberList) { - return _.chain(policyMemberList).some(member => !_.isEmpty(member.errors)).value(); + return policyMemberList.some(member => !_.isEmpty(member.errors)).value(); } export { From eb2dc7da879bda6b88ba60c1610ad76b01867248 Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Wed, 27 Jul 2022 16:39:45 -0700 Subject: [PATCH 14/16] update prop --- src/libs/actions/Policy.js | 2 +- src/pages/policyMemberPropType.js | 12 ++++++++++++ src/pages/settings/InitialSettingsPage.js | 7 ++----- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 src/pages/policyMemberPropType.js diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index 84232695c8e4..98f948f1b477 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -546,7 +546,7 @@ function subscribeToPolicyEvents() { * @returns {Boolean} */ function hasPolicyMemberError(policyMemberList) { - return policyMemberList.some(member => !_.isEmpty(member.errors)).value(); + return _.some(policyMemberList, member => !_.isEmpty(member.errors)); } export { diff --git a/src/pages/policyMemberPropType.js b/src/pages/policyMemberPropType.js new file mode 100644 index 000000000000..c8018b6a8e65 --- /dev/null +++ b/src/pages/policyMemberPropType.js @@ -0,0 +1,12 @@ +import PropTypes from 'prop-types'; + +export default PropTypes.shape({ + /** Role of the user in the policy */ + role: PropTypes.string, + + /** + * Errors from api calls on the specific user + * `{: 'error message', : 'error message 2'}` + */ + errors: PropTypes.objectOf(PropTypes.string), +}); diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index 0cdee44e53f5..985144c5d833 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -26,6 +26,7 @@ import networkPropTypes from '../../components/networkPropTypes'; import {withNetwork} from '../../components/OnyxProvider'; import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../components/withCurrentUserPersonalDetails'; import * as Policy from '../../libs/actions/Policy'; +import policyMemberPropType from '../pages/policyMemberPropType'; const propTypes = { /* Onyx Props */ @@ -55,11 +56,7 @@ const propTypes = { })), /** List of policy members */ - policyMembers: PropTypes.objectOf(PropTypes.shape( - - /** The members list is keyed by email which is dynamic so we just check that it's a string */ - PropTypes.objectOf(PropTypes.string), - )), + policyMembers: PropTypes.objectOf(policyMemberPropType), /** The user's wallet account */ userWallet: PropTypes.shape({ From 3913b00fedd31176fdcc86ecf6cde02764a880ef Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Wed, 27 Jul 2022 16:40:30 -0700 Subject: [PATCH 15/16] style / clean up comments --- src/pages/policyMemberPropType.js | 6 +++--- src/pages/settings/InitialSettingsPage.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/policyMemberPropType.js b/src/pages/policyMemberPropType.js index c8018b6a8e65..0e5c39e02369 100644 --- a/src/pages/policyMemberPropType.js +++ b/src/pages/policyMemberPropType.js @@ -4,9 +4,9 @@ export default PropTypes.shape({ /** Role of the user in the policy */ role: PropTypes.string, - /** - * Errors from api calls on the specific user - * `{: 'error message', : 'error message 2'}` + /** + * Errors from api calls on the specific user + * {: 'error message', : 'error message 2'} */ errors: PropTypes.objectOf(PropTypes.string), }); diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index 985144c5d833..cd1762ee6748 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -26,7 +26,7 @@ import networkPropTypes from '../../components/networkPropTypes'; import {withNetwork} from '../../components/OnyxProvider'; import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../components/withCurrentUserPersonalDetails'; import * as Policy from '../../libs/actions/Policy'; -import policyMemberPropType from '../pages/policyMemberPropType'; +import policyMemberPropType from '../policyMemberPropType'; const propTypes = { /* Onyx Props */ From 57ba1bda94e364119788dc8fbb505b9f9cfbe995 Mon Sep 17 00:00:00 2001 From: Andrew Lor Date: Thu, 28 Jul 2022 09:41:16 -0600 Subject: [PATCH 16/16] issue 9485 - move const to correct order --- src/components/Composer/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Composer/index.js b/src/components/Composer/index.js index f64f9b082c36..a7c1d0045170 100755 --- a/src/components/Composer/index.js +++ b/src/components/Composer/index.js @@ -11,8 +11,6 @@ import CONST from '../../CONST'; import updateIsFullComposerAvailable from '../../libs/ComposerUtils/updateIsFullComposerAvailable'; import getNumberOfLines from '../../libs/ComposerUtils/index'; -const COPY_DROP_EFFECT = 'copy'; - const propTypes = { /** Maximum number of lines in the text input */ maxLines: PropTypes.number, @@ -110,6 +108,8 @@ const IMAGE_EXTENSIONS = { 'image/webp': 'webp', }; +const COPY_DROP_EFFECT = 'copy'; + /** * Enable Markdown parsing. * On web we like to have the Text Input field always focused so the user can easily type a new chat