diff --git a/plugins/data-manager/frontend/public/javascripts/countly.views.js b/plugins/data-manager/frontend/public/javascripts/countly.views.js index 49b376f37dc..b04d5f76ce4 100644 --- a/plugins/data-manager/frontend/public/javascripts/countly.views.js +++ b/plugins/data-manager/frontend/public/javascripts/countly.views.js @@ -1,4 +1,4 @@ -/*global app, countlyAuth, countlyVue, CV, countlyDataManager, countlyCommon, moment, countlyGlobal, CountlyHelpers */ +/*global app, countlyAuth, countlyVue, CV, countlyDataManager, countlyCommon, moment, countlyGlobal, CountlyHelpers, _ */ (function() { @@ -252,7 +252,9 @@ } doc.is_visible = true; } - this.$store.dispatch('countlyDataManager/editEvent', doc); + if (!(_.isEqual(doc, this.$refs.eventDrawer.initialEditedObject))) { + this.$store.dispatch('countlyDataManager/editEvent', doc); + } } else { this.$store.dispatch('countlyDataManager/saveEvent', doc); @@ -299,7 +301,9 @@ onSubmit: function(doc) { if (doc.isEditMode) { doc.app_id = countlyCommon.ACTIVE_APP_ID; - this.$store.dispatch('countlyDataManager/editEventGroups', doc); + if (!(_.isEqual(doc, this.$refs.eventGroupDrawer.initialEditedObject))) { + this.$store.dispatch('countlyDataManager/editEventGroups', doc); + } } else { doc.app_id = countlyCommon.ACTIVE_APP_ID; diff --git a/plugins/data-manager/frontend/public/templates/event-group-drawer.html b/plugins/data-manager/frontend/public/templates/event-group-drawer.html index 630794c6714..54e779fe9c6 100644 --- a/plugins/data-manager/frontend/public/templates/event-group-drawer.html +++ b/plugins/data-manager/frontend/public/templates/event-group-drawer.html @@ -2,6 +2,7 @@ @submit="onSubmit" @close="onClose" @copy="onCopy" + ref="eventGroupDrawer" :title="title" :saveButtonLabel="saveButtonLabel" v-bind="$props.controls">