fix nametoshow

This commit is contained in:
Surya Paolo
2023-02-02 02:52:27 +01:00
parent d5831e3dbf
commit f79c3b1d77

View File

@@ -337,7 +337,7 @@ export const useUserStore = defineStore('UserStore', {
value = row[col.name] value = row[col.name]
} }
let tipoconto = costanti.AccountType.USER let tipoconto = costanti.AccountType.USER
if (row.hasOwnProperty(col.tipoconto) && col.tipoconto) { if (col.hasOwnProperty('tipoconto') && col.tipoconto) {
tipoconto = col.tipoconto tipoconto = col.tipoconto
} }
let img = '' let img = ''
@@ -366,9 +366,14 @@ export const useUserStore = defineStore('UserStore', {
if (!reale) if (!reale)
img = 'images/noimg-user.svg' img = 'images/noimg-user.svg'
if (col.tipoconto === costanti.AccountType.COLLECTIVE_ACCOUNT) { let tipoconto = costanti.AccountType.USER
if (col.hasOwnProperty('tipoconto') && col.tipoconto) {
tipoconto = col.tipoconto
}
if (tipoconto === costanti.AccountType.COLLECTIVE_ACCOUNT) {
img = this.getImgByGroupname(myrec.groupname) img = this.getImgByGroupname(myrec.groupname)
} else if (col.tipoconto === costanti.AccountType.COMMUNITY_ACCOUNT) { } else if (tipoconto === costanti.AccountType.COMMUNITY_ACCOUNT) {
img = this.getImgByCircuitpath(myrec.path) img = this.getImgByCircuitpath(myrec.path)
} else { } else {
if (myrec.profile && myrec.profile.img) { if (myrec.profile && myrec.profile.img) {
@@ -568,7 +573,12 @@ export const useUserStore = defineStore('UserStore', {
let name = '' let name = ''
let myrec = this.getRecByCol(user, col) let myrec = this.getRecByCol(user, col)
if (col.tipoconto === costanti.AccountType.USER) { let tipoconto = costanti.AccountType.USER
if (col && col.hasOwnProperty('tipoconto')) {
tipoconto = col.tipoconto
}
if (tipoconto === costanti.AccountType.USER) {
if (!!myrec.name) if (!!myrec.name)
name = myrec.name + ' ' name = myrec.name + ' '
if (!!myrec.surname) if (!!myrec.surname)
@@ -580,9 +590,9 @@ export const useUserStore = defineStore('UserStore', {
if (col && col.field === 'extrarec' && !name) { if (col && col.field === 'extrarec' && !name) {
name = myrec.dest name = myrec.dest
} }
} else if (col.tipoconto === costanti.AccountType.COLLECTIVE_ACCOUNT) { } else if (tipoconto === costanti.AccountType.COLLECTIVE_ACCOUNT) {
return myrec.descr return myrec.descr
} else if (col.tipoconto === costanti.AccountType.COMMUNITY_ACCOUNT) { } else if (tipoconto === costanti.AccountType.COMMUNITY_ACCOUNT) {
return myrec.name return myrec.name
} }