From 06a5207c6d2f4d68616aca92819c780fd36716f0 Mon Sep 17 00:00:00 2001 From: Joel McKinnon Date: Tue, 14 Jan 2020 17:07:32 -0800 Subject: [PATCH] deriving current output from current (blue) condition output and persisting --- .../condition/components/ConditionEdit.vue | 4 ++- .../condition/components/ConditionSet.vue | 28 ++--------------- .../condition/components/CurrentOutput.vue | 30 +++++++++++++------ 3 files changed, 26 insertions(+), 36 deletions(-) diff --git a/src/plugins/condition/components/ConditionEdit.vue b/src/plugins/condition/components/ConditionEdit.vue index 5f9f7443c6..0b3e1bc0df 100644 --- a/src/plugins/condition/components/ConditionEdit.vue +++ b/src/plugins/condition/components/ConditionEdit.vue @@ -47,8 +47,9 @@
  • - +
  • @@ -82,6 +83,7 @@ export default { mounted() { }, updated() { + console.log('updated conditionEdit'); this.updateCurrentCondition(); this.persist() }, diff --git a/src/plugins/condition/components/ConditionSet.vue b/src/plugins/condition/components/ConditionSet.vue index c4c022bb1a..f027ec669a 100644 --- a/src/plugins/condition/components/ConditionSet.vue +++ b/src/plugins/condition/components/ConditionSet.vue @@ -2,7 +2,7 @@
    - + { - if (condition.isCurrent) { - currentConditionIndex = index; - } - }); - return currentConditionIndex; + conditionCollection } } }; diff --git a/src/plugins/condition/components/CurrentOutput.vue b/src/plugins/condition/components/CurrentOutput.vue index 94cb947347..ae3153d278 100644 --- a/src/plugins/condition/components/CurrentOutput.vue +++ b/src/plugins/condition/components/CurrentOutput.vue @@ -12,7 +12,7 @@ class="c-cs__ui_content" >
    - {{ currentOutput }} + {{ conditionCollection[currentConditionIndex].output }}
    @@ -20,21 +20,33 @@