diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue
index 69e2b87d3..becc1c174 100644
--- a/src/components/FormModel.vue
+++ b/src/components/FormModel.vue
@@ -90,7 +90,7 @@ const $props = defineProps({
});
const emit = defineEmits(['onFetch', 'onDataSaved']);
const modelValue = computed(
- () => $props.model ?? `formModel_${route?.meta?.title ?? route.name}`
+ () => $props.model ?? `formModel_${route?.meta?.title ?? route.name}`,
).value;
const componentIsRendered = ref(false);
const arrayData = useArrayData(modelValue);
@@ -137,7 +137,7 @@ onMounted(async () => {
JSON.stringify(newVal) !== JSON.stringify(originalData.value);
isResetting.value = false;
},
- { deep: true }
+ { deep: true },
);
}
});
@@ -145,7 +145,7 @@ onMounted(async () => {
if (!$props.url)
watch(
() => arrayData.store.data,
- (val) => updateAndEmit('onFetch', val)
+ (val) => updateAndEmit('onFetch', val),
);
watch(formUrl, async () => {
@@ -206,11 +206,11 @@ async function save() {
updateAndEmit('onDataSaved', formData.value, response?.data);
if ($props.reload) await arrayData.fetch({});
+ hasChanges.value = false;
} catch (err) {
console.error(err);
notify('errors.writeRequest', 'negative');
} finally {
- hasChanges.value = false;
isLoading.value = false;
}
}
@@ -239,7 +239,7 @@ function filter(value, update, filterOptions) {
(ref) => {
ref.setOptionIndex(-1);
ref.moveOptionSelection(1, true);
- }
+ },
);
}
diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue
index 3d489cf73..9ce050fe9 100644
--- a/src/components/VnTable/VnFilter.vue
+++ b/src/components/VnTable/VnFilter.vue
@@ -7,6 +7,7 @@ import { useArrayData } from 'composables/useArrayData';
import VnSelect from 'components/common/VnSelect.vue';
import VnInput from 'components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
+import VnInputTime from 'components/common/VnInputTime.vue';
import VnTableColumn from 'components/VnTable/VnColumn.vue';
const $props = defineProps({
@@ -75,6 +76,17 @@ const components = {
},
forceAttrs,
},
+ time: {
+ component: markRaw(VnInputTime),
+ event: updateEvent,
+ attrs: {
+ ...defaultAttrs,
+ disable: !$props.isEditable,
+ },
+ forceAttrs: {
+ label: $props.showLabel && $props.column.label,
+ },
+ },
checkbox: {
component: markRaw(QCheckbox),
event: updateEvent,
diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue
index 77ab2692d..a88540ebf 100644
--- a/src/components/common/VnInputDate.vue
+++ b/src/components/common/VnInputDate.vue
@@ -1,84 +1,31 @@