Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6207,6 +6207,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
connectPrompt: ({connectionName}: ConnectionNameParams) =>
`${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? 'この会計連携'} を接続してもよろしいですか?これにより、既存の会計連携はすべて削除されます。`,
enterCredentials: '認証情報を入力してください',
updateCredentials: '認証情報を更新',
claimOffer: {
badgeText: 'オファーをご利用いただけます!',
xero: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6094,6 +6094,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
connectPrompt: ({connectionName}: ConnectionNameParams) =>
`确定要连接 ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionName] ?? '此会计集成'} 吗?这将删除所有现有的会计连接。`,
enterCredentials: '请输入您的凭证',
updateCredentials: '更新凭证',
claimOffer: {
badgeText: '优惠可用!',
xero: {
Expand Down
24 changes: 19 additions & 5 deletions src/pages/workspace/accounting/PolicyAccountingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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'),
Expand All @@ -185,6 +196,9 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
policy,
connectedIntegration,
startIntegrationFlow,
isSageIntacct,
hasAuthError,
policyID,
],
);

Expand Down
Loading