diff --git a/public/images/riso-logo-full.png b/public/images/riso-logo-full.png index 38a9695f..51a29654 100644 Binary files a/public/images/riso-logo-full.png and b/public/images/riso-logo-full.png differ diff --git a/src/components/CContactUser/CContactUser.ts b/src/components/CContactUser/CContactUser.ts index 0d718da1..b34351f5 100755 --- a/src/components/CContactUser/CContactUser.ts +++ b/src/components/CContactUser/CContactUser.ts @@ -11,6 +11,7 @@ import { CSendCoins } from '@/components/CSendCoins' export default defineComponent({ name: 'CContactUser', + emits: ['showed'], props: { myuser: { type: Object as PropType, @@ -36,7 +37,7 @@ export default defineComponent({ }, }, components: { CLabel, CSendCoins }, - setup(props) { + setup(props, { emit }) { const $q = useQuasar() const userStore = useUserStore() const globalStore = useGlobalStore() @@ -86,6 +87,11 @@ export default defineComponent({ } + function showed() { + loading.value = false + emit('showed') + } + return { tools, @@ -99,6 +105,7 @@ export default defineComponent({ clickOpenSendCoin, site, loading, + showed, } }, }) diff --git a/src/components/CContactUser/CContactUser.vue b/src/components/CContactUser/CContactUser.vue index 2215fddf..d909039f 100755 --- a/src/components/CContactUser/CContactUser.vue +++ b/src/components/CContactUser/CContactUser.vue @@ -17,7 +17,7 @@ color="orange" rounded :label="$t('profile.myactivities')" - :to="`/attivita/` + myuser.username" + :to="`/my/` + myuser.username" > @@ -85,7 +85,7 @@ showsendCoinTo = false; loading = false; " - @showed="loading = false" + @showed="showed" > diff --git a/src/components/CFindUsers/CFindUsers.ts b/src/components/CFindUsers/CFindUsers.ts index de9f7d1a..1dd08c86 100755 --- a/src/components/CFindUsers/CFindUsers.ts +++ b/src/components/CFindUsers/CFindUsers.ts @@ -64,19 +64,19 @@ export default defineComponent({ const contact = computed(() => userStore.my) - const searchType = ref('username') + const searchType = ref('receivers') const usersList = ref({ show: false, title: '', list: [], listgroup: [] }) const options = ref([ - { - label: 'Cerca per Nome o Username', - value: 'username' - }, { label: 'Lista dei Riceventi di oggi', value: 'receivers' }, + { + label: 'Cerca per Nome o Username', + value: 'username' + }, { label: 'Scansiona il QRCode del Destinatario', value: 'qrcode' diff --git a/src/components/CFindUsers/CFindUsers.vue b/src/components/CFindUsers/CFindUsers.vue index 5af9b01f..6d386718 100755 --- a/src/components/CFindUsers/CFindUsers.vue +++ b/src/components/CFindUsers/CFindUsers.vue @@ -6,7 +6,7 @@ :options="options" color="primary" /> - + diff --git a/src/components/CFinder/CFinder.ts b/src/components/CFinder/CFinder.ts index ceef1754..36de781a 100755 --- a/src/components/CFinder/CFinder.ts +++ b/src/components/CFinder/CFinder.ts @@ -276,8 +276,8 @@ export default defineComponent({ { label: '👤 Circuiti che Gestisci', value: tools.FILTER_MYREC }, // {label: 'Seguo', value: tools.FILTER_MYFOLLOW}, ] - - } + + } } else { /* @@ -367,12 +367,24 @@ export default defineComponent({ icon: 'flag', 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', table: 'cities', key: 'idCity', 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, arrvalue: [], useinput: true, @@ -380,6 +392,7 @@ export default defineComponent({ // filter: getFilterCitiesByProvince, // param1: shared_consts.PARAM_SHOW_PROVINCE, tablesel: 'cities', + filteradv: true, }, /*{ label: 'Visibilità', @@ -396,15 +409,15 @@ export default defineComponent({ 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), + 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, + notinsearch: false, useinput: false, }, - { + /*{ label: 'Categoria', table: 'skills', key: 'idSkill', @@ -415,17 +428,18 @@ export default defineComponent({ filter: getFilterSkills, showcount: true, useinput: false, - }, + },*/ { label: 'Offro/Cerco', table: 'adtypes', 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: [], addall: true, type: costanti.FieldType.select, filter: null, useinput: false, + filteradv: true, }, /*{ label: 'Specializzazione', @@ -465,7 +479,7 @@ export default defineComponent({ table: 'statusSkills', key: 'idStatusSkill', 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, filter: null, useinput: false, @@ -485,7 +499,6 @@ export default defineComponent({ filteradv: true, //icon: 'swap_horizontal_circle', }, - /* { label: '', table: '', @@ -501,8 +514,6 @@ export default defineComponent({ icon: '', }, - */ - ] searchList_Events.value = [ @@ -523,7 +534,7 @@ export default defineComponent({ table: 'regions', key: 'idReg', 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, arrvalue: [], filter: null, @@ -542,6 +553,18 @@ export default defineComponent({ useinput: true, 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', table: 'cities', @@ -555,6 +578,7 @@ export default defineComponent({ // filter: getFilterCitiesByProvince, // param1: shared_consts.PARAM_SHOW_PROVINCE, tablesel: 'cities', + filteradv: true, }, /*{ label: 'Visiblità', @@ -568,6 +592,18 @@ export default defineComponent({ filter: null, 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', table: 'caldate', @@ -578,20 +614,9 @@ export default defineComponent({ addall: true, filter: null, 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', table: 'skills', key: 'idSkill', @@ -602,7 +627,7 @@ export default defineComponent({ filter: getFilterSkills, showcount: true, useinput: false, - }, + },*/ { label: 'In cambio di', table: 'contribtypes', @@ -613,9 +638,23 @@ export default defineComponent({ filter: null, useinput: false, icon: 'fas fa-hand-holding', - filteradv: false, + filteradv: true, //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, 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', table: 'cities', @@ -660,17 +711,19 @@ export default defineComponent({ // filter: getFilterCitiesByProvince, // param1: shared_consts.PARAM_SHOW_PROVINCE, tablesel: 'cities', + filteradv: true, }, { label: 'Offro/Cerco', table: 'adtypes', 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: [], addall: true, type: costanti.FieldType.select, filter: null, useinput: false, + filteradv: true, }, { label: 'Tipologia', @@ -683,6 +736,7 @@ export default defineComponent({ filter: null, useinput: false, icon: 'flag', + filteradv: true, }, { label: 'N° max Ospiti', @@ -695,6 +749,7 @@ export default defineComponent({ filter: null, useinput: false, icon: 'fas fa-users', + filteradv: true, }, { label: 'Preferenze', @@ -707,6 +762,7 @@ export default defineComponent({ filter: null, useinput: false, icon: 'fas fa-asterisk', + filteradv: true, }, { label: 'In cambio di', @@ -718,9 +774,23 @@ export default defineComponent({ filter: null, useinput: false, icon: 'fas fa-hand-holding', - filteradv: false, + filteradv: true, //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, 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', table: 'cities', @@ -759,6 +841,7 @@ export default defineComponent({ arrvalue: [], useinput: true, filter: null, + filteradv: true, //filter: getFilterCitiesByProvince, // param1: shared_consts.PARAM_SHOW_PROVINCE, tablesel: 'cities', @@ -784,7 +867,7 @@ export default defineComponent({ type: costanti.FieldType.select, filter: null, addall: true, - notinsearch: true, + notinsearch: false, useinput: false, }, { @@ -809,6 +892,7 @@ export default defineComponent({ type: costanti.FieldType.select, filter: null, useinput: false, + filteradv: true, }, /* { @@ -878,7 +962,8 @@ export default defineComponent({ addall: false, filter: null, useinput: false, - icon: 'fas fa-filter' + icon: 'fas fa-filter', + filteradv: true, }, { label: '', @@ -977,6 +1062,20 @@ export default defineComponent({ // param1: shared_consts.PARAM_SHOW_PROVINCE, 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 = [ @@ -1018,6 +1117,19 @@ export default defineComponent({ // param1: shared_consts.PARAM_SHOW_PROVINCE, tablesel: 'cities', 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', @@ -1043,6 +1155,20 @@ export default defineComponent({ filter: null, 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 = [] diff --git a/src/components/CGridOriz/CGridOriz.ts b/src/components/CGridOriz/CGridOriz.ts index 6d4449a6..8e93fbc7 100755 --- a/src/components/CGridOriz/CGridOriz.ts +++ b/src/components/CGridOriz/CGridOriz.ts @@ -396,7 +396,7 @@ export default defineComponent({ type: costanti.FieldType.select, filter: null, addall: true, - notinsearch: true, + notinsearch: false, useinput: false, }, { @@ -537,7 +537,7 @@ export default defineComponent({ useinput: true, icon: 'flag', }, - { + /*{ label: 'Comune', table: 'cities', key: 'idCity', @@ -550,7 +550,7 @@ export default defineComponent({ // filter: getFilterCitiesByProvince, // param1: shared_consts.PARAM_SHOW_PROVINCE, tablesel: 'cities', - }, + },*/ /*{ label: 'Visiblità', table: 'pub_to_share', @@ -563,6 +563,18 @@ export default defineComponent({ filter: null, 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', table: 'caldate', @@ -574,19 +586,7 @@ export default defineComponent({ filter: null, 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', table: 'skills', key: 'idSkill', @@ -610,7 +610,7 @@ export default defineComponent({ icon: 'fas fa-hand-holding', filteradv: false, //icon: 'swap_horizontal_circle', - }, + },*/ ] @@ -779,7 +779,7 @@ export default defineComponent({ type: costanti.FieldType.select, filter: null, addall: true, - notinsearch: true, + notinsearch: false, useinput: false, }, { diff --git a/src/components/CGridOriz/CGridOriz.vue b/src/components/CGridOriz/CGridOriz.vue index e6a8678b..36716cb8 100755 --- a/src/components/CGridOriz/CGridOriz.vue +++ b/src/components/CGridOriz/CGridOriz.vue @@ -18,7 +18,7 @@ :hint="hint" :nodataLabel="noMsgRecord" :prop_search="prop_search" - :finder="true" + :finder="finder" labelElemFind="trovati" :choose_visutype="visuType" :butt_modif_new="false" diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index 1278c05f..12ead09d 100755 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -396,6 +396,7 @@ export default defineComponent({ const myMapComp = ref(null) const tablesel = ref('') + const showfilteradv = ref(false) const showSpin = ref(false) const showNotification = ref(false) @@ -914,6 +915,15 @@ export default defineComponent({ 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') { const myfield = tools.getFieldSearchByTable(mytable.value, item.table, 'mycities.prov') @@ -1373,6 +1383,28 @@ export default defineComponent({ // 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 serverData.value = [] @@ -1680,7 +1712,7 @@ export default defineComponent({ myvertical.value = props.vertical if (props.prop_search) { - showfilter.value = props.prop_showfilter || (tools.getCookie('s_adv', '0') !== '0') + showfilter.value = props.prop_showfilter || true } else { showfilter.value = props.prop_showfilter } @@ -1693,7 +1725,7 @@ export default defineComponent({ const checkScrollPosition = () => { // console.log('checkScrollPosition') const container = carouselTabRef.value - if (!container ) return + if (!container) return if (!addEventScroll.value && carouselTabRef.value) { carouselTabRef.value?.addEventListener('scroll', checkScrollPosition) @@ -1706,10 +1738,10 @@ export default defineComponent({ console.log('carouselTabRef NO !') } console.log(' .... >>> AVANTI ', container.scrollLeft, container.clientWidth) - + isAtStart.value = container.scrollLeft <= 0 isAtEnd.value = container.scrollLeft + container.clientWidth >= container.scrollWidth - 1 - + if (serverData.value.length > 0) { // Assicurarsi che ci siano elementi console.log('entro dentro...') const cardWidth = container.scrollWidth / serverData.value.length @@ -1727,7 +1759,7 @@ export default defineComponent({ behavior: 'smooth', }); }; - + function mounted() { // console.log('mounted...') try { @@ -2656,7 +2688,7 @@ export default defineComponent({ function handleTransition(newVal: any, oldVal: any) { // Se siamo vicini alla fine degli elementi caricati, carichiamo altri elementi if (serverData.value.length - newVal <= 2 && !loading.value) { - onLoadScroll(newVal, () => {}) + onLoadScroll(newVal, () => { }) } } @@ -2667,7 +2699,7 @@ export default defineComponent({ } loading.value = true - + try { refresh_infscroll(done) } catch (error) { @@ -2687,7 +2719,7 @@ export default defineComponent({ autoplay.value = true } } - + const stopAutoplay = () => { if (autoplayInterval.value) { clearInterval(autoplayInterval.value) @@ -2695,7 +2727,7 @@ export default defineComponent({ } autoplay.value = false } - + const onIntersection = (entry: any) => { if (entry.isIntersecting) { // console.log('PARTITO INTERSECTION!') @@ -2705,7 +2737,7 @@ export default defineComponent({ stopAutoplay() } } - + created() @@ -2833,7 +2865,7 @@ export default defineComponent({ isAtStart, isAtEnd, activeIndex, - scroll, + scroll, slideGridOriz, autoplay, onUpdateData, @@ -2841,6 +2873,7 @@ export default defineComponent({ handleTransition, loadMore, onIntersection, + showfilteradv, } } }) diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index 21021991..9c0ce49f 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -28,9 +28,10 @@ v-if="butt_modif_new || mytitle" :class="$q.screen.lt.sm ? `` : `q-ma-xs` + ` `" > -
- {{ mytitle }} -
+ + {{ mytitle }} + +
- - + +
- - - + + - - - + - + (scope.opt && checkIfShowRec(scope.opt)) + " + > + + + {{ + scope.opt[fieldsTable.getLabelByTable(item.table)] || + scope.opt + }} + + + + + + @@ -738,9 +756,20 @@ :class="$q.screen.lt.sm ? `` : `row` + ` text-blue `" > - +
+ +
, + type: Object as PropType, 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) diff --git a/src/components/CMovements/CMovements.vue b/src/components/CMovements/CMovements.vue index ba834344..a0ce3907 100755 --- a/src/components/CMovements/CMovements.vue +++ b/src/components/CMovements/CMovements.vue @@ -17,7 +17,7 @@ /> - +
{{ t('circuit.nessun_movimento_inviato') }} diff --git a/src/components/CMyActivities/CMyActivities.ts b/src/components/CMyActivities/CMyActivities.ts index 8f59ac31..b0954ae6 100755 --- a/src/components/CMyActivities/CMyActivities.ts +++ b/src/components/CMyActivities/CMyActivities.ts @@ -41,6 +41,12 @@ export default defineComponent({ CTimeAgo, CContactUser }, props: { + introUser: { + type: Boolean, + required: false, + default: true, + }, + }, setup(props) { const userStore = useUserStore() @@ -73,7 +79,7 @@ export default defineComponent({ const notifStore = useNotifStore() const mycards = computed(() => { - return costanti.MAINCARDS.filter((rec: any) => rec.table) + return costanti.MAINCARDS.filter((rec: any) => rec.table && rec.visible) }) const optionsMainCards = ref({}) diff --git a/src/components/CMyActivities/CMyActivities.vue b/src/components/CMyActivities/CMyActivities.vue index 6088b87b..edfdf956 100755 --- a/src/components/CMyActivities/CMyActivities.vue +++ b/src/components/CMyActivities/CMyActivities.vue @@ -3,7 +3,6 @@ v-if="!caricato" class="fit column no-wrap justify-evenly items-center content-start" > -
@@ -11,203 +10,193 @@
{{ username }}
-
- -
- -
- -
-
- -
- +
+ +
-
- - - online - -
- -
- OnLine: -
- -
- - -
- -
-
- - {{ myuser.name }} -  {{ myuser.surname }} +
+
+ + + online +
-
-
- {{ myuser.username }} -
-
- +
+ OnLine: +
- - - - - - +
+ + +
- - -
+ + {{ myuser.name }} - -
-
Gruppi:
- -  {{ myuser.surname }} +
+
+
+ {{ myuser.username }} +
+
+ + +
+ + + + + + + + + +
+ +
+
Gruppi:
+ + + - - - - -
-
-
{{ card.title }}
- - + + +
+
+
{{ card.title }}
+ + + - - - - -
-
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
-
- + + + +
+
+ +
+ +
+ + +
+ +
+ +
+
+
+
+ +
+ +
+ +
+
+
+
+
@@ -218,16 +207,6 @@ - - -
diff --git a/src/components/CMyCircuits/CMyCircuits.ts b/src/components/CMyCircuits/CMyCircuits.ts index cfddebaa..4778ac62 100755 --- a/src/components/CMyCircuits/CMyCircuits.ts +++ b/src/components/CMyCircuits/CMyCircuits.ts @@ -67,6 +67,8 @@ export default defineComponent({ const finishloading = ref(false) const loadingvalues = ref(false) + const mytab = ref('circuiti') + const init = ref(false) const globalStore = useGlobalStore() @@ -227,6 +229,7 @@ export default defineComponent({ finishloading, addlastmov, loadingvalues, + mytab, } } }) diff --git a/src/components/CMyCircuits/CMyCircuits.vue b/src/components/CMyCircuits/CMyCircuits.vue index 2507d195..548a3d9e 100755 --- a/src/components/CMyCircuits/CMyCircuits.vue +++ b/src/components/CMyCircuits/CMyCircuits.vue @@ -7,109 +7,128 @@
- -
- {{ t('circuit.nessun_circuito_attivo') }} -
-
- - - - -
-
+ + + -
- -
- -
- + - - - -
-
- -
-
+
+ {{ t('circuit.nessun_circuito_attivo') }} +
+
+ + + + +
+ - -
-
+ +
+ + + + +
+
+ +
+
+ + + + +
+ +
+
- - - + + + -
-
+
+
+ +
@@ -124,17 +143,6 @@
- - -