sito Terra Della Visione...3
Pagina Operatori
This commit is contained in:
@@ -210,9 +210,16 @@ export const useUserStore = defineStore('UserStore', {
|
||||
// Check if is this User!
|
||||
if (this.my.username === username) return this.my
|
||||
|
||||
let trovato = null
|
||||
let trovato:any = null
|
||||
if (this.usersList) trovato = this.usersList.find((item: any) => item.username === username)
|
||||
|
||||
if (trovato) {
|
||||
if (trovato.surname === 'undefined')
|
||||
trovato.surname = ''
|
||||
if (trovato.name === 'undefined')
|
||||
trovato.name = ''
|
||||
}
|
||||
|
||||
return (trovato) || null
|
||||
},
|
||||
|
||||
@@ -280,13 +287,13 @@ export const useUserStore = defineStore('UserStore', {
|
||||
getNameSurnameByUserId(userId: string): string {
|
||||
|
||||
const user = this.getUserByUserId(userId)
|
||||
if (user) return `${user.name} ${user.surname}`
|
||||
if (user) return `${user.name} ` + !!user.surname ? user.surname : ''
|
||||
return `(${userId})`
|
||||
},
|
||||
|
||||
getNameSurnameByUsername(username: string): string {
|
||||
const user = this.getUserByUsername(username)
|
||||
if (user) return `${user.name} ${user.surname}`
|
||||
let user = this.getUserByUsername(username)
|
||||
if (user) return `${user.name} ` + !!user.surname ? user.surname : ''
|
||||
return `(${username})`
|
||||
},
|
||||
|
||||
@@ -294,10 +301,17 @@ export const useUserStore = defineStore('UserStore', {
|
||||
// Check if is this User!
|
||||
if (this.my._id === userId) return this.my
|
||||
|
||||
let trovato = null
|
||||
let trovato:any = null
|
||||
|
||||
if (this.usersList) trovato = this.usersList.find((item: any) => item._id === userId)
|
||||
|
||||
if (trovato) {
|
||||
if (trovato.surname === undefined)
|
||||
trovato.surname = ''
|
||||
if (trovato.name === undefined)
|
||||
trovato.name = ''
|
||||
}
|
||||
|
||||
return (trovato) || null
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user