fix: ordinamento membri (namecomplete (concat: name, surname, username)
This commit is contained in:
@@ -440,7 +440,7 @@ export default defineComponent({
|
||||
|
||||
watch(() => ordinam.value, (to: any, from: any) => {
|
||||
if (pagination.value.sortBy !== ordinam.value) {
|
||||
tools.setCookie('s_ordinam_' + props.prop_mytable, ordinam.value)
|
||||
tools.setCookie('s_ordinamnew_' + props.prop_mytable, ordinam.value)
|
||||
// pagination.value.sortBy = getObjSort(ordinam.value, ordinam_desc.value)
|
||||
// refresh()
|
||||
}
|
||||
@@ -628,6 +628,9 @@ export default defineComponent({
|
||||
if ((field === 'date_reg') || (field === 'numMembers')) {
|
||||
return -1;
|
||||
}
|
||||
if (field === 'namecomplete') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return precorder ? precorder : 1;
|
||||
}
|
||||
@@ -1038,7 +1041,7 @@ export default defineComponent({
|
||||
pagination.value.rowsPerPage = rowsPerPage
|
||||
//pagination.value.sortBy = getObjSort(sortBy, descending)
|
||||
pagination.value.sortBy = sortBy
|
||||
ordinam.value = sortBy
|
||||
// ordinam.value = sortBy
|
||||
ordinam_desc.value = descending
|
||||
pagination.value.descending = descending
|
||||
|
||||
@@ -1115,7 +1118,7 @@ export default defineComponent({
|
||||
pagination.value.page = page
|
||||
pagination.value.rowsPerPage = rowsPerPage
|
||||
pagination.value.sortBy = getObjSort(sortBy, descending)
|
||||
ordinam.value = sortBy
|
||||
// ordinam.value = sortBy
|
||||
ordinam_desc.value = descending
|
||||
pagination.value.descending = descending
|
||||
|
||||
@@ -1159,7 +1162,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function refresh_infscroll(done: any) {
|
||||
// console.log('refresh_infscroll')
|
||||
// console.log('refresh_infscroll', 'pag', pagination.value.rowsNumber)
|
||||
rowclicksel.value = null
|
||||
|
||||
onUpdateData(0,
|
||||
@@ -1511,10 +1514,10 @@ export default defineComponent({
|
||||
if (!shared_consts.TABLES_ORDER_DATE_UPDATED.includes(tablesel.value) &&
|
||||
!shared_consts.TABLES_ORDER_DESCR.includes(tablesel.value)) {
|
||||
console.log('get cookie)')
|
||||
let v1 = tools.getCookie('s_ordinam_' + tablesel.value, null)
|
||||
let v1 = tools.getCookie('s_ordinamnew_' + tablesel.value, null)
|
||||
if (v1)
|
||||
ordinam.value = v1
|
||||
let v2 = tools.getCookie('s_ordinam_des_' + tablesel.value, null)
|
||||
let v2 = tools.getCookie('s_ordinamnew_des_' + tablesel.value, null)
|
||||
if (v2)
|
||||
ordinam_desc.value = v2
|
||||
}
|
||||
@@ -2130,7 +2133,7 @@ export default defineComponent({
|
||||
|
||||
function onLoadScroll(index: number, done: any) {
|
||||
if (index > 1) {
|
||||
// console.log('onLoadScroll', index, 'RECLOAD', numRecLoaded.value, 'ROWS: ', pagination.value.rowsNumber)
|
||||
// console.log('onLoadScroll', index, 'RECLOAD', numRecLoaded.value, 'ROWS: ', pagination.value.rowsNumber, 'PAGE: ', pagination.value.page)
|
||||
if (numRecLoaded.value < pagination.value.rowsNumber || (pagination.value.rowsNumber <= 0 && clickbuttsearch.value)) {
|
||||
if (pagination.value.rowsNumber === 0) {
|
||||
pagination.value.page = 0
|
||||
@@ -2142,6 +2145,7 @@ export default defineComponent({
|
||||
done(true)
|
||||
}
|
||||
} else {
|
||||
// console.log('DONE .....................')
|
||||
done()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,6 @@
|
||||
<q-tab-panels
|
||||
v-model="mytab"
|
||||
animated
|
||||
swipeable
|
||||
vertical
|
||||
transition-prev="jump-up"
|
||||
transition-next="jump-up"
|
||||
|
||||
@@ -136,15 +136,15 @@ export default defineComponent({
|
||||
return null
|
||||
}
|
||||
|
||||
function clicca(tipo: any, set: any, title: string) {
|
||||
if (set && myrec.value.username !== userStore.my.username && tipo === costanti.TIPOFAVBOOK.FAVORITE) {
|
||||
function clicca(tipo: any, myset: any, title: string) {
|
||||
if (myset && tipo === costanti.TIPOFAVBOOK.FAVORITE) {
|
||||
userStore.setFavorite($q, t, myrec.value._id, props.table, myrec.value);
|
||||
}
|
||||
if (set && myrec.value.username !== userStore.my.username && tipo === costanti.TIPOFAVBOOK.BOOKMARK) {
|
||||
if (myset && tipo === costanti.TIPOFAVBOOK.BOOKMARK) {
|
||||
userStore.setBookmark($q, t, myrec.value._id, props.table, myrec.value);
|
||||
}
|
||||
|
||||
if (!set) {
|
||||
if (!myset) {
|
||||
usersList.value.show = true;
|
||||
usersList.value.title = title;
|
||||
usersList.value.list = myrec.value.myfav;
|
||||
|
||||
@@ -86,7 +86,7 @@ export default defineComponent({
|
||||
|
||||
function navigaExt(obj: any) {
|
||||
cmdExt(costanti.CMD_SHOW_PAGE, obj, null)
|
||||
//let link = tools.getDirectoryByTable(props.table) + '/' + obj._id
|
||||
//let link = shared_consts.getDirectoryByTable(props.table) + '/' + obj._id
|
||||
//console.log('link', link)
|
||||
//$router.push(link)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user