diff --git a/resources/js/components/FormControls/Input.vue b/resources/js/components/FormControls/Input.vue
index 88e278b..d9c1527 100644
--- a/resources/js/components/FormControls/Input.vue
+++ b/resources/js/components/FormControls/Input.vue
@@ -27,7 +27,7 @@
class="fpl-input flex-grow text-gray-700"
:class="(valid.$invalid) ? 'ring-2 ring-offset-2 ring-opacity-30 ring-red-500' :''">
{
+ if (val === null) {
+ if (localMetric.Eng_Unit) {
+ delete localMetric.Eng_Unit
+ }
+ return;
+ }
+ if (!localMetric.Eng_Unit) {
+ localMetric.Eng_Unit = {};
+ }
+ localMetric.Eng_Unit.default = val;
+ }"
>
@@ -66,8 +77,20 @@
{localMetric.Eng_Low.default = Number(val)}"
+ :value="localMetric.Eng_Low?.default" @input="(val) => {
+ if (val === null) {
+ if (localMetric.Eng_Low) {
+ delete localMetric.Eng_Low
+ }
+ return;
+ }
+ if (!localMetric.Eng_Low) {
+ localMetric.Eng_Low = {};
+ }
+ localMetric.Eng_Low.default = val;
+ }"
>
@@ -79,7 +102,19 @@
{localMetric.Eng_High.default = Number(val)}"
+ type="number"
+ :value="localMetric.Eng_High?.default" @input="(val) => {
+ if (val === null) {
+ if (localMetric.Eng_High) {
+ delete localMetric.Eng_High
+ }
+ return;
+ }
+ if (!localMetric.Eng_High) {
+ localMetric.Eng_High = {};
+ }
+ localMetric.Eng_High.default = val;
+ }"
>
@@ -197,15 +232,6 @@ export default {
Sparkplug_Type: {
default: ['String'],
},
- Eng_Unit: {
- default: '',
- },
- Eng_Low: {
- default: '',
- },
- Eng_High: {
- default: '',
- },
},
..._.cloneDeep(this.selectedMetric.property.allOf[1].properties),
}
@@ -219,6 +245,7 @@ export default {
localMetric: null,
metricSchema: null,
types: null,
+ console: console,
}
},
}