From a1c2c3b0e9e70e70ddfafeb0d3289e4b319fac8f Mon Sep 17 00:00:00 2001 From: charles-ramos Date: Tue, 21 Jul 2026 16:49:57 -0300 Subject: [PATCH] removal - solucx --- Parse-Dashboard/app.js | 2 -- Parse-Dashboard/index.ejs | 1 - Parse-Dashboard/login.ejs | 1 - src/dashboard/Dashboard.js | 58 -------------------------------------- src/lib/back4app2.js | 1 - webpack/base.config.js | 1 - 6 files changed, 64 deletions(-) diff --git a/Parse-Dashboard/app.js b/Parse-Dashboard/app.js index a4a00583c3..7ecb6863fc 100644 --- a/Parse-Dashboard/app.js +++ b/Parse-Dashboard/app.js @@ -220,7 +220,6 @@ module.exports = function(config, options) { - `); @@ -264,7 +263,6 @@ module.exports = function(config, options) { - diff --git a/Parse-Dashboard/index.ejs b/Parse-Dashboard/index.ejs index a9cf7404d4..8872943b1d 100644 --- a/Parse-Dashboard/index.ejs +++ b/Parse-Dashboard/index.ejs @@ -27,7 +27,6 @@ - diff --git a/Parse-Dashboard/login.ejs b/Parse-Dashboard/login.ejs index b3e6cdd9b4..611ea35de7 100644 --- a/Parse-Dashboard/login.ejs +++ b/Parse-Dashboard/login.ejs @@ -26,6 +26,5 @@ - diff --git a/src/dashboard/Dashboard.js b/src/dashboard/Dashboard.js index 61a7226a57..78d3487926 100644 --- a/src/dashboard/Dashboard.js +++ b/src/dashboard/Dashboard.js @@ -139,23 +139,6 @@ const PARSE_DOT_COM_SERVER_INFO = { status: 'SUCCESS', } -// const monthQuarter = { -// '0': 'Q1', -// '1': 'Q2', -// '2': 'Q3', -// '3': 'Q4' -// }; - -const waitForScriptToLoad = async conditionFn => { - for (let i = 1; i <= 20; i++) { - if (conditionFn()) { - return; - } - await new Promise(resolve => setTimeout(resolve, i * 50)); - } - throw new Error('Script not loaded yet!'); -}; - const preloadMap = { cloudCode: () => import('./Data/CloudCode/B4ACloudCode.react'), graphqlConsole: () => import('./Data/ApiConsole/GraphQLConsole.react'), @@ -226,47 +209,6 @@ class Dashboard extends React.Component { fetchHubUser().then(userDetail => { user.createdAt = userDetail.createdAt; user.verification = userDetail.verification; - const now = new Date(); - const createdAt = new Date(userDetail.createdAt); - const hourDiff = Math.floor((now - createdAt) / (1000 * 60 * 60)); - if (hourDiff === 0) { - return; - } - if (userDetail.disableSolucxForm) { - return; - } - // Flow1 are users who signed up less than 30 days ago (720 hours) - const isFlow1 = hourDiff <= 720; - let transactionId = userDetail.id; - if (!isFlow1) { - const monthQuarter = ['Q1', 'Q2', 'Q3', 'Q4']; - const quarter = monthQuarter[Math.floor(now.getMonth() / 3)]; - transactionId += `${now.getFullYear()}${quarter}`; - } - const options = { - transaction_id: transactionId, - store_id: isFlow1 ? '1001' : '1002', - name: userDetail.username, - email: userDetail.username, - journey: isFlow1 ? 'csat-back4app' : 'nps-back4app', - }; - const retryInterval = isFlow1 ? 5 : 45; - const collectInterval = isFlow1 ? 30 : 90; - options.param_requestdata = encodeURIComponent(JSON.stringify({ - userDetail, - options, - localStorage: localStorage.getItem('solucxWidgetLog-' + userDetail.username) - })); - // eslint-disable-next-line no-undef - waitForScriptToLoad(() => typeof createSoluCXWidget === 'function').then(() => { - // eslint-disable-next-line no-undef - createSoluCXWidget( - process.env.SOLUCX_API_KEY, - 'bottomBoxLeft', - options, - { collectInterval, retryAttempts: 1, retryInterval } - ); - }).catch(err => console.log(err)); }); const stateApps = []; diff --git a/src/lib/back4app2.js b/src/lib/back4app2.js index 230b73cdde..77bb611e60 100644 --- a/src/lib/back4app2.js +++ b/src/lib/back4app2.js @@ -11,7 +11,6 @@ const back4app2 = { id username createdAt - disableSolucxForm avatar } } diff --git a/webpack/base.config.js b/webpack/base.config.js index bd7c3d53e4..52efd312df 100644 --- a/webpack/base.config.js +++ b/webpack/base.config.js @@ -96,7 +96,6 @@ module.exports = { 'process.env': { 'version' : JSON.stringify(version), 'BACKEND_URL': JSON.stringify(BACK4APP_API_PATH), - 'SOLUCX_API_KEY': JSON.stringify(settings.SOLUCX_API_KEY), 'BUILD_TIMESTAMP': JSON.stringify(new Date().toISOString()), }, b4aSettings: JSON.stringify(settings)