From ff845650529aee071c0d434716a00f7a277266e9 Mon Sep 17 00:00:00 2001 From: jmather-c <117302272+jmather-c@users.noreply.github.com> Date: Thu, 15 Jun 2023 08:54:16 -0700 Subject: [PATCH] #223 - Add Related Stripe Sync Records component to setup steps (#1103) * Add Related Stripe Sync Records to setup steps * Updated from PR feedback * Updates from feedback * and fields... * Added a sensible rename to trigger ci flows --- .../lwc/orgSettingsStep/orgSettingsStep.html | 52 ++++++++++++++++++- .../lwc/orgSettingsStep/orgSettingsStep.js | 32 +++++++++++- .../relatedSyncRecords.html | 2 +- .../relatedSyncRecords.js-meta.xml | 19 ++++++- .../main/default/lwc/setup/setup.html | 22 ++++---- .../force-app/main/default/lwc/setup/setup.js | 36 ++++++------- .../force-app/main/default/lwc/step/step.html | 4 +- 7 files changed, 131 insertions(+), 36 deletions(-) diff --git a/sfdx/force-app/main/default/lwc/orgSettingsStep/orgSettingsStep.html b/sfdx/force-app/main/default/lwc/orgSettingsStep/orgSettingsStep.html index d2992e1c87..5711c05c71 100644 --- a/sfdx/force-app/main/default/lwc/orgSettingsStep/orgSettingsStep.html +++ b/sfdx/force-app/main/default/lwc/orgSettingsStep/orgSettingsStep.html @@ -1,5 +1,25 @@ \ No newline at end of file diff --git a/sfdx/force-app/main/default/lwc/orgSettingsStep/orgSettingsStep.js b/sfdx/force-app/main/default/lwc/orgSettingsStep/orgSettingsStep.js index f119372f36..486f255dbf 100644 --- a/sfdx/force-app/main/default/lwc/orgSettingsStep/orgSettingsStep.js +++ b/sfdx/force-app/main/default/lwc/orgSettingsStep/orgSettingsStep.js @@ -1,4 +1,34 @@ import { LightningElement } from 'lwc'; -export default class OrgSettingsStep extends LightningElement {} +const SUB_PAGES = { + PAGE_LAYOUTS: 'PageLayouts', + LIGHTNING_RECORD_PAGES: 'LightningPages', +}; + +export default class OrgSettingsStep extends LightningElement { + targetedObjects = [ + 'Account', + 'Order', + 'PricebookEntry', + 'Product2', + ]; + + openPageLayouts(e) { + this.gotoSetupObjectManagerPage(e.target.dataset.object, SUB_PAGES.PAGE_LAYOUTS); + } + + openLightningRecordPages(e) { + this.gotoSetupObjectManagerPage(e.target.dataset.object, SUB_PAGES.LIGHTNING_RECORD_PAGES); + } + + /** + * Returns the relative url to a page within Setup. + * + * @param {string} object + * @param {string} subPage + */ + gotoSetupObjectManagerPage(object, subPage) { + window.open(`/lightning/setup/ObjectManager/${object}/${subPage}/view`, '_blank'); + } +} diff --git a/sfdx/force-app/main/default/lwc/relatedSyncRecords/relatedSyncRecords.html b/sfdx/force-app/main/default/lwc/relatedSyncRecords/relatedSyncRecords.html index 815c291200..1929e44060 100644 --- a/sfdx/force-app/main/default/lwc/relatedSyncRecords/relatedSyncRecords.html +++ b/sfdx/force-app/main/default/lwc/relatedSyncRecords/relatedSyncRecords.html @@ -8,7 +8,7 @@

- Related Sync Records + Related Stripe Sync Records

diff --git a/sfdx/force-app/main/default/lwc/relatedSyncRecords/relatedSyncRecords.js-meta.xml b/sfdx/force-app/main/default/lwc/relatedSyncRecords/relatedSyncRecords.js-meta.xml index bbc0ba7e24..682b865fe2 100644 --- a/sfdx/force-app/main/default/lwc/relatedSyncRecords/relatedSyncRecords.js-meta.xml +++ b/sfdx/force-app/main/default/lwc/relatedSyncRecords/relatedSyncRecords.js-meta.xml @@ -2,9 +2,24 @@ 52.0 true - Related Sync Records - Gets related sync records based on the current record Id. + Related Stripe Sync Records + Displays related Stripe Sync Records based on the current Record Id. lightning__RecordPage + + + + Account + Order + PricebookEntry + Product2 + + + + + + + + \ No newline at end of file diff --git a/sfdx/force-app/main/default/lwc/setup/setup.html b/sfdx/force-app/main/default/lwc/setup/setup.html index 9d93270685..86aa24fcae 100644 --- a/sfdx/force-app/main/default/lwc/setup/setup.html +++ b/sfdx/force-app/main/default/lwc/setup/setup.html @@ -308,14 +308,7 @@

diff --git a/sfdx/force-app/main/default/lwc/setup/setup.js b/sfdx/force-app/main/default/lwc/setup/setup.js index c3fc387a13..0c942b7f6c 100644 --- a/sfdx/force-app/main/default/lwc/setup/setup.js +++ b/sfdx/force-app/main/default/lwc/setup/setup.js @@ -30,18 +30,10 @@ export default class FirstTimeSetup extends LightningElement { @track tabToNavTo = ''; @track stepName; @track steps = [ - { - title: 'Update Page Layouts', - name: 'C-ORG-SETTINGS-STEP', - orderIndex: 1, - isComplete: false, - isActive: false, - component: 'c-org-settings-step', - }, { title: 'Connect Stripe and Salesforce', name: 'C-SYSTEM-CONNECTIONS-STEP', - orderIndex: 2, + orderIndex: 1, isComplete: false, isActive: false, component: 'c-system-connections-step', @@ -49,7 +41,7 @@ export default class FirstTimeSetup extends LightningElement { { title: 'Define Data Mapping', name: 'C-DATA-MAPPING-STEP', - orderIndex: 3, + orderIndex: 2, isComplete: false, isActive: false, component: 'c-data-mapping-step', @@ -57,7 +49,7 @@ export default class FirstTimeSetup extends LightningElement { { title: 'Manage Integration', name: 'C-SYNC-PREFERENCES-STEP', - orderIndex: 4, + orderIndex: 3, isComplete: false, isActive: false, component: 'c-sync-preferences-step', @@ -65,19 +57,27 @@ export default class FirstTimeSetup extends LightningElement { { title: 'Activate Syncing', name: 'C-POLLING-STEP', - orderIndex: 5, + orderIndex: 4, isComplete: false, isActive: false, component: 'c-polling-step', - } + }, + { + title: 'Update Salesforce Pages', + name: 'C-ORG-SETTINGS-STEP', + orderIndex: 5, + isComplete: false, + isActive: false, + component: 'c-org-settings-step', + }, ]; setupStepRefs = { - orgSettings: 0, - systemConnections: 1, - dataMapping: 2, - syncPreferences: 3, - polling: 4, + systemConnections: 0, + dataMapping: 1, + syncPreferences: 2, + polling: 3, + orgSettings: 4, }; generalStepRefs = { diff --git a/sfdx/force-app/main/default/lwc/step/step.html b/sfdx/force-app/main/default/lwc/step/step.html index 2fbf533663..16ee2d6f5b 100644 --- a/sfdx/force-app/main/default/lwc/step/step.html +++ b/sfdx/force-app/main/default/lwc/step/step.html @@ -26,9 +26,9 @@

-
+

{stepName} -

+