- controllo della @ sull'username telegram (sugli Eventi)

- controllo email di test, se funzionante o no
This commit is contained in:
Surya Paolo
2025-07-29 12:54:40 +02:00
parent 85db3b4a61
commit 6013a624f6
11 changed files with 137 additions and 65 deletions

View File

@@ -491,6 +491,7 @@ export const costanti = {
editor_nohtml: 20000,
verifica: 21000,
pickcolor: 22000,
username_telegram: 23000,
},
TypeMov: {

View File

@@ -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' }),

View File

@@ -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();