#7136 - Enable paginate event in VnSelectFilter #255
|
@ -127,7 +127,6 @@ async function paginate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function endPagination() {
|
function endPagination() {
|
||||||
hasMoreData.value = arrayData.hasMoreData.value;
|
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
emit('onFetch', store.data);
|
emit('onFetch', store.data);
|
||||||
emit('onPaginate');
|
emit('onPaginate');
|
||||||
|
@ -183,11 +182,12 @@ defineExpose({ fetch, addFilter });
|
||||||
</QCard>
|
</QCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<QInfiniteScroll
|
<QInfiniteScroll
|
||||||
v-if="store.data"
|
v-if="store.data"
|
||||||
@load="onLoad"
|
@load="onLoad"
|
||||||
:offset="offset"
|
:offset="offset"
|
||||||
:disable="disableInfiniteScroll || !arrayData.hasMoreData.value"
|
:disable="disableInfiniteScroll || !arrayData.hasMoreData"
|
||||||
class="full-width"
|
class="full-width"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
>
|
>
|
||||||
|
|
|
@ -97,7 +97,7 @@ export function useArrayData(key, userOptions) {
|
||||||
const { limit } = filter;
|
const { limit } = filter;
|
||||||
|
|
||||||
hasMoreData.value = response.data.length >= limit;
|
hasMoreData.value = response.data.length >= limit;
|
||||||
|
store.hasMoreData = hasMoreData.value;
|
||||||
if (append) {
|
if (append) {
|
||||||
if (!store.data) store.data = [];
|
if (!store.data) store.data = [];
|
||||||
for (const row of response.data) store.data.push(row);
|
for (const row of response.data) store.data.push(row);
|
||||||
|
@ -168,7 +168,7 @@ export function useArrayData(key, userOptions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadMore() {
|
async function loadMore() {
|
||||||
if (!hasMoreData.value) return;
|
if (!hasMoreData.value && !store.hasMoreData) return;
|
||||||
|
|
||||||
store.skip = store.limit * page.value;
|
store.skip = store.limit * page.value;
|
||||||
page.value += 1;
|
page.value += 1;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
customerFilter:
|
customerFilter:
|
||||||
filter:
|
filter:
|
||||||
name: 'Name'
|
name: Name
|
||||||
socialName: 'Social name'
|
socialName: Social name
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
customerFilter:
|
customerFilter:
|
||||||
filter:
|
filter:
|
||||||
name: 'Nombre'
|
name: Nombre
|
||||||
socialName: 'Razón Social'
|
socialName: Razón Social
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
@ -15,6 +16,8 @@ import { toDate } from 'src/filters';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const { hasAny } = useRole();
|
||||||
|
const isAdministrative = () => hasAny(['administrative']);
|
||||||
|
|
||||||
const suppliersOptions = ref([]);
|
const suppliersOptions = ref([]);
|
||||||
const travelsOptions = ref([]);
|
const travelsOptions = ref([]);
|
||||||
|
@ -206,6 +209,7 @@ const onFilterTravelSelected = (formData, id) => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
|
v-if="isAdministrative()"
|
||||||
v-model="data.isBooked"
|
v-model="data.isBooked"
|
||||||
:label="t('entry.basicData.booked')"
|
:label="t('entry.basicData.booked')"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
entryList:
|
entryList:
|
||||||
list:
|
list:
|
||||||
inventoryEntry: 'Inventory entry'
|
inventoryEntry: Inventory entry
|
||||||
virtualEntry: 'Virtual entry'
|
virtualEntry: Virtual entry
|
||||||
entryFilter:
|
entryFilter:
|
||||||
filter:
|
filter:
|
||||||
search: 'General search'
|
search: General search
|
||||||
reference: 'Reference'
|
reference: Reference
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
entryList:
|
entryList:
|
||||||
list:
|
list:
|
||||||
inventoryEntry: 'Es inventario'
|
inventoryEntry: Es inventario
|
||||||
virtualEntry: 'Es una redada'
|
virtualEntry: Es una redada
|
||||||
entryFilter:
|
entryFilter:
|
||||||
filter:
|
filter:
|
||||||
search: 'Búsqueda general'
|
search: Búsqueda general
|
||||||
reference: 'Referencia'
|
reference: Referencia
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
travelFilter:
|
travelFilter:
|
||||||
filter:
|
filter:
|
||||||
warehouseOutFk: 'Warehouse Out'
|
warehouseOutFk: Warehouse Out
|
||||||
warehouseInFk: 'Warehouse In'
|
warehouseInFk: Warehouse In
|
||||||
agencyModeFk: 'Agency'
|
agencyModeFk: Agency
|
||||||
scopeDays: 'Days onward'
|
scopeDays: Days onward
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
travelFilter:
|
travelFilter:
|
||||||
filter:
|
filter:
|
||||||
warehouseInFk: 'Alm. entrada'
|
warehouseInFk: Alm. entrada
|
||||||
warehouseOutFk: 'Alm. salida'
|
warehouseOutFk: Alm. salida
|
||||||
agencyModeFk: 'Agencia'
|
agencyModeFk: Agencia
|
||||||
scopeDays: 'Días adelante'
|
scopeDays: Días adelante
|
||||||
|
|
|
@ -27,7 +27,10 @@ export default defineConfig({
|
||||||
sassVariables: 'src/quasar-variables.scss',
|
sassVariables: 'src/quasar-variables.scss',
|
||||||
}),
|
}),
|
||||||
VueI18nPlugin({
|
VueI18nPlugin({
|
||||||
include: path.resolve(__dirname, 'src/i18n/**'),
|
include: [
|
||||||
|
path.resolve(__dirname, 'src/i18n/**'),
|
||||||
|
path.resolve(__dirname, 'src/pages/**/locale/**'),
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
jsconfigPaths(),
|
jsconfigPaths(),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue