From c93361dfa2a312cc48329f446bee1839804da5c2 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Mon, 15 Aug 2022 15:10:00 +0200 Subject: [PATCH] InfiniteScroll: Le liste (Beni / Servizi / Eventi) devono essere caricate in automatico, scorrendo la lista... fix category --- grp.js | 2 +- quasar.conf.js | 1 + query_gruppi.js | 2 +- src/components/CFinder/CFinder.ts | 30 +- src/components/CFinder/CFinder.vue | 5 + .../CGridTableRec/CGridTableRec.scss | 1 + src/components/CGridTableRec/CGridTableRec.ts | 189 ++++++++- .../CGridTableRec/CGridTableRec.vue | 231 ++++++++++- src/components/CMyCardPopup/CMyCardPopup.vue | 1 - src/components/CMyEditor/CMyEditor.ts | 5 + src/components/CMyEditor/CMyEditor.vue | 6 +- src/components/CMyPopupEdit/CMyPopupEdit.ts | 2 +- src/components/CMyPopupEdit/CMyPopupEdit.vue | 2 +- src/components/CMyRecCard/CMyRecCard.vue | 26 +- src/components/CMySelect/CMySelect.ts | 7 +- src/components/CSignUp/CSignUp.vue | 390 +++++++++--------- src/components/CSkill/CSkill.vue | 2 +- src/db/lang/ws_it.js | 15 +- src/db/static_data.ts | 11 + src/model/UserStore.ts | 1 + src/root/eventi/eventi.vue | 4 +- src/root/goods/goods.vue | 4 +- src/root/hosp/hosp.vue | 4 +- src/root/provapao/provapao.scss | 0 src/root/provapao/provapao.ts | 181 ++++++++ src/root/provapao/provapao.vue | 43 ++ src/root/services/services.vue | 4 +- src/statics/lang/it.js | 9 +- src/store/Api/index.ts | 3 +- src/store/Modules/fieldsTable.ts | 7 + src/store/Modules/tools.ts | 32 ++ src/store/Modules/toolsext.ts | 1 + src/store/globalStore.ts | 7 +- src/views/user/myfriends/myfriends.vue | 2 + src/views/user/mygroup/mygroup.scss | 2 +- src/views/user/mygroup/mygroup.ts | 2 + src/views/user/mygroup/mygroup.vue | 143 ++++--- src/views/user/myprofile/myprofile.vue | 2 +- 38 files changed, 1051 insertions(+), 328 deletions(-) create mode 100755 src/root/provapao/provapao.scss create mode 100755 src/root/provapao/provapao.ts create mode 100755 src/root/provapao/provapao.vue diff --git a/grp.js b/grp.js index 4c2a37a2..f49f1231 100644 --- a/grp.js +++ b/grp.js @@ -145,7 +145,7 @@ db.getCollection('mygoods').aggregate( "from": "sectorgoods", "localField": "recGood.idSectorGood", "foreignField": "_id", - "as": "sectorgood" + "as": "sectorGood" } }, { diff --git a/quasar.conf.js b/quasar.conf.js index a377104c..74072d12 100755 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -203,6 +203,7 @@ module.exports = configure((ctx) => ({ 'QBanner', 'QInnerLoading', 'QSpinnerGears', + 'QSpinnerDots', 'QDate', 'QTime', 'QSlideTransition', diff --git a/query_gruppi.js b/query_gruppi.js index 4c68449f..99adc8a2 100644 --- a/query_gruppi.js +++ b/query_gruppi.js @@ -134,7 +134,7 @@ db.getCollection('myskills').aggregate( "from": "sectorgoods", "localField": "recGood.idSectorGood", "foreignField": "_id", - "as": "sectorgood" + "as": "sectorGood" } }, { diff --git a/src/components/CFinder/CFinder.ts b/src/components/CFinder/CFinder.ts index f52a222c..f901f97b 100755 --- a/src/components/CFinder/CFinder.ts +++ b/src/components/CFinder/CFinder.ts @@ -316,7 +316,7 @@ export default defineComponent({ tablesel: 'cities', }, { - label: 'Visiblità', + label: 'Visibilità', table: 'pub_to_share', key: 'pub_to_share', type: costanti.FieldType.select, @@ -353,7 +353,7 @@ export default defineComponent({ label: 'Categoria', table: 'skills', key: 'idSkill', - value: tools.getCookie(tools.COOK_SEARCH + 'skills' + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true), + value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSKILLS + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true), arrvalue: [], type: costanti.FieldType.select, addall: true, @@ -517,7 +517,7 @@ export default defineComponent({ label: 'Categoria', table: 'skills', key: 'idSkill', - value: tools.getCookie(tools.COOK_SEARCH + 'skills' + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true), + value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSKILLS + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true), arrvalue: [], type: costanti.FieldType.select, addall: true, @@ -706,11 +706,11 @@ export default defineComponent({ filter: null, useinput: false, }, - /*{ + { label: 'Settore', table: 'sectorgoods', key: 'idSectorGood', - value: tools.getCookie(tools.COOK_SEARCH + 'sectorgoods', 0), + value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORGOODS, 0, true), arrvalue: [], type: costanti.FieldType.select, filter: null, @@ -722,7 +722,7 @@ export default defineComponent({ label: 'Categoria', table: 'goods', key: 'idGood', - value: tools.getCookie(tools.COOK_SEARCH + 'goods' + '_' + tools.getCookie(tools.COOK_SEARCH + 'sectorgoods', costanti.FILTER_TUTTI), costanti.FILTER_TUTTI), + value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABGOODS + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORGOODS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true), arrvalue: [], type: costanti.FieldType.select, addall: true, @@ -730,6 +730,7 @@ export default defineComponent({ showcount: true, useinput: false, }, + /* { label: 'Consegna', table: 'shippings', @@ -910,6 +911,8 @@ export default defineComponent({ visibility: 1, admins: 1, idCatGrp: 1, + date_created: 1, + date_updated: 1, photos: 1, idCity: 1, note: 1, @@ -933,6 +936,8 @@ export default defineComponent({ visibility: 1, admins: 1, idCatGrp: 1, + date_created: 1, + date_updated: 1, photos: 1, idCity: 1, note: 1, @@ -955,6 +960,8 @@ export default defineComponent({ descr: 1, img: 1, idCatGrp: 1, + date_created: 1, + date_updated: 1, visibility: 1, admins: 1, photos: 1, @@ -1027,9 +1034,10 @@ export default defineComponent({ }, lookup3: { lk_tab: 'sectorgoods', - lk_LF: 'recGood.idSectorGood', + // lk_LF: 'recGood.idSectorGood', + lk_LF: 'idSectorGood', lk_FF: '_id', - lk_as: 'sectorgood', + lk_as: 'sectorGood', af_objId_tab: '', }, lookup5: { @@ -1094,7 +1102,8 @@ export default defineComponent({ }, lookup3: { lk_tab: toolsext.TABSECTORS, - lk_LF: 'recSkill.idSector', + // lk_LF: 'recSkill.idSector', + lk_LF: 'idSector', lk_FF: '_id', lk_as: 'sector', af_objId_tab: '', @@ -1210,7 +1219,8 @@ export default defineComponent({ }, lookup3: { lk_tab: toolsext.TABSECTORS, - lk_LF: 'recSkill.idSector', + // lk_LF: 'recSkill.idSector', + lk_LF: 'idSector', lk_FF: '_id', lk_as: 'sector', af_objId_tab: '', diff --git a/src/components/CFinder/CFinder.vue b/src/components/CFinder/CFinder.vue index 3c6db653..e2bb02d6 100755 --- a/src/components/CFinder/CFinder.vue +++ b/src/components/CFinder/CFinder.vue @@ -51,6 +51,11 @@ + + + + + diff --git a/src/components/CGridTableRec/CGridTableRec.scss b/src/components/CGridTableRec/CGridTableRec.scss index 348efce6..736739f4 100755 --- a/src/components/CGridTableRec/CGridTableRec.scss +++ b/src/components/CGridTableRec/CGridTableRec.scss @@ -9,6 +9,7 @@ .tdclass, .trclass{ min-height: 20px !important; + margin-top: 5px; } .q-table td { diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index 9ee36e89..30a564c4 100755 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -251,8 +251,12 @@ export default defineComponent({ const $router = useRouter() + const myinfscroll = ref(null) + const serverData: any = ref([]) + const numRecLoaded = ref(0) const spinner_visible = ref(false) + const changetable = ref(false) const searchList = ref([]) let actual = '' @@ -302,7 +306,10 @@ export default defineComponent({ watch(() => searchList.value, (to: any, from: any) => { // console.log('watch searchlist', to) - refresh() + if (searchList.value && !changetable.value) { + console.log('REFRR searchList.value', to) + refresh() + } }) watch(() => showfilteradv.value, (newval: any, from: any) => { @@ -311,7 +318,10 @@ export default defineComponent({ watch(() => props.filtercustom, (to: any, from: any) => { // console.log('filtercustom', to) - refresh() + if (JSON.stringify(to) !== JSON.stringify(from)) { + console.log('REFRR props.filtercustom', to, from) + refresh() + } }) $router.beforeResolve((to: any) => { @@ -325,6 +335,7 @@ export default defineComponent({ }) function setCategBySector(tablecat: string, tabsector: string, newval: any) { + console.log('setCategBySector', tablecat, tabsector, newval) const recSector = searchList.value.find((rec) => rec.table === tabsector) if (recSector) @@ -341,10 +352,12 @@ export default defineComponent({ if (arrvalues) trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved) } + console.log(' ...item', item) if (valsaved && trovato) item.value = valsaved else { if (arrvalues) { + console.log(' ...filter tutti') item.value = costanti.FILTER_TUTTI } } @@ -400,7 +413,7 @@ export default defineComponent({ } function searchval(newval: any, table: any) { - console.log('searchval', newval, table) + console.log('REFRR searchval', newval, table) tools.setCookie(tools.COOK_SEARCH + table, newval) if (table === toolsext.TABSKILLS) { @@ -410,12 +423,19 @@ export default defineComponent({ } } else if (table === toolsext.TABSECTORS) { setCategBySector(toolsext.TABSKILLS, table, newval) + } else if (table === toolsext.TABSECTORGOODS) { + setCategBySector(toolsext.TABGOODS, table, newval) } else if (table === toolsext.TABREGIONS) { setProvinceByRegion(toolsext.TABPROVINCE, table, newval) - } else if (table === 'goods') { - setCategBySector('sectorgoods', table, newval) + } else if (table === toolsext.TABGOODS) { + const recSector = searchList.value.find((rec) => rec.table === toolsext.TABSECTORGOODS) + if (recSector) { + tools.setCookie(tools.COOK_SEARCH + table + '_' + recSector.value, newval) + } + // setCategBySector('sectorgoods', table, newval) } + refresh() } @@ -440,7 +460,7 @@ export default defineComponent({ // emulate ajax call // SELECT * FROM ... WHERE...LIMIT... async function fetchFromServer(startRow: any, endRow: any, param_myfilter: any, param_myfilterand: any, sortBy: any, descending: any) { - + // console.log('fetchFromServer') let myobj: any = {} if (sortBy) { myobj = {} @@ -623,7 +643,7 @@ export default defineComponent({ let obj2: any = {} if (idSectorGood > 0) { // idSectorGood - obj2['sectorgood._id'] = idSectorGood + obj2['sectorGood._id'] = idSectorGood filtersearch2.push(obj2) } } else if ((item.table === 'subskills') && item.value === costanti.FILTER_TUTTI) { @@ -742,8 +762,11 @@ export default defineComponent({ savefilter() - if (!mytable.value) + if (!mytable.value) { + startsearch.value = false return + } + // console.log('myfilterandnow', myfilterandnow, 'myfilterandnow', myfilterandnow) @@ -762,7 +785,7 @@ export default defineComponent({ const startRow = (page - 1) * rowsPerPage const endRow = startRow + fetchCount - // console.log('startRow', startRow, 'endRow', endRow) + console.log('onRequest: startRow', startRow, 'endRow', endRow) serverData.value = [] @@ -798,9 +821,86 @@ export default defineComponent({ // ...and turn of loading indicator loading.value = false spinner_visible.value = false + changetable.value = false + startsearch.value = false }) } + function onUpdateData(index: number, myprops: any, done: any) { + const { page, rowsPerPage, rowsNumber, sortBy, descending } = myprops.pagination + const myfilternow = myfilter.value + const myfilterandnow = myfilterand.value + + savefilter() + + if (!mytable.value) { + startsearch.value = false + if (myinfscroll.value) { + // @ts-ignore + myinfscroll.value.resume() + } + done() + return + } + + // function all rows if "All" (0) is rowsel + const fetchCount = rowsPerPage === 0 ? rowsNumber : rowsPerPage + + // calculate starting row of data + const startRow = numRecLoaded.value + const endRow = startRow + fetchCount + console.log('startRow', startRow, 'endRow', endRow, 'fetchCount', fetchCount) + + + if (startRow < pagination.value.rowsNumber) { + + // fetch data from "server" + return fetchFromServer(startRow, endRow, myfilternow, myfilterandnow, sortBy, descending).then((ris: any) => { + + pagination.value.rowsNumber = getRowsNumberCount(myfilter) + console.log(' ...rowsNumber', pagination.value.rowsNumber) + + if (returnedData.value === []) { + // no more data + } else { + try { + numRecLoaded.value = numRecLoaded.value + (returnedData.value ? returnedData.value.length : 0) + console.log(' ...numRecLoaded.value', numRecLoaded.value) + serverData.value = [...serverData.value, ...returnedData.value] + } catch (e) { + serverData.value = [] + } + } + + // don't forfunction to update local pagination object + pagination.value.page = page + pagination.value.rowsPerPage = rowsPerPage + pagination.value.sortBy = sortBy + pagination.value.descending = descending + + // console.log('pagination', pagination) + + // ...and turn of loading indicator + changetable.value = false + startsearch.value = false + + if (myinfscroll.value) { + // @ts-ignore + myinfscroll.value.resume() + } + + console.log(' ...DONE ') + done() + }) + } else { + startsearch.value = false + if (myinfscroll.value) { + // @ts-ignore + myinfscroll.value.resume() + } + } + } + function refresh_arr() { const myarr = [...serverData.value] @@ -809,19 +909,37 @@ export default defineComponent({ } function refresh_table() { + onRequest({ pagination: pagination.value }) rowclicksel.value = null } + function refresh_infscroll(done: any) { + rowclicksel.value = null + + onUpdateData(0, + { + pagination: pagination.value + }, done) + } + + function refresh() { + console.log('refresh', 'startsearch', startsearch.value) + // console.log('refresh') - if (!startsearch.value) + if (startsearch.value) return false + console.log('REFRESH!') + + startsearch.value = true + serverData.value = [] + numRecLoaded.value = 0 search.value = search.value.trim() @@ -834,10 +952,21 @@ export default defineComponent({ // console.log('myfilter', myfilter.value) - refresh_table() + if (shared_consts.VERTIC_SHOW_GRID.includes(myvertical.value)) { + if (myinfscroll.value) { + // @ts-ignore + myinfscroll.value.stop() + } + + refresh_infscroll(function () { return true }) + } else { + refresh_table() + } + } watch(() => mycodeid.value, (newval, oldval) => { + console.log('REFRR - mycodeid.value', newval) refresh() }) @@ -846,6 +975,8 @@ export default defineComponent({ myvertical.value === costanti.VISUTABLE_SCHEDA_GROUP || myvertical.value === costanti.VISUTABLE_SCHEDA_USER || (props.showType === costanti.SHOW_USERINFO))) { + + console.log('REFRR - updateTables.value', newval) refresh() userStore.updateTables = false @@ -865,6 +996,10 @@ export default defineComponent({ return userStore.isFacilitatore } + function isAdmin() { + return userStore.isAdmin + } + function disabilita() { if ((mytable.value === 'users') && (isFacilitatore() && !userStore.isAdmin && !userStore.isManager)) { return true @@ -891,6 +1026,14 @@ export default defineComponent({ item['idSkill'] = costanti.FILTER_NESSUNO newRecord.value['idSkill'] = item['idSkill'] } + } else if (col.jointable === toolsext.TABSECTORGOODS) { + // Sbianca la select della Categoria Beni + + if (item && item.hasOwnProperty('idGood')) { + item['idGood'] = costanti.FILTER_NESSUNO + newRecord.value['idGood'] = item['idGood'] + console.log('newRecord', newRecord) + } } rowsel = item idsel = item._id @@ -936,7 +1079,7 @@ export default defineComponent({ } function annulla(val: any) { - console.log('annulla') + console.log('GridTable annulla') /* if (newRecord.value) { globalStore.DeleteRec({ table: mytable.value, id: newRecord.value._id }) @@ -1280,7 +1423,8 @@ export default defineComponent({ } function changeTable(mysel: any) { - // console.log('changeTable', tablesel.value) + console.log('changeTable', tablesel.value) + changetable.value = true if (tablesel.value === undefined || tablesel.value === '') return @@ -1379,12 +1523,12 @@ export default defineComponent({ } } - startsearch.value = true - + console.log('REFRR - changetable') refresh() } function doSearch() { + console.log('REFRR - doSearch') refresh() } @@ -1721,6 +1865,17 @@ export default defineComponent({ return actualDate.value } + function onLoadScroll (index: number, done: any) { + if (index > 0) { + console.log('onLoadScroll', index, 'RECLOAD', numRecLoaded.value, 'ROWS: ', pagination.value.rowsNumber) + if (numRecLoaded.value >= pagination.value.rowsNumber) { + done(true) + } else { + pagination.value.page = pagination.value.page + 1 + refresh_infscroll(done) + } + } + } // onMounted(mounted) created() @@ -1809,6 +1964,10 @@ export default defineComponent({ getActualDate, actualDate, actual, + isAdmin, + onLoadScroll, + numRecLoaded, + myinfscroll, } } }) diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index 9b8f23b4..118047e7 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -33,7 +33,208 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + +
+ + + + + + +
+ +
{{ pagination.rowsNumber }} elemento trovato
+
{{ pagination.rowsNumber }} elementi trovati
+
+ numRecLoaded: {{numRecLoaded}} + + INFINITE:
+ +
+
+ +
+ {{ actual = tools.getstrVeryShortDate(row.dateTimeStart) }} + {{ tools.getstrDateLong(row.dateTimeStart) }} +
+
+ + + + + +
+ + +
@@ -357,8 +560,8 @@
- {{actual = tools.getstrVeryShortDate(props.row.dateTimeStart)}} - {{tools.getstrDateLong(props.row.dateTimeStart) }} + {{ actual = tools.getstrVeryShortDate(props.row.dateTimeStart) }} + {{ tools.getstrDateLong(props.row.dateTimeStart) }}
@@ -611,7 +814,7 @@ label="Campi Avanzati" @click="showfilteradv = !showfilteradv"> -->
+ v-if="showColCheck(col, tools.TIPOVIS_EDIT_RECORD, false) && col.foredit" class="tdclass">
-
diff --git a/src/components/CMyEditor/CMyEditor.ts b/src/components/CMyEditor/CMyEditor.ts index 429f240d..d445e4b9 100755 --- a/src/components/CMyEditor/CMyEditor.ts +++ b/src/components/CMyEditor/CMyEditor.ts @@ -57,6 +57,8 @@ export default defineComponent({ verdana: 'Verdana' }) + const showtools = ref(false) + const toolbarcomp = ref([ ['left', 'center', 'right', 'justify'], ['bold', 'italic', 'underline', 'strike'], @@ -172,6 +174,8 @@ export default defineComponent({ myvalue.value = '' else myvalue.value = props.value + + showtools.value = tools.getCookie('showtools', '0') === '1' } function onPaste (evt: any) { @@ -213,6 +217,7 @@ export default defineComponent({ tools, onPaste, editorRef, + showtools, } } }) diff --git a/src/components/CMyEditor/CMyEditor.vue b/src/components/CMyEditor/CMyEditor.vue index f9756551..9dd8b1cc 100755 --- a/src/components/CMyEditor/CMyEditor.vue +++ b/src/components/CMyEditor/CMyEditor.vue @@ -16,7 +16,9 @@ spellcheck="false" > - + +
+ @@ -30,7 +32,7 @@ toolbar-text-color="white" toolbar-toggle-color="yellow-8" toolbar-bg="primary" - :toolbar="toolbarcomp" + :toolbar="showtools ? toolbarcomp : []" :fonts="myfonts" @update:model-value="changeval" @paste="onPaste" diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.ts b/src/components/CMyPopupEdit/CMyPopupEdit.ts index da1bafd8..6fbc8d66 100755 --- a/src/components/CMyPopupEdit/CMyPopupEdit.ts +++ b/src/components/CMyPopupEdit/CMyPopupEdit.ts @@ -16,7 +16,6 @@ import { CAccomodation } from '../CAccomodation' import { tools } from '@store/Modules/tools' import { costanti } from '@costanti' - // @ts-ignore // import VueTelInput from 'vue3-tel-input' // import 'vue3-tel-input/dist/vue3-tel-input.css' @@ -27,6 +26,7 @@ import MixinUsers from '@/mixins/mixin-users' import { toolsext } from '@store/Modules/toolsext' import { shared_consts } from '@/common/shared_vuejs' + export default defineComponent({ name: 'CMyPopupEdit', emits: ['showandsave', 'update:row', 'show', 'save', 'annulla'], diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.vue b/src/components/CMyPopupEdit/CMyPopupEdit.vue index 8677eff9..3466722a 100755 --- a/src/components/CMyPopupEdit/CMyPopupEdit.vue +++ b/src/components/CMyPopupEdit/CMyPopupEdit.vue @@ -54,7 +54,7 @@
- debounce="1000" - :label="$t('reg.nationality')"> + - + :label="$t('reg.repeatPassword')"> - + - + -
- -
+ - - - - Privacy Policy - - - - - + + - + - + - - +
+ +
+ + + + + + Privacy Policy + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ + +
+


-
-
- -
- - -
-


diff --git a/src/components/CSkill/CSkill.vue b/src/components/CSkill/CSkill.vue index 89df556d..098fb80b 100755 --- a/src/components/CSkill/CSkill.vue +++ b/src/components/CSkill/CSkill.vue @@ -9,7 +9,7 @@ :prop_colkey="prop_colkey" :col_title="col_title" :col_footer="col_footer" - :vertical="-1" + :vertical="costanti.VISUTABLE_LISTA" :choose_visutype="!visuinpage" :butt_modif_new="!visuinpage" nodataLabel="Nessun dato presente" diff --git a/src/db/lang/ws_it.js b/src/db/lang/ws_it.js index 76b6a8c0..0bf433ed 100755 --- a/src/db/lang/ws_it.js +++ b/src/db/lang/ws_it.js @@ -217,12 +217,17 @@ const msg_website_it = { '10€' + 'scegli' + '
clicca sull\'importo per fare una donazione
' + - '
2) Tramite Bonifico Bancario:
' + - 'Intestato a Paolo Arena
' + - 'IBAN: IT76O0347501605CC0010311400
' + - 'Causale: "donazione riso.app"

' + + '
2) Tramite Satispay: Clicca qui
' + + '
' + + 'Se ancora non hai Satispay Richiedila cliccando qui
' + + 'E\' consigliata se hai un conto bancario come alternativa alla costosa carta di credito/debito
' + + '👉🏻 Registrandoti entrambi riceviamo un Bonus di 5 €
' + + '
' + + '
3) Tramite Bonifico Bancario:
' + + '(Scrivi a Surya (surya@riso.app) per ricevere le coordinate
' + '' + - '3) In alternativa scegli tu una forma di scambio da donare a Paolo (per scrivergli su Telegram: Surya Paolo)
' + + '4) In alternativa scegli tu una forma di scambio da donare a Paolo (per scrivergli su Telegram: Surya Paolo)
' + ' Sono graditi messaggi sia di suggerimenti che di apprezzamenti.
' + 'Grazie Mille per l\'Aiuto ed il Supporto' + '
', diff --git a/src/db/static_data.ts b/src/db/static_data.ts index dcaef6c5..2bc95162 100755 --- a/src/db/static_data.ts +++ b/src/db/static_data.ts @@ -500,6 +500,17 @@ const baseroutes: IListRoutes[] = [ inmenu: true, infooter: true, }, + { + active: true, + order: 15, + path: '/provapao', + materialIcon: 'fas fa-house-user', + name: 'mypages.provapao', + component: () => import('@/root/provapao/provapao.vue'), + meta: { requiresAuth: true }, + inmenu: true, + infooter: true, + }, { active: true, order: 15, diff --git a/src/model/UserStore.ts b/src/model/UserStore.ts index 84f967d8..c461d1a9 100755 --- a/src/model/UserStore.ts +++ b/src/model/UserStore.ts @@ -21,6 +21,7 @@ export interface IMyGroup { photos: IImgGallery[] visibility?: number[] date_created?: Date + date_updated?: Date admins?: IFriends[] req_users?: IFriends[] blocked?: boolean diff --git a/src/root/eventi/eventi.vue b/src/root/eventi/eventi.vue index 951daf84..49ec17b5 100755 --- a/src/root/eventi/eventi.vue +++ b/src/root/eventi/eventi.vue @@ -12,7 +12,7 @@ - +
@@ -21,7 +21,7 @@
- + diff --git a/src/root/goods/goods.vue b/src/root/goods/goods.vue index 15470f0e..adbd44ab 100755 --- a/src/root/goods/goods.vue +++ b/src/root/goods/goods.vue @@ -11,7 +11,7 @@ :table="toolsext.TABMYGOODS" /> - +
@@ -19,7 +19,7 @@
- + diff --git a/src/root/hosp/hosp.vue b/src/root/hosp/hosp.vue index b7b096e7..4222b310 100755 --- a/src/root/hosp/hosp.vue +++ b/src/root/hosp/hosp.vue @@ -12,7 +12,7 @@ - +
@@ -21,7 +21,7 @@
- + diff --git a/src/root/provapao/provapao.scss b/src/root/provapao/provapao.scss new file mode 100755 index 00000000..e69de29b diff --git a/src/root/provapao/provapao.ts b/src/root/provapao/provapao.ts new file mode 100755 index 00000000..77ec4f96 --- /dev/null +++ b/src/root/provapao/provapao.ts @@ -0,0 +1,181 @@ +import { + defineComponent, ref, computed, +} from 'vue' + +import { tools } from '@src/store/Modules/tools' +import { toolsext } from '@src/store/Modules/toolsext' +import { CSkill } from '@/components/CSkill' +import { CFinder } from '@/components/CFinder' +import { CDashboard } from '@/components/CDashboard' +import { CTitlePage } from '@/components/CTitlePage' +import { CChartMap } from '@src/components/CChartMap' +import { CUserNonVerif } from '@/components/CUserNonVerif' +import { CMapsEsempio } from '@src/components/CMapsEsempio' +import { CVerifyEmail } from '@src/components/CVerifyEmail' +import { CVerifyTelegram } from '@src/components/CVerifyTelegram' +import { LandingFooter } from '@/components/LandingFooter' +import { useGlobalStore } from '@store/globalStore' +import { useUserStore } from '@store/UserStore' +import { static_data } from '@/db/static_data' +import MixinBase from '@/mixins/mixin-base' +import MixinUsers from '@/mixins/mixin-users' +import { costanti } from '@costanti' + +export default defineComponent({ + name: 'ProvaPao', + components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, LandingFooter }, + + setup() { + + // @ts-ignore + const columns = [ + { + name: 'index', + label: '#', + field: 'index' + }, + { + name: 'name', + required: true, + label: 'Dessert (100g serving)', + align: 'left', + // @ts-ignore + field: row => row.name, + // @ts-ignore + format: val => `${val}`, + sortable: true + }, + { name: 'calories', align: 'center', label: 'Calories', field: 'calories', sortable: true }, + { name: 'fat', label: 'Fat (g)', field: 'fat', sortable: true }, + { name: 'carbs', label: 'Carbs (g)', field: 'carbs' }, + { name: 'protein', label: 'Protein (g)', field: 'protein' }, + { name: 'sodium', label: 'Sodium (mg)', field: 'sodium' }, + { name: 'calcium', label: 'Calcium (%)', field: 'calcium', sortable: true, sort: (a: any, b: any) => parseInt(a, 10) - parseInt(b, 10) }, + { name: 'iron', label: 'Iron (%)', field: 'iron', sortable: true, sort: (a: any, b: any) => parseInt(a, 10) - parseInt(b, 10) } + ] + + const seed = [ + { + name: 'Frozen Yogurt', + calories: 159, + fat: 6.0, + carbs: 24, + protein: 4.0, + sodium: 87, + calcium: '14%', + iron: '1%' + }, + { + name: 'Ice cream sandwich', + calories: 237, + fat: 9.0, + carbs: 37, + protein: 4.3, + sodium: 129, + calcium: '8%', + iron: '1%' + }, + { + name: 'Eclair', + calories: 262, + fat: 16.0, + carbs: 23, + protein: 6.0, + sodium: 337, + calcium: '6%', + iron: '7%' + }, + { + name: 'Cupcake', + calories: 305, + fat: 3.7, + carbs: 67, + protein: 4.3, + sodium: 413, + calcium: '3%', + iron: '8%' + }, + { + name: 'Gingerbread', + calories: 356, + fat: 16.0, + carbs: 49, + protein: 3.9, + sodium: 327, + calcium: '7%', + iron: '16%' + }, + { + name: 'Jelly bean', + calories: 375, + fat: 0.0, + carbs: 94, + protein: 0.0, + sodium: 50, + calcium: '0%', + iron: '0%' + }, + { + name: 'Lollipop', + calories: 392, + fat: 0.2, + carbs: 98, + protein: 0, + sodium: 38, + calcium: '0%', + iron: '2%' + }, + { + name: 'Honeycomb', + calories: 408, + fat: 3.2, + carbs: 87, + protein: 6.5, + sodium: 562, + calcium: '0%', + iron: '45%' + }, + { + name: 'Donut', + calories: 452, + fat: 25.0, + carbs: 51, + protein: 4.9, + sodium: 326, + calcium: '2%', + iron: '22%' + }, + { + name: 'KitKat', + calories: 518, + fat: 26.0, + carbs: 65, + protein: 7, + sodium: 54, + calcium: '12%', + iron: '6%' + } + ] + +// we generate lots of rows here + let rows: any = [] + for (let i = 0; i < 1000; i++) { + rows = rows.concat(seed.slice(0).map((r: any) => ({ ...r }))) + } + rows.forEach((row: any, index: any) => { + row.index = index + }) + + return { + tools, + toolsext, + static_data, + columns, + rows, + + pagination: ref({ + rowsPerPage: 0 + }) + } + }, +}) diff --git a/src/root/provapao/provapao.vue b/src/root/provapao/provapao.vue new file mode 100755 index 00000000..d3ce1f6a --- /dev/null +++ b/src/root/provapao/provapao.vue @@ -0,0 +1,43 @@ + + + diff --git a/src/root/services/services.vue b/src/root/services/services.vue index 6471089c..894f6724 100755 --- a/src/root/services/services.vue +++ b/src/root/services/services.vue @@ -11,7 +11,8 @@ :table="toolsext.TABMYSKILLS" /> - +
+
@@ -20,7 +21,6 @@
- diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js index 59906f9e..34939bf7 100755 --- a/src/statics/lang/it.js +++ b/src/statics/lang/it.js @@ -31,6 +31,7 @@ const msg_it = { chisei: 'Chi Sei? Raccontaci di te:', iltuoimpegno: 'Quale è stato il tuo impegno per salvare il pianeta ad oggi?', come_aiutare: 'Cosa vorresti fare per aiutare il pianeta?', + skills: 'Competenze e Talenti', }, otherpages: { product: 'Prodotto', @@ -243,7 +244,7 @@ const msg_it = { open: 'Clicca sul bottone qui sotto, si aprirà una chat Telegram speciale (chiamata BOT)', ifclose: 'poi premi "AVVIA" o "START" e segui le istruzioni indicate.', openbot: 'Entra qui', - regbot: 'Verifica Telegram', + regbot: 'Registrati cliccando qui (si aprirà Telegram)', }, login: { facebook: 'Facebook', @@ -990,6 +991,7 @@ const msg_it = { request_trust: 'Richieste Fiducia', trusted: 'Fiducia Accettata', rejected: 'Rifiutati', + provapao: 'Prova pao', }, friends: { accept_trust: 'Accetta Fiducia', @@ -1020,6 +1022,7 @@ const msg_it = { admin: 'amministratore', admins: 'Amministratori', createdby: 'Creato da {username} in data {date}', + lastmodify: 'Ultima modifica {date}', subscribes: 'Membri', ask_group: 'Chiedi di entrare nel Gruppo', exit_group: 'Esci dal Gruppo', @@ -1120,6 +1123,10 @@ const msg_it = { expiringDate: 'Data Scadenza', }, + editor: { + showtool: 'Mostra strumenti per formattare il testo', + hidetool: 'Nascondi strumenti per formattare il testo', + } }, diff --git a/src/store/Api/index.ts b/src/store/Api/index.ts index b44414fb..156ef5e2 100755 --- a/src/store/Api/index.ts +++ b/src/store/Api/index.ts @@ -126,7 +126,8 @@ export const Api = { return reject({ code: toolsext.ERR_AUTHENTICATION }) } } - + if (tools.isDebug()) + console.log('result', res) return resolve(res) }) .catch((error) => { diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index 366eb70e..52a79c8a 100755 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -614,6 +614,13 @@ export const colmyUserGroup = [ sortable: true, showWhen: 0 }), + AddCol({ + name: 'date_updated', label_trans: 'reg.pub_updated', fieldtype: costanti.FieldType.onlydate, + required: false, + visible: false, + sortable: true, + showWhen: 0 + }), AddCol({ name: 'photos', label_trans: 'skill.photos', diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index d3095e6b..ba7d9b79 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -2258,6 +2258,12 @@ export const tools = { return '' }, + getstrDateYY(mytimestamp: Date | number | string | undefined) { + // console.log('getstrDate', mytimestamp) + if (mytimestamp) return date.formatDate(mytimestamp, 'DD/MM/YY') + return '' + }, + getstrDateLong(mytimestamp: Date | number | string | undefined) { // console.log('getstrDate', mytimestamp) const dayofweek = this.getDayOfWeek(mytimestamp) @@ -5785,6 +5791,32 @@ export const tools = { return config[name]; }, + getArrSector(table: string, rec: any) { + if (table === toolsext.TABMYGOODS) + return rec.sectorGood + else if ((table === toolsext.TABMYBACHECAS) || (table === toolsext.TABMYSKILLS)) + return rec.sector + else if (table === toolsext.TABMYGROUPS) + return [{descr: rec.sector}] + else if (table === toolsext.TABMYHOSPS) + return [] + + + }, + + getArrSubSector(table: string, rec: any) { + if (table === toolsext.TABMYGOODS) + return rec.recGood + else if ((table === toolsext.TABMYBACHECAS) || (table === toolsext.TABMYSKILLS)) + return rec.recSkill + else if (table === toolsext.TABMYGROUPS) + return [] + else if (table === toolsext.TABMYHOSPS) + return [] + + + } + // getLocale() { // if (navigator.languages && navigator.languages.length > 0) { // return navigator.languages[0] diff --git a/src/store/Modules/toolsext.ts b/src/store/Modules/toolsext.ts index 9baee52c..182a61d4 100755 --- a/src/store/Modules/toolsext.ts +++ b/src/store/Modules/toolsext.ts @@ -62,6 +62,7 @@ export const toolsext = { TABFRIENDS: 'friends', TABMYGROUPS: 'mygroups', TABSKILLS: 'skills', + TABGOODS: 'goods', TABSECTORS: 'sectors', TABSECTORGOODS: 'sectorgoods', TABREGIONS: 'regions', diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts index a8b37d8e..1353d5f4 100644 --- a/src/store/globalStore.ts +++ b/src/store/globalStore.ts @@ -1625,7 +1625,12 @@ export const useGlobalStore = defineStore('GlobalStore', { let obj: any = {} obj[mykey] = costanti.FILTER_NESSUNO obj[collab] = '[Nessuno]' - obj['idSector'] = [] + + if (table === toolsext.TABMYGOODS) { + obj['idSectorGood'] = [] + } else if ((table === toolsext.TABMYSKILLS) ) { + obj['idSector'] = [] + } myarr = [obj, ...myarr] diff --git a/src/views/user/myfriends/myfriends.vue b/src/views/user/myfriends/myfriends.vue index 42715504..3abdece2 100755 --- a/src/views/user/myfriends/myfriends.vue +++ b/src/views/user/myfriends/myfriends.vue @@ -1,5 +1,6 @@