Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#Wave-Control: Add NetSuite]: Added NetSuite connect button and fixed copies #44218

Merged
merged 32 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
22f38a2
Merge branch 'main' of github.com:mananjadhav/App into mj-netsuite-to…
mananjadhav Jun 22, 2024
a50e94f
Merge branch 'mj-netsuite-subsidiary-select' of github.com:mananjadha…
mananjadhav Jun 22, 2024
8584f97
Merge branch 'mj-netsuite-subsidiary-select' into mj-netsuite-token-i…
mananjadhav Jun 22, 2024
0c1f040
feat: added connect button
mananjadhav Jun 23, 2024
221f0ef
fix: add current integration name
mananjadhav Jun 23, 2024
c300257
fix: disconnect prompt text
mananjadhav Jun 23, 2024
5f3f526
fix: added current integration name
mananjadhav Jun 23, 2024
2ecec42
fix: added comment
mananjadhav Jun 23, 2024
4cd240d
refactor: lint fixes
mananjadhav Jun 23, 2024
4c72b52
Merge branch 'mj-netsuite-subsidiary-select' into mj-netsuite-connect…
mananjadhav Jun 25, 2024
ab7997e
feat: create generic confirmation modal
mananjadhav Jun 25, 2024
4a4783f
refactor: use accounting confirmation modal
mananjadhav Jun 25, 2024
6c84302
refactor: prettier fixes
mananjadhav Jun 25, 2024
abac11b
refactor: clean up props
mananjadhav Jun 25, 2024
432e443
refactor: clean up translations
mananjadhav Jun 25, 2024
de1919d
refactor: add es translations
mananjadhav Jun 25, 2024
499d31f
refactor: run prettier
mananjadhav Jun 25, 2024
c282904
refactor: use modal for qbo
mananjadhav Jun 25, 2024
14dfbdc
fix: integration name
mananjadhav Jun 25, 2024
32d85e8
fix: rollback to danger for modal
mananjadhav Jun 25, 2024
61578a4
Merge branch 'main' of github.com:mananjadhav/App into mj-netsuite-co…
mananjadhav Jun 26, 2024
2984b26
Merge branch 'main' of github.com:mananjadhav/App into mj-netsuite-co…
mananjadhav Jun 26, 2024
e10eb65
Merge branch 'main' of github.com:mananjadhav/App into mj-netsuite-co…
mananjadhav Jun 27, 2024
0f6e35f
fix: update modal to success
mananjadhav Jun 27, 2024
db05635
fix: update content
mananjadhav Jun 27, 2024
4cfa704
fix: update spacing
mananjadhav Jun 27, 2024
8287fd5
fix: remove unwanted file
mananjadhav Jun 27, 2024
0c17ae0
docs: added todo
mananjadhav Jun 27, 2024
a600231
fix: update copy and variable
mananjadhav Jun 27, 2024
26fe29a
refactor: run prettier
mananjadhav Jun 27, 2024
05c92d0
refactor: simplify condition with ??
mananjadhav Jun 27, 2024
6a3037c
refactor: fix typo
mananjadhav Jun 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,11 @@ const CONST = {
XERO: 'xero',
NETSUITE: 'netsuite',
},
NAME_MAP: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NAME_MAP: {
NAME_USER_FRIENDLY: {

This will match the constant names we use in the API and is also more intuitive.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay updated.

netsuite: 'NetSuite',
quickbooksOnline: 'Quickbooks Online',
xero: 'Xero',
},
SYNC_STAGE_NAME: {
STARTING_IMPORT_QBO: 'startingImportQBO',
STARTING_IMPORT_XERO: 'startingImportXero',
Expand Down
30 changes: 30 additions & 0 deletions src/components/AccountingConnectionConfirmationModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import useLocalize from '@hooks/useLocalize';
import type {ConnectionName} from '@src/types/onyx/Policy';
import ConfirmModal from './ConfirmModal';

type AccountingConnectionConfirmationModalProps = {
integrationToConnect: ConnectionName;
onConfirm: () => void;
onCancel: () => void;
};

function AccountingConnectionConfirmationModal({integrationToConnect, onCancel, onConfirm}: AccountingConnectionConfirmationModalProps) {
const {translate} = useLocalize();

return (
<ConfirmModal
title={translate('workspace.accounting.connectTitle', integrationToConnect)}
isVisible
onConfirm={onConfirm}
onCancel={onCancel}
prompt={translate('workspace.accounting.connectPrompt', integrationToConnect)}
confirmText={translate('workspace.accounting.setup')}
cancelText={translate('common.cancel')}
success
/>
);
}

AccountingConnectionConfirmationModal.displayName = 'AccountingConnectionConfirmationModal';
export default AccountingConnectionConfirmationModal;
54 changes: 54 additions & 0 deletions src/components/ConnectToNetSuiteButton/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React, {useState} from 'react';
import AccountingConnectionConfirmationModal from '@components/AccountingConnectionConfirmationModal';
import Button from '@components/Button';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useThemeStyles from '@hooks/useThemeStyles';
import {removePolicyConnection} from '@libs/actions/connections';
import Navigation from '@libs/Navigation/Navigation';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import type {ConnectToNetSuiteButtonProps} from './types';

function ConnectToNetSuiteButton({policyID, shouldDisconnectIntegrationBeforeConnecting, integrationToDisconnect}: ConnectToNetSuiteButtonProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const {isOffline} = useNetwork();

const [isDisconnectModalOpen, setIsDisconnectModalOpen] = useState(false);

return (
<>
<Button
onPress={() => {
if (shouldDisconnectIntegrationBeforeConnecting && integrationToDisconnect) {
setIsDisconnectModalOpen(true);
return;
}

// TODO: Will be updated to new token input page
Navigation.navigate(ROUTES.POLICY_ACCOUNTING_NETSUITE_SUBSIDIARY_SELECTOR.getRoute(policyID));
}}
text={translate('workspace.accounting.setup')}
style={styles.justifyContentCenter}
small
isDisabled={isOffline}
/>
{shouldDisconnectIntegrationBeforeConnecting && isDisconnectModalOpen && integrationToDisconnect && (
<AccountingConnectionConfirmationModal
onConfirm={() => {
removePolicyConnection(policyID, integrationToDisconnect);

// TODO: Will be updated to new token input page
Navigation.navigate(ROUTES.POLICY_ACCOUNTING_NETSUITE_SUBSIDIARY_SELECTOR.getRoute(policyID));
mananjadhav marked this conversation as resolved.
Show resolved Hide resolved
setIsDisconnectModalOpen(false);
}}
integrationToConnect={CONST.POLICY.CONNECTIONS.NAME.NETSUITE}
onCancel={() => setIsDisconnectModalOpen(false)}
/>
)}
</>
);
}

export default ConnectToNetSuiteButton;
10 changes: 10 additions & 0 deletions src/components/ConnectToNetSuiteButton/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type {PolicyConnectionName} from '@src/types/onyx/Policy';

type ConnectToNetSuiteButtonProps = {
policyID: string;
shouldDisconnectIntegrationBeforeConnecting?: boolean;
integrationToDisconnect?: PolicyConnectionName;
};

// eslint-disable-next-line import/prefer-default-export
export type {ConnectToNetSuiteButtonProps};
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, {useRef, useState} from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import {WebView} from 'react-native-webview';
import AccountingConnectionConfirmationModal from '@components/AccountingConnectionConfirmationModal';
import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView';
import Button from '@components/Button';
import ConfirmModal from '@components/ConfirmModal';
import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import Modal from '@components/Modal';
Expand Down Expand Up @@ -57,19 +57,14 @@ function ConnectToQuickbooksOnlineButton({
isDisabled={isOffline}
/>
{shouldDisconnectIntegrationBeforeConnecting && integrationToDisconnect && isDisconnectModalOpen && (
<ConfirmModal
title={translate('workspace.accounting.disconnectTitle', CONST.POLICY.CONNECTIONS.NAME.XERO)}
<AccountingConnectionConfirmationModal
onConfirm={() => {
removePolicyConnection(policyID, integrationToDisconnect);
setIsDisconnectModalOpen(false);
setWebViewOpen(true);
}}
isVisible
integrationToConnect={CONST.POLICY.CONNECTIONS.NAME.QBO}
onCancel={() => setIsDisconnectModalOpen(false)}
prompt={translate('workspace.accounting.disconnectPrompt', CONST.POLICY.CONNECTIONS.NAME.QBO)}
confirmText={translate('workspace.accounting.disconnect')}
cancelText={translate('common.cancel')}
danger
/>
)}
{isWebViewOpen && (
Expand Down
11 changes: 3 additions & 8 deletions src/components/ConnectToQuickbooksOnlineButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useState} from 'react';
import AccountingConnectionConfirmationModal from '@components/AccountingConnectionConfirmationModal';
import Button from '@components/Button';
import ConfirmModal from '@components/ConfirmModal';
import useEnvironment from '@hooks/useEnvironment';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
Expand Down Expand Up @@ -38,19 +38,14 @@ function ConnectToQuickbooksOnlineButton({policyID, shouldDisconnectIntegrationB
small
/>
{shouldDisconnectIntegrationBeforeConnecting && integrationToDisconnect && isDisconnectModalOpen && (
<ConfirmModal
title={translate('workspace.accounting.disconnectTitle', CONST.POLICY.CONNECTIONS.NAME.XERO)}
isVisible={isDisconnectModalOpen}
<AccountingConnectionConfirmationModal
onConfirm={() => {
removePolicyConnection(policyID, integrationToDisconnect);
Link.openLink(getQuickBooksOnlineSetupLink(policyID), environmentURL);
setIsDisconnectModalOpen(false);
}}
integrationToConnect={CONST.POLICY.CONNECTIONS.NAME.QBO}
onCancel={() => setIsDisconnectModalOpen(false)}
prompt={translate('workspace.accounting.disconnectPrompt', CONST.POLICY.CONNECTIONS.NAME.QBO)}
confirmText={translate('workspace.accounting.disconnect')}
cancelText={translate('common.cancel')}
danger
/>
)}
</>
Expand Down
11 changes: 3 additions & 8 deletions src/components/ConnectToXeroButton/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, {useRef, useState} from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import {WebView} from 'react-native-webview';
import AccountingConnectionConfirmationModal from '@components/AccountingConnectionConfirmationModal';
import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView';
import Button from '@components/Button';
import ConfirmModal from '@components/ConfirmModal';
import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import Modal from '@components/Modal';
Expand Down Expand Up @@ -52,19 +52,14 @@ function ConnectToXeroButton({policyID, session, shouldDisconnectIntegrationBefo
isDisabled={isOffline}
/>
{shouldDisconnectIntegrationBeforeConnecting && isDisconnectModalOpen && integrationToDisconnect && (
<ConfirmModal
title={translate('workspace.accounting.disconnectTitle', CONST.POLICY.CONNECTIONS.NAME.QBO)}
<AccountingConnectionConfirmationModal
onConfirm={() => {
removePolicyConnection(policyID, integrationToDisconnect);
setIsDisconnectModalOpen(false);
setWebViewOpen(true);
}}
isVisible
integrationToConnect={CONST.POLICY.CONNECTIONS.NAME.XERO}
onCancel={() => setIsDisconnectModalOpen(false)}
prompt={translate('workspace.accounting.disconnectPrompt', CONST.POLICY.CONNECTIONS.NAME.XERO)}
confirmText={translate('workspace.accounting.disconnect')}
cancelText={translate('common.cancel')}
danger
/>
)}
<Modal
Expand Down
11 changes: 3 additions & 8 deletions src/components/ConnectToXeroButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useState} from 'react';
import AccountingConnectionConfirmationModal from '@components/AccountingConnectionConfirmationModal';
import Button from '@components/Button';
import ConfirmModal from '@components/ConfirmModal';
import useEnvironment from '@hooks/useEnvironment';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
Expand Down Expand Up @@ -35,19 +35,14 @@ function ConnectToXeroButton({policyID, shouldDisconnectIntegrationBeforeConnect
isDisabled={isOffline}
/>
{shouldDisconnectIntegrationBeforeConnecting && isDisconnectModalOpen && integrationToDisconnect && (
<ConfirmModal
title={translate('workspace.accounting.disconnectTitle', CONST.POLICY.CONNECTIONS.NAME.QBO)}
isVisible
<AccountingConnectionConfirmationModal
onConfirm={() => {
removePolicyConnection(policyID, integrationToDisconnect);
Link.openLink(getXeroSetupLink(policyID), environmentURL);
setIsDisconnectModalOpen(false);
}}
integrationToConnect={CONST.POLICY.CONNECTIONS.NAME.XERO}
onCancel={() => setIsDisconnectModalOpen(false)}
prompt={translate('workspace.accounting.disconnectPrompt', CONST.POLICY.CONNECTIONS.NAME.XERO)}
confirmText={translate('workspace.accounting.disconnect')}
cancelText={translate('common.cancel')}
danger
/>
)}
</>
Expand Down
46 changes: 19 additions & 27 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2435,22 +2435,23 @@ export default {
syncNow: 'Sync now',
disconnect: 'Disconnect',
disconnectTitle: (integration?: ConnectionName): string => {
switch (integration) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return 'Disconnect QuickBooks Online';
case CONST.POLICY.CONNECTIONS.NAME.XERO:
return 'Disconnect Xero';
default: {
return 'Disconnect integration';
}
}
const integrationName = integration && CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integration] : 'integration';
return `Disconnect ${integrationName}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be simplified down to:

Suggested change
const integrationName = integration && CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integration] : 'integration';
return `Disconnect ${integrationName}`;
return `Disconnect ${CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ?? 'integration'}`;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get a TS error. Hence I had to use this way.

Screenshot 2024-06-28 at 2 20 50 AM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just be strict with the types for the function?

            disconnectPrompt: (currentIntegration: ConnectionName): string => `Are you sure you want to disconnect ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[currentIntegration] ?? 'integration'}?`},

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, let me check if it has any other usage. I can update. Give me a few mins.

Copy link
Collaborator Author

@mananjadhav mananjadhav Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to update it for connectTitle. For disconnectTitle, it allows undefined.

Argument of type 'PolicyConnectionName | undefined' is not assignable to parameter of type 'keyof Connections'.\n Type 'undefined' is not assignable to type 'keyof Connections'.

},
connectTitle: (integrationToConnect?: ConnectionName): string => {
const integrationName =
integrationToConnect && CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] : 'accounting integration';
return `Connect ${integrationName}`;
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Responded. #44218 (comment)


syncError: (integration?: ConnectionName): string => {
switch (integration) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return "Can't connect to QuickBooks Online.";
case CONST.POLICY.CONNECTIONS.NAME.XERO:
return "Can't connect to Xero.";
case CONST.POLICY.CONNECTIONS.NAME.NETSUITE:
return "Can't connec to NetSuite";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return "Can't connec to NetSuite";
return "Can't connect to NetSuite.";

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eye!!

default: {
return "Can't connect to integration.";
}
Expand All @@ -2469,24 +2470,15 @@ export default {
[CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE]: 'Not imported',
[CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Imported as report fields',
},
disconnectPrompt: (integrationToConnect?: ConnectionName, currentIntegration?: ConnectionName): string => {
switch (integrationToConnect) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return 'Are you sure you want to disconnect Xero to set up QuickBooks Online?';
case CONST.POLICY.CONNECTIONS.NAME.XERO:
return 'Are you sure you want to disconnect QuickBooks Online to set up Xero?';
default: {
switch (currentIntegration) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return 'Are you sure you want to disconnect QuickBooks Online?';
case CONST.POLICY.CONNECTIONS.NAME.XERO:
return 'Are you sure you want to disconnect Xero?';
default: {
return 'Are you sure you want to disconnect this integration?';
}
}
}
}
disconnectPrompt: (currentIntegration?: ConnectionName): string => {
const integrationName =
currentIntegration && CONST.POLICY.CONNECTIONS.NAME_MAP[currentIntegration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[currentIntegration] : 'this integration';
return `Are you sure you want to disconnect ${integrationName}?`;
},
connectPrompt: (integrationToConnect?: ConnectionName): string => {
const integrationName =
integrationToConnect && CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] : 'this accounting integration';
return `Are you sure you want to connect ${integrationName}? This will remove any existing acounting connections.`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Responded #44218 (comment).

},
enterCredentials: 'Enter your credentials',
connections: {
Expand Down
46 changes: 18 additions & 28 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2437,23 +2437,23 @@ export default {
other: 'Otras integraciones',
syncNow: 'Sincronizar ahora',
disconnect: 'Desconectar',
disconnectTitle: (currentIntegration?: ConnectionName): string => {
switch (currentIntegration) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return 'Desconectar QuickBooks Online';
case CONST.POLICY.CONNECTIONS.NAME.XERO:
return 'Desconectar Xero';
default: {
return 'Desconectar integración';
}
}
disconnectTitle: (integration?: ConnectionName): string => {
const integrationName = integration && CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integration] : 'integración';
return `Desconectar ${integrationName}`;
},
connectTitle: (integrationToConnect?: ConnectionName): string => {
const integrationName =
integrationToConnect && CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] : 'accounting integration';
return `Conectar ${integrationName}`;
},
syncError: (integration?: ConnectionName): string => {
switch (integration) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return 'No se puede conectar a QuickBooks Online.';
case CONST.POLICY.CONNECTIONS.NAME.XERO:
return 'No se puede conectar a Xero';
case CONST.POLICY.CONNECTIONS.NAME.NETSUITE:
return 'No se puede conectar a NetSuite';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return 'No se puede conectar a NetSuite';
return 'No se puede conectar a NetSuite.';

Let's also add the punctuation for the Xero copy above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

default: {
return 'No se ha podido conectar a la integración.';
}
Expand All @@ -2472,24 +2472,14 @@ export default {
[CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE]: 'No importado',
[CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Importado como campos de informe',
},
disconnectPrompt: (integrationToConnect?: ConnectionName, currentIntegration?: ConnectionName): string => {
switch (integrationToConnect) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return '¿Estás seguro de que quieres desconectar Xero para configurar QuickBooks Online?';
case CONST.POLICY.CONNECTIONS.NAME.XERO:
return '¿Estás seguro de que quieres desconectar QuickBooks Online para configurar Xero?';
default: {
switch (currentIntegration) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return '¿Estás seguro de que quieres desconectar QuickBooks Online?';
case CONST.POLICY.CONNECTIONS.NAME.XERO:
return '¿Estás seguro de que quieres desconectar Xero?';
default: {
return '¿Estás seguro de que quieres desconectar integración?';
}
}
}
}
disconnectPrompt: (currentIntegration?: ConnectionName): string => {
const integrationName = currentIntegration && CONST.POLICY.CONNECTIONS.NAME_MAP[currentIntegration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[currentIntegration] : 'integración';
return `¿Estás seguro de que quieres desconectar ${integrationName}?`;
},
connectPrompt: (integrationToConnect?: ConnectionName): string => {
const integrationName =
integrationToConnect && CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] : 'esta integración contable';
return `¿Estás seguro de que quieres conectar a ${integrationName}? Esto eliminará cualquier conexión contable existente.`;
},
enterCredentials: 'Ingresa tus credenciales',
connections: {
Expand Down
Loading
Loading