-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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 KiB

After

Width:  |  Height:  |  Size: 424 KiB

View File

@@ -11,6 +11,7 @@ import { CSendCoins } from '@/components/CSendCoins'
export default defineComponent({ export default defineComponent({
name: 'CContactUser', name: 'CContactUser',
emits: ['showed'],
props: { props: {
myuser: { myuser: {
type: Object as PropType<IUserFields>, type: Object as PropType<IUserFields>,
@@ -36,7 +37,7 @@ export default defineComponent({
}, },
}, },
components: { CLabel, CSendCoins }, components: { CLabel, CSendCoins },
setup(props) { setup(props, { emit }) {
const $q = useQuasar() const $q = useQuasar()
const userStore = useUserStore() const userStore = useUserStore()
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
@@ -86,6 +87,11 @@ export default defineComponent({
} }
function showed() {
loading.value = false
emit('showed')
}
return { return {
tools, tools,
@@ -99,6 +105,7 @@ export default defineComponent({
clickOpenSendCoin, clickOpenSendCoin,
site, site,
loading, loading,
showed,
} }
}, },
}) })

View File

@@ -17,7 +17,7 @@
color="orange" color="orange"
rounded rounded
:label="$t('profile.myactivities')" :label="$t('profile.myactivities')"
:to="`/attivita/` + myuser.username" :to="`/my/` + myuser.username"
> >
</q-btn> </q-btn>
</div> </div>
@@ -85,7 +85,7 @@
showsendCoinTo = false; showsendCoinTo = false;
loading = false; loading = false;
" "
@showed="loading = false" @showed="showed"
> >
</CSendCoins> </CSendCoins>
</div> </div>

View File

@@ -64,19 +64,19 @@ export default defineComponent({
const contact = computed(() => userStore.my) const contact = computed(() => userStore.my)
const searchType = ref('username') const searchType = ref('receivers')
const usersList = ref(<any>{ show: false, title: '', list: [], listgroup: [] }) const usersList = ref(<any>{ show: false, title: '', list: [], listgroup: [] })
const options = ref([ const options = ref([
{
label: 'Cerca per Nome o Username',
value: 'username'
},
{ {
label: 'Lista dei Riceventi di oggi', label: 'Lista dei Riceventi di oggi',
value: 'receivers' value: 'receivers'
}, },
{
label: 'Cerca per Nome o Username',
value: 'username'
},
{ {
label: 'Scansiona il QRCode del Destinatario', label: 'Scansiona il QRCode del Destinatario',
value: 'qrcode' value: 'qrcode'

View File

@@ -6,7 +6,7 @@
:options="options" :options="options"
color="primary" color="primary"
/> />
<q-tab-panels v-model="searchType" animated class="shadow-2 rounded-borders"> <q-tab-panels v-model="searchType" keep-alive animated class="shadow-2 rounded-borders">
<q-tab-panel name="username"> <q-tab-panel name="username">
<CGridTableRec <CGridTableRec
prop_mytable="users" prop_mytable="users"
@@ -69,7 +69,7 @@
:myuser="rec" :myuser="rec"
:showBtnActivities="false" :showBtnActivities="false"
:sendRIS="tools.isUserOk() ? sendRIS : false" :sendRIS="tools.isUserOk() ? sendRIS : false"
:actionType="actionType" :actionType="actionType"
/> />
</div> </div>
</div> </div>

View File

@@ -276,8 +276,8 @@ export default defineComponent({
{ label: '👤 Circuiti che Gestisci', value: tools.FILTER_MYREC }, { label: '👤 Circuiti che Gestisci', value: tools.FILTER_MYREC },
// {label: 'Seguo', value: tools.FILTER_MYFOLLOW}, // {label: 'Seguo', value: tools.FILTER_MYFOLLOW},
] ]
} }
} else { } else {
/* /*
@@ -367,12 +367,24 @@ export default defineComponent({
icon: 'flag', icon: 'flag',
tablesel: 'provinces', tablesel: 'provinces',
}, },
{
label: 'Circuito',
table: 'circuits',
key: 'profile.mycircuits.circuitname',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'circuits', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: null,
useinput: false,
icon: 'fas fa-globe-europe'
},
{ {
label: 'Comune', label: 'Comune',
table: 'cities', table: 'cities',
key: 'idCity', key: 'idCity',
type: costanti.FieldType.select_by_server, type: costanti.FieldType.select_by_server,
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'cities', costanti.FILTER_TUTTI), value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'cities', costanti.FILTER_TUTTI),
addall: true, addall: true,
arrvalue: [], arrvalue: [],
useinput: true, useinput: true,
@@ -380,6 +392,7 @@ export default defineComponent({
// filter: getFilterCitiesByProvince, // filter: getFilterCitiesByProvince,
// param1: shared_consts.PARAM_SHOW_PROVINCE, // param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities', tablesel: 'cities',
filteradv: true,
}, },
/*{ /*{
label: 'Visibilità', label: 'Visibilità',
@@ -396,15 +409,15 @@ export default defineComponent({
label: 'Settore', label: 'Settore',
table: toolsext.TABSECTORS, table: toolsext.TABSECTORS,
key: 'idSector', key: 'idSector',
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABSECTORS, 0, true), value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABSECTORS, 0, true),
arrvalue: [], arrvalue: [],
type: costanti.FieldType.select, type: costanti.FieldType.select,
filter: null, filter: null,
addall: true, addall: true,
notinsearch: true, notinsearch: false,
useinput: false, useinput: false,
}, },
{ /*{
label: 'Categoria', label: 'Categoria',
table: 'skills', table: 'skills',
key: 'idSkill', key: 'idSkill',
@@ -415,17 +428,18 @@ export default defineComponent({
filter: getFilterSkills, filter: getFilterSkills,
showcount: true, showcount: true,
useinput: false, useinput: false,
}, },*/
{ {
label: 'Offro/Cerco', label: 'Offro/Cerco',
table: 'adtypes', table: 'adtypes',
key: 'adType', key: 'adType',
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'adtypes', costanti.FILTER_TUTTI, true), value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'adtypes', costanti.FILTER_TUTTI, true),
arrvalue: [], arrvalue: [],
addall: true, addall: true,
type: costanti.FieldType.select, type: costanti.FieldType.select,
filter: null, filter: null,
useinput: false, useinput: false,
filteradv: true,
}, },
/*{ /*{
label: 'Specializzazione', label: 'Specializzazione',
@@ -465,7 +479,7 @@ export default defineComponent({
table: 'statusSkills', table: 'statusSkills',
key: 'idStatusSkill', key: 'idStatusSkill',
value: 0, value: 0,
arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'statusSkills', []), arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'statusSkills', []),
type: costanti.FieldType.multiselect, type: costanti.FieldType.multiselect,
filter: null, filter: null,
useinput: false, useinput: false,
@@ -485,7 +499,6 @@ export default defineComponent({
filteradv: true, filteradv: true,
//icon: 'swap_horizontal_circle', //icon: 'swap_horizontal_circle',
}, },
/*
{ {
label: '', label: '',
table: '', table: '',
@@ -501,8 +514,6 @@ export default defineComponent({
icon: '', icon: '',
}, },
*/
] ]
searchList_Events.value = [ searchList_Events.value = [
@@ -523,7 +534,7 @@ export default defineComponent({
table: 'regions', table: 'regions',
key: 'idReg', key: 'idReg',
type: costanti.FieldType.select, type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI), value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI),
addall: true, addall: true,
arrvalue: [], arrvalue: [],
filter: null, filter: null,
@@ -542,6 +553,18 @@ export default defineComponent({
useinput: true, useinput: true,
icon: 'flag', icon: 'flag',
}, },
{
label: 'Circuito',
table: 'circuits',
key: 'profile.mycircuits.circuitname',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'circuits', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: null,
useinput: false,
icon: 'fas fa-globe-europe'
},
{ {
label: 'Comune', label: 'Comune',
table: 'cities', table: 'cities',
@@ -555,6 +578,7 @@ export default defineComponent({
// filter: getFilterCitiesByProvince, // filter: getFilterCitiesByProvince,
// param1: shared_consts.PARAM_SHOW_PROVINCE, // param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities', tablesel: 'cities',
filteradv: true,
}, },
/*{ /*{
label: 'Visiblità', label: 'Visiblità',
@@ -568,6 +592,18 @@ export default defineComponent({
filter: null, filter: null,
tablesel: 'pub_to_share', tablesel: 'pub_to_share',
},*/ },*/
{
label: 'Settore',
table: toolsext.TABSECTORS,
key: 'idSector',
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABSECTORS, 0, true),
arrvalue: [],
type: costanti.FieldType.select,
filter: null,
addall: true,
notinsearch: false,
useinput: false,
},
{ {
label: 'Data Inizio', label: 'Data Inizio',
table: 'caldate', table: 'caldate',
@@ -578,20 +614,9 @@ export default defineComponent({
addall: true, addall: true,
filter: null, filter: null,
useinput: false, useinput: false,
filteradv: true,
}, },
{ /*{
label: 'Settore',
table: toolsext.TABSECTORS,
key: 'idSector',
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABSECTORS, 0, true),
arrvalue: [],
type: costanti.FieldType.select,
filter: null,
addall: true,
notinsearch: true,
useinput: false,
},
{
label: 'Categoria', label: 'Categoria',
table: 'skills', table: 'skills',
key: 'idSkill', key: 'idSkill',
@@ -602,7 +627,7 @@ export default defineComponent({
filter: getFilterSkills, filter: getFilterSkills,
showcount: true, showcount: true,
useinput: false, useinput: false,
}, },*/
{ {
label: 'In cambio di', label: 'In cambio di',
table: 'contribtypes', table: 'contribtypes',
@@ -613,9 +638,23 @@ export default defineComponent({
filter: null, filter: null,
useinput: false, useinput: false,
icon: 'fas fa-hand-holding', icon: 'fas fa-hand-holding',
filteradv: false, filteradv: true,
//icon: 'swap_horizontal_circle', //icon: 'swap_horizontal_circle',
}, },
{
label: '',
table: '',
key: '',
value: 0,
type: costanti.FieldType.separator,
arrvalue: [],
addall: true,
filter: null,
showcount: true,
useinput: false,
notinsearch: false,
icon: '',
},
] ]
@@ -646,6 +685,18 @@ export default defineComponent({
useinput: true, useinput: true,
icon: 'flag', icon: 'flag',
}, },
{
label: 'Circuito',
table: 'circuits',
key: 'profile.mycircuits.circuitname',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'circuits', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: null,
useinput: false,
icon: 'fas fa-globe-europe'
},
{ {
label: 'Comune', label: 'Comune',
table: 'cities', table: 'cities',
@@ -660,17 +711,19 @@ export default defineComponent({
// filter: getFilterCitiesByProvince, // filter: getFilterCitiesByProvince,
// param1: shared_consts.PARAM_SHOW_PROVINCE, // param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities', tablesel: 'cities',
filteradv: true,
}, },
{ {
label: 'Offro/Cerco', label: 'Offro/Cerco',
table: 'adtypes', table: 'adtypes',
key: 'adType', key: 'adType',
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'adtypes', costanti.FILTER_TUTTI, true), value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'adtypes', costanti.FILTER_TUTTI, true),
arrvalue: [], arrvalue: [],
addall: true, addall: true,
type: costanti.FieldType.select, type: costanti.FieldType.select,
filter: null, filter: null,
useinput: false, useinput: false,
filteradv: true,
}, },
{ {
label: 'Tipologia', label: 'Tipologia',
@@ -683,6 +736,7 @@ export default defineComponent({
filter: null, filter: null,
useinput: false, useinput: false,
icon: 'flag', icon: 'flag',
filteradv: true,
}, },
{ {
label: 'N° max Ospiti', label: 'N° max Ospiti',
@@ -695,6 +749,7 @@ export default defineComponent({
filter: null, filter: null,
useinput: false, useinput: false,
icon: 'fas fa-users', icon: 'fas fa-users',
filteradv: true,
}, },
{ {
label: 'Preferenze', label: 'Preferenze',
@@ -707,6 +762,7 @@ export default defineComponent({
filter: null, filter: null,
useinput: false, useinput: false,
icon: 'fas fa-asterisk', icon: 'fas fa-asterisk',
filteradv: true,
}, },
{ {
label: 'In cambio di', label: 'In cambio di',
@@ -718,9 +774,23 @@ export default defineComponent({
filter: null, filter: null,
useinput: false, useinput: false,
icon: 'fas fa-hand-holding', icon: 'fas fa-hand-holding',
filteradv: false, filteradv: true,
//icon: 'swap_horizontal_circle', //icon: 'swap_horizontal_circle',
}, },
{
label: '',
table: '',
key: '',
value: 0,
type: costanti.FieldType.separator,
arrvalue: [],
addall: true,
filter: null,
showcount: true,
useinput: false,
notinsearch: true,
icon: '',
},
] ]
@@ -749,6 +819,18 @@ export default defineComponent({
useinput: true, useinput: true,
icon: 'flag', icon: 'flag',
}, },
{
label: 'Circuito',
table: 'circuits',
key: 'profile.mycircuits.circuitname',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'circuits', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: null,
useinput: false,
icon: 'fas fa-globe-europe'
},
{ {
label: 'Comune', label: 'Comune',
table: 'cities', table: 'cities',
@@ -759,6 +841,7 @@ export default defineComponent({
arrvalue: [], arrvalue: [],
useinput: true, useinput: true,
filter: null, filter: null,
filteradv: true,
//filter: getFilterCitiesByProvince, //filter: getFilterCitiesByProvince,
// param1: shared_consts.PARAM_SHOW_PROVINCE, // param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities', tablesel: 'cities',
@@ -784,7 +867,7 @@ export default defineComponent({
type: costanti.FieldType.select, type: costanti.FieldType.select,
filter: null, filter: null,
addall: true, addall: true,
notinsearch: true, notinsearch: false,
useinput: false, useinput: false,
}, },
{ {
@@ -809,6 +892,7 @@ export default defineComponent({
type: costanti.FieldType.select, type: costanti.FieldType.select,
filter: null, filter: null,
useinput: false, useinput: false,
filteradv: true,
}, },
/* /*
{ {
@@ -878,7 +962,8 @@ export default defineComponent({
addall: false, addall: false,
filter: null, filter: null,
useinput: false, useinput: false,
icon: 'fas fa-filter' icon: 'fas fa-filter',
filteradv: true,
}, },
{ {
label: '', label: '',
@@ -977,6 +1062,20 @@ export default defineComponent({
// param1: shared_consts.PARAM_SHOW_PROVINCE, // param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities', tablesel: 'cities',
}, },
{
label: '',
table: '',
key: '',
value: 0,
type: costanti.FieldType.separator,
arrvalue: [],
addall: true,
filter: null,
showcount: true,
useinput: false,
notinsearch: true,
icon: '',
},
] ]
searchList_MyGroups.value = [ searchList_MyGroups.value = [
@@ -1018,6 +1117,19 @@ export default defineComponent({
// param1: shared_consts.PARAM_SHOW_PROVINCE, // param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities', tablesel: 'cities',
icon: 'fas fa-map-marker-alt', icon: 'fas fa-map-marker-alt',
filteradv: true,
},
{
label: 'Circuito',
table: 'circuits',
key: 'profile.mycircuits.circuitname',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'circuits', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: null,
useinput: false,
icon: 'fas fa-globe-europe'
}, },
{ {
label: 'Categorie', label: 'Categorie',
@@ -1043,6 +1155,20 @@ export default defineComponent({
filter: null, filter: null,
tablesel: 'visibility', tablesel: 'visibility',
}, },
{
label: '',
table: '',
key: '',
value: 0,
type: costanti.FieldType.separator,
arrvalue: [],
addall: true,
filter: null,
showcount: true,
useinput: false,
notinsearch: true,
icon: '',
},
] ]
filtercustom.value = [] filtercustom.value = []

View File

@@ -396,7 +396,7 @@ export default defineComponent({
type: costanti.FieldType.select, type: costanti.FieldType.select,
filter: null, filter: null,
addall: true, addall: true,
notinsearch: true, notinsearch: false,
useinput: false, useinput: false,
}, },
{ {
@@ -537,7 +537,7 @@ export default defineComponent({
useinput: true, useinput: true,
icon: 'flag', icon: 'flag',
}, },
{ /*{
label: 'Comune', label: 'Comune',
table: 'cities', table: 'cities',
key: 'idCity', key: 'idCity',
@@ -550,7 +550,7 @@ export default defineComponent({
// filter: getFilterCitiesByProvince, // filter: getFilterCitiesByProvince,
// param1: shared_consts.PARAM_SHOW_PROVINCE, // param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities', tablesel: 'cities',
}, },*/
/*{ /*{
label: 'Visiblità', label: 'Visiblità',
table: 'pub_to_share', table: 'pub_to_share',
@@ -563,6 +563,18 @@ export default defineComponent({
filter: null, filter: null,
tablesel: 'pub_to_share', tablesel: 'pub_to_share',
},*/ },*/
{
label: 'Settore',
table: toolsext.TABSECTORS,
key: 'idSector',
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABSECTORS, 0, true),
arrvalue: [],
type: costanti.FieldType.select,
filter: null,
addall: true,
notinsearch: false,
useinput: false,
},
{ {
label: 'Data Inizio', label: 'Data Inizio',
table: 'caldate', table: 'caldate',
@@ -574,19 +586,7 @@ export default defineComponent({
filter: null, filter: null,
useinput: false, useinput: false,
}, },
{ /*{
label: 'Settore',
table: toolsext.TABSECTORS,
key: 'idSector',
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + toolsext.TABSECTORS, 0, true),
arrvalue: [],
type: costanti.FieldType.select,
filter: null,
addall: true,
notinsearch: true,
useinput: false,
},
{
label: 'Categoria', label: 'Categoria',
table: 'skills', table: 'skills',
key: 'idSkill', key: 'idSkill',
@@ -610,7 +610,7 @@ export default defineComponent({
icon: 'fas fa-hand-holding', icon: 'fas fa-hand-holding',
filteradv: false, filteradv: false,
//icon: 'swap_horizontal_circle', //icon: 'swap_horizontal_circle',
}, },*/
] ]
@@ -779,7 +779,7 @@ export default defineComponent({
type: costanti.FieldType.select, type: costanti.FieldType.select,
filter: null, filter: null,
addall: true, addall: true,
notinsearch: true, notinsearch: false,
useinput: false, useinput: false,
}, },
{ {

View File

@@ -18,7 +18,7 @@
:hint="hint" :hint="hint"
:nodataLabel="noMsgRecord" :nodataLabel="noMsgRecord"
:prop_search="prop_search" :prop_search="prop_search"
:finder="true" :finder="finder"
labelElemFind="trovati" labelElemFind="trovati"
:choose_visutype="visuType" :choose_visutype="visuType"
:butt_modif_new="false" :butt_modif_new="false"

View File

@@ -396,6 +396,7 @@ export default defineComponent({
const myMapComp = ref(<any>null) const myMapComp = ref(<any>null)
const tablesel = ref('') const tablesel = ref('')
const showfilteradv = ref(false)
const showSpin = ref(false) const showSpin = ref(false)
const showNotification = ref(false) const showNotification = ref(false)
@@ -914,6 +915,15 @@ export default defineComponent({
arrfilter_provices.push({ key: 'reg', value: idRegion }) arrfilter_provices.push({ key: 'reg', value: idRegion })
} }
} else if (item.table === 'circuits') {
const myfield = tools.getFieldSearchByTable(mytable.value, item.table, 'profile.mycircuits.circuitname')
obj[myfield] = item.value
if (myfield) {
if (item.value !== '' && item.value !== costanti.FILTER_TUTTI) {
filtersearch3and.push({ "profile.mycircuits.circuitname": item.value.name })
}
}
} else if (item.table === 'provinces') { } else if (item.table === 'provinces') {
const myfield = tools.getFieldSearchByTable(mytable.value, item.table, 'mycities.prov') const myfield = tools.getFieldSearchByTable(mytable.value, item.table, 'mycities.prov')
@@ -1373,6 +1383,28 @@ export default defineComponent({
// console.log('REFRESH!') // console.log('REFRESH!')
// Controllo se la Regione è su Tutti, allora la provincia e comune devono andare vuoti
if (searchList.value) {
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
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + toolsext.TABPROVINCE, filtroProv.value)
}
}
/*const filtroCircuito = searchList.value.find((myrec) => myrec.table === 'circuits')
if (filtroCircuito && filtroCircuito.value !== costanti.FILTER_TUTTI) {
const filtroProv = searchList.value.find((myrec) => myrec.table === toolsext.TABPROVINCE) // check if exist
if (filtroProv && filtroRegioni) {
filtroRegioni.value = costanti.FILTER_TUTTI
filtroProv.value = costanti.FILTER_TUTTI
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + toolsext.TABREGIONS, filtroRegioni.value)
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + toolsext.TABPROVINCE, filtroProv.value)
}
}*/
}
startsearch.value = true startsearch.value = true
serverData.value = [] serverData.value = []
@@ -1680,7 +1712,7 @@ export default defineComponent({
myvertical.value = props.vertical myvertical.value = props.vertical
if (props.prop_search) { if (props.prop_search) {
showfilter.value = props.prop_showfilter || (tools.getCookie('s_adv', '0') !== '0') showfilter.value = props.prop_showfilter || true
} else { } else {
showfilter.value = props.prop_showfilter showfilter.value = props.prop_showfilter
} }
@@ -1693,7 +1725,7 @@ export default defineComponent({
const checkScrollPosition = () => { const checkScrollPosition = () => {
// console.log('checkScrollPosition') // console.log('checkScrollPosition')
const container = carouselTabRef.value const container = carouselTabRef.value
if (!container ) return if (!container) return
if (!addEventScroll.value && carouselTabRef.value) { if (!addEventScroll.value && carouselTabRef.value) {
carouselTabRef.value?.addEventListener('scroll', checkScrollPosition) carouselTabRef.value?.addEventListener('scroll', checkScrollPosition)
@@ -1706,10 +1738,10 @@ export default defineComponent({
console.log('carouselTabRef NO !') console.log('carouselTabRef NO !')
} }
console.log(' .... >>> AVANTI ', container.scrollLeft, container.clientWidth) console.log(' .... >>> AVANTI ', container.scrollLeft, container.clientWidth)
isAtStart.value = container.scrollLeft <= 0 isAtStart.value = container.scrollLeft <= 0
isAtEnd.value = container.scrollLeft + container.clientWidth >= container.scrollWidth - 1 isAtEnd.value = container.scrollLeft + container.clientWidth >= container.scrollWidth - 1
if (serverData.value.length > 0) { // Assicurarsi che ci siano elementi if (serverData.value.length > 0) { // Assicurarsi che ci siano elementi
console.log('entro dentro...') console.log('entro dentro...')
const cardWidth = container.scrollWidth / serverData.value.length const cardWidth = container.scrollWidth / serverData.value.length
@@ -1727,7 +1759,7 @@ export default defineComponent({
behavior: 'smooth', behavior: 'smooth',
}); });
}; };
function mounted() { function mounted() {
// console.log('mounted...') // console.log('mounted...')
try { try {
@@ -2656,7 +2688,7 @@ export default defineComponent({
function handleTransition(newVal: any, oldVal: any) { function handleTransition(newVal: any, oldVal: any) {
// Se siamo vicini alla fine degli elementi caricati, carichiamo altri elementi // Se siamo vicini alla fine degli elementi caricati, carichiamo altri elementi
if (serverData.value.length - newVal <= 2 && !loading.value) { if (serverData.value.length - newVal <= 2 && !loading.value) {
onLoadScroll(newVal, () => {}) onLoadScroll(newVal, () => { })
} }
} }
@@ -2667,7 +2699,7 @@ export default defineComponent({
} }
loading.value = true loading.value = true
try { try {
refresh_infscroll(done) refresh_infscroll(done)
} catch (error) { } catch (error) {
@@ -2687,7 +2719,7 @@ export default defineComponent({
autoplay.value = true autoplay.value = true
} }
} }
const stopAutoplay = () => { const stopAutoplay = () => {
if (autoplayInterval.value) { if (autoplayInterval.value) {
clearInterval(autoplayInterval.value) clearInterval(autoplayInterval.value)
@@ -2695,7 +2727,7 @@ export default defineComponent({
} }
autoplay.value = false autoplay.value = false
} }
const onIntersection = (entry: any) => { const onIntersection = (entry: any) => {
if (entry.isIntersecting) { if (entry.isIntersecting) {
// console.log('PARTITO INTERSECTION!') // console.log('PARTITO INTERSECTION!')
@@ -2705,7 +2737,7 @@ export default defineComponent({
stopAutoplay() stopAutoplay()
} }
} }
created() created()
@@ -2833,7 +2865,7 @@ export default defineComponent({
isAtStart, isAtStart,
isAtEnd, isAtEnd,
activeIndex, activeIndex,
scroll, scroll,
slideGridOriz, slideGridOriz,
autoplay, autoplay,
onUpdateData, onUpdateData,
@@ -2841,6 +2873,7 @@ export default defineComponent({
handleTransition, handleTransition,
loadMore, loadMore,
onIntersection, onIntersection,
showfilteradv,
} }
} }
}) })

View File

@@ -28,9 +28,10 @@
v-if="butt_modif_new || mytitle" v-if="butt_modif_new || mytitle"
:class="$q.screen.lt.sm ? `` : `q-ma-xs` + ` `" :class="$q.screen.lt.sm ? `` : `q-ma-xs` + ` `"
> >
<div class="q-table__title" style="min-width: 150px"> <q-toolbar class="bg-primary text-white">
{{ mytitle }} <q-toolbar-title>{{ mytitle }}</q-toolbar-title>
</div> </q-toolbar>
<q-space></q-space> <q-space></q-space>
<div v-if="butt_modif_new" class="row justify-center"> <div v-if="butt_modif_new" class="row justify-center">
<q-btn <q-btn
@@ -96,146 +97,163 @@
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `" :class="$q.screen.lt.sm ? `` : `row` + ` text-blue `"
> >
<span v-for="(item, index) in searchList" :key="index"> <span v-for="(item, index) in searchList" :key="index">
<CMySelect <div
:col="fieldsTable.getColByColumns(mycolumns, item.key)" class="text-center q-my-xs"
v-if=" v-if="item.type === costanti.FieldType.separator"
(item.type === costanti.FieldType.select ||
item.type === costanti.FieldType.select_by_server) &&
lengthopt(item, false, false) > 1
"
:label="labelcombo(item)"
v-model:value="item.value"
@update:value="searchval(item.value, item.table)"
:addall="item.addall"
:addnone="item.addnone"
:tablesel="
item.type === costanti.FieldType.select_by_server
? item.tablesel
: ''
"
:pickup="item.type === costanti.FieldType.select_by_server"
label-color="primary"
class="combowidth"
color="primary"
:icon_alternative="item.icon"
:optval="fieldsTable.getKeyByTable(item.table)"
:optlab="fieldsTable.getLabelByTable(item.table)"
:options="valoriopt(item, false, false)"
:filter="item && item.filter ? item.filter : ''"
:filter_extra="item.filter_extra"
:useinput="
item.useinput &&
item.type !== costanti.FieldType.select_by_server
"
> >
</CMySelect> <q-btn
size="sm"
dense
:icon="
!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'
"
:label="$t('grid.advanced_filters')"
@click="showfilteradv = !showfilteradv"
></q-btn>
</div>
<!--<div v-if="item.type === costanti.FieldType.multiselect_by_server"> <div v-if="!(item.filteradv && !showfilteradv)">
<CMySelect
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
v-if="
(item.type === costanti.FieldType.select ||
item.type === costanti.FieldType.select_by_server) &&
lengthopt(item, false, false) > 1
"
:label="labelcombo(item)"
v-model:value="item.value"
@update:value="searchval(item.value, item.table)"
:addall="item.addall"
:addnone="item.addnone"
:tablesel="
item.type === costanti.FieldType.select_by_server
? item.tablesel
: ''
"
:pickup="item.type === costanti.FieldType.select_by_server"
label-color="primary"
class="combowidth"
color="primary"
:icon_alternative="item.icon"
:optval="fieldsTable.getKeyByTable(item.table)"
:optlab="fieldsTable.getLabelByTable(item.table)"
:options="valoriopt(item, false, false)"
:filter="item && item.filter ? item.filter : ''"
:filter_extra="item.filter_extra"
:useinput="
item.useinput &&
item.type !== costanti.FieldType.select_by_server
"
>
</CMySelect>
<!--<div v-if="item.type === costanti.FieldType.multiselect_by_server">
item: {{ item}} item: {{ item}}
</div>--> </div>-->
<CMySelect <CMySelect
v-if=" v-if="
item.type === costanti.FieldType.multiselect_by_server && item.type === costanti.FieldType.multiselect_by_server &&
lengthopt(item, false) > 1 lengthopt(item, false) > 1
" "
:col="fieldsTable.getColByColumns(mycolumns, item.key)" :col="fieldsTable.getColByColumns(mycolumns, item.key)"
:multiselect_by_server="true" :multiselect_by_server="true"
:label="labelcombo(item)" :label="labelcombo(item)"
v-model:arrvalue="item.arrvalue" v-model:arrvalue="item.arrvalue"
@update:arrvalue="searchval(item.arrvalue, item.table)" @update:arrvalue="searchval(item.arrvalue, item.table)"
:addall="item.addall" :addall="item.addall"
:addnone="item.addnone" :addnone="item.addnone"
:tablesel="item.tablesel" :tablesel="item.tablesel"
:pickup="true" :pickup="true"
:param1="item.param1" :param1="item.param1"
label-color="primary" label-color="primary"
class="combowidth" class="combowidth"
color="primary" color="primary"
:icon_alternative="item.icon" :icon_alternative="item.icon"
:optval="fieldsTable.getKeyByTable(item.table)" :optval="fieldsTable.getKeyByTable(item.table)"
:optlab="fieldsTable.getLabelByTable(item.table)" :optlab="fieldsTable.getLabelByTable(item.table)"
:filter="item.filter" :filter="item.filter"
:filter_extra="item.filter_extra" :filter_extra="item.filter_extra"
:options="valoriopt(item, false)" :options="valoriopt(item, false)"
:useinput="true" :useinput="true"
> >
</CMySelect> </CMySelect>
<q-select <q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" :behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
v-if="item.type === costanti.FieldType.multiselect" v-if="item.type === costanti.FieldType.multiselect"
v-model="item.arrvalue" v-model="item.arrvalue"
label-color="primary" label-color="primary"
:label="labelcombo(item)" :label="labelcombo(item)"
@update:model-value="searchval(item.arrvalue, item.table)" @update:model-value="searchval(item.arrvalue, item.table)"
rounded rounded
dense dense
outlined outlined
multiple multiple
options-dense options-dense
emit-value emit-value
map-options map-options
stack-label stack-label
:useinput="item.useinput" :useinput="item.useinput"
:options="valoriopt(item, item.addall, item.addnone)" :options="valoriopt(item, item.addall, item.addnone)"
:filter="item.filter" :filter="item.filter"
class="combowidth" class="combowidth"
:option-value="fieldsTable.getKeyByTable(item.table)" :option-value="fieldsTable.getKeyByTable(item.table)"
>
<template v-if="item.icon" v-slot:prepend>
<q-icon :name="item.icon" />
</template>
<template
v-if="item.arrvalue.length >= 1"
v-slot:selected-item="scope"
> >
<div <template v-if="item.icon" v-slot:prepend>
v-if=" <q-icon :name="item.icon" />
scope.opt[fieldsTable.getLabelByTable(item.table)] || </template>
(scope.opt && checkIfShowRec(scope.opt)) <template
" v-if="item.arrvalue.length >= 1"
v-slot:selected-item="scope"
> >
<q-chip <div
removable v-if="
dense
@remove="scope.removeAtIndex(scope.index)"
v-if="checkIfShowRec(scope.opt)"
color="white"
text-color="mycol"
class="q-my-none q-ml-xs q-mr-none"
>
<q-avatar
color="primary"
text-color="white"
:icon="item.icon"
size="12px"
/>
{{
scope.opt[fieldsTable.getLabelByTable(item.table)] || scope.opt[fieldsTable.getLabelByTable(item.table)] ||
scope.opt (scope.opt && checkIfShowRec(scope.opt))
}} "
</q-chip> >
</div> <q-chip
</template> removable
<template dense
v-slot:option="{ itemProps, opt, selected, toggleOption }" @remove="scope.removeAtIndex(scope.index)"
> v-if="checkIfShowRec(scope.opt)"
<q-item v-bind="itemProps"> color="white"
<q-item-section> text-color="mycol"
<q-item-label>{{ class="q-my-none q-ml-xs q-mr-none"
opt[fieldsTable.getLabelByTable(item.table)] >
}}</q-item-label> <q-avatar
</q-item-section> color="primary"
<q-item-section side> text-color="white"
<q-toggle :icon="item.icon"
:model-value="selected" size="12px"
@update:model-value="toggleOption(opt)" />
/> {{
</q-item-section> scope.opt[fieldsTable.getLabelByTable(item.table)] ||
</q-item> scope.opt
</template> }}
</q-select> </q-chip>
</div>
</template>
<template
v-slot:option="{ itemProps, opt, selected, toggleOption }"
>
<q-item v-bind="itemProps">
<q-item-section>
<q-item-label>{{
opt[fieldsTable.getLabelByTable(item.table)]
}}</q-item-label>
</q-item-section>
<q-item-section side>
<q-toggle
:model-value="selected"
@update:model-value="toggleOption(opt)"
/>
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</span> </span>
</div> </div>
</div> </div>
@@ -738,9 +756,20 @@
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `" :class="$q.screen.lt.sm ? `` : `row` + ` text-blue `"
> >
<span v-for="(item, index) in searchList" :key="index"> <span v-for="(item, index) in searchList" :key="index">
<!--<div class="text-center q-my-xs" v-if="(item.type === costanti.FieldType.separator)"> <div
<q-btn size="sm" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'" label="Filtri Avanzati" @click="showfilteradv = !showfilteradv"></q-btn> class="text-center q-my-xs"
</div>--> v-if="item.type === costanti.FieldType.separator"
>
<q-btn
size="sm"
dense
:icon="
!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'
"
:label="$t('grid.advanced_filters')"
@click="showfilteradv = !showfilteradv"
></q-btn>
</div>
<CMySelect <CMySelect
:col="fieldsTable.getColByColumns(mycolumns, item.key)" :col="fieldsTable.getColByColumns(mycolumns, item.key)"

View File

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

View File

@@ -17,7 +17,7 @@
/> />
</q-tabs> </q-tabs>
<q-tab-panels v-model="tab" animated> <q-tab-panels v-model="tab" animated keep-alive>
<q-tab-panel name="tutti"> <q-tab-panel name="tutti">
<div v-if="mylist.length === 0"> <div v-if="mylist.length === 0">
{{ t('circuit.nessun_movimento_inviato') }} {{ t('circuit.nessun_movimento_inviato') }}

View File

@@ -41,6 +41,12 @@ export default defineComponent({
CTimeAgo, CContactUser CTimeAgo, CContactUser
}, },
props: { props: {
introUser: {
type: Boolean,
required: false,
default: true,
},
}, },
setup(props) { setup(props) {
const userStore = useUserStore() const userStore = useUserStore()
@@ -73,7 +79,7 @@ export default defineComponent({
const notifStore = useNotifStore() const notifStore = useNotifStore()
const mycards = computed(() => { const mycards = computed(() => {
return costanti.MAINCARDS.filter((rec: any) => rec.table) return costanti.MAINCARDS.filter((rec: any) => rec.table && rec.visible)
}) })
const optionsMainCards = ref({}) const optionsMainCards = ref({})

View File

@@ -3,7 +3,6 @@
v-if="!caricato" v-if="!caricato"
class="fit column no-wrap justify-evenly items-center content-start" class="fit column no-wrap justify-evenly items-center content-start"
> >
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade" />
<q-card flat bordered style="width: 250px"> <q-card flat bordered style="width: 250px">
<div class="text-h6"> <div class="text-h6">
<q-skeleton :animation="animation" /> <q-skeleton :animation="animation" />
@@ -11,203 +10,193 @@
<div class="col-12 text-h7 text-grey text-center"> <div class="col-12 text-h7 text-grey text-center">
{{ username }} {{ username }}
</div> </div>
<div class="col-12 text-h7">
<q-skeleton :animation="animation" />
</div>
<div class="col-12 text-h8 q-mt-sm">
<q-skeleton :animation="animation" />
</div>
<div class="col-12 text-h8 q-mt-sm">
<q-skeleton :animation="animation" />
</div>
</q-card> </q-card>
</div> </div>
<div v-else> <div v-else>
<div v-if="myuser"> <div v-if="myuser">
<div v-if="tools.isUserOk() || tools.isLogged()"> <div v-if="tools.isUserOk() || tools.isLogged()">
<CNotifAtTop /> <div v-if="introUser">
<CNotifAtTop />
</div>
</div> </div>
<div class="q-gutter-sm q-pa-sm q-pb-md"> <div class="q-gutter-sm q-pa-sm q-pb-md">
<div <div
v-if="myuser && myuser.lang" v-if="myuser && myuser.lang"
class="fit column no-wrap justify-evenly items-center content-start" class="fit column no-wrap justify-evenly items-center content-start"
> >
<div class=""> <div v-if="introUser">
<q-avatar size="140px"> <div class="">
<q-img <q-avatar size="140px">
:src="myuser.profile ? getImgUser(myuser.profile) : ''" <q-img
:alt="username" :src="myuser.profile ? getImgUser(myuser.profile) : ''"
img-class="imgprofile" :alt="username"
height="140px" img-class="imgprofile"
@click="showPic = true" height="140px"
/> @click="showPic = true"
<q-badge />
v-if="tools.isUserOnline(myuser)" <q-badge
align="top" v-if="tools.isUserOnline(myuser)"
floating align="top"
color="green" floating
>online</q-badge color="green"
> >online</q-badge
</q-avatar> >
</div> </q-avatar>
<div class="last_access">
OnLine: <CTimeAgo :datetime="myuser.lasttimeonline" />
</div>
<div v-if="myuser.reported">
<CTitleBanner
title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
bgcolor="bg-red"
clcolor="text-white"
>
</CTitleBanner>
</div>
<div v-if="site && site.confpages && site.confpages.showNameSurname">
<div class="text-h6">
<span v-if="checkifShow('name') && myuser.name">
{{ myuser.name }}</span
>
<span v-if="checkifShow('surname') && myuser.surname"
>&nbsp;{{ myuser.surname }}</span
>
</div> </div>
</div>
<div class="col-12 text-h7 text-blue text-shadow-2">
{{ myuser.username }}
</div>
<br />
<CContactUser :myuser="myuser" :showBtnActivities="false" /> <div class="last_access">
OnLine: <CTimeAgo :datetime="myuser.lasttimeonline" />
</div>
<CTitleBanner <div v-if="myuser.reported">
v-if="site.confpages.showCompetenze" <CTitleBanner
class="" title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
:title="$t('profile.skills')" bgcolor="bg-red"
bgcolor="bg-primary" clcolor="text-white"
clcolor="text-white" >
myclass="myshad" </CTitleBanner>
:canopen="true" </div>
>
<q-tabs v-model="mytab" inline-label dense class="shadow-2">
<q-tab name="my" icon="far fa-user" />
<q-tab v-if="isMyRecord(myuser.username)" name="favorite" icon="favorite" content-class="text-red" />
<q-tab
v-if="isMyRecord(myuser.username)"
name="bookmark"
icon="bookmark"
content-class="text-teal"
/>
</q-tabs>
<q-tab-panels <div
v-model="mytab" v-if="site && site.confpages && site.confpages.showNameSurname"
animated
vertical
transition-prev="jump-up"
transition-next="jump-up"
> >
<q-tab-panel name="my"> <div class="text-h6">
<div <span v-if="checkifShow('name') && myuser.name">
v-for="(card, ind) of mycards" {{ myuser.name }}</span
:key="ind"
:name="card.table"
> >
<q-card class="q-my-md"> <span v-if="checkifShow('surname') && myuser.surname"
<div v-if="(card.table === 'mygroups') && tools.isUserOk()"> >&nbsp;{{ myuser.surname }}</span
<div class="row text-h6 text-bold">Gruppi:</div> >
<q-list> </div>
<span </div>
v-for="(grp, index) in listgroupsfiltered" <div class="col-12 text-h7 text-blue text-shadow-2">
:key="index" {{ myuser.username }}
class="q-my-sm q-mx-none" </div>
clickable <br />
<CContactUser :myuser="myuser" :showBtnActivities="false" />
</div>
<q-tabs
v-if="isMyRecord(myuser.username)"
v-model="mytab"
inline-label
dense
class="shadow-2"
>
<q-tab name="my" icon="far fa-user" />
<q-tab
v-if="isMyRecord(myuser.username)"
name="favorite"
icon="favorite"
content-class="text-red"
/>
<q-tab
v-if="isMyRecord(myuser.username)"
name="bookmark"
icon="bookmark"
content-class="text-teal"
/>
</q-tabs>
<q-tab-panels
v-model="mytab"
animated
vertical
keep-alive
transition-prev="jump-up"
transition-next="jump-up"
>
<q-tab-panel name="my">
<div v-for="(card, ind) of mycards" :key="ind" :name="card.table">
<q-card class="q-my-md">
<div v-if="card.table === 'mygroups' && tools.isUserOk()">
<div class="row text-h6 text-bold">Gruppi:</div>
<q-list>
<span
v-for="(grp, index) in listgroupsfiltered"
:key="index"
class="q-my-sm q-mx-none"
clickable
>
<CMyGroup
:mygrp="grp"
:visu="costanti.USER_GROUPS"
:noaut="true"
> >
<CMyGroup </CMyGroup>
:mygrp="grp" </span>
:visu="costanti.USER_GROUPS" </q-list>
:noaut="true" </div>
> <div v-else-if="card.table === shared_consts.TAB_MYCIRCUITS">
</CMyGroup> <div class="text-h6">{{ card.title }}</div>
</span> <q-list>
</q-list> <span
</div> v-for="(circuit, index) in listcircuitsfiltered"
<div v-else-if="card.table === 'circuits'"> :key="index"
<div class="text-h6">{{ card.title }}</div> class="q-my-sm q-mx-none"
<q-list> clickable
<span >
v-for="(circuit, index) in listcircuitsfiltered" <CMyCircuit
:key="index" :mycircuit="circuit"
class="q-my-sm q-mx-none" :visu="costanti.USER_CIRCUITS"
clickable :noaut="true"
:username="myuser.username"
> >
<CMyCircuit </CMyCircuit>
:mycircuit="circuit" </span>
:visu="costanti.USER_CIRCUITS" </q-list>
:noaut="true" </div>
:username="myuser.username" <div v-else-if="card.table !== 'mygroups' || myuser.email">
> <CSkill
</CMyCircuit> :table="card.table"
</span> :filtercustom="
</q-list> card.table === 'mybachecas'
</div> ? filtro_eventi
<div v-else-if="card.table !== 'mygroups' || myuser.email"> : filtroutente
<CSkill "
:table="card.table" :butt_modif_new="isMyRecord(myuser.username)"
:filtercustom="card.table === 'mybachecas' ? filtro_eventi: filtroutente" :visuinpage="true"
:butt_modif_new="isMyRecord(myuser.username)" :noaut="true"
:visuinpage="true" :title="card.title"
:noaut="true" />
:title="card.title" </div>
/> </q-card>
</div> </div>
</q-card> </q-tab-panel>
</div> <q-tab-panel v-if="isMyRecord(myuser.username)" name="favorite">
</q-tab-panel> <div v-for="(card, ind) of mycards" :key="ind" :name="card.table">
<q-tab-panel v-if="isMyRecord(myuser.username)" name="favorite"> <q-card class="q-my-md">
<div <div v-if="card.showfavorite && filtrofavorite(card.table)">
v-for="(card, ind) of mycards" <CSkill
:key="ind" :table="card.table"
:name="card.table" :filtercustom="filtrofavorite(card.table)"
> :butt_modif_new="false"
<q-card class="q-my-md"> :visuinpage="true"
<div v-if="card.showfavorite && filtrofavorite(card.table)"> :noaut="false"
<CSkill :title="card.title"
:table="card.table" />
:filtercustom="filtrofavorite(card.table)" </div>
:butt_modif_new="false" </q-card>
:visuinpage="true" </div>
:noaut="false" </q-tab-panel>
:title="card.title" <q-tab-panel v-if="isMyRecord(myuser.username)" name="bookmark">
/> <div v-for="(card, ind) of mycards" :key="ind" :name="card.table">
</div> <q-card class="q-my-md">
</q-card> <div v-if="card.showfavorite && filtrobookmark(card.table)">
</div> <CSkill
</q-tab-panel> :table="card.table"
<q-tab-panel v-if="isMyRecord(myuser.username)" name="bookmark"> :filtercustom="filtrobookmark(card.table)"
<div :butt_modif_new="false"
v-for="(card, ind) of mycards" :visuinpage="true"
:key="ind" :noaut="false"
:name="card.table" :title="card.title"
> />
<q-card class="q-my-md"> </div>
<div v-if="card.showfavorite && filtrobookmark(card.table)"> </q-card>
<CSkill </div>
:table="card.table" </q-tab-panel>
:filtercustom="filtrobookmark(card.table)" </q-tab-panels>
:butt_modif_new="false"
:visuinpage="true"
:noaut="false"
:title="card.title"
/>
</div>
</q-card>
</div>
</q-tab-panel>
</q-tab-panels>
</CTitleBanner>
</div> </div>
</div> </div>
@@ -218,16 +207,6 @@
<q-dialog v-model="showPic" full-height full-width> <q-dialog v-model="showPic" full-height full-width>
<img :src="getImgUser()" :alt="username" class="full-width" /> <img :src="getImgUser()" :alt="username" class="full-width" />
</q-dialog> </q-dialog>
<q-page-sticky position="top-right" :offset="[18, 18]">
<q-btn
fab
glossy
class="semi-transparent"
icon="fas fa-link"
color="primary"
@click="tools.copyToClip($q, getlinkpage(), true)"
/>
</q-page-sticky>
</div> </div>
</div> </div>
</template> </template>

View File

@@ -67,6 +67,8 @@ export default defineComponent({
const finishloading = ref(false) const finishloading = ref(false)
const loadingvalues = ref(false) const loadingvalues = ref(false)
const mytab = ref('circuiti')
const init = ref(false) const init = ref(false)
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
@@ -227,6 +229,7 @@ export default defineComponent({
finishloading, finishloading,
addlastmov, addlastmov,
loadingvalues, loadingvalues,
mytab,
} }
} }
}) })

View File

@@ -7,109 +7,128 @@
<div class="q-mt-md"> <div class="q-mt-md">
<CSendRISTo></CSendRISTo> <CSendRISTo></CSendRISTo>
<CTitleBanner <q-tabs
:class="`q-pa-xs `" v-model="mytab"
:title="myoptions[0].label" no-caps
bgcolor="white" class="bg-indigo text-white shadow-2 q-mt-sm full-width"
bgcolor2="lightblue" dense
:clcolor="`text-indigo`"
:canopen="true"
:small="true"
> >
<div v-if="listcircuitsmy.length === 0" class="q-ma-sm q-pa-sm"> <q-tab name="circuiti" icon="fas fa-sitemap" label="Lista Circuiti" />
{{ t('circuit.nessun_circuito_attivo') }} <q-tab name="mov" icon="fas fa-exchange-alt" label="Storico Transazioni" />
</div> </q-tabs>
<div v-else style="max-height: 250px; overflow-y: auto">
<span
v-for="(circuit, index) in listcircuitsmy"
:key="index"
class="q-my-sm"
clickable
>
<CMyCircuit
:mycircuit="circuit"
:visu="visu"
:username="username"
>
</CMyCircuit>
</span>
</div>
</CTitleBanner>
<div class="row justify-center"> <q-tab-panels
<q-btn v-model="mytab"
rounded animated
toggle-color="primary" keep-alive
:label="
visu === costanti.MY_CIRCUITS
? t('circuit.find_others_circuit')
: t('circuit.hide_others_circuit')
"
@click="togglevisu()"
/>
</div>
<CTitleBanner
v-if="visu === costanti.FIND_CIRCUIT"
:class="`q-pa-xs `"
:title="t('circuit.circuiti_territoriali')"
bgcolor="bg-primary"
:clcolor="`text-white`"
:canopen="true"
:small="true"
> >
<div> <q-tab-panel name="circuiti">
<span <CTitleBanner
v-for="(circuit, index) in listcircuitsfind" :class="`q-pa-xs `"
:key="index" :title="myoptions[0].label"
class="q-my-sm" bgcolor="white"
clickable bgcolor2="lightblue"
:clcolor="`text-indigo`"
:canopen="true"
:small="true"
> >
<CMyCircuit <div v-if="listcircuitsmy.length === 0" class="q-ma-sm q-pa-sm">
:mycircuit="circuit" {{ t('circuit.nessun_circuito_attivo') }}
:visu="visu" </div>
:username="username" <div v-else style="max-height: 250px; overflow-y: auto">
> <span
</CMyCircuit> v-for="(circuit, index) in listcircuitsmy"
</span> :key="index"
</div> class="q-my-sm"
<div> clickable
<slot></slot> >
</div> <CMyCircuit
</CTitleBanner> :mycircuit="circuit"
:visu="visu"
:username="username"
>
</CMyCircuit>
</span>
</div>
</CTitleBanner>
<CTitleBanner
:class="`q-pa-xs `"
:title="t('circuit.tuoi_ultimi_movimenti', { num: numtransaz })"
bgcolor="white"
bgcolor2="lightblue"
:clcolor="`text-indigo`"
:canopen="true"
:small="true"
:open="false"
>
<CMovements
@loaded="movcaricati"
:username="username"
:showbuttolastmov="false"
>
<div class="row justify-center"> <div class="row justify-center">
<q-btn <q-btn
rounded rounded
dense toggle-color="primary"
class="text-center" :label="
color="primary" visu === costanti.MY_CIRCUITS
:label="t('circuit.show_next_mov')" ? t('circuit.find_others_circuit')
@click="addlastmov()" : t('circuit.hide_others_circuit')
"
@click="togglevisu()"
/> />
</div> </div>
</CMovements> <CTitleBanner
v-if="visu === costanti.FIND_CIRCUIT"
:class="`q-pa-xs `"
:title="t('circuit.circuiti_territoriali')"
bgcolor="bg-primary"
:clcolor="`text-white`"
:canopen="true"
:small="true"
>
<div>
<span
v-for="(circuit, index) in listcircuitsfind"
:key="index"
class="q-my-sm"
clickable
>
<CMyCircuit
:mycircuit="circuit"
:visu="visu"
:username="username"
>
</CMyCircuit>
</span>
</div>
<div>
<slot></slot>
</div>
</CTitleBanner>
</q-tab-panel>
<q-tab-panel name="mov">
<CTitleBanner
:class="`q-pa-xs `"
:title="t('circuit.tuoi_ultimi_movimenti', { num: numtransaz })"
bgcolor="white"
bgcolor2="lightblue"
:clcolor="`text-indigo`"
:canopen="true"
:small="true"
:open="false"
>
<CMovements
@loaded="movcaricati"
:username="username"
:showbuttolastmov="false"
>
<div class="row justify-center">
<q-btn
rounded
dense
class="text-center"
color="primary"
:label="t('circuit.show_next_mov')"
@click="addlastmov()"
/>
</div>
</CMovements>
<q-inner-loading id="spinner" :showing="loadingvalues"> <q-inner-loading id="spinner" :showing="loadingvalues">
<q-spinner-tail size="3em" color="primary" /> <q-spinner-tail size="3em" color="primary" />
</q-inner-loading> </q-inner-loading>
<br /> <br />
</CTitleBanner> </CTitleBanner>
</q-tab-panel>
</q-tab-panels>
</div> </div>
</div> </div>
<div v-else> <div v-else>
@@ -124,17 +143,6 @@
<div v-else> <div v-else>
<CUserNonVerif></CUserNonVerif> <CUserNonVerif></CUserNonVerif>
</div> </div>
<CTitleBanner
v-if="visu === costanti.FIND_CIRCUIT"
:class="`q-pa-xs `"
:title="myoptions[0].label"
bgcolor="bg-primary"
:clcolor="`text-white`"
:canopen="true"
:small="true"
>
</CTitleBanner>
</template> </template>
<script lang="ts" src="./CMyCircuits.ts"> <script lang="ts" src="./CMyCircuits.ts">

View File

@@ -472,7 +472,7 @@
/> />
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabCard" animated> <q-tab-panels v-model="tabCard" animated keep-alive>
<q-tab-panel <q-tab-panel
v-for="(rec, ind) in myel.listcards" v-for="(rec, ind) in myel.listcards"
:key="ind" :key="ind"
@@ -777,7 +777,7 @@
/> />
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabElemsText" animated> <q-tab-panels v-model="tabElemsText" animated keep-alive>
<q-tab-panel <q-tab-panel
v-for="(rec, ind) in myel.elemsText" v-for="(rec, ind) in myel.elemsText"
:key="ind" :key="ind"
@@ -1567,7 +1567,7 @@
</q-tab> </q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabScheda" animated> <q-tab-panels v-model="tabScheda" animated keep-alive>
<q-tab-panel <q-tab-panel
v-for="(recscheda, ind) in myel.catalogo.arrSchede" v-for="(recscheda, ind) in myel.catalogo.arrSchede"
:key="recscheda._id" :key="recscheda._id"

View File

@@ -5,7 +5,7 @@
.text_user_city{ .text_user_city{
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: wrap;
overflow: hidden; overflow: hidden;
font-size: 0.85rem; font-size: 0.85rem;
color: grey; color: grey;

View File

@@ -321,7 +321,7 @@
> >
</q-item-label> </q-item-label>
<q-item-label <q-item-label
lines="1" lines="3"
style="text-align: right" style="text-align: right"
class="text_user_city" class="text_user_city"
> >

View File

@@ -86,8 +86,8 @@ export default defineComponent({
const contact = ref(<IUserFields | null>null) const contact = ref(<IUserFields | null>null)
const circuit = ref(<ICircuit | null | undefined>null) const circuit = ref(<ICircuit | null | undefined>null)
watch(() => props.mycontact, (newval, oldval) => { watch(() => props.mycontact!.username, (newval, oldval) => {
console.log('watch: mycontact') console.log('watch: mycontact', props.mycontact)
mounted() mounted()
}) })

View File

@@ -1,7 +1,7 @@
<template> <template>
<div v-if="contact"> <div v-if="contact">
<q-item class="q-my-sm" clickable> <q-item class="q-my-sm" clickable>
<q-item-section avatar @click="naviga(`/my/` + contact.username)"> <q-item-section avatar @click="actionType === costanti.ACTIONTYPE.SEND_RIS ? naviga(`/my/` + contact.username + '?sr=0') : naviga(`/my/` + contact.username)">
<q-avatar size="60px"> <q-avatar size="60px">
<q-img <q-img
:src="getImgUser(contact)" :src="getImgUser(contact)"

View File

@@ -296,6 +296,7 @@ export default defineComponent({
showpage.value = true showpage.value = true
loading.value = false loading.value = false
} }
if (props.to_group) { if (props.to_group) {
@@ -330,7 +331,7 @@ export default defineComponent({
} }
loading.value = false loading.value = false
emit('showed', true) emit('showed')
} }
function hide() { function hide() {

View File

@@ -47,10 +47,10 @@ export default defineComponent({
label: 'Condividi il tuo Link', label: 'Condividi il tuo Link',
value: 'link', value: 'link',
}, },
{ /*{
label: 'Rendi visibile il tuo profilo per 8 ore', label: 'Rendi visibile il tuo profilo per 8 ore',
value: 'showonlist', value: 'showonlist',
}, },*/
{ {
label: 'Genera il QR Code', label: 'Genera il QR Code',
value: 'qrcode', value: 'qrcode',
@@ -105,6 +105,21 @@ export default defineComponent({
qtyRIS.value = qtyRIS.value.replace(',', '.') qtyRIS.value = qtyRIS.value.replace(',', '.')
} }
function clickInviaRIS() {
showSendCoin.value = !showSendCoin.value
if (showSendCoin.value)
showReceiveCoin.value = !showSendCoin.value
}
async function clickriceviRIS() {
showReceiveCoin.value = !showReceiveCoin.value;
if (showReceiveCoin.value)
showSendCoin.value = !showReceiveCoin.value
if (showReceiveCoin.value)
clickAddtoRecList();
}
async function clickAddtoRecList() { async function clickAddtoRecList() {
const risultato = await tools.addToTemporaryReceiverRIS(t) const risultato = await tools.addToTemporaryReceiverRIS(t)
if (risultato) { if (risultato) {
@@ -140,6 +155,8 @@ export default defineComponent({
showonreclist, showonreclist,
riscallrec, riscallrec,
clickAddtoRecList, clickAddtoRecList,
clickInviaRIS,
clickriceviRIS,
} }
}, },
}) })

View File

@@ -10,10 +10,8 @@
size="md" size="md"
rounded rounded
:label="$t('circuit.sendcoins_toso')" :label="$t('circuit.sendcoins_toso')"
@click=" @click="clickInviaRIS"
showSendCoin = !showSendCoin; :push="showSendCoin"
showSendCoin ? (showReceiveCoin = false) : null;
"
> >
</q-btn> </q-btn>
&nbsp; &nbsp;
@@ -23,10 +21,8 @@
size="md" size="md"
rounded rounded
:label="$t('circuit.receive_coins')" :label="$t('circuit.receive_coins')"
@click=" @click="clickriceviRIS"
showReceiveCoin = !showReceiveCoin; :push="showReceiveCoin"
showReceiveCoin ? (showSendCoin = false) : null;
"
> >
</q-btn> </q-btn>
@@ -42,6 +38,16 @@
:small="true" :small="true"
:open="true" :open="true"
> >
<q-banner
v-show="riscallrec"
rounded
class="bg-blue text-white"
style="text-align: center"
>
{{ riscallrec }}
<br />
</q-banner>
<q-option-group <q-option-group
class="q-ma-xs" class="q-ma-xs"
style="text-align: left !important" style="text-align: left !important"
@@ -52,6 +58,7 @@
<q-tab-panels <q-tab-panels
v-model="receiveType" v-model="receiveType"
animated animated
keep-alive
class="shadow-2 rounded-borders" class="shadow-2 rounded-borders"
> >
<q-tab-panel name="link"> <q-tab-panel name="link">
@@ -105,7 +112,7 @@
</CCopyBtnSmall> </CCopyBtnSmall>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="showonlist"> <q-tab-panel name="showonlist">
<q-btn <!--<q-btn
v-if="!showonreclist" v-if="!showonreclist"
icon="fas fa-upload" icon="fas fa-upload"
color="positive" color="positive"
@@ -114,22 +121,16 @@
:label="$t('circuit.addtothereceiverlist')" :label="$t('circuit.addtothereceiverlist')"
@click="clickAddtoRecList" @click="clickAddtoRecList"
> >
</q-btn> </q-btn>-->
<q-slide-transition> <q-slide-transition> </q-slide-transition>
<q-banner
v-show="riscallrec"
rounded
class="bg-blue text-white"
style="text-align: center"
>
{{ riscallrec }}
<br />
</q-banner>
</q-slide-transition>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="qrcode"> <q-tab-panel name="qrcode">
<CQRCode :read="false" textlink="Link Profilo" :link="userStore.getLinkProfileAndRIS('', '', '')"></CQRCode> <CQRCode
:read="false"
textlink="Link Profilo"
:link="userStore.getLinkProfileAndRIS('', '', '')"
></CQRCode>
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>
</CTitleBanner> </CTitleBanner>

View File

@@ -398,15 +398,6 @@
:to="`/my/` + getMyUsername()" :to="`/my/` + getMyUsername()"
>{{ t('pages.profile') }} >{{ t('pages.profile') }}
</q-btn> </q-btn>
<q-btn
v-if="site.confpages && site.confpages.showCompetenze"
rounded
color="orange"
icon="house"
:to="`/attivita/` + getMyUsername()"
>
&nbsp;{{ t('otherpages.myactivities') }}
</q-btn>
<q-btn <q-btn
rounded rounded

View File

@@ -454,7 +454,7 @@ function getRoutesAd(site: ISites) {
path: '/attivita/:username', path: '/attivita/:username',
materialIcon: 'fas fa-user', materialIcon: 'fas fa-user',
name: 'mypages.attivita', name: 'mypages.attivita',
component: () => import('@/views/user/myactivities/myactivities.vue'), component: () => import('@/views/user/myprofile/myprofile.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
inmenu: false, inmenu: false,
infooter: false, infooter: false,

View File

@@ -14,6 +14,7 @@ const msg_it = {
csv: 'Esporta Movimenti', csv: 'Esporta Movimenti',
}, },
grid: { grid: {
advanced_filters: 'Filtri Avanzati',
found: 'trovato', found: 'trovato',
newrecord: 'Aggiungi', newrecord: 'Aggiungi',
table: 'Tabella', table: 'Tabella',

View File

@@ -7654,6 +7654,9 @@ export const tools = {
if (tablejoin === 'regions') { if (tablejoin === 'regions') {
ris = 'mycities.reg' ris = 'mycities.reg'
} }
if (tablejoin === 'circuits') {
ris = 'mycircuits.circuitname'
}
} }
return ris return ris

View File

@@ -2085,7 +2085,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
} }
// console.log('value', value, 'label', label) // console.log('value', value, 'label', label)
newarr.push({ value: valout, label }) newarr.push({ value: valout, label, name: label })
} }
myarr = newarr myarr = newarr

View File

@@ -11,7 +11,7 @@
<q-tab name="pagine" icon="fas fa-book-reader" label="Pagine"> </q-tab> <q-tab name="pagine" icon="fas fa-book-reader" label="Pagine"> </q-tab>
<q-tab name="opzioni" icon="fas fa-save" label="Opzioni"> </q-tab> <q-tab name="opzioni" icon="fas fa-save" label="Opzioni"> </q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabcatalogo" animated class=""> <q-tab-panels v-model="tabcatalogo" animated class="" keep-alive>
<q-tab-panel name="visu" v-if="optcatalogo"> <q-tab-panel name="visu" v-if="optcatalogo">
<div class="row justify-center q-mx-auto bg-blue-1"> <div class="row justify-center q-mx-auto bg-blue-1">
<div class="text-center"> <div class="text-center">
@@ -41,7 +41,7 @@
> >
</q-tab> </q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabvisu" animated class=""> <q-tab-panels v-model="tabvisu" animated class="" keep-alive>
<q-tab-panel name="categorie"> <q-tab-panel name="categorie">
<div class="row justify-center q-mx-auto bg-blue-1"> <div class="row justify-center q-mx-auto bg-blue-1">
<div v-for="(reccat, index) in getCatProds()" :key="index"> <div v-for="(reccat, index) in getCatProds()" :key="index">

View File

@@ -357,7 +357,7 @@
<br /> <br />
<div class="row text-center"> <div class="column text-center">
<q-banner <q-banner
v-if=" v-if="
circuitStore.isCircuitNational(circuit.name) && circuitStore.isCircuitNational(circuit.name) &&
@@ -394,7 +394,7 @@
<br /> <br />
</q-banner> </q-banner>
<q-banner <q-banner
v-if=" v-if="false &&
userStore.my.profile && userStore.my.profile &&
userStore.my.profile.calc && userStore.my.profile.calc &&
!circuit.circuitoIndipendente && !circuit.circuitoIndipendente &&
@@ -421,6 +421,7 @@
!circuit.circuitoIndipendente && !circuit.circuitoIndipendente &&
userStore.my.profile.calc && userStore.my.profile.calc &&
userStore.my.profile.calc.numGoodsAndServices <= 0 userStore.my.profile.calc.numGoodsAndServices <= 0
&& false
" "
rounded rounded
class="bg-deep-purple text-white" class="bg-deep-purple text-white"
@@ -524,7 +525,7 @@
></q-tab> ></q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabcircuit" animated> <q-tab-panels v-model="tabcircuit" animated keep-alive>
<q-tab-panel <q-tab-panel
name="gruppicollettivi" name="gruppicollettivi"
style="max-width: 500px" style="max-width: 500px"
@@ -555,7 +556,7 @@
></q-tab> ></q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabmembers" animated> <q-tab-panels v-model="tabmembers" animated keep-alive>
<q-tab-panel name="all"> <q-tab-panel name="all">
<div class="row justify-center"> <div class="row justify-center">
<q-btn rounded icon="fas fa-user-plus" class="text-center"> <q-btn rounded icon="fas fa-user-plus" class="text-center">
@@ -660,7 +661,7 @@
nodataLabel="Nessun Gruppo Comunitario" nodataLabel="Nessun Gruppo Comunitario"
:prop_search="true" :prop_search="true"
hint="gruppo da trovare" hint="gruppo da trovare"
:finder="false" :finder="true"
:choose_visutype="false" :choose_visutype="false"
:finder_noNull="false" :finder_noNull="false"
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS" :options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
@@ -1057,7 +1058,7 @@
></q-tab> ></q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabmembers"> <q-tab-panels v-model="tabmembers" keep-alive>
<q-tab-panel name="all"> <q-tab-panel name="all">
<!--<q-toggle v-model="showsaldi" :label="t('movement.showsaldi')"></q-toggle>--> <!--<q-toggle v-model="showsaldi" :label="t('movement.showsaldi')"></q-toggle>-->
</q-tab-panel> </q-tab-panel>
@@ -1181,7 +1182,7 @@
nodataLabel="Nessun Iscritto" nodataLabel="Nessun Iscritto"
:prop_search="true" :prop_search="true"
hint="Username o nome da trovare" hint="Username o nome da trovare"
:finder="false" :finder="true"
:choose_visutype="false" :choose_visutype="false"
:finder_noNull="false" :finder_noNull="false"
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS" :options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"

View File

@@ -59,7 +59,13 @@ export default defineComponent({
}, },
] ]
filtercustom.value = [] filtercustom.value = [
{
$or: [
{ deleted: { $exists: false } },
{ deleted: { $exists: true, $eq: false } }],
}
]
arrfilterand.value = [] arrfilterand.value = []
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.FRIENDS_SEARCH, costanti.FIND_PEOPLE, true) const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.FRIENDS_SEARCH, costanti.FIND_PEOPLE, true)

View File

@@ -220,7 +220,7 @@
></q-tab> ></q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabgrp" animated> <q-tab-panels v-model="tabgrp" animated keep-alive>
<q-tab-panel name="info"> <q-tab-panel name="info">
<div> <div>
<q-card> <q-card>
@@ -417,7 +417,7 @@
></q-tab> ></q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tabmembers" animated> <q-tab-panels v-model="tabmembers" animated keep-alive>
<q-tab-panel name="rich"> <q-tab-panel name="rich">
<CGridTableRec <CGridTableRec
prop_mytable="mygroups" prop_mytable="mygroups"
@@ -515,7 +515,7 @@
</q-tab-panels> </q-tab-panels>
<div v-if="tabgrp === 'circuits' && tabcircuit === 'info'"> <div v-if="tabgrp === 'circuits' && tabcircuit === 'info'">
<q-tab-panels v-model="tabcircuit" animated> <q-tab-panels v-model="tabcircuit" animated keep-alive>
<q-tab-panel name="info" style="max-width: 500px"> <q-tab-panel name="info" style="max-width: 500px">
<div v-for="(circuit, ind) of circuitslist" :key="ind"> <div v-for="(circuit, ind) of circuitslist" :key="ind">
<div class="circuit_name">{{ circuit.name }}:</div> <div class="circuit_name">{{ circuit.name }}:</div>

View File

@@ -9,6 +9,7 @@ import { CDateTime } from '@/components/CDateTime'
import { CMyGroup } from '@/components/CMyGroup' import { CMyGroup } from '@/components/CMyGroup'
import { CMyCircuit } from '@/components/CMyCircuit' import { CMyCircuit } from '@/components/CMyCircuit'
import { CNotifAtTop } from '@src/components/CNotifAtTop' import { CNotifAtTop } from '@src/components/CNotifAtTop'
import { CMyActivities } from '@src/components/CMyActivities'
import { CSendCoins } from '@/components/CSendCoins' import { CSendCoins } from '@/components/CSendCoins'
import { CContactUser } from '@/components/CContactUser' import { CContactUser } from '@/components/CContactUser'
import { CTimeAgo } from '@/components/CTimeAgo' import { CTimeAgo } from '@/components/CTimeAgo'
@@ -37,7 +38,7 @@ export default defineComponent({
components: { components: {
CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec, CMyUser, CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec, CMyUser,
CMyGroup, CLabel, CMyCircuit, CSendCoins, CNotifAtTop, CMyGroup, CLabel, CMyCircuit, CSendCoins, CNotifAtTop,
CCheckIfIsLogged, CTimeAgo, CContactUser CCheckIfIsLogged, CTimeAgo, CContactUser, CMyActivities,
}, },
props: {}, props: {},
setup() { setup() {
@@ -52,6 +53,7 @@ export default defineComponent({
const { getRefLink } = MixinUsers() const { getRefLink } = MixinUsers()
const animation = ref('fade') const animation = ref('fade')
const spinner_visible = ref(false)
const usersList = ref({ show: false, title: '', list: [] }) const usersList = ref({ show: false, title: '', list: [] })
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username) const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
@@ -82,6 +84,8 @@ export default defineComponent({
const listgroupsfiltered = ref(<IMyGroup[]>[]) const listgroupsfiltered = ref(<IMyGroup[]>[])
const listcircuitsfiltered = ref(<IMyCircuit[]>[]) const listcircuitsfiltered = ref(<IMyCircuit[]>[])
const tab = ref('attivita')
function profile() { function profile() {
return userStore.my.profile return userStore.my.profile
@@ -94,7 +98,12 @@ export default defineComponent({
async function loadProfile() { async function loadProfile() {
console.log('loadProfile...', username.value) console.log('loadProfile...', username.value)
try { try {
caricato.value = false caricato.value = false
if (sendRIS.value)
spinner_visible.value = true
// Carica il profilo di quest'utente // Carica il profilo di quest'utente
if (username.value) { if (username.value) {
await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => { await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => {
@@ -183,6 +192,10 @@ export default defineComponent({
return '' return ''
} }
function showed() {
spinner_visible.value = false
}
return { return {
username, username,
getlinkpage, getlinkpage,
@@ -222,6 +235,9 @@ export default defineComponent({
gotoPage, gotoPage,
sendRIS, sendRIS,
causalDest, causalDest,
spinner_visible,
showed,
tab,
} }
} }
}) })

File diff suppressed because it is too large Load Diff