-Poter entrare nel login anche con l'username Telegram !

- Se clicchi sulla foto, mi apre il profilo anzichè l'invio dei RIS
- ++ Filtro sulle ricerche: Scegliere un Circuito specifico.
- Nella lista iscritti compaiono anche i cancellati...
- n "Attività" si vede tutto allargato, non sta nella dimensione della pagina.
- Nelle notifiche della campanellina non si vede più il titolo... (è vuoto).
- Non funziona il Filtro per Settore (nella Home sugli Eventi)
- Filtri avanzati da mostrare solo se clicco sul bottone.
- I menu in basso non funzionano !
- Nel menu "Iscritti" del circuito, non compare più la ricerca ! Riattivarla
- Opzione di mandare una email quando uno si registra al Circuito
- ++ Opzione per il Circuito: Chiedi di entrare agli admin (e non in automatico).
This commit is contained in:
Surya Paolo
2025-01-09 15:17:21 +01:00
parent 3734762a8b
commit da6bef1b96
35 changed files with 1386 additions and 1088 deletions

View File

@@ -14,7 +14,9 @@ import {
ISearchList,
IPagination,
IParamDialog,
IMySkill
IMySkill,
ICoordLatLng,
ICoordGPS
} from 'model'
import { lists } from '@store/Modules/lists'
import { IParamsQuery } from 'model'
@@ -36,7 +38,7 @@ import { costanti } from '@costanti'
import translate from '@/globalroutines/util'
import { toolsext } from '@store/Modules/toolsext'
import { useRouter } from 'vue-router'
import { useRoute } from 'vue-router'
export default defineComponent({
name: 'CGridTableUser',
props: {
@@ -50,7 +52,7 @@ export default defineComponent({
default: '',
},
prop_mycolumns: {
type: Object as PropType<[]>,
type: Object as PropType<any[]>,
required: false,
default: null,
},
@@ -293,6 +295,9 @@ export default defineComponent({
},
setup(props, { emit }) {
const $q = useQuasar()
const router = useRouter()
const route = useRoute()
const { t } = useI18n()
const userStore = useUserStore()
const globalStore = useGlobalStore()
@@ -317,6 +322,7 @@ export default defineComponent({
const search = ref('')
const tablesel = ref('')
const showfilteradv = ref(false)
const showSpin = ref(false)
const showNotification = ref(false)
@@ -488,11 +494,11 @@ export default defineComponent({
const recSector = searchList.value.find((rec) => rec.table === tabsector)
if (recSector)
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + tabsector + costanti.FILTER_SEP + tabsector, newval)
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + tabsector, newval)
for (const item of searchList.value) {
if (item.table === tablecat) {
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + tablecat + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + item.table + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
const rec = searchList.value.find((myrec) => myrec.table === tablecat) // check if exist
let trovato = false
let arrvalues = []
@@ -519,11 +525,11 @@ export default defineComponent({
const recRegion = searchList.value.find((rec) => rec.table === tabregion)
if (recRegion)
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + tabregion + costanti.FILTER_SEP + tabregion, newval)
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + tabregion, newval)
for (const item of searchList.value) {
if (item.table === tableprov) {
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + tableprov + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + tableprov + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
const rec = searchList.value.find((myrec) => myrec.table === tableprov) // check if exist
let trovato = false
let arrvalues = []
@@ -541,7 +547,7 @@ export default defineComponent({
}
}
} else if (item.table === shared_consts.TAB_CITIES) {
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + item.table + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
const valsaved = tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + item.table + costanti.FILTER_SEP + newval, costanti.FILTER_TUTTI)
const rec = searchList.value.find((myrec) => myrec.table === shared_consts.TAB_CITIES) // check if exist
let trovato = false
let arrvalues = []
@@ -570,7 +576,7 @@ export default defineComponent({
function searchval(newval: any, table: any) {
// console.log('REFRR searchval', newval, table)
const myrecfilt = searchList.value.find((rec) => rec.table === table)
let keycookie = tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP
let keycookie = tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + table
if (myrecfilt && myrecfilt.keycookie)
keycookie += myrecfilt.keycookie
tools.setCookie(keycookie, newval)
@@ -578,7 +584,7 @@ export default defineComponent({
if (table === shared_consts.TABLES_MYSKILLS) {
const recSector = searchList.value.find((rec) => rec.table === 'sectors')
if (recSector) {
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + table + costanti.FILTER_SEP + recSector.value, newval)
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + recSector.value, newval)
}
} else if (table === toolsext.TABSECTORS) {
setCategBySector(shared_consts.TABLES_MYSKILLS, table, newval)
@@ -722,30 +728,24 @@ export default defineComponent({
let idProvince = 0
let idRegion = 0
let idSkill = 0
if (searchList.value) {
recSector = searchList.value.find((item: ISearchList) => item.table === toolsext.TABSECTORS)
idSector = recSector ? recSector.value : 0
}
if (searchList.value) {
recSectorGood = searchList.value.find((item: ISearchList) => item.table === 'sectorgoods')
idSectorGood = recSectorGood ? recSectorGood.value : 0
}
if (searchList.value) {
recProvince = searchList.value.find((item: ISearchList) => item.table === 'provinces')
idProvince = recProvince ? recProvince.value : 0
}
if (searchList.value) {
recRegion = searchList.value.find((item: ISearchList) => item.table === 'regions')
idRegion = recRegion ? recRegion.value : 0
}
if (searchList.value) {
recCities = searchList.value.find((item: ISearchList) => item.table === 'cities')
}
if (searchList.value) {
recCities = searchList.value.find((item: ISearchList) => item.table === 'cities')
recSkill = searchList.value.find((item: ISearchList) => item.table === shared_consts.TABLES_MYSKILLS)
idSkill = recSkill ? recSkill.value : 0
// console.log('recSkill', idSkill)
}
@@ -828,8 +828,7 @@ export default defineComponent({
objitem[item.key] = item.value
filtersearch.push(objitem)
} else if (item.arrvalue.length > 0) {
} else if (item.arrvalue && item.arrvalue.length > 0) {
const myarr = item.arrvalue.filter((value: any) => {
if (typeof value === 'number') {
@@ -841,17 +840,33 @@ export default defineComponent({
const arr2: any = []
if (item.table !== 'provinces') {
myarr.forEach((myval: any) => {
const objitem2: any = {}
objitem2[item.key] = myval
arr2.push(objitem2)
})
if (shared_consts.COL_WITH_ARRFILTER_IN_AND.includes(item.key)) {
myarr.forEach((myval: any) => {
const objitem2: any = {}
objitem2[item.key] = myval
arr2.push(objitem2)
})
const obj2: any = {
$or: arr2
}
if (arr2.length > 0) {
filtersearch.push(obj2)
const obj2: any = {
$and: arr2
}
if (arr2.length > 0) {
filtersearch.push(obj2)
}
} else {
myarr.forEach((myval: any) => {
const objitem2: any = {}
objitem2[item.key] = myval
arr2.push(objitem2)
})
const obj2: any = {
$or: arr2
}
if (arr2.length > 0) {
filtersearch.push(obj2)
}
}
}
@@ -1193,12 +1208,24 @@ export default defineComponent({
// console.log('REFRESH!')
// Controllo se la Regione è su Tutti, allora la provincia e comune devono andare vuoti
// Reset others tables
const filtroRegioni = searchList.value.find((myrec) => myrec.table === toolsext.TABREGIONS) // check if exist
if (filtroRegioni && filtroRegioni.value === costanti.FILTER_TUTTI) {
const filtroProv = searchList.value.find((myrec) => myrec.table === toolsext.TABPROVINCE) // check if exist
if (filtroProv) {
filtroProv.value = costanti.FILTER_TUTTI
const label = tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + toolsext.TABPROVINCE
tools.setCookie(label, filtroProv.value)
}
}
startsearch.value = true
serverData.value = []
numRecLoaded.value = 0
pagination.value.page = 0
search.value = search.value.trim()
search.value = search.value ? search.value.trim() : ''
// console.log('refresh')
// console.log('search', search)
@@ -1341,7 +1368,8 @@ export default defineComponent({
}
*/
newRecord.value = null
newRecordBool.value = false
newRecord.value = {}
}
function SaveValue(newVal: any, valinitial: any) {
@@ -1446,6 +1474,7 @@ export default defineComponent({
newRecord.value = tools.getdefaultnewrec(mytable.value, { groupname: props.groupname })
}
if (!newRecord.value) {
newRecordBool.value = false
newRecord.value = {}
}
newRecord.value.userId = userStore.my._id
@@ -1775,7 +1804,8 @@ export default defineComponent({
} else if (visib === '0') {
// Se da togliere, lo togli
if (colVisib.value.includes(field))
colVisib.value = colVisib.value.filter((myrec: any) => myrec !== field)
if (colVisib.value)
colVisib.value = colVisib.value.filter((myrec: any) => myrec !== field)
}
}
}
@@ -1852,12 +1882,10 @@ export default defineComponent({
}
}
function enableSaveNewRec(newrec: boolean) {
function enableSaveNewRec(newrec: boolean, showmsg: boolean = true) {
const ok = true
const showmsg = true
let myrec = null
if (newrec) {
myrec = { ...newRecord.value }
@@ -1872,6 +1900,17 @@ export default defineComponent({
for (col of mycolumns.value) {
if (!msg) {
if (col.showonlyif_dipersona) {
const valori = myrec['idStatusSkill']
if (valori && (valori.length === 1) && valori.includes(shared_consts.STATUSSKILL_ONLINE)) {
col.required = false
} else {
col.required = true
}
col.visible = col.required
}
if (col.required) {
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
if (tools.isArray(myrec[col.name])) {
@@ -1994,7 +2033,8 @@ export default defineComponent({
else
serverData.value = [ris, ...serverData.value]
newRecord.value = null
newRecord.value = {}
newRecordBool.value = false
tools.showPositiveNotif($q, t('db.recupdated'))
// refresh()
@@ -2022,7 +2062,7 @@ export default defineComponent({
}
async function saverecModif() {
// console.log('saverecModif')
// console.log('saverecModif', recModif.value)
const mydata = {
table: mytable.value,
data: {}
@@ -2073,8 +2113,8 @@ export default defineComponent({
function showColCheck(col: IColGridTable, tipovis: number, visulabel: boolean, value: any = '', record: any = null) {
// if (col.isadvanced_field && !showfilteradv.value)
// return false
if (col.isadvanced_field && !showfilteradv.value)
return false
const check = tools.checkIfShowField(col, tipovis, visulabel, value)