diff --git a/force-app/main/default/lwc/configurationManager/configurationManager.html b/force-app/main/default/lwc/configurationManager/configurationManager.html
index b967c25..36231d2 100644
--- a/force-app/main/default/lwc/configurationManager/configurationManager.html
+++ b/force-app/main/default/lwc/configurationManager/configurationManager.html
@@ -45,6 +45,7 @@
diff --git a/force-app/main/default/lwc/configurationManager/configurationManager.js b/force-app/main/default/lwc/configurationManager/configurationManager.js
index 16437cd..8f223b2 100644
--- a/force-app/main/default/lwc/configurationManager/configurationManager.js
+++ b/force-app/main/default/lwc/configurationManager/configurationManager.js
@@ -7,8 +7,8 @@ import getIndicatorBundleWrapper from '@salesforce/apex/IndicatorController.getI
import { refreshApex } from '@salesforce/apex';
-import IndicatorEditModal from "c/indicatorEditModal";
import indicatorBuilderModal from 'c/indicatorBuilderModal';
+import editIndicatorBundleModal from 'c/editIndicatorBundleModal';
import Indicator_Bundle from "@salesforce/schema/Indicator_Bundle__mdt";
import Indicator_Item from "@salesforce/schema/Indicator_Item__mdt";
@@ -95,16 +95,12 @@ export default class ConfigurationManager extends LightningElement {
handleNewClick(event) {
const developerName = (event.currentTarget.dataset || {}).developerName;
-
+ console.log(developerName);
/**This can be removed after proof of concept**/
switch (developerName) {
- case Indicator_Bundle.objectApiName.replace('__c',''):
- IndicatorEditModal.open({
- masterLabel:event.currentTarget.label,
- objectApiName:Indicator_Bundle.objectApiName,
- isNew:true,
- size:'full'
- }).then((result) => {
+ case Indicator_Bundle.objectApiName.replace('__c', ''):
+ console.log('here');
+ editIndicatorBundleModal.open().then((result) => {
console.log(result);
});
break;
@@ -135,4 +131,10 @@ export default class ConfigurationManager extends LightningElement {
this.openModal(event.detail);
}
+ handleEditBundle(event) {
+ editIndicatorBundleModal.open().then((result) => {
+ console.log(result);
+ });
+ }
+
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/editIndicatorBundle/editIndicatorBundle.html b/force-app/main/default/lwc/editIndicatorBundle/editIndicatorBundle.html
index 7836de1..7d39184 100644
--- a/force-app/main/default/lwc/editIndicatorBundle/editIndicatorBundle.html
+++ b/force-app/main/default/lwc/editIndicatorBundle/editIndicatorBundle.html
@@ -30,15 +30,10 @@
-
-
+
+
diff --git a/force-app/main/default/lwc/editIndicatorBundle/editIndicatorBundle.js b/force-app/main/default/lwc/editIndicatorBundle/editIndicatorBundle.js
index b0ede93..a5794bd 100644
--- a/force-app/main/default/lwc/editIndicatorBundle/editIndicatorBundle.js
+++ b/force-app/main/default/lwc/editIndicatorBundle/editIndicatorBundle.js
@@ -177,9 +177,9 @@ export default class EditIndicatorBundle extends LightningElement {
saveMetaDataRecord() {
- deployIndicatorBundles({wrapper: [this.indicator_Bundle]})
+ deployIndicatorBundles({ wrapper: JSON.stringify({ 'indicatorBundle': this.indicator_Bundle }) })
.then(result => {
- console.log('deploymentId = result');
+ console.log('deploymentId = ' + result);
})
.catch(error => {
console.log(error);
diff --git a/force-app/main/default/lwc/editIndicatorBundleModal/__tests__/editIndicatorBundleModal.test.js b/force-app/main/default/lwc/editIndicatorBundleModal/__tests__/editIndicatorBundleModal.test.js
new file mode 100644
index 0000000..4ea0a02
--- /dev/null
+++ b/force-app/main/default/lwc/editIndicatorBundleModal/__tests__/editIndicatorBundleModal.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import EditIndicatorBundleModal from 'c/editIndicatorBundleModal';
+
+describe('c-edit-indicator-bundle-modal', () => {
+ afterEach(() => {
+ // The jsdom instance is shared across test cases in a single file so reset the DOM
+ while (document.body.firstChild) {
+ document.body.removeChild(document.body.firstChild);
+ }
+ });
+
+ it('TODO: test case generated by CLI command, please fill in test logic', () => {
+ // Arrange
+ const element = createElement('c-edit-indicator-bundle-modal', {
+ is: EditIndicatorBundleModal
+ });
+
+ // Act
+ document.body.appendChild(element);
+
+ // Assert
+ // const div = element.shadowRoot.querySelector('div');
+ expect(1).toBe(1);
+ });
+});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/editIndicatorBundleModal/editIndicatorBundleModal.html b/force-app/main/default/lwc/editIndicatorBundleModal/editIndicatorBundleModal.html
new file mode 100644
index 0000000..351d2c5
--- /dev/null
+++ b/force-app/main/default/lwc/editIndicatorBundleModal/editIndicatorBundleModal.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/force-app/main/default/lwc/editIndicatorBundleModal/editIndicatorBundleModal.js b/force-app/main/default/lwc/editIndicatorBundleModal/editIndicatorBundleModal.js
new file mode 100644
index 0000000..5de05ad
--- /dev/null
+++ b/force-app/main/default/lwc/editIndicatorBundleModal/editIndicatorBundleModal.js
@@ -0,0 +1,4 @@
+import { LightningElement } from 'lwc';
+import LightningModal from 'lightning/modal';
+
+export default class EditIndicatorBundleModal extends LightningModal {}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/editIndicatorBundleModal/editIndicatorBundleModal.js-meta.xml b/force-app/main/default/lwc/editIndicatorBundleModal/editIndicatorBundleModal.js-meta.xml
new file mode 100644
index 0000000..353961e
--- /dev/null
+++ b/force-app/main/default/lwc/editIndicatorBundleModal/editIndicatorBundleModal.js-meta.xml
@@ -0,0 +1,5 @@
+
+
+ 62.0
+ false
+
\ No newline at end of file
diff --git a/force-app/main/default/lwc/indicatorEditModal/indicatorEditModal.html b/force-app/main/default/lwc/indicatorEditModal/indicatorEditModal.html
deleted file mode 100644
index 4fbb778..0000000
--- a/force-app/main/default/lwc/indicatorEditModal/indicatorEditModal.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/force-app/main/default/lwc/indicatorEditModal/indicatorEditModal.js b/force-app/main/default/lwc/indicatorEditModal/indicatorEditModal.js
deleted file mode 100644
index e318ccd..0000000
--- a/force-app/main/default/lwc/indicatorEditModal/indicatorEditModal.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Created by robertwright on 10/31/23.
- */
-
-import {api} from 'lwc';
-import LightningModal from 'lightning/modal';
-
-import Indicator_Bundle from "@salesforce/schema/Indicator_Bundle__mdt";
-import Indicator_Item from "@salesforce/schema/Indicator_Item__mdt";
-import Indicator_Item_Extension from "@salesforce/schema/Indicator_Item_Extension__mdt";
-
-export default class IndicatorEditModal extends LightningModal {
- /*componentConstructor;
- componentProperties = {};
-
- @api masterLabel;
- @api objectApiName;
- @api isNew = false;
-
- get headerLabel() {
- return (this.isNew) ? `New ${this.masterLabel}` : `Update ${this.masterLabel}`;
- }
-
- get componentToRender() {
- switch (this.objectApiName) {
- case Indicator_Bundle.objectApiName:
- return "c/editIndicatorBundle";
- break;
- default:
- return "c/editIndicatorBundle";
- }
- }
-
- connectedCallback() {
- import(`${this.componentToRender}`)
- .then(({ default: ctor }) => (this.componentConstructor = ctor))
- .catch((err) => console.log("Error importing component"));
- }*/
-
-}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/indicatorEditModal/indicatorEditModal.js-meta.xml b/force-app/main/default/lwc/indicatorEditModal/indicatorEditModal.js-meta.xml
deleted file mode 100644
index 29f7cd2..0000000
--- a/force-app/main/default/lwc/indicatorEditModal/indicatorEditModal.js-meta.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- 59.0
- Used to edit indicator records
- false
- Indicator Edit Modal
-
- lightning__dynamicComponent
-
-
diff --git a/force-app/main/default/lwc/key/key.html b/force-app/main/default/lwc/key/key.html
index ee1ae93..97586e9 100644
--- a/force-app/main/default/lwc/key/key.html
+++ b/force-app/main/default/lwc/key/key.html
@@ -70,6 +70,7 @@ Bundle is not active.
Item is not active. No indicators will be shown, even if they are active.
-
+
diff --git a/force-app/main/default/lwc/key/key.js b/force-app/main/default/lwc/key/key.js
index b4bc9a3..96b50dc 100644
--- a/force-app/main/default/lwc/key/key.js
+++ b/force-app/main/default/lwc/key/key.js
@@ -278,11 +278,9 @@ export default class Key extends LightningElement {
}
handleClick(event){
- console.log(event.target.name);
- const editindicatorEvent = new CustomEvent('editindicator', {
+ this.dispatchEvent(new CustomEvent(event.target.dataset.eventType, {
detail: event.target.name
- });
- this.dispatchEvent(editindicatorEvent);
+ }));
//window.open('/lightning/setup/CustomMetadata/page?address=%2F' + event.target.name,'_blank');
}