From 2bf8f15499ab4e3aa5f76d7f0ca63ebc7e88ffac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Tue, 9 Sep 2025 16:32:34 +0200 Subject: [PATCH 1/6] do not render reimbursable URLs for QBD and Intacct --- src/libs/ReportActionsUtils.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 298613169cc8..57cf3bbcc225 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2146,20 +2146,27 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry([ + CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.intacct, + CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.quickbooksDesktop, + ]); + const shouldSuppressLinks = noLinkLabels.has(label ?? ''); + if (!shouldSuppressLinks && reimbursableUrls.length === 1) { const shouldAddPeriod = nonReimbursableUrls.length === 0; result.push({ text: translateLocal('report.actions.type.exportedToIntegration.reimburseableLink') + (shouldAddPeriod ? '.' : ''), url: reimbursableUrls.at(0) ?? '', }); } - if (reimbursableUrls.length === 1 && nonReimbursableUrls.length) { + if (!shouldSuppressLinks && reimbursableUrls.length === 1 && nonReimbursableUrls.length) { result.push({ text: translateLocal('common.and'), url: '', }); } - if (nonReimbursableUrls.length) { + if (!shouldSuppressLinks && nonReimbursableUrls.length) { const text = translateLocal('report.actions.type.exportedToIntegration.nonReimbursableLink'); let url = ''; From 5d615747c669177b02cd3fb496890191b517363a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Tue, 9 Sep 2025 16:54:56 +0200 Subject: [PATCH 2/6] fix prettier --- src/libs/ReportActionsUtils.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 57cf3bbcc225..90f57112e531 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2148,10 +2148,7 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry([ - CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.intacct, - CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.quickbooksDesktop, - ]); + const noLinkLabels = new Set([CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.intacct, CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.quickbooksDesktop]); const shouldSuppressLinks = noLinkLabels.has(label ?? ''); if (!shouldSuppressLinks && reimbursableUrls.length === 1) { const shouldAddPeriod = nonReimbursableUrls.length === 0; From ccd7abdeecb11c746d1e118993a421648abd2d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Wed, 10 Sep 2025 10:53:35 +0200 Subject: [PATCH 3/6] add other Intacct key --- src/CONST/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CONST/index.ts b/src/CONST/index.ts index a9872417e85a..3c271a1988cb 100755 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -3049,6 +3049,7 @@ const CONST = { quickbooksDesktop: 'QuickBooks Desktop', xero: 'Xero', intacct: 'Sage Intacct', + intacct_other: 'Intacct', financialForce: 'FinancialForce', billCom: 'Bill.com', zenefits: 'Zenefits', From 457ce2bc4418bb85817f428cee318d2b452e0f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Wed, 10 Sep 2025 10:53:40 +0200 Subject: [PATCH 4/6] fix logic --- src/libs/ReportActionsUtils.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 90f57112e531..ab1f0f04045c 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2148,27 +2148,32 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry([CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.intacct, CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.quickbooksDesktop]); + const noLinkLabels = new Set([ + CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.intacct, + CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.intacct_other, + CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.quickbooksDesktop, + ]); const shouldSuppressLinks = noLinkLabels.has(label ?? ''); - if (!shouldSuppressLinks && reimbursableUrls.length === 1) { + + if (reimbursableUrls.length === 1) { const shouldAddPeriod = nonReimbursableUrls.length === 0; result.push({ text: translateLocal('report.actions.type.exportedToIntegration.reimburseableLink') + (shouldAddPeriod ? '.' : ''), - url: reimbursableUrls.at(0) ?? '', + url: !shouldSuppressLinks ? (reimbursableUrls.at(0) ?? '') : '', }); } - if (!shouldSuppressLinks && reimbursableUrls.length === 1 && nonReimbursableUrls.length) { + if (reimbursableUrls.length === 1 && nonReimbursableUrls.length) { result.push({ text: translateLocal('common.and'), url: '', }); } - if (!shouldSuppressLinks && nonReimbursableUrls.length) { + if (nonReimbursableUrls.length) { const text = translateLocal('report.actions.type.exportedToIntegration.nonReimbursableLink'); let url = ''; if (nonReimbursableUrls.length === 1) { - url = nonReimbursableUrls.at(0) ?? ''; + url = !shouldSuppressLinks ? (nonReimbursableUrls.at(0) ?? '') : ''; } else { switch (label) { case CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.xero: From 3f34bfaa21819532f2b36ff61d650f3016339f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Wed, 10 Sep 2025 14:03:49 +0200 Subject: [PATCH 5/6] new logic to hide reimbursable links not supported --- src/libs/ReportActionsUtils.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index ab1f0f04045c..0e40297da19b 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2147,19 +2147,12 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry([ - CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.intacct, - CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.intacct_other, - CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY.quickbooksDesktop, - ]); - const shouldSuppressLinks = noLinkLabels.has(label ?? ''); - if (reimbursableUrls.length === 1) { const shouldAddPeriod = nonReimbursableUrls.length === 0; + const reimbursableUrl = reimbursableUrls.at(0) ?? ''; result.push({ text: translateLocal('report.actions.type.exportedToIntegration.reimburseableLink') + (shouldAddPeriod ? '.' : ''), - url: !shouldSuppressLinks ? (reimbursableUrls.at(0) ?? '') : '', + url: reimbursableUrl.startsWith('https://') ? reimbursableUrl : '', }); } if (reimbursableUrls.length === 1 && nonReimbursableUrls.length) { @@ -2173,7 +2166,8 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry Date: Thu, 11 Sep 2025 07:51:38 +0200 Subject: [PATCH 6/6] Update src/CONST/index.ts Co-authored-by: Francois Laithier --- src/CONST/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CONST/index.ts b/src/CONST/index.ts index 74d8758ce1a1..6583c394e0ad 100755 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -3054,7 +3054,6 @@ const CONST = { quickbooksDesktop: 'QuickBooks Desktop', xero: 'Xero', intacct: 'Sage Intacct', - intacct_other: 'Intacct', financialForce: 'FinancialForce', billCom: 'Bill.com', zenefits: 'Zenefits',