ver 1.1.20:

- corretto campo foto che non compariva più.
 - sistemato i campi aggiuntivi e i richiesti.
- migliorato la barra in alto di selezione.
- aggiunto alcune icone.
This commit is contained in:
Surya Paolo
2025-02-03 17:18:33 +01:00
parent 997fd136ea
commit 979f90f980
84 changed files with 1257 additions and 357 deletions

View File

@@ -21,8 +21,9 @@ import {
IImg,
IText,
IAreaDiStampa,
ICatalogo,
IOptCatalogo,
IPagina,
IUserProfile,
} from '@model'
import MixinBase from '@/mixins/mixin-base'
@@ -5405,6 +5406,24 @@ export const tools = {
return userStore.my.verified_email!
},
isEmailVerifiedByUser(userprofile: IUserFields): boolean {
return userprofile.verified_email!
},
isUsernameTelegOkByUser(userprofile: IUserFields): boolean {
return !!userprofile.profile.username_telegram
},
getLinkUserTelegramByUser(userprofile: IUserFields) {
if (userprofile) {
if (!!userprofile.profile.username_telegram) {
return 'https://t.me/' + userprofile.profile.username_telegram
}
} else {
return ''
}
},
TelegCode() {
const userStore = useUserStore()
@@ -7395,6 +7414,14 @@ export const tools = {
link_telegram: '',
}
},
getdefaultnewrec_Catalog(): any {
return {
title: '',
active: true,
idCollana: '',
}
},
getdefaultnewrec_Circuit(): any {
return {
name: '',
@@ -7508,6 +7535,12 @@ export const tools = {
// if ((userStore.isAdmin || userStore.isManager))
// return true
if (shared_consts.TABLES_PER_EDITORI.includes(tablesel)) {
if (userStore.isEditor || userStore.isAdmin) {
return true
}
}
if (shared_consts.TABLES_WITH_ADMINS.includes(tablesel)) {
if (userStore.isAdmin)
return true
@@ -7520,7 +7553,7 @@ export const tools = {
}
}
}
if (rec.hasOwnProperty('userId')) {
@@ -8037,6 +8070,7 @@ export const tools = {
try {
let username = myrow.hasOwnProperty('username') ? myrow['username'] : ''
const userId = myrow.hasOwnProperty('userId') ? myrow['userId'] : ''
const id = myrow.hasOwnProperty('_id') ? myrow['_id'] : ''
if (username === '') {
if (userId === userStore.my._id)
@@ -8055,6 +8089,8 @@ export const tools = {
} else if (table === 'circuits') {
if (myrow.hasOwnProperty('path'))
ris = 'circuits/' + myrow['path']
} else if (table === 'catalogs') {
ris = 'catalogs/' + id
} else if (!!myrow && !!myrow.directory) {
ris = myrow.directory
} else if (table === 'myelems') {
@@ -8205,13 +8241,14 @@ export const tools = {
getoptionsMainCards(only: boolean) {
let myarr = []
let obj = { label: '', value: '', icon: '' }
let obj = { label: '', value: '', icon: '', color: '' }
for (let i = 0; i < costanti.MAINCARDS.length; i++) {
let rec: any = costanti.MAINCARDS[i]
if (rec.table && rec.showinoptions) {
obj.label = rec.title
obj.value = rec.table
obj.icon = rec.icon
obj.color = rec.color
myarr.push({ ...obj })
}
}
@@ -8398,6 +8435,8 @@ export const tools = {
return tools.getdefaultnewrec_MyGroup()
} else if (table === toolsext.TABCIRCUITS) {
return tools.getdefaultnewrec_Circuit()
} else if (table === toolsext.TABCATALOGS) {
return tools.getdefaultnewrec_Catalog()
}
return null
},
@@ -8606,6 +8645,10 @@ export const tools = {
},
}
} else if (table === toolsext.TABCATALOGS) {
return {
}
} else {
return {
// Servizi
@@ -9460,7 +9503,7 @@ export const tools = {
return myrec
},
adjustSize(optcatalogo: ICatalogo, mysize: any, add: number = 0) {
adjustSize(optcatalogo: IOptCatalogo, mysize: any, add: number = 0) {
if (!mysize) {
return '';
}
@@ -9551,7 +9594,7 @@ export const tools = {
return jsonResult;
},
getScale(optcatalogo: ICatalogo) {
getScale(optcatalogo: IOptCatalogo) {
if (optcatalogo.printable && optcatalogo.generazionePDFInCorso)
return optcatalogo.areadistampa!.scale_printable
else