- controllo della @ sull'username telegram (sugli Eventi)
- controllo email di test, se funzionante o no
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
v-if="
|
||||
((tools.getLinkUserTelegramByUser(myuser) ||
|
||||
(myuser.email && tools.isEmailVerifiedByUser(myuser))) &&
|
||||
tools.isUserOk()) ||
|
||||
tools.isUserOk(true)) ||
|
||||
showBtnActivities
|
||||
"
|
||||
class=""
|
||||
@@ -40,18 +40,18 @@
|
||||
</div>
|
||||
<div class="q-pa-xs">
|
||||
<q-btn
|
||||
v-if="tools.getLinkUserTelegramByUser(myuser) && tools.isUserOk()"
|
||||
v-if="tools.getLinkUserTelegramByUser(myuser) && tools.isUserOk(true)"
|
||||
icon="fab fa-telegram"
|
||||
color="blue"
|
||||
:type="tools.isUserOk() ? 'a' : 'btn'"
|
||||
:type="tools.isUserOk(true) ? 'a' : 'btn'"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('dialog.contact')"
|
||||
:href="
|
||||
tools.isUserOk() ? tools.getLinkUserTelegramByUser(myuser) : null
|
||||
tools.isUserOk(true) ? tools.getLinkUserTelegramByUser(myuser) : null
|
||||
"
|
||||
@click="
|
||||
!tools.isUserOk() ? (showingtooltip = !showingtooltip) : false
|
||||
!tools.isUserOk(true) ? (showingtooltip = !showingtooltip) : false
|
||||
"
|
||||
target="__blank"
|
||||
>
|
||||
|
||||
@@ -449,6 +449,10 @@ export default defineComponent({
|
||||
if (col.value && col.value.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
newval = tools.removespaces_slash(newval)
|
||||
}
|
||||
|
||||
if (col.value.fieldtype === costanti.FieldType.username_telegram) {
|
||||
newval = tools.removeatIniziale(newval)
|
||||
}
|
||||
// console.log('popuppedit: changevalRec', newval, 'COLName', col.value.name)
|
||||
|
||||
// console.log('row', props.row, 'col', props.mycol, 'newval', newval)
|
||||
@@ -953,10 +957,17 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function nameKeydown(e: any, col: any) {
|
||||
if (col.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
if (col.fieldtype === costanti.FieldType.username_telegram) {
|
||||
if (!/^[a-z0-9_]*$/i.test(e.key)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
if (/^\W$/.test(e.key)) {
|
||||
e.preventDefault();
|
||||
} else {
|
||||
if (col.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
|
||||
if (/^\W$/.test(e.key)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,8 +316,6 @@
|
||||
>
|
||||
<span style="font-size: 14px">{{ myvalue }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Componente di selezione del colore -->
|
||||
@@ -333,7 +331,8 @@
|
||||
<div
|
||||
v-else-if="
|
||||
col.fieldtype === costanti.FieldType.string ||
|
||||
col.fieldtype === costanti.FieldType.crypted
|
||||
col.fieldtype === costanti.FieldType.crypted ||
|
||||
col.fieldtype === costanti.FieldType.username_telegram
|
||||
"
|
||||
>
|
||||
<div
|
||||
@@ -359,6 +358,19 @@
|
||||
:rules="[(val) => !!val || !col.required || 'Campo richiesto']"
|
||||
:label="col.visulabel ? addstrrequired + t(col.label_trans) : col.label"
|
||||
>
|
||||
<template
|
||||
v-if="col.fieldtype === costanti.FieldType.username_telegram"
|
||||
v-slot:prepend
|
||||
>
|
||||
<span class="text-h7 text-blue">@</span>
|
||||
</template>
|
||||
|
||||
<template
|
||||
v-if="col.fieldtype === costanti.FieldType.username_telegram"
|
||||
v-slot:prepend
|
||||
>
|
||||
<span class="text-h7 text-blue">@</span>
|
||||
</template>
|
||||
</q-input>
|
||||
<q-field v-if="col.showLinkResult && myvalue">
|
||||
Diventerà: {{ tools.generateURL(col.showLinkResult, myvalue) }}
|
||||
@@ -560,7 +572,7 @@
|
||||
{{ t(col.label_trans ? col.label_trans : '') }}
|
||||
</span>
|
||||
<CGallery
|
||||
:filetype="shared_consts.FILETYPE.IMG"
|
||||
:filetype="shared_consts.FILETYPE.IMG"
|
||||
:imagebak="
|
||||
col.showpicprofile_ifnotset
|
||||
? userStore.getImgByProfile(row['profile'], true)
|
||||
@@ -1492,7 +1504,8 @@
|
||||
<div
|
||||
v-else-if="
|
||||
col.fieldtype === costanti.FieldType.string ||
|
||||
col.fieldtype === costanti.FieldType.crypted
|
||||
col.fieldtype === costanti.FieldType.crypted ||
|
||||
col.fieldtype === costanti.FieldType.username_telegram
|
||||
"
|
||||
>
|
||||
<q-input
|
||||
|
||||
@@ -50,7 +50,7 @@ export default defineComponent({
|
||||
|
||||
const $router = useRouter()
|
||||
|
||||
const datastat = ref(<any>{
|
||||
const datastat = ref(<INotData>{
|
||||
num_reg: 0,
|
||||
num_reg_today: 0,
|
||||
online_today: 0,
|
||||
@@ -160,6 +160,7 @@ export default defineComponent({
|
||||
// console.log('load')
|
||||
myloadingload.value = true
|
||||
datastat.value = await globalStore.getStatSite()
|
||||
datastat.value = {}
|
||||
|
||||
eseguipolling.value = true
|
||||
|
||||
|
||||
@@ -1,62 +1,86 @@
|
||||
<template>
|
||||
|
||||
<div v-if="!globalStore.serverError" class="q-ma-sm">
|
||||
|
||||
<div v-if="tools.isLogged() && (site.confpages?.enableRegMultiChoice || (!site.confpages?.enabledRegNeedTelegram))">
|
||||
<div
|
||||
v-if="!globalStore.serverError"
|
||||
class="q-ma-sm"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
tools.isLogged() &&
|
||||
(site.confpages?.enableRegMultiChoice || !site.confpages?.enabledRegNeedTelegram)
|
||||
"
|
||||
>
|
||||
<CVerifyEmail v-if="!tools.isEmailVerified() && !tools.TelegVerificato()">
|
||||
</CVerifyEmail>
|
||||
</div>
|
||||
|
||||
<div v-if="userStore.isUserWaitingVerifAportador()" class="centeritems">
|
||||
<q-banner inline-actions rounded class="bg-light-grey text-black">
|
||||
<div class="text-h7"
|
||||
>Sei in attesa di essere Ammesso da
|
||||
{{ tools.getAportadorSolidario() }}.<br>
|
||||
Ti arriverà una notifica sulla Chat Telegram <strong>'BOT RISO'</strong>.<br /><br />
|
||||
<div
|
||||
v-if="userStore.isUserWaitingVerifAportador()"
|
||||
class="centeritems"
|
||||
>
|
||||
<div class="text-h5 text-center text-bold q-mb-md">Attendi Ammissione</div>
|
||||
|
||||
Se non dovesse arrivarti entro qualche ora, contattalo per ricordarglielo.<br />
|
||||
</div>
|
||||
<q-card class="q-ma-md q-pa-sm bg-light-blue text-dark shadow-6">
|
||||
<div class="text-h7 justify-center">
|
||||
Sei in attesa di essere Ammesso da {{ tools.getAportadorSolidario() }}.<br />
|
||||
Ti arriverà una notifica sulla Chat Telegram
|
||||
<a :href="tools.getLinkBotTelegram('', '')"
|
||||
><strong>{{ tools.getBotName() }}</strong></a
|
||||
>.<br /><br />
|
||||
|
||||
Se non dovesse arrivarti entro qualche ora, contattala per avvisarla:<br />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
class="q-ma-sm justify-center row"
|
||||
color="primary"
|
||||
:to="tools.getLinkProfileAportador()"
|
||||
:label="`Apri Profilo di ` + tools.getAportadorSolidario()"
|
||||
>
|
||||
</q-btn>
|
||||
<br /><br />
|
||||
<div class="text-h7 row justify-center text-bold">Per supporto con Telegram:</div>
|
||||
<q-btn
|
||||
rounded
|
||||
type="a"
|
||||
class="q-ma-sm justify-center row"
|
||||
color="primary"
|
||||
icon="fab fa-telegram"
|
||||
href="https://t.me/surya1977"
|
||||
:label="`Contatta Surya`"
|
||||
>
|
||||
</q-btn>
|
||||
<div class="text-h7 row justify-center">Oppure tramite email:</div>
|
||||
<q-btn
|
||||
rounded
|
||||
type="a"
|
||||
class="q-ma-sm justify-center row"
|
||||
color="grey"
|
||||
icon="fas fa-envelope"
|
||||
href="mailto:surya@riso.app?Subject=Richiesta%20di%20aiuto%20su%20Riso"
|
||||
:label="`Invia Email a Surya`"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
</q-card>
|
||||
<div class="row justify-center">
|
||||
<q-btn
|
||||
rounded
|
||||
class="q-ma-sm"
|
||||
color="positive"
|
||||
@click="tools.refreshPage()"
|
||||
icon="refresh"
|
||||
label="Aggiorna la Pagina"
|
||||
label="Verifica ora se sei stato Ammesso"
|
||||
>
|
||||
</q-btn>
|
||||
<br>
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
class="q-ma-sm"
|
||||
color="primary"
|
||||
:to="tools.getLinkProfileAportador()"
|
||||
:label="`Profilo di ` + tools.getAportadorSolidario()"
|
||||
>
|
||||
</q-btn>
|
||||
<br><br>
|
||||
<div class="text-h7"> Per supporto ed Aiuto:</div>
|
||||
<q-btn
|
||||
rounded
|
||||
type="a"
|
||||
class="q-ma-sm"
|
||||
color="primary"
|
||||
icon="fab fa-telegram"
|
||||
href="https://t.me/surya1977"
|
||||
:label="`Contatta l'Assistenza (Surya)`"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
|
||||
</q-banner>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CUserNonVerif.ts">
|
||||
</script>
|
||||
<script lang="ts" src="./CUserNonVerif.ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CUserNonVerif.scss';
|
||||
|
||||
@@ -491,6 +491,7 @@ export const costanti = {
|
||||
editor_nohtml: 20000,
|
||||
verifica: 21000,
|
||||
pickcolor: 22000,
|
||||
username_telegram: 23000,
|
||||
},
|
||||
|
||||
TypeMov: {
|
||||
|
||||
@@ -2296,7 +2296,7 @@ export const colmyBachecas = [
|
||||
AddCol({
|
||||
name: 'contact_telegram',
|
||||
label_trans: 'event.contact_telegram',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
fieldtype: costanti.FieldType.username_telegram,
|
||||
isadvanced_field: true,
|
||||
}),
|
||||
AddCol({
|
||||
@@ -2375,7 +2375,7 @@ export const colTableSites = [
|
||||
AddCol({ name: 'dir', label_trans: 'sites.dir' }),
|
||||
AddCol({ name: 'dir_test', label_trans: 'sites.dir_test', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'email_from', label_trans: 'sites.email_from', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'email_pwd', label_trans: 'sites.email_pwd', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'email_pwd', label_trans: 'sites.email_pwd', fieldtype: costanti.FieldType.password }),
|
||||
AddCol({ name: 'telegram_key', label_trans: 'sites.telegram_key', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'telegram_bot_name', label_trans: 'sites.telegram_bot_name', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'telegram_support_chat', label_trans: 'sites.telegram_support_chat', fieldtype: costanti.FieldType.string }),
|
||||
@@ -3082,7 +3082,7 @@ export const colTableOperator = [
|
||||
AddCol({ name: 'email', label_trans: 'reg.email' }),
|
||||
AddCol({ name: 'img', label_trans: 'event.img' }),
|
||||
AddCol({ name: 'cell', label_trans: 'reg.cell' }),
|
||||
AddCol({ name: 'usertelegram', label_trans: 'op.usertelegram' }),
|
||||
AddCol({ name: 'usertelegram', label_trans: 'op.usertelegram', fieldtype: costanti.FieldType.username_telegram }),
|
||||
AddCol({ name: 'qualification', label_trans: 'op.qualification' }),
|
||||
AddCol({ name: 'disciplines', label_trans: 'op.disciplines' }),
|
||||
AddCol({ name: 'certifications', label_trans: 'op.certifications' }),
|
||||
|
||||
@@ -5057,6 +5057,16 @@ export const tools = {
|
||||
return mystr;
|
||||
},
|
||||
|
||||
removeatIniziale(mystr: string) {
|
||||
mystr = mystr.trim()
|
||||
|
||||
// remove @ from the beginning
|
||||
if (mystr.startsWith('@')) {
|
||||
mystr = mystr.substring(1);
|
||||
}
|
||||
return mystr
|
||||
},
|
||||
|
||||
removespaces_slash(mystr: string) {
|
||||
mystr = mystr.replace(/\s+/g, '');
|
||||
mystr = mystr.replace(/\//g, '');
|
||||
@@ -5598,9 +5608,9 @@ export const tools = {
|
||||
}
|
||||
},
|
||||
|
||||
isUserOk() {
|
||||
isUserOk(anchesenonammesso: boolean = false) {
|
||||
const userStore = useUserStore();
|
||||
if (userStore) return userStore.isUserOk();
|
||||
if (userStore) return userStore.isUserOk(anchesenonammesso);
|
||||
else return false;
|
||||
},
|
||||
|
||||
@@ -5705,6 +5715,16 @@ export const tools = {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
getLinkUserTelegramAportador() {
|
||||
const aportador = this.getAportadorSolidario()
|
||||
if (aportador) {
|
||||
if (userprofile.profile?.username_telegram) {
|
||||
return 'https://t.me/' + userprofile.profile.username_telegram;
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
|
||||
TelegCode() {
|
||||
const userStore = useUserStore();
|
||||
|
||||
@@ -794,7 +794,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return this.my.profile.teleg_id! > 0 || this.my.profile.teleg_id_old! > 0;
|
||||
},
|
||||
|
||||
isUserOk(): boolean {
|
||||
isUserOk(anchesenonammesso: boolean = false): boolean {
|
||||
const globalStore = useGlobalStore();
|
||||
|
||||
if (
|
||||
@@ -803,7 +803,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
) {
|
||||
return (
|
||||
((this.isTelegIdOk() && this.isUsernameTelegOk()) || this.my.verified_email!) &&
|
||||
this.my.verified_by_aportador!
|
||||
(anchesenonammesso || this.my.verified_by_aportador!)
|
||||
);
|
||||
} else {
|
||||
//if (tools.getAskToVerifyReg()) {
|
||||
@@ -813,13 +813,15 @@ export const useUserStore = defineStore('UserStore', {
|
||||
) {
|
||||
return (
|
||||
this.isTelegIdOk() &&
|
||||
this.my.verified_by_aportador! &&
|
||||
(anchesenonammesso || this.my.verified_by_aportador!) &&
|
||||
this.isUsernameTelegOk()
|
||||
);
|
||||
} else {
|
||||
return this.my.verified_email!;
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
// return this.my.verified_email! && this.isTelegIdOk() && this.my.verified_by_aportador!
|
||||
},
|
||||
|
||||
|
||||
@@ -2250,7 +2250,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
console.log(usertosend);
|
||||
|
||||
return Api.SendReq('/news/testemail', 'POST', usertosend).then((res) => {
|
||||
return res;
|
||||
return res?.data?.code === serv_constants.RIS_CODE_OK;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -2408,7 +2408,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return Api.SendReq('/site/load', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
// console.log('datastat', res)
|
||||
this.datastat = res.data.datastat;
|
||||
this.datastat = res.data?.datastat;
|
||||
return this.datastat;
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
<CContactUser
|
||||
:myuser="userStore.userprofile"
|
||||
:showBtnActivities="false"
|
||||
:showBtnRis="true"
|
||||
:showBtnRis="tools.isUserOk()"
|
||||
:sendRIS="tools.isUserOk() ? sendRIS : false"
|
||||
:causalDest="causalDest"
|
||||
@showed="showed"
|
||||
|
||||
Reference in New Issue
Block a user