From 671adf20dad0a2c0b1b2d3dcfa74fbad2893cc97 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 31 May 2024 13:06:04 +0530 Subject: [PATCH 1/2] dont show sync err when sync is in progress --- src/libs/actions/connections/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/connections/index.ts b/src/libs/actions/connections/index.ts index 9b463cf1780c..dc9dfb96de2d 100644 --- a/src/libs/actions/connections/index.ts +++ b/src/libs/actions/connections/index.ts @@ -232,8 +232,8 @@ function updateManyPolicyConnectionConfigs, connectionName: PolicyConnectionName): boolean { - return policy?.connections?.[connectionName]?.lastSync?.isSuccessful === false; +function hasSynchronizationError(policy: OnyxEntry, connectionName: PolicyConnectionName, isSyncInProgress: boolean): boolean { + return !isSyncInProgress && policy?.connections?.[connectionName]?.lastSync?.isSuccessful === false; } export {removePolicyConnection, updatePolicyConnectionConfig, updateManyPolicyConnectionConfigs, hasSynchronizationError, syncConnection}; From bdc636329c4222eb4c5f05941582804639e5744a Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 31 May 2024 13:06:24 +0530 Subject: [PATCH 2/2] update signature --- src/pages/workspace/accounting/PolicyAccountingPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx index d33611ec09f2..d94fea0fd485 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -163,7 +163,7 @@ function PolicyAccountingPage({policy, connectionSyncProgress}: PolicyAccounting if (!connectedIntegration) { return []; } - const shouldShowSynchronizationError = hasSynchronizationError(policy, connectedIntegration); + const shouldShowSynchronizationError = hasSynchronizationError(policy, connectedIntegration, isSyncInProgress); const integrationData = accountingIntegrationData(connectedIntegration, policyID, translate); const iconProps = integrationData?.icon ? {icon: integrationData.icon, iconType: CONST.ICON_TYPE_AVATAR} : {}; return [