Sistemazioni varie BUGS

This commit is contained in:
paoloar77
2022-03-10 23:20:09 +01:00
parent b597a9ad4b
commit 64579ccabf
13 changed files with 52 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.8" APP_VERSION="0.3.10"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.8" APP_VERSION="0.3.10"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.8" APP_VERSION="0.3.10"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="12" APP_ID="12"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.8" APP_VERSION="0.3.10"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.8" APP_VERSION="0.3.10"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet DIRECTORY_LOCAL=newfreeplanet

View File

@@ -385,6 +385,7 @@
<div> <div>
<CMyUser <CMyUser
:notsetcmd="true"
:mycontact="props.row" :mycontact="props.row"
:visu="visufind" :visu="visufind"
:groupname="extrafield" :groupname="extrafield"

View File

@@ -35,6 +35,7 @@ export default defineComponent({
const myarrlabel = ref(<any>[]) const myarrlabel = ref(<any>[])
const myarrdata = ref(<any>[]) const myarrdata = ref(<any>[])
const myarrbg = ref(<any>[])
const myarrsum = ref(<any>[]) const myarrsum = ref(<any>[])
// @ts-ignore // @ts-ignore
@@ -50,7 +51,7 @@ export default defineComponent({
label: props.title, label: props.title,
data: myarrdata.value, data: myarrdata.value,
borderColor: tools.colourNameToHex('red'), borderColor: tools.colourNameToHex('red'),
backgroundColor: tools.colourNameToHex(props.color), backgroundColor: myarrbg.value,
fill: true, fill: true,
}, },
], ],
@@ -77,6 +78,7 @@ export default defineComponent({
function mounted() { function mounted() {
myarrdata.value = [] myarrdata.value = []
myarrbg.value = []
myarrlabel.value = [] myarrlabel.value = []
myarrsum.value = [] myarrsum.value = []
@@ -88,6 +90,8 @@ export default defineComponent({
let ind = '' let ind = ''
let num = 1
for (rec of props.mydata) { for (rec of props.mydata) {
if (props.sum) { if (props.sum) {
somma += rec.count somma += rec.count
@@ -100,7 +104,13 @@ export default defineComponent({
//myarrlabel.value.push(rec._id) //myarrlabel.value.push(rec._id)
myarrlabel.value.push(ind) myarrlabel.value.push(ind)
myarrdata.value.push(rec.count) myarrdata.value.push(rec.count)
if (num === props.mydata.length) {
myarrbg.value.push(tools.colourNameToHex('green'))
} else {
myarrbg.value.push(tools.colourNameToHex(props.color))
}
myarrsum.value.push(somma) myarrsum.value.push(somma)
num++
// ind++ // ind++
} }
} }

View File

@@ -20,6 +20,7 @@ import { costanti } from '@costanti'
import { useGlobalStore } from '@store/globalStore' import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore' import { useUserStore } from '@store/UserStore'
import { useI18n } from '@/boot/i18n' import { useI18n } from '@/boot/i18n'
import { useQuasar } from 'quasar'
export default defineComponent({ export default defineComponent({
name: 'CStatusReg', name: 'CStatusReg',
@@ -27,11 +28,12 @@ export default defineComponent({
components: { CTitleBanner, CCardState, CCardStat, CLineChart, CMyFieldRec }, components: { CTitleBanner, CCardState, CCardStat, CLineChart, CMyFieldRec },
setup(props, { attrs, slots, emit }) { setup(props, { attrs, slots, emit }) {
const { t } = useI18n() const { t } = useI18n()
const $q = useQuasar()
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
const userStore = useUserStore() const userStore = useUserStore()
const NUMSEC_TO_POLLING = ref(300) const NUMSEC_TO_POLLING = ref(60)
const MAXNUM_POLLING = ref(10) const MAXNUM_POLLING = ref(1000)
const myloadingload = ref(false) const myloadingload = ref(false)
const eseguipolling = ref(false) const eseguipolling = ref(false)
@@ -40,6 +42,7 @@ export default defineComponent({
const datastat = ref(<any>{ const datastat = ref(<any>{
num_reg: 0, num_reg: 0,
online_today: 0,
num_passeggeri: 0, num_passeggeri: 0,
num_imbarcati: 0, num_imbarcati: 0,
num_teleg_attivo: 0, num_teleg_attivo: 0,
@@ -67,6 +70,19 @@ export default defineComponent({
return datastat.value.lastsreg return datastat.value.lastsreg
}) })
watch(() => $q.appVisible, (value: any, oldval: any) => {
// console.log('visible', value)
if (value && !oldval) {
// console.log('Ora è visibile !')
riaggiorna()
}
if (!value && oldval) {
// console.log('Ora è invisibile !')
beforeDestroy()
}
})
function checkifpolling() { function checkifpolling() {
if (userStore.my.profile) { if (userStore.my.profile) {
if (!tools.isUserOk() && tools.appid() === tools.IDAPP_RISO) if (!tools.isUserOk() && tools.appid() === tools.IDAPP_RISO)
@@ -74,9 +90,8 @@ export default defineComponent({
} }
if (eseguipolling.value) { if (eseguipolling.value) {
clearInterval(polling.value) beforeDestroy()
polling.value = null if (numpolled.value > 200) {
if (numpolled.value > 100) {
NUMSEC_TO_POLLING.value = 60 * 5 NUMSEC_TO_POLLING.value = 60 * 5
} }
if (numpolled.value < MAXNUM_POLLING.value) { if (numpolled.value < MAXNUM_POLLING.value) {
@@ -91,12 +106,15 @@ export default defineComponent({
} }
function beforeDestroy() { function beforeDestroy() {
clearInterval(polling.value) if (polling.value) {
clearInterval(polling.value)
polling.value = null
}
} }
function created() { function created() {
if (tools.isManager()) { if (tools.isManager()) {
MAXNUM_POLLING.value = 100 MAXNUM_POLLING.value = 10000
} }
load() load()
} }
@@ -106,15 +124,8 @@ export default defineComponent({
myloadingload.value = true myloadingload.value = true
datastat.value = await globalStore.getStatSite() datastat.value = await globalStore.getStatSite()
// console.log('datastat.value.lastsreg')
// console.table(datastat.value.lastsreg)
// console.log('newsstate')
// console.table('GlobalStore.state.serv_settings', GlobalStore.state.serv_settings)
eseguipolling.value = true eseguipolling.value = true
// console.log('eseguipolling', eseguipolling)
myloadingload.value = false myloadingload.value = false
if (userStore.my) { if (userStore.my) {

View File

@@ -8,10 +8,14 @@
<div class="flex flex-center"> <div class="flex flex-center">
<CCardState :mytext="$t('pages.statusreg.verifieds')" :myval="datastat.num_teleg_attivo" <CCardState :mytext="$t('pages.statusreg.verifieds')" :myval="datastat.num_teleg_attivo"
mycolor="blue"
:myperc="(datastat.num_teleg_attivo / datastat.num_reg) * 100"></CCardState> :myperc="(datastat.num_teleg_attivo / datastat.num_reg) * 100"></CCardState>
<CCardState :mytext="$t('pages.statusreg.online_today')" :myval="datastat.online_today"
mycolor="green" :myperc="(datastat.online_today / datastat.num_reg) * 100"></CCardState>
<CCardState :mytext="$t('pages.statusreg.autorizzare')" :myval="datastat.num_autorizzare" <CCardState :mytext="$t('pages.statusreg.autorizzare')" :myval="datastat.num_autorizzare"
:myperc="(datastat.num_autorizzare / datastat.num_teleg_attivo) * 100"></CCardState> mycolor="yellow" :myperc="(datastat.num_autorizzare / datastat.num_teleg_attivo) * 100"></CCardState>
<div class="q-pa-xs" v-if="datastat.num_part_accepted > 1"> <div class="q-pa-xs" v-if="datastat.num_part_accepted > 1">
<CCardStat :mytext="$t('stat.accepted')" :myval="datastat.num_part_accepted"></CCardStat> <CCardStat :mytext="$t('stat.accepted')" :myval="datastat.num_part_accepted"></CCardStat>

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="q-ma-md"> <div class="q-ma-md">
<CVerifyTelegram v-if="!tools.TelegVerificato()"> <CVerifyTelegram v-if="!tools.TelegVerificato() || !tools.isUsernameTelegOk()">
</CVerifyTelegram> </CVerifyTelegram>
@@ -16,7 +16,7 @@
💬 In questo modo le persone potranno contattarti (sia su Telegram sia dalla APP) <strong>senza aver bisogno di condividere il tuo numero di cellulare</strong>.<br> 💬 In questo modo le persone potranno contattarti (sia su Telegram sia dalla APP) <strong>senza aver bisogno di condividere il tuo numero di cellulare</strong>.<br>
<br> <br>
👉🏻 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.<br> 👉🏻 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 (sull'iPhone si chiama "Impostazioni").<br>
👉🏻 2. Seleziona la voce <b>Impostazioni</b> nel menu.<br> 👉🏻 2. Seleziona la voce <b>Impostazioni</b> nel menu.<br>
👉🏻 3. Premi su <b>Username</b> nella sezione account.<br> 👉🏻 3. Premi su <b>Username</b> nella sezione account.<br>
👉🏻 4. Digita un <strong>username qualsiasi</strong> a tua scelta (deve essere un nome ancora libero e non già usato da altri, <u>non deve per forza coincidere con l'username che hai scelto per la APP</u>).<br> 👉🏻 4. Digita un <strong>username qualsiasi</strong> a tua scelta (deve essere un nome ancora libero e non già usato da altri, <u>non deve per forza coincidere con l'username che hai scelto per la APP</u>).<br>

View File

@@ -84,6 +84,7 @@ const msg_website_it = {
statusreg: { statusreg: {
reg: 'Partecipanti', reg: 'Partecipanti',
verifieds: 'Verificati', verifieds: 'Verificati',
online_today: 'On Line Oggi',
autorizzati: 'Autorizzati', autorizzati: 'Autorizzati',
autorizzare: 'In attesa di Abilitazione', autorizzare: 'In attesa di Abilitazione',
passeggeri: 'Passeggeri Navi', passeggeri: 'Passeggeri Navi',

View File

@@ -19,6 +19,7 @@ export interface ICheckUser {
export interface INotData { export interface INotData {
num_reg?: number num_reg?: number
online_today?: number
num_passeggeri?: number num_passeggeri?: number
num_imbarcati?: number num_imbarcati?: number
email_non_verif?: number email_non_verif?: number

View File

@@ -4962,6 +4962,7 @@ export const tools = {
}, },
setCmd($q: any, cmd: number, username: string, value: any, dest: string) { setCmd($q: any, cmd: number, username: string, value: any, dest: string) {
console.log('setcmd', cmd)
if (cmd === shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP) { if (cmd === shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP) {
tools.removeFromMyGroups($q, username, dest) tools.removeFromMyGroups($q, username, dest)
} else if (cmd === shared_consts.GROUPSCMD.BLOCK_GROUP) { } else if (cmd === shared_consts.GROUPSCMD.BLOCK_GROUP) {