From 9bfbd9e904363d8f4541f67db26006ca28e02958 Mon Sep 17 00:00:00 2001 From: Fayaz Ahmed Date: Mon, 9 May 2022 22:12:04 +0530 Subject: [PATCH] Ported duplicate logic to a mixin --- .../settings/automation/AddAutomationRule.vue | 322 +------------ .../automation/EditAutomationRule.vue | 419 +--------------- .../shared/mixins/automationMixin.js | 446 ++++++++++++++++++ .../mixins/specs/automationMixin.spec.js | 70 +++ 4 files changed, 529 insertions(+), 728 deletions(-) create mode 100644 app/javascript/shared/mixins/automationMixin.js create mode 100644 app/javascript/shared/mixins/specs/automationMixin.spec.js diff --git a/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue b/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue index 655437c14..e7c3a8891 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue @@ -138,72 +138,28 @@ diff --git a/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue b/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue index 8704fbb92..9ffbff631 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue @@ -144,25 +144,22 @@