From 1f6d1b59777d4131da54c62e6dc1e71b317c9e68 Mon Sep 17 00:00:00 2001 From: Vit Horacek <36083550+mountiny@users.noreply.github.com> Date: Tue, 26 May 2026 15:22:41 +0200 Subject: [PATCH] Revert "Always show Update credentials for Sage Intacct connections" --- src/languages/de.ts | 1 - src/languages/en.ts | 1 - src/languages/es.ts | 1 - src/languages/fr.ts | 1 - src/languages/it.ts | 1 - src/languages/ja.ts | 1 - src/languages/nl.ts | 1 - src/languages/pl.ts | 1 - src/languages/pt-BR.ts | 1 - src/languages/zh-hans.ts | 1 - .../accounting/PolicyAccountingPage.tsx | 24 ++++--------------- 11 files changed, 5 insertions(+), 29 deletions(-) diff --git a/src/languages/de.ts b/src/languages/de.ts index f5826d6b50f6..811244571114 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -6280,7 +6280,6 @@ _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 a109cde8c398..a5be3b7e194f 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -6310,7 +6310,6 @@ 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 cf1889979f88..e67c12e1b803 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -6065,7 +6065,6 @@ ${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 2e8aab81166b..2ad012ab2b7d 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -6303,7 +6303,6 @@ _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 1ce1a5e1c6e3..f95908488941 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -6270,7 +6270,6 @@ _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 2efe3c162d57..dec8bb3b079a 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -6200,7 +6200,6 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${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 d897a416122b..57cf6345c3fe 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -6249,7 +6249,6 @@ _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 91a528850469..a5541564c81a 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -6242,7 +6242,6 @@ _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 831708df266f..e3da3b1b5941 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -6249,7 +6249,6 @@ _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 8bcd2b4f563a..4899bcc96cd5 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -6087,7 +6087,6 @@ _如需更详细的说明,请[访问我们的帮助网站](${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 057b8c5140dd..635cff79699d 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -115,9 +115,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { const hasAccountingConnection = hasAccountingConnections(policy); const synchronizationError = connectedIntegration && getSynchronizationErrorMessage(policy, connectedIntegration, isSyncInProgress, translate, styles); - const isSageIntacct = connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT; - const hasAuthError = !!connectedIntegration && !!synchronizationError && isAuthenticationError(policy, connectedIntegration); - const shouldShowEnterCredentials = !!connectedIntegration && (hasAuthError || isSageIntacct); + const shouldShowEnterCredentials = connectedIntegration && !!synchronizationError && isAuthenticationError(policy, connectedIntegration); // 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( @@ -152,30 +150,21 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { ? [ { icon: icons.Key, - 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}); - }, + text: translate('workspace.accounting.enterCredentials'), + onSelected: () => 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'), @@ -196,9 +185,6 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { policy, connectedIntegration, startIntegrationFlow, - isSageIntacct, - hasAuthError, - policyID, ], );