InfiniteScroll 3
fix user list send telegram text invited show in profile
This commit is contained in:
@@ -850,7 +850,7 @@ export default defineComponent({
|
||||
// calculate starting row of data
|
||||
const startRow = numRecLoaded.value
|
||||
const endRow = startRow + fetchCount
|
||||
console.log('startRow', startRow, 'endRow', endRow, 'rowsNumber', pagination.value.rowsNumber)
|
||||
// console.log('startRow', startRow, 'endRow', endRow, 'rowsNumber', pagination.value.rowsNumber)
|
||||
|
||||
|
||||
if ((startRow < pagination.value.rowsNumber) || clickbuttsearch.value) {
|
||||
@@ -859,14 +859,14 @@ export default defineComponent({
|
||||
return fetchFromServer(startRow, endRow, myfilternow, myfilterandnow, sortBy, descending).then((ris: any) => {
|
||||
|
||||
pagination.value.rowsNumber = getRowsNumberCount(myfilter)
|
||||
console.log(' ...rowsNumber', pagination.value.rowsNumber)
|
||||
// console.log(' ...rowsNumber', pagination.value.rowsNumber)
|
||||
|
||||
if (returnedData.value === []) {
|
||||
// no more data
|
||||
} else {
|
||||
try {
|
||||
numRecLoaded.value = numRecLoaded.value + (returnedData.value ? returnedData.value.length : 0)
|
||||
console.log(' ...numRecLoaded.value', numRecLoaded.value)
|
||||
// console.log(' ...numRecLoaded.value', numRecLoaded.value)
|
||||
serverData.value = [...serverData.value, ...returnedData.value]
|
||||
} catch (e) {
|
||||
serverData.value = []
|
||||
@@ -890,7 +890,7 @@ export default defineComponent({
|
||||
myinfscroll.value.resume()
|
||||
}
|
||||
|
||||
console.log(' ...DONE ')
|
||||
// console.log(' ...DONE ')
|
||||
done(pagination.value.rowsNumber === 0 ? true : false)
|
||||
})
|
||||
} else {
|
||||
@@ -1869,7 +1869,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function onLoadScroll (index: number, done: any) {
|
||||
if (index > 0) {
|
||||
if (index > 1) {
|
||||
console.log('onLoadScroll', index, 'RECLOAD', numRecLoaded.value, 'ROWS: ', pagination.value.rowsNumber)
|
||||
if (numRecLoaded.value < pagination.value.rowsNumber || (pagination.value.rowsNumber <= 0 && clickbuttsearch.value)) {
|
||||
if (pagination.value.rowsNumber === 0) {
|
||||
@@ -1881,6 +1881,8 @@ export default defineComponent({
|
||||
} else {
|
||||
done(true)
|
||||
}
|
||||
} else{
|
||||
done()
|
||||
}
|
||||
}
|
||||
// onMounted(mounted)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</q-inner-loading>
|
||||
|
||||
<div v-if="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)">
|
||||
<div v-if="(prop_search || canEdit)" class="q-my-xs text-right">
|
||||
<div v-if="(prop_search || canEdit) && finder" class="q-my-xs text-right">
|
||||
<q-btn size="sm" dense icon="fas fa-filter" :label="!showfilter ? $t('grid.showfilters') : $t('grid.hidefilters')"
|
||||
@click="showfilter = !showfilter"></q-btn>
|
||||
</div>
|
||||
@@ -169,7 +169,7 @@
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="search"/>
|
||||
</template>
|
||||
<template v-if="searchList" v-slot:after>
|
||||
<template v-if="searchList && finder" v-slot:after>
|
||||
<q-btn dense label="" color="primary" @click="showfilter = !showfilter" icon="fas fa-filter"></q-btn>
|
||||
</template>
|
||||
</q-input>
|
||||
@@ -199,6 +199,7 @@
|
||||
<div v-if="pagination.rowsNumber > 1 && prop_search">{{ pagination.rowsNumber }} elementi trovati</div>
|
||||
</div>
|
||||
|
||||
|
||||
<q-infinite-scroll
|
||||
ref="myinfscroll"
|
||||
v-if="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
|
||||
@@ -209,36 +210,73 @@
|
||||
>
|
||||
|
||||
<div v-for="(row, index) in serverData" :key="index" class="caption">
|
||||
<div v-if="row && shared_consts.TABLES_WITH_DATE.includes(tablesel)">
|
||||
<div
|
||||
v-if="showType === costanti.SHOW_MYCARD || (myvertical !== costanti.VISUTABLE_USER_TABGROUP && myvertical === costanti.VISUTABLE_LISTA && shared_consts.TABLES_VISU_CMYSRECCARD.includes(tablesel)) ">
|
||||
|
||||
<div v-if="row.dateTimeStart && (tools.getstrVeryShortDate(row.dateTimeStart) !== actual)" class="actualdate">
|
||||
<span style="display: none">{{ actual = tools.getstrVeryShortDate(row.dateTimeStart) }}</span>
|
||||
<q-chip class="text-center shadow-5 glossy bg-orange" icon="fas fa-calendar-day">{{ tools.getstrDateLong(row.dateTimeStart) }}</q-chip>
|
||||
<div v-if="row && shared_consts.TABLES_WITH_DATE.includes(tablesel)">
|
||||
|
||||
<div v-if="row.dateTimeStart && (tools.getstrVeryShortDate(row.dateTimeStart) !== actual)" class="actualdate">
|
||||
<span style="display: none">{{ actual = tools.getstrVeryShortDate(row.dateTimeStart) }}</span>
|
||||
<q-chip class="text-center shadow-5 glossy bg-orange" icon="fas fa-calendar-day">{{ tools.getstrDateLong(row.dateTimeStart) }}</q-chip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<CMyRecGrpCard
|
||||
v-if="tablesel === toolsext.TABMYGROUPS"
|
||||
:table="tablesel"
|
||||
:prop_myrec="row"
|
||||
@cmdext="cmdExt"
|
||||
>
|
||||
</CMyRecGrpCard>
|
||||
<CMyRecCard
|
||||
v-else
|
||||
:table="tablesel"
|
||||
:prop_myrec="row"
|
||||
@cmdext="cmdExt"
|
||||
>
|
||||
</CMyRecCard>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="((showType === costanti.SHOW_USERINFO) && myvertical !== costanti.VISUTABLE_SCHEDA_USER) || ((myvertical === 2) && (shared_consts.TABLES_VISU_LISTA_USER.includes(tablesel)))"
|
||||
class="fill-all-width">
|
||||
<div>
|
||||
|
||||
<CMyUser
|
||||
:notsetcmd="true"
|
||||
:mycontact="row"
|
||||
:visu="visufind"
|
||||
:groupname="extrafield"
|
||||
:labelextra="col_title ? row[col_title] : ''"
|
||||
:labelFooter="col_footer ? getLabelFooterByRow(row) : ''"
|
||||
>
|
||||
</CMyUser>
|
||||
|
||||
<q-separator></q-separator>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div
|
||||
v-else-if="((showType === costanti.SHOW_GROUPINFO) && myvertical !== costanti.VISUTABLE_SCHEDA_GROUP) || ((myvertical === 2) && (tablesel === 'mygroups'))"
|
||||
class="fill-all-width">
|
||||
<div>
|
||||
|
||||
<CMyGroups
|
||||
v-model="filtergrp"
|
||||
:finder="false"
|
||||
:mygrp="row"
|
||||
:visu="costanti.FIND_GROUP"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<CMyRecGrpCard
|
||||
v-if="tablesel === toolsext.TABMYGROUPS"
|
||||
:table="tablesel"
|
||||
:prop_myrec="row"
|
||||
@cmdext="cmdExt"
|
||||
>
|
||||
</CMyRecGrpCard>
|
||||
<CMyRecCard
|
||||
v-else
|
||||
:table="tablesel"
|
||||
:prop_myrec="row"
|
||||
@cmdext="cmdExt"
|
||||
>
|
||||
</CMyRecCard>
|
||||
</div>
|
||||
<template v-slot:loading>
|
||||
<div class="row justify-center q-my-md">
|
||||
<q-spinner-dots color="primary" size="40px"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</q-infinite-scroll>
|
||||
|
||||
<q-table
|
||||
v-else
|
||||
:grid="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
|
||||
|
||||
Reference in New Issue
Block a user