diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 56b4a7e1b3..a7ce10c6bf 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -77,7 +77,7 @@ const isLoading = ref(false); const hasChanges = ref(false); const originalData = ref(); const vnPaginateRef = ref(); -const formData = ref(); +const formData = ref([]); const saveButtonRef = ref(null); const watchChanges = ref(); const formUrl = computed(() => $props.url); diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index 9da0b26a47..86802ee92a 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -25,7 +25,7 @@ const $props = defineProps({ }, searchUrl: { type: String, - default: 'params', + default: 'table', }, }); diff --git a/src/components/VnTable/VnOrder.vue b/src/components/VnTable/VnOrder.vue index 7fdd23b78a..8ffdfe2bc3 100644 --- a/src/components/VnTable/VnOrder.vue +++ b/src/components/VnTable/VnOrder.vue @@ -17,7 +17,7 @@ const $props = defineProps({ }, searchUrl: { type: String, - default: 'params', + default: 'table', }, vertical: { type: Boolean, diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 908157610d..da6c89cbbb 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -325,6 +325,8 @@ function handleOnDataSaved(_) { } function handleScroll() { + if ($props.crudModel.disableInfiniteScroll) return; + const tMiddle = tableRef.value.$el.querySelector('.q-table__middle'); const { scrollHeight, scrollTop, clientHeight } = tMiddle; const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40; diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index 11dcbee3b2..9bc1cec7b1 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -98,7 +98,7 @@ function existSummary(routes) { - + diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 43d634ad93..1ed1194ea7 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -49,7 +49,7 @@ const $props = defineProps({ }, searchUrl: { type: String, - default: 'params', + default: 'table', }, redirect: { type: Boolean, diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 80c607214b..b058dc6426 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -44,7 +44,7 @@ const props = defineProps({ }, limit: { type: Number, - default: 10, + default: 20, }, userParams: { type: Object, @@ -100,7 +100,7 @@ const arrayData = useArrayData(props.dataKey, { const store = arrayData.store; onMounted(async () => { - if (props.autoLoad) await fetch(); + if (props.autoLoad && !store.data?.length) await fetch(); mounted.value = true; }); @@ -115,7 +115,11 @@ watch( watch( () => store.data, - (data) => emit('onChange', data) + (data) => { + if (!mounted.value) return; + emit('onChange', data); + }, + { immediate: true } ); watch( diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index dc6d4751c9..da2d370fe0 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -45,7 +45,7 @@ const props = defineProps({ }, limit: { type: Number, - default: 10, + default: 20, }, userParams: { type: Object, diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 8b06363a0b..7fce714fc2 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -270,7 +270,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { const pushUrl = { path: to }; if (to.endsWith('/list') || to.endsWith('/')) pushUrl.query = newUrl.query; - destroy(); + else destroy(); return router.push(pushUrl); } } diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index aa8df17e2c..0701255407 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -940,7 +940,7 @@ supplier: basicData: alias: Alias workerFk: Responsible - isSerious: Verified + isReal: Verified isActive: Active isPayMethodChecked: PayMethod checked note: Notes diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 575e2c6c72..54728c5b69 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -938,7 +938,7 @@ supplier: basicData: alias: Alias workerFk: Responsable - isSerious: Verificado + isReal: Verificado isActive: Activo isPayMethodChecked: Método de pago validado note: Notas diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue index 72c445fa91..9e750e1cb4 100644 --- a/src/pages/Account/AccountList.vue +++ b/src/pages/Account/AccountList.vue @@ -104,7 +104,7 @@ const exprBuilder = (param, value) => {