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 @@ - - diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index 5c84951cb..3d482933a 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -1,14 +1,11 @@ - - - - -es: - Cancel: Cancelar - diff --git a/src/pages/Item/Card/ItemLastEntries.vue b/src/pages/Item/Card/ItemLastEntries.vue index 9071cc6eb..a3ae99da6 100644 --- a/src/pages/Item/Card/ItemLastEntries.vue +++ b/src/pages/Item/Card/ItemLastEntries.vue @@ -200,16 +200,10 @@ onUnmounted(() => (stateStore.rightDrawer = false)); - +
diff --git a/src/pages/Item/ItemRequestFilter.vue b/src/pages/Item/ItemRequestFilter.vue index 2c056acc6..2fbe849d1 100644 --- a/src/pages/Item/ItemRequestFilter.vue +++ b/src/pages/Item/ItemRequestFilter.vue @@ -192,7 +192,6 @@ const decrement = (paramsObj, key) => { v-model="params.from" @update:model-value="searchFn()" is-outlined - emit-date-format /> @@ -203,7 +202,6 @@ const decrement = (paramsObj, key) => { v-model="params.to" @update:model-value="searchFn()" is-outlined - emit-date-format /> diff --git a/src/pages/Monitor/SalesClientsTable.vue b/src/pages/Monitor/SalesClientsTable.vue index 3f2389471..8008b1fda 100644 --- a/src/pages/Monitor/SalesClientsTable.vue +++ b/src/pages/Monitor/SalesClientsTable.vue @@ -169,7 +169,6 @@ const columns = computed(() => [ [ diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue index 7b74117bb..63ac48393 100644 --- a/src/pages/Ticket/TicketFilter.vue +++ b/src/pages/Ticket/TicketFilter.vue @@ -17,15 +17,6 @@ const props = defineProps({ }, }); -const from = Date.vnNew(); -const to = Date.vnNew(); -to.setDate(to.getDate() + 1); - -const defaultParams = { - from: toDateString(from), - to: toDateString(to), -}; - const workers = ref(); const provinces = ref(); const states = ref(); @@ -44,11 +35,7 @@ const warehouses = ref(); @on-fetch="(data) => (workers = data)" auto-load /> - +