Commit 7900f9bf authored by Janis Streib's avatar Janis Streib 🦉
Browse files

FIX: more DBEditor bugs

parent cae6c514
......@@ -45,7 +45,6 @@
:attribute_name="attr"
:input_reducer="input_reducer[attr]"
v-bind:key="attr"
v-if="'new' in object_functions[object_function].parameters[attr]"
></DataEditField>
</template>
<template>
......@@ -59,7 +58,8 @@
:attribute_name="attr"
:input_reducer="input_reducer[attr]"
v-bind:key="attr"
v-if="'new' in data && !non_optionals_order.includes(attr)"></DataEditField>
v-if="!non_optionals_order.includes(attr)"
></DataEditField>
</template>
</b-collapse>
......
......@@ -59,7 +59,7 @@ export default {
immediate: true,
deep: true,
async handler() {
if (this.object_attribute.data_type === 'timestamp_tz' && this.attribute_preset !== null && this.attribute_preset !== '__NULL') {
if (this.object_attribute && this.object_attribute.data_type === 'timestamp_tz' && this.attribute_preset !== '' && this.attribute_preset !== null && this.attribute_preset !== '__NULL') {
const d = new Date(this.attribute_preset)
this.date_picker = d.getFullYear() + '-' + (d.getMonth() + 1 + '').padStart(2, '0') + '-' + (d.getDate() + '').padStart(2, '0')
this.time_picker = (d.getHours() + '').padStart(2, '0') + ':' + (d.getMinutes() + '').padStart(2, '0')
......@@ -75,7 +75,7 @@ export default {
return
}
if (this.time_picker === null || this.time_picker === '' || this.time_picker.toLowerCase().includes('nan')) {
this.composedDate = new Date(this.date_picker).toJSON()
this.composedDate = new Date(this.date_picker + 'T00:00:00').toJSON()
return
}
this.composedDate = new Date(this.date_picker + 'T' + this.time_picker).toJSON()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment