InfiniteScroll: Le liste (Beni / Servizi / Eventi) devono essere caricate in automatico, scorrendo la lista...

fix category
This commit is contained in:
paoloar77
2022-08-15 15:10:00 +02:00
parent 0b6188699e
commit c93361dfa2
38 changed files with 1051 additions and 328 deletions

View File

@@ -126,7 +126,8 @@ export const Api = {
return reject({ code: toolsext.ERR_AUTHENTICATION })
}
}
if (tools.isDebug())
console.log('result', res)
return resolve(res)
})
.catch((error) => {

View File

@@ -614,6 +614,13 @@ export const colmyUserGroup = [
sortable: true,
showWhen: 0
}),
AddCol({
name: 'date_updated', label_trans: 'reg.pub_updated', fieldtype: costanti.FieldType.onlydate,
required: false,
visible: false,
sortable: true,
showWhen: 0
}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',

View File

@@ -2258,6 +2258,12 @@ export const tools = {
return ''
},
getstrDateYY(mytimestamp: Date | number | string | undefined) {
// console.log('getstrDate', mytimestamp)
if (mytimestamp) return date.formatDate(mytimestamp, 'DD/MM/YY')
return ''
},
getstrDateLong(mytimestamp: Date | number | string | undefined) {
// console.log('getstrDate', mytimestamp)
const dayofweek = this.getDayOfWeek(mytimestamp)
@@ -5785,6 +5791,32 @@ export const tools = {
return config[name];
},
getArrSector(table: string, rec: any) {
if (table === toolsext.TABMYGOODS)
return rec.sectorGood
else if ((table === toolsext.TABMYBACHECAS) || (table === toolsext.TABMYSKILLS))
return rec.sector
else if (table === toolsext.TABMYGROUPS)
return [{descr: rec.sector}]
else if (table === toolsext.TABMYHOSPS)
return []
},
getArrSubSector(table: string, rec: any) {
if (table === toolsext.TABMYGOODS)
return rec.recGood
else if ((table === toolsext.TABMYBACHECAS) || (table === toolsext.TABMYSKILLS))
return rec.recSkill
else if (table === toolsext.TABMYGROUPS)
return []
else if (table === toolsext.TABMYHOSPS)
return []
}
// getLocale() {
// if (navigator.languages && navigator.languages.length > 0) {
// return navigator.languages[0]

View File

@@ -62,6 +62,7 @@ export const toolsext = {
TABFRIENDS: 'friends',
TABMYGROUPS: 'mygroups',
TABSKILLS: 'skills',
TABGOODS: 'goods',
TABSECTORS: 'sectors',
TABSECTORGOODS: 'sectorgoods',
TABREGIONS: 'regions',

View File

@@ -1625,7 +1625,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
let obj: any = {}
obj[mykey] = costanti.FILTER_NESSUNO
obj[collab] = '[Nessuno]'
obj['idSector'] = []
if (table === toolsext.TABMYGOODS) {
obj['idSectorGood'] = []
} else if ((table === toolsext.TABMYSKILLS) ) {
obj['idSector'] = []
}
myarr = [obj, ...myarr]