- aggiornata la grafica della Home di RISO
- Profilo Completition - Email Verificata - Invita un Amico (invio di email)
This commit is contained in:
@@ -4024,151 +4024,6 @@ export const colTableIscrittiConacreis = [
|
||||
AddCol(DuplicateRec),
|
||||
];
|
||||
|
||||
export const colTableIscrittiArcadei = [
|
||||
AddCol({
|
||||
name: 'annoTesseramento',
|
||||
label_trans: 'reg.annoTesseramento',
|
||||
fieldtype: costanti.FieldType.number,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'numTesseraInterna',
|
||||
label_trans: 'reg.numTesseraInterna',
|
||||
fieldtype: costanti.FieldType.number,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'metodo_pagamento',
|
||||
label_trans: 'reg.metodo_pagamento',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'metodo_pagamento',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'ha_pagato',
|
||||
label_trans: 'reg.ha_pagato',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
}),
|
||||
AddCol({ name: 'name', label_trans: 'reg.name', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({
|
||||
name: 'surname',
|
||||
label_trans: 'reg.surname',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'dateofreg',
|
||||
label_trans: 'reg.dateofreg',
|
||||
fieldtype: costanti.FieldType.onlydate,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'dateofapproved',
|
||||
label_trans: 'reg.dateofapproved',
|
||||
fieldtype: costanti.FieldType.onlydate,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'email',
|
||||
label_trans: 'reg.email',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'email2',
|
||||
label_trans: 'reg.email2',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
// AddCol({ name: 'fiscalcode', label_trans: 'reg.fiscalcode', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({
|
||||
name: 'residency_address',
|
||||
label_trans: 'reg.residency_address',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'residency_city',
|
||||
label_trans: 'reg.residency_city',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'residency_province',
|
||||
label_trans: 'reg.residency_province',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'residency_country',
|
||||
label_trans: 'reg.residency_country',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'residency_zipcode',
|
||||
label_trans: 'reg.residency_zipcode',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'dateofbirth',
|
||||
label_trans: 'reg.dateofbirth',
|
||||
fieldtype: costanti.FieldType.onlydate,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'born_city',
|
||||
label_trans: 'reg.born_city',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'born_province',
|
||||
label_trans: 'reg.born_province',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'born_country',
|
||||
label_trans: 'reg.born_country',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'cell_phone',
|
||||
label_trans: 'reg.cell_phone',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'cell_phone2',
|
||||
label_trans: 'reg.cell_phone2',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'doctype',
|
||||
label_trans: 'reg.doctype',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'documentnumber',
|
||||
label_trans: 'reg.documentnumber',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'quota_versata',
|
||||
label_trans: 'reg.quota_versata',
|
||||
fieldtype: costanti.FieldType.number,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'categorie_interesse',
|
||||
label_trans: 'reg.categorie_interesse',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'cat_interesse_arcadei',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'altre_comunicazioni',
|
||||
label_trans: 'reg.altre_comunicazioni',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'come_ci_hai_conosciuto',
|
||||
label_trans: 'reg.come_ci_hai_conosciuto',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'iscrizione_compilata',
|
||||
label_trans: 'reg.iscrizione_compilata',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
}),
|
||||
AddCol({ name: 'note', label_trans: 'reg.note', fieldtype: costanti.FieldType.string }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
];
|
||||
|
||||
export const colTableGestoreOrdini = [
|
||||
AddCol({ name: 'name', label_trans: 'products.name' }),
|
||||
AddCol({
|
||||
@@ -7610,14 +7465,6 @@ export const fieldsTable = {
|
||||
collabel: 'label',
|
||||
noshow: true,
|
||||
},
|
||||
{
|
||||
value: 'cat_interesse_arcadei',
|
||||
label: "Categorie d'Interesse Arcadei",
|
||||
columns: colTableGeneric,
|
||||
colkey: 'value',
|
||||
collabel: 'label',
|
||||
noshow: true,
|
||||
},
|
||||
{
|
||||
value: 'lang',
|
||||
label: 'Lingua',
|
||||
|
||||
@@ -2717,6 +2717,17 @@ export const tools = {
|
||||
return result;
|
||||
},
|
||||
|
||||
getUserEmail() {
|
||||
const userStore = useUserStore();
|
||||
return userStore.my?.email;
|
||||
},
|
||||
|
||||
getEmailSupport() {
|
||||
const globalStore = useGlobalStore();
|
||||
const site = globalStore.site;
|
||||
return this.getemailto(site?.contacts.email)
|
||||
},
|
||||
|
||||
visumenu(elem: IListRoutes) {
|
||||
// : IListRoutes
|
||||
|
||||
@@ -5631,11 +5642,19 @@ export const tools = {
|
||||
getLinkBotTelegram(aportador_solidario: string, regexpire: string): string {
|
||||
let mylink = '';
|
||||
const sep = '-';
|
||||
if (tools.isTest() && !import.meta.env.DEV) {
|
||||
/*if (tools.isTest() && !import.meta.env.DEV) {
|
||||
mylink = tools.getValDb('TELEG_BOT_LINK_TEST', false);
|
||||
} else {
|
||||
mylink = tools.getValDb('TELEG_BOT_LINK', false);
|
||||
}*/
|
||||
const globalStore = useGlobalStore();
|
||||
const site = globalStore.site;
|
||||
if (tools.isTest() && !import.meta.env.DEV) {
|
||||
mylink = 'https://t.me/' + site.telegram_bot_name_test
|
||||
} else {
|
||||
mylink = 'https://t.me/' + site.telegram_bot_name
|
||||
}
|
||||
|
||||
let add = '';
|
||||
if (aportador_solidario) {
|
||||
add = '?start=inv' + sep + aportador_solidario + sep + 'ex' + sep + regexpire;
|
||||
@@ -6356,6 +6375,33 @@ export const tools = {
|
||||
});
|
||||
},
|
||||
|
||||
verifyUser($q: any, username: string, usernameDest: string) {
|
||||
// Segnala Profilo
|
||||
const userStore = useUserStore();
|
||||
//T_TOLTO
|
||||
$q.dialog({
|
||||
message: t('db.domanda_verifyuser', { username: usernameDest }),
|
||||
ok: { label: t('dialog.yes'), push: true },
|
||||
cancel: { label: t('dialog.cancel') },
|
||||
title: t('db.domanda'),
|
||||
}).onOk(() => {
|
||||
userStore
|
||||
.setFriendsCmd(
|
||||
$q,
|
||||
t,
|
||||
username,
|
||||
usernameDest,
|
||||
shared_consts.FRIENDSCMD.SETTRUST,
|
||||
true
|
||||
)
|
||||
.then((res: any) => {
|
||||
if (res) {
|
||||
tools.showPositiveNotif($q, t('db.trusted', {username: usernameDest}));
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
refuseReqFriends($q: any, username: string, usernameDest: string) {
|
||||
//T_TOLTO
|
||||
const userStore = useUserStore();
|
||||
@@ -7705,7 +7751,10 @@ export const tools = {
|
||||
|
||||
let risultato = false;
|
||||
|
||||
if (userStore.isAdmin || shared_consts.USER_ADMIN_CIRCUITS.includes(userStore.my.username)) {
|
||||
if (
|
||||
userStore.isAdmin ||
|
||||
shared_consts.USER_ADMIN_CIRCUITS.includes(userStore.my.username)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -8250,7 +8299,9 @@ export const tools = {
|
||||
return {
|
||||
idSector: tools.getSelectionByTable('sectors', 0, true),
|
||||
idSkill: tools.getSelectionByTable('skills', 0, true),
|
||||
idStatusSkill: tools.getSelectionByTable('statusSkills', [shared_consts.STATUSSKILL_DI_PERSONA]),
|
||||
idStatusSkill: tools.getSelectionByTable('statusSkills', [
|
||||
shared_consts.STATUSSKILL_DI_PERSONA,
|
||||
]),
|
||||
idContribType: tools.getSelectionByTable('contribtypes', []),
|
||||
dateTimeStart: tools.getDateTomorrowByTime(21),
|
||||
dateTimeEnd: null,
|
||||
@@ -8644,7 +8695,7 @@ export const tools = {
|
||||
? ris.last_my_transactions
|
||||
: [];
|
||||
|
||||
userStore.my.profile.total_transactions = ris.total_transactions
|
||||
userStore.my.profile.total_transactions = ris.total_transactions;
|
||||
return [{ userId: userStore.my._id }];
|
||||
}
|
||||
});
|
||||
@@ -11061,7 +11112,7 @@ export const tools = {
|
||||
}
|
||||
},
|
||||
|
||||
addstrCookie(table): string {
|
||||
addstrCookie(table: string): string {
|
||||
let addstr = '_' + table;
|
||||
return addstr;
|
||||
},
|
||||
@@ -11193,19 +11244,26 @@ export const tools = {
|
||||
return Math.ceil((pastDaysOfYear + startOfYear.getDay() + 1) / 7);
|
||||
},
|
||||
|
||||
getmenuByPath(path: string) {
|
||||
const myroutes = static_data.routes;
|
||||
getmenuByPath(path: string): IListRoutes | undefined {
|
||||
if (!path) return undefined;
|
||||
const normalizedPath = tools.norm(path);
|
||||
|
||||
const norm = path
|
||||
? (path.startsWith('/') ? path : `/${path}`).trim().toLowerCase()
|
||||
: undefined;
|
||||
function searchMenu(routes: IListRoutes[]): IListRoutes | undefined {
|
||||
for (const route of routes) {
|
||||
if (!route) continue;
|
||||
|
||||
const mymenus = myroutes.find((menu: any) => menu.path === norm);
|
||||
if (tools.norm(route.path) === normalizedPath) return route;
|
||||
if (Array.isArray(route.routes2)) {
|
||||
const found = searchMenu(route.routes2);
|
||||
if (found) return found;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// console.log('mymenus', mymenus, 'path', path, 'norm', norm);
|
||||
|
||||
return mymenus;
|
||||
return searchMenu(static_data.routes);
|
||||
},
|
||||
|
||||
norm(path?: string): string | undefined {
|
||||
return typeof path === 'string'
|
||||
? path
|
||||
@@ -11219,7 +11277,7 @@ export const tools = {
|
||||
try {
|
||||
return /Telegram/.test(navigator.userAgent);
|
||||
} catch (e) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// FINE !
|
||||
|
||||
Reference in New Issue
Block a user