vc-create-dashboard 3.0.68 → 3.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3785,7 +3785,7 @@ class CreateDashboardComponent {
|
|
|
3785
3785
|
else if (this.mode === 'EDIT') {
|
|
3786
3786
|
const widgetsArray = [];
|
|
3787
3787
|
data.forEach((element) => {
|
|
3788
|
-
if (!
|
|
3788
|
+
if (!this.extractWidgetCodes(this.dashboardForm.configureWidget).includes(element.id)) {
|
|
3789
3789
|
let obj = {};
|
|
3790
3790
|
obj.module_name = element.module;
|
|
3791
3791
|
obj._id = '';
|
|
@@ -3838,6 +3838,15 @@ class CreateDashboardComponent {
|
|
|
3838
3838
|
this.openConfigureWidgets = false;
|
|
3839
3839
|
this.submitDashboard();
|
|
3840
3840
|
}
|
|
3841
|
+
extractWidgetCodes(widgets) {
|
|
3842
|
+
const widgetCodes = [];
|
|
3843
|
+
widgets?.forEach((widget) => {
|
|
3844
|
+
if (widget?.widget_code) {
|
|
3845
|
+
widgetCodes.push(widget?.widget_code);
|
|
3846
|
+
}
|
|
3847
|
+
});
|
|
3848
|
+
return widgetCodes;
|
|
3849
|
+
}
|
|
3841
3850
|
closeConfigureWidgets(event) {
|
|
3842
3851
|
this.openConfigureWidgets = event;
|
|
3843
3852
|
}
|