- aggiornato la guida per installare la App
- aggiornato la Guida Completa e Breve di RISO. - pagina per ricevere i RIS. - sistemato problema creazione nuovi Circuiti (admin non corretti). - corretto giro delle email, invitante, invitato e ricezione msg su telegram.
This commit is contained in:
@@ -11372,7 +11372,7 @@ export const tools = {
|
||||
|
||||
isStatusNonAutorizzato() {
|
||||
const userStore = useUserStore();
|
||||
return userStore.servercode === serv_constants.RIS_CODE__HTTP_FORBIDDEN_PERMESSI
|
||||
return userStore.servercode === serv_constants.RIS_CODE__HTTP_FORBIDDEN_PERMESSI;
|
||||
},
|
||||
|
||||
pageExist(path: string) {
|
||||
@@ -11382,6 +11382,52 @@ export const tools = {
|
||||
return !!page;
|
||||
},
|
||||
|
||||
lastUserLogged() {
|
||||
return localStorage.getItem(toolsext.localStorage.lastUserLogged);
|
||||
},
|
||||
|
||||
convertNbspToSpaces(htmlText: string) {
|
||||
if (!htmlText) return '';
|
||||
return htmlText.replace(/ /g, ' ');
|
||||
},
|
||||
removeNbsp(htmlText: string) {
|
||||
if (!htmlText) return '';
|
||||
return htmlText.replace(/ /g, '');
|
||||
},
|
||||
|
||||
converteSpaziMultipliIn1solo(htmlText: string) {
|
||||
if (!htmlText) return '';
|
||||
|
||||
// Collassa spazi multipli in uno solo (mantiene la struttura)
|
||||
return htmlText
|
||||
.replace(/>\s+</g, '><') // spazi TRA i tag
|
||||
.replace(/\s+$/gm, '') // spazi FINE riga
|
||||
.replace(/^\s+/gm, '') // spazi INIZIO riga
|
||||
.replace(/[ \t]{2,}/g, ' '); // 2+ spazi → 1 spazio (MA non newline) },
|
||||
},
|
||||
// Nel tuo file tools.ts o dove hai le utility
|
||||
convertHTMLForElement(htmlText: string, usacomeHTML?: boolean): string {
|
||||
if (!htmlText) return '';
|
||||
|
||||
if (!usacomeHTML) {
|
||||
return htmlText;
|
||||
}
|
||||
|
||||
return this.converteSpaziMultipliIn1solo(htmlText);
|
||||
},
|
||||
|
||||
convertinbspInSpazi(str: string) {
|
||||
return str
|
||||
.replace(/ /g, ' ') // Converti in spazi normali
|
||||
},
|
||||
|
||||
convertinbspInSpaziNormali(str: string) {
|
||||
return str
|
||||
.replace(/ /g, ' ') // Converti in spazi normali
|
||||
.replace(/>\s+</g, '><') // Rimuovi spazi tra tag
|
||||
.trim();
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
// getLocale() {
|
||||
|
||||
@@ -126,6 +126,7 @@ export const toolsext = {
|
||||
token: 'tk',
|
||||
refreshToken: 'rt',
|
||||
username: 'uname',
|
||||
lastUserLogged: 'lul',
|
||||
name: 'nm',
|
||||
surname: 'sn',
|
||||
perm: 'pm',
|
||||
|
||||
@@ -1436,6 +1436,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
tools.localStSetItem(toolsext.localStorage.lang, this.lang);
|
||||
tools.localStSetItem(toolsext.localStorage.userId, myuser._id);
|
||||
tools.localStSetItem(toolsext.localStorage.username, myuser.username);
|
||||
tools.localStSetItem(toolsext.localStorage.lastUserLogged, myuser.username);
|
||||
tools.localStSetItem(toolsext.localStorage.name, myuser.name);
|
||||
tools.localStSetItem(toolsext.localStorage.surname, myuser.surname);
|
||||
tools.localStSetItem(toolsext.localStorage.perm, String(myuser.perm) || '');
|
||||
|
||||
@@ -3090,17 +3090,17 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
newrec.catalogo = this.createRaccoltaCataloghiVuoto();
|
||||
} else if (newrec.type === shared_consts.ELEMTYPE.TEXT) {
|
||||
newrec.container = "Inserisci qui il testo"
|
||||
newrec.align = shared_consts.ALIGNTYPE.CEHTER
|
||||
newrec.align = shared_consts.ALIGNTYPE.CENTER
|
||||
} else if (newrec.type === shared_consts.ELEMTYPE.HTML) {
|
||||
newrec.containerHtml = "Inserisci qui il testo"
|
||||
newrec.align = shared_consts.ALIGNTYPE.CEHTER
|
||||
newrec.align = shared_consts.ALIGNTYPE.CENTER
|
||||
} else if (newrec.type === shared_consts.ELEMTYPE.IMAGEUPLOAD) {
|
||||
newrec.align = shared_consts.ALIGNTYPE.CEHTER
|
||||
newrec.align = shared_consts.ALIGNTYPE.CENTER
|
||||
} else if (newrec.type === shared_consts.ELEMTYPE.BUTTON) {
|
||||
newrec.container = "Bottone 1"
|
||||
newrec.containerHtml = "primary"
|
||||
newrec.container2 = "fas fa-home"
|
||||
newrec.align = shared_consts.ALIGNTYPE.CEHTER
|
||||
newrec.align = shared_consts.ALIGNTYPE.CENTER
|
||||
newrec.link = "https://www.pippo.it"
|
||||
newrec.container3 = "_blank"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user