From 863d2216cf4d0c5563015cffa5ede22f0630b474 Mon Sep 17 00:00:00 2001 From: Cole Blanchard <33158416+blanchco@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:42:00 -0400 Subject: [PATCH] fix: other values now show source (#4744) Co-authored-by: Cole Blanchard --- .../petrinet/tera-initial-other-value-modal.vue | 14 +++++++------- .../petrinet/tera-parameter-other-value-modal.vue | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/client/hmi-client/src/components/model/petrinet/tera-initial-other-value-modal.vue b/packages/client/hmi-client/src/components/model/petrinet/tera-initial-other-value-modal.vue index 8a8e0357c8..ce54438630 100644 --- a/packages/client/hmi-client/src/components/model/petrinet/tera-initial-other-value-modal.vue +++ b/packages/client/hmi-client/src/components/model/petrinet/tera-initial-other-value-modal.vue @@ -34,13 +34,13 @@ - @@ -114,7 +114,7 @@ const props = defineProps<{ const otherValueList = ref(props.otherValueList); const columns = ref([ { field: 'name', header: 'Configuration name' }, - { field: 'target', header: 'Source' }, + { field: 'source', header: 'Source' }, { field: 'expression', header: 'Value' } ]); @@ -131,13 +131,13 @@ const customSelection = ref(false); const selection = ref(null); const onCustomSelectionChange = (val) => { - if (!val?.name) { + if (customSelection.value && !val?.name) { selection.value = numberType.value === numberOptions[0] ? { constant: customConstant.value, source: customSource.value } : { constant: 0, source: '' }; } else { - selection.value = { constant: val.expression, source: customSource.value }; + selection.value = { constant: val.expression, source: val.source }; } }; @@ -145,7 +145,7 @@ function getColumnWidth(columnField: string) { switch (columnField) { case 'name': return 40; - case 'target': + case 'source': return 20; case 'expression': return 100; diff --git a/packages/client/hmi-client/src/components/model/petrinet/tera-parameter-other-value-modal.vue b/packages/client/hmi-client/src/components/model/petrinet/tera-parameter-other-value-modal.vue index bd2377a1f3..c01b0fbaf3 100644 --- a/packages/client/hmi-client/src/components/model/petrinet/tera-parameter-other-value-modal.vue +++ b/packages/client/hmi-client/src/components/model/petrinet/tera-parameter-other-value-modal.vue @@ -36,7 +36,7 @@ {{ data.name }}