From b597a9ad4b54226440ce198b03694001801dbe06 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Thu, 10 Mar 2022 00:28:07 +0100 Subject: [PATCH] =?UTF-8?q?Se=20la=20window=20viene=20attivata,=20e=20se?= =?UTF-8?q?=20sono=20in=20fase=20di=20registrazione,=20allora=20controllo?= =?UTF-8?q?=20se=20ci=20sono=20aggiornamenti=20ogni=2010=20secondi,=20load?= =?UTF-8?q?Site=20Corretto=20che=20il=20link=20di=20registrazione=20se=20e?= =?UTF-8?q?ra=20in=20minuscolo=20l'username=20e=20venivi=20registrato=20in?= =?UTF-8?q?=20maiuscolo,=20non=20lo=20prendeva.=20L'immagine=20di=20telegr?= =?UTF-8?q?am=20occorre=20salvare=20anche=20la=20versione=20SMALL=20Corret?= =?UTF-8?q?to=20filtro,=20se=20cambiavo=20Regione,=20non=20mi=20resettava?= =?UTF-8?q?=20la=20Provincia=20e=20la=20Citt=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- _ALL_SITES/insiemesipuo.app/.env.development | 2 +- .../popolodelnuovomondo.app/.env.development | 2 +- _ALL_SITES/riso.app/.env.development | 2 +- _ALL_SITES/riso.app/.env.test | 2 +- quasar.conf.js | 1 + src/App.ts | 25 +-------- .../CCheckIfIsLogged/CCheckIfIsLogged.vue | 13 ++++- src/components/CGridTableRec/CGridTableRec.ts | 48 +++++++++++++++++ src/components/CLineChart/CLineChart.ts | 37 +++++++------ src/components/CLineChart/CLineChart.vue | 2 +- .../CUserNonVerif/CUserNonVerif.vue | 18 ++++--- .../CVerifyTelegram/CVerifyTelegram.ts | 54 ++++++++++++++++++- src/store/Modules/fieldsTable.ts | 2 +- src/store/Modules/tools.ts | 14 +++-- src/store/Modules/toolsext.ts | 3 ++ src/store/UserStore.ts | 25 ++++++++- src/store/globalStore.ts | 2 +- 18 files changed, 189 insertions(+), 65 deletions(-) diff --git a/.env.development b/.env.development index 72cad3fb..810c48c3 100755 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.3.7" +APP_VERSION="0.3.8" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/insiemesipuo.app/.env.development b/_ALL_SITES/insiemesipuo.app/.env.development index e571b101..5abedd30 100755 --- a/_ALL_SITES/insiemesipuo.app/.env.development +++ b/_ALL_SITES/insiemesipuo.app/.env.development @@ -1,4 +1,4 @@ - APP_VERSION="0.3.7" + APP_VERSION="0.3.8" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/popolodelnuovomondo.app/.env.development b/_ALL_SITES/popolodelnuovomondo.app/.env.development index 0aaeb763..6fd33db2 100755 --- a/_ALL_SITES/popolodelnuovomondo.app/.env.development +++ b/_ALL_SITES/popolodelnuovomondo.app/.env.development @@ -1,4 +1,4 @@ - APP_VERSION="0.3.7" + APP_VERSION="0.3.8" SERVICE_WORKER_FILE="service-worker.js" APP_ID="12" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/riso.app/.env.development b/_ALL_SITES/riso.app/.env.development index c976fb8e..b6228e4d 100755 --- a/_ALL_SITES/riso.app/.env.development +++ b/_ALL_SITES/riso.app/.env.development @@ -1,4 +1,4 @@ - APP_VERSION="0.3.7" + APP_VERSION="0.3.8" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/riso.app/.env.test b/_ALL_SITES/riso.app/.env.test index c1694187..1c245a39 100755 --- a/_ALL_SITES/riso.app/.env.test +++ b/_ALL_SITES/riso.app/.env.test @@ -1,4 +1,4 @@ - APP_VERSION="0.3.7" + APP_VERSION="0.3.8" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/quasar.conf.js b/quasar.conf.js index a7273101..acd0bfd4 100755 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -240,6 +240,7 @@ module.exports = configure((ctx) => ({ 'Notify', 'Cookies', 'Loading', + 'AppVisibility', ], iconSet: 'fontawesome-v5', lang: 'it', // Quasar language diff --git a/src/App.ts b/src/App.ts index 3a3a09d1..aca3e082 100755 --- a/src/App.ts +++ b/src/App.ts @@ -71,30 +71,7 @@ export default { if (chiamaautologin) { // console.log('CHIAMA autologin_FromLocalStorage') - await userStore.autologin_FromLocalStorage($router) - .then((loadstorage: any) => { - if (loadstorage) { - - if ($q.screen.gt.sm) { - globalStore.setleftDrawerOpen(true) - } - - /*if (toolsext.getLocale() !== '') { - // console.log('SETLOCALE :', this.$i18n.locale) - $i18n.locale = toolsext.getLocale() // Set Lang - } else { - userStore.setlang($router, this.$i18n.locale) - }*/ - - - // console.log('lang CARICATO:', this.$i18n.locale) - - //++Todo PWA: globalroutines('loadapp', '') - - // Create Subscription to Push Notification - globalStore.createPushSubscription() - } - }) + await userStore.autologin_FromLocalStorage($router, $q) } else { globalStore.finishLoading = true } diff --git a/src/components/CCheckIfIsLogged/CCheckIfIsLogged.vue b/src/components/CCheckIfIsLogged/CCheckIfIsLogged.vue index 56f0aaa2..599239e8 100755 --- a/src/components/CCheckIfIsLogged/CCheckIfIsLogged.vue +++ b/src/components/CCheckIfIsLogged/CCheckIfIsLogged.vue @@ -10,14 +10,23 @@
Accedi al menu inserendo le tue credenziali per entrare πŸ”‘
- +

πŸ“ Non sei Registrato?
- πŸ‘‰πŸ» Chiedi in chat il link a chi ti ha invitato.
+ πŸ‘‰πŸ» Chiedi in chat il link a chi ti ha invitato
+ oppure chiedi sul Gruppo Territoriale di RISO scegliendo la tua provincia !

+ +
+ Visualizza le FAQ (Risposte alle domande piΓΉ frequenti)
+
+ +
+
+
rec.table === tabregion) + if (recRegion) + tools.setCookie(tools.COOK_SEARCH + tabregion, newval) + + for (const item of searchList.value) { + if (item.table === tableprov) { + const valsaved = tools.getCookie(tools.COOK_SEARCH + tableprov + '_' + newval, costanti.FILTER_TUTTI) + const rec = searchList.value.find((rec) => rec.table === tableprov) // check if exist + let trovato = false + let arrvalues = [] + if (rec) { + arrvalues = valoriopt.value(rec.value, false, false) + if (arrvalues) + trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved) + } + if (valsaved && trovato) + item.value = valsaved + else { + if (arrvalues) { + item.value = costanti.FILTER_TUTTI + } + } + } else if (item.table === toolsext.TABCITIES) { + const valsaved = tools.getCookie(tools.COOK_SEARCH + toolsext.TABCITIES + '_' + newval, costanti.FILTER_TUTTI) + const rec = searchList.value.find((rec) => rec.table === toolsext.TABCITIES) // check if exist + let trovato = false + let arrvalues = [] + if (rec) { + arrvalues = valoriopt.value(rec.value, false, false) + if (arrvalues) + trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved) + } + if (valsaved && trovato) + item.value = valsaved + else { + if (arrvalues) { + item.value = costanti.FILTER_TUTTI + } + } + } + } + + } + function searchval(newval: any, table: any) { console.log('searchval', newval, table) tools.setCookie(tools.COOK_SEARCH + table, newval) @@ -346,6 +392,8 @@ export default defineComponent({ } } else if (table === toolsext.TABSECTORS) { setCategBySector(toolsext.TABSKILLS, table, newval) + } else if (table === toolsext.TABREGIONS) { + setProvinceByRegion(toolsext.TABPROVINCE, table, newval) }else if (table === 'goods') { setCategBySector('sectorgoods', table, newval) } diff --git a/src/components/CLineChart/CLineChart.ts b/src/components/CLineChart/CLineChart.ts index 82181496..3b27328c 100755 --- a/src/components/CLineChart/CLineChart.ts +++ b/src/components/CLineChart/CLineChart.ts @@ -9,14 +9,14 @@ import { useQuasar } from 'quasar' import { Chart, ChartData, ChartOptions, registerables } from 'chart.js' -import { LineChart, useLineChart } from 'vue-chart-3' +import { BarChart, useBarChart } from 'vue-chart-3' Chart.register(...registerables) export default defineComponent({ - name: 'CLineChart', - components: { LineChart }, + name: 'CBarChart', + components: { BarChart }, props: { mydata: { required: false, default: [] }, title: { required: false, default: false }, @@ -38,14 +38,14 @@ export default defineComponent({ const myarrsum = ref([]) // @ts-ignore - const chartData = computed>(() => ({ + const chartData = computed>(() => ({ labels: myarrlabel.value, datasets: [ - { + /*{ label: 'Totali', data: myarrsum.value, backgroundColor: tools.colourNameToHex('green'), - }, + },*/ { label: props.title, data: myarrdata.value, @@ -56,18 +56,20 @@ export default defineComponent({ ], })) - const options = computed>(() => ({ - elements: { - line: { - tension: 0.4 - } + const options = computed>(() => ({ + bar: { }, interaction: { intersect: false }, + scales: { + y: { + beginAtZero: true + } + } })) - const { lineChartProps, lineChartRef } = useLineChart({ + const { barChartProps, barChartRef } = useBarChart({ chartData, options, @@ -84,7 +86,7 @@ export default defineComponent({ let rec: any - let ind = 1 + let ind = '' for (rec of props.mydata) { if (props.sum) { @@ -92,11 +94,14 @@ export default defineComponent({ } else { somma = rec.count } + + let day = rec._id.split('-') + ind = day[2] + '/' + day[1] //myarrlabel.value.push(rec._id) myarrlabel.value.push(ind) myarrdata.value.push(rec.count) myarrsum.value.push(somma) - ind++ + // ind++ } } @@ -111,8 +116,8 @@ export default defineComponent({ getoffset, q, options, - lineChartProps, - lineChartRef, + barChartProps, + barChartRef, myarrdata, myarrlabel, } diff --git a/src/components/CLineChart/CLineChart.vue b/src/components/CLineChart/CLineChart.vue index 9861d767..5c2166e7 100755 --- a/src/components/CLineChart/CLineChart.vue +++ b/src/components/CLineChart/CLineChart.vue @@ -1,6 +1,6 @@