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 @@
-
+
diff --git a/src/components/CUserNonVerif/CUserNonVerif.vue b/src/components/CUserNonVerif/CUserNonVerif.vue
index 9a0ffd49..ac2ce840 100755
--- a/src/components/CUserNonVerif/CUserNonVerif.vue
+++ b/src/components/CUserNonVerif/CUserNonVerif.vue
@@ -12,17 +12,17 @@
-
π Ora torna su Telegram ed imposta l'Username di Telegram:
+ π E' necessario ora impostare un Username su Telegram:
+
+ π¬ In questo modo le persone potranno contattarti (sia su Telegram sia dalla APP) senza aver bisogno di condividere il tuo numero di cellulare.
- π¬ In questo modo le persone potranno contattarti su Telegram senza aver bisogno del tuo numero di cellulare, e potranno farlo anche dalla APP.
-
- ππ» 1. Su telegram premi sull'icona (tre linee orizzontali) del menu principale in alto a sinistra.
+ ππ» 1. Vai su Telegram, e nella pagina iniziale (dove vedi tutte le chat), premi sull'icona (tre linee orizzontali) del menu principale in alto a sinistra.
ππ» 2. Seleziona la voce Impostazioni nel menu.
- ππ» 3.Premi su Username nella sezione account.
- ππ» 4. Digita il tuo username. (deve essere un nome ancora libero e non giΓ usato da altri).
+ ππ» 3. Premi su Username nella sezione account.
+ ππ» 4. Digita un username qualsiasi a tua scelta (deve essere un nome ancora libero e non giΓ usato da altri, non deve per forza coincidere con l'username che hai scelto per la APP).
ππ» 5. Per confermare premi sull'icona con la spunta (V) in alto a destra.
- π Infine vai sul BOT RISO Telegram e scrivi OK nel messaggio.
+ π Infine vai sul BOT RISO Telegram e scrivi OK nel messaggio. Ti comparirΓ un messaggio di Benvenuto.
@@ -32,6 +32,10 @@
L'USERNAME SU TELEGRAM
+ Se hai difficoltΓ , contatta la Chat del Supporto Tecnico: "Help - RISO"
+
CLICCANDO QUI ππ» Help - RISO
+
+
diff --git a/src/components/CVerifyTelegram/CVerifyTelegram.ts b/src/components/CVerifyTelegram/CVerifyTelegram.ts
index cb68f7ad..acb16589 100755
--- a/src/components/CVerifyTelegram/CVerifyTelegram.ts
+++ b/src/components/CVerifyTelegram/CVerifyTelegram.ts
@@ -1,4 +1,4 @@
-import { defineComponent, ref, computed } from 'vue'
+import { defineComponent, ref, computed, onMounted, watch, onBeforeUnmount } from 'vue'
import MixinBase from '@src/mixins/mixin-base'
import { CCopyBtn } from '../CCopyBtn'
@@ -6,6 +6,7 @@ import { useUserStore } from '@store/UserStore'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { tools } from '@store/Modules/tools'
+import { useRouter } from 'vue-router'
export default defineComponent({
name: 'CVerifyTelegram',
@@ -16,7 +17,58 @@ export default defineComponent({
const { t } = useI18n()
const userStore = useUserStore()
+ const $router = useRouter()
+ const polling = ref()
+
+
+ watch(() => $q.appVisible, (value: any, oldval: any) => {
+ console.log('visible', value)
+
+ if (value && !oldval) {
+ // console.log('Ora Γ¨ visibile !')
+ start()
+ }
+ if (!value && oldval) {
+ // console.log('Ora Γ¨ invisibile !')
+ end()
+ }
+ })
+
+ function refresh() {
+ console.log('refresh')
+ userStore.autologin_FromLocalStorage($router, $q)
+ }
+
+ function load() {
+ start()
+ }
+
+ function start() {
+ refresh()
+ if (tools.notFinishReg()) {
+ if (!polling.value) {
+ polling.value = setInterval(() => {
+ refresh()
+ }, 10000)
+ }
+
+ }
+ }
+
+ function end() {
+ if (polling.value) {
+ clearInterval(polling.value)
+ polling.value = null
+ }
+ }
+
+ function beforeDestroy() {
+ end()
+ }
+
+ onMounted(load)
+ onBeforeUnmount(beforeDestroy)
return {
tools,
diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts
index ae5218d8..623385c3 100755
--- a/src/store/Modules/fieldsTable.ts
+++ b/src/store/Modules/fieldsTable.ts
@@ -2661,7 +2661,7 @@ export const fieldsTable = {
value: 'provinces',
label: 'Provincia',
columns: colProvinces,
- colkey: '_id',
+ colkey: 'prov',
collabel: 'descr',
remote: true,
},
diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts
index 4e52d361..5cb327b1 100644
--- a/src/store/Modules/tools.ts
+++ b/src/store/Modules/tools.ts
@@ -4141,7 +4141,7 @@ export const tools = {
return userStore.my.username
else
return false
- }catch (e) {
+ } catch (e) {
return ''
}
},
@@ -5033,6 +5033,10 @@ export const tools = {
return userStore.isUsernameTelegOk()
},
+ notFinishReg() {
+ return !this.isUserOk()
+ },
+
getParamsByTable(table: string) {
let obj = {
@@ -5277,15 +5281,15 @@ export const tools = {
const mycolchiaro = tools.colourNameToHex(newcol)
return 'background: ' + mycol +
- ' background: -webkit-linear-gradient('+degree+'deg, ' + mycol + ', ' + mycolchiaro + ') !important; ' +
- ' background: linear-gradient('+degree+'deg, ' + mycol + ', ' + mycolchiaro + ') !important;'
+ ' background: -webkit-linear-gradient(' + degree + 'deg, ' + mycol + ', ' + mycolchiaro + ') !important; ' +
+ ' background: linear-gradient(' + degree + 'deg, ' + mycol + ', ' + mycolchiaro + ') !important;'
},
- getCurrentUrl(){
+ getCurrentUrl() {
return window.location.pathname
},
- isCurrentUrlSignUp(){
+ isCurrentUrlSignUp() {
return window.location.pathname.indexOf('signup') >= 0
},
diff --git a/src/store/Modules/toolsext.ts b/src/store/Modules/toolsext.ts
index 28a0066f..51925c22 100755
--- a/src/store/Modules/toolsext.ts
+++ b/src/store/Modules/toolsext.ts
@@ -62,6 +62,9 @@ export const toolsext = {
TABMYGROUPS: 'mygroups',
TABSKILLS: 'skills',
TABSECTORS: 'sectors',
+ TABREGIONS: 'regions',
+ TABCITIES: 'cities',
+ TABPROVINCE: 'provinces',
TABMYSKILLS: 'myskills',
TABMYGOODS: 'mygoods',
TABMYBACHECAS: 'mybachecas',
diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts
index 90cd605a..000add90 100755
--- a/src/store/UserStore.ts
+++ b/src/store/UserStore.ts
@@ -263,7 +263,7 @@ export const useUserStore = defineStore('UserStore', {
},
isUserOk(): boolean {
- return this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
+ return this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador! && this.isUsernameTelegOk()
// return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
},
@@ -838,7 +838,7 @@ export const useUserStore = defineStore('UserStore', {
// console.log('setGlobal: END')
},
- async autologin_FromLocalStorage($router: Router) {
+ async autologin_FromLocalStorage($router: Router, $q: any) {
try {
const globalStore = useGlobalStore()
@@ -903,6 +903,27 @@ export const useUserStore = defineStore('UserStore', {
}
return await this.setGlobal($router, isLogged)
+ .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)
+ }*/
+
+
+ //++Todo PWA: globalroutines('loadapp', '')
+
+ // Create Subscription to Push Notification
+ globalStore.createPushSubscription()
+ }
+ })
// console.log('autologin _id STATE ', this._id)
diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts
index d3200302..89d1e2ab 100644
--- a/src/store/globalStore.ts
+++ b/src/store/globalStore.ts
@@ -537,7 +537,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
}
},
- createPushSubscription() {
+ async createPushSubscription() {
// If Already subscribed, don't send to the Server DB
// if (state.wasAlreadySubOnDb) {