diff --git a/src/languages/de.ts b/src/languages/de.ts index be489bbd549e..2d8a2655c6f2 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -6274,6 +6274,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU connectPrompt: ({connectionName}: ConnectionNameParams) => `Sind Sie sicher, dass Sie ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'diese Buchhaltungsintegration'} verbinden möchten? Dadurch werden alle bestehenden Buchhaltungsverbindungen entfernt.`, enterCredentials: 'Gib deine Anmeldedaten ein', + updateCredentials: 'Anmeldedaten aktualisieren', claimOffer: { badgeText: 'Angebot verfügbar!', xero: { diff --git a/src/languages/en.ts b/src/languages/en.ts index f1a4e2669a2e..18e08046152e 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -6301,6 +6301,7 @@ const translations = { CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'this accounting integration' }? This will remove any existing accounting connections.`, enterCredentials: 'Enter your credentials', + updateCredentials: 'Update credentials', claimOffer: { badgeText: 'Offer available!', xero: { diff --git a/src/languages/es.ts b/src/languages/es.ts index b863321ecfd5..5dbbe98a8ddb 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -6056,6 +6056,7 @@ ${amount} para ${merchant} - ${date}`, connectPrompt: ({connectionName}) => `¿Estás seguro de que quieres conectar a ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'esta integración contable'}? Esto eliminará cualquier conexión contable existente.`, enterCredentials: 'Ingresa tus credenciales', + updateCredentials: 'Actualizar credenciales', claimOffer: { badgeText: '¡Oferta disponible!', xero: { diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 554e4a16b5be..4451635ec596 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -6297,6 +6297,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST. connectPrompt: ({connectionName}: ConnectionNameParams) => `Voulez-vous vraiment connecter ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'cette intégration comptable'} ? Cette action supprimera toutes les connexions comptables existantes.`, enterCredentials: 'Saisissez vos identifiants', + updateCredentials: 'Mettre à jour les identifiants', claimOffer: { badgeText: 'Offre disponible !', xero: { diff --git a/src/languages/it.ts b/src/languages/it.ts index 6b623afded90..b033f541920b 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -6264,6 +6264,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST. connectPrompt: ({connectionName}: ConnectionNameParams) => `Sei sicuro di voler collegare ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'questa integrazione contabile'}? Questo rimuoverà tutte le connessioni contabili esistenti.`, enterCredentials: 'Inserisci le tue credenziali', + updateCredentials: 'Aggiorna credenziali', claimOffer: { badgeText: 'Offerta disponibile!', xero: { diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 6979a4002a61..338bc40f60c3 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -6194,6 +6194,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO connectPrompt: ({connectionName}: ConnectionNameParams) => `${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'この会計連携'} を接続してもよろしいですか?これにより、既存の会計連携はすべて削除されます。`, enterCredentials: '認証情報を入力してください', + updateCredentials: '認証情報を更新', claimOffer: { badgeText: 'オファーをご利用いただけます!', xero: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 1509a397fc94..d84d0acde00c 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -6243,6 +6243,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_ connectPrompt: ({connectionName}: ConnectionNameParams) => `Weet je zeker dat je ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'deze boekhoudkoppeling'} wilt koppelen? Hierdoor worden alle bestaande boekhoudkundige koppelingen verwijderd.`, enterCredentials: 'Voer je inloggegevens in', + updateCredentials: 'Inloggegevens bijwerken', claimOffer: { badgeText: 'Aanbieding beschikbaar!', xero: { diff --git a/src/languages/pl.ts b/src/languages/pl.ts index a4f26a850b73..7806ec2c79c1 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -6236,6 +6236,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy connectPrompt: ({connectionName}: ConnectionNameParams) => `Czy na pewno chcesz połączyć ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'ta integracja księgowa'}? Spowoduje to usunięcie wszystkich istniejących połączeń księgowych.`, enterCredentials: 'Wprowadź swoje dane logowania', + updateCredentials: 'Zaktualizuj dane logowania', claimOffer: { badgeText: 'Oferta dostępna!', xero: { diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 1b1ffcee8e14..2ace25332da8 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -6243,6 +6243,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS connectPrompt: ({connectionName}: ConnectionNameParams) => `Tem certeza de que deseja conectar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'esta integração contábil'}? Isso removerá quaisquer conexões contábeis existentes.`, enterCredentials: 'Insira suas credenciais', + updateCredentials: 'Atualizar credenciais', claimOffer: { badgeText: 'Oferta disponível!', xero: { diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 023f23b2cfb3..ec6ba803d18b 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -6081,6 +6081,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM connectPrompt: ({connectionName}: ConnectionNameParams) => `确定要连接 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? '此会计集成'} 吗?这将删除所有现有的会计连接。`, enterCredentials: '请输入您的凭证', + updateCredentials: '更新凭证', claimOffer: { badgeText: '优惠可用!', xero: { diff --git a/src/pages/workspace/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx index 635cff79699d..057b8c5140dd 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -115,7 +115,9 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { const hasAccountingConnection = hasAccountingConnections(policy); const synchronizationError = connectedIntegration && getSynchronizationErrorMessage(policy, connectedIntegration, isSyncInProgress, translate, styles); - const shouldShowEnterCredentials = connectedIntegration && !!synchronizationError && isAuthenticationError(policy, connectedIntegration); + const isSageIntacct = connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT; + const hasAuthError = !!connectedIntegration && !!synchronizationError && isAuthenticationError(policy, connectedIntegration); + const shouldShowEnterCredentials = !!connectedIntegration && (hasAuthError || isSageIntacct); // Get the last successful date of the integration. Then, if `connectionSyncProgress` is the same integration displayed and the state is 'jobDone', get the more recent update time of the two. const successfulDate = getIntegrationLastSuccessfulDate( @@ -150,21 +152,30 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { ? [ { icon: icons.Key, - text: translate('workspace.accounting.enterCredentials'), - onSelected: () => startIntegrationFlow({name: connectedIntegration}), + text: translate(isSageIntacct && !hasAuthError ? 'workspace.accounting.updateCredentials' : 'workspace.accounting.enterCredentials'), + onSelected: () => { + if (isSageIntacct && policyID) { + Navigation.navigate(ROUTES.POLICY_ACCOUNTING_SAGE_INTACCT_ENTER_CREDENTIALS.getRoute(policyID)); + return; + } + startIntegrationFlow({name: connectedIntegration}); + }, shouldCallAfterModalHide: true, disabled: isOffline, iconRight: icons.NewWindow, }, ] - : [ + : []), + ...(!hasAuthError || isSageIntacct + ? [ { icon: icons.Sync, text: translate('workspace.accounting.syncNow'), onSelected: () => syncConnection(policy, connectedIntegration), disabled: isOffline, }, - ]), + ] + : []), { icon: icons.Trashcan, text: translate('workspace.accounting.disconnect'), @@ -185,6 +196,9 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { policy, connectedIntegration, startIntegrationFlow, + isSageIntacct, + hasAuthError, + policyID, ], );