diff --git a/src/languages/de.ts b/src/languages/de.ts index 9a5d43843811..f5aee9e61dac 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -6289,6 +6289,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 88e0bbe8b673..953f48fd72a6 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -6317,6 +6317,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 9ed06f7e346a..2419565e0b41 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -6073,6 +6073,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 b6b2a7801543..957d55785e38 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -6311,6 +6311,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 705ae2ec94d0..1d84e03d413a 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -6277,6 +6277,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 22dff1932990..36d1806a8340 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -6207,6 +6207,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 b6f95c44ed34..f7f77f22505c 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -6255,6 +6255,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 1fe87f4ec8c4..1ad2eea0abab 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -6250,6 +6250,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 394be17dc887..a8a99526de2a 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -6255,6 +6255,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 8013eff5912d..a53524d51a31 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -6094,6 +6094,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..897a85412109 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 + ? [ { 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, ], );