- Statistiche

- Menu e Sottomenu
- Lista ultimi Movimenti
This commit is contained in:
Surya Paolo
2024-09-26 02:14:50 +02:00
parent 4ac0acc2f3
commit 4c9e5ae991
101 changed files with 2215 additions and 9516 deletions

View File

@@ -16,6 +16,7 @@ import {
ISignupIscrizioneConacreisOptions,
ISignupIscrizioneArcadeiOptions,
ISettings,
IMovQuery,
} from '@src/model'
import { tools } from '@store/Modules/tools'
import translate from '@src/globalroutines/util'
@@ -415,16 +416,16 @@ export const useUserStore = defineStore('UserStore', {
if (row.hasOwnProperty(col.name)) {
value = row[col.name]
}
let tipoconto = costanti.AccountType.USER
let tipoconto = shared_consts.AccountType.USER
if (col.hasOwnProperty('tipoconto') && col.tipoconto) {
tipoconto = col.tipoconto
}
let img = ''
if (tipoconto === costanti.AccountType.USER) {
if (tipoconto === shared_consts.AccountType.USER) {
img = this.getImgByUsername(value)
} else if (tipoconto === costanti.AccountType.COLLECTIVE_ACCOUNT) {
} else if (tipoconto === shared_consts.AccountType.COLLECTIVE_ACCOUNT) {
img = this.getImgByGroupname(value)
} else if (tipoconto === costanti.AccountType.COMMUNITY_ACCOUNT) {
} else if (tipoconto === shared_consts.AccountType.COMMUNITY_ACCOUNT) {
img = this.getImgByCircuitpath(value)
}
@@ -445,14 +446,14 @@ export const useUserStore = defineStore('UserStore', {
if (!reale)
img = 'images/noimg-user.svg'
let tipoconto = costanti.AccountType.USER
let tipoconto = shared_consts.AccountType.USER
if (col && col.hasOwnProperty('tipoconto') && col.tipoconto) {
tipoconto = col.tipoconto
}
if (tipoconto === costanti.AccountType.COLLECTIVE_ACCOUNT) {
if (tipoconto === shared_consts.AccountType.COLLECTIVE_ACCOUNT) {
img = this.getImgByGroupname(myrec.groupname)
} else if (tipoconto === costanti.AccountType.COMMUNITY_ACCOUNT) {
} else if (tipoconto === shared_consts.AccountType.COMMUNITY_ACCOUNT) {
img = this.getImgByCircuitpath(myrec.path)
} else {
if (myrec.profile && myrec.profile.img) {
@@ -470,6 +471,35 @@ export const useUserStore = defineStore('UserStore', {
return ''
},
getImgByMov(mov: IMovQuery, tipoconto: number, from: boolean, reale: boolean): string {
try {
let img = ''
if (!reale)
img = 'images/noimg-user.svg'
if (tipoconto === shared_consts.AccountType.COLLECTIVE_ACCOUNT) {
img = this.getImgByGroup(from ? mov.groupfrom : mov.groupto)
// img = this.getImgByGroupname(from ? mov.groupfrom.groupname : mov.groupto.groupname)
} else if (tipoconto === shared_consts.AccountType.COMMUNITY_ACCOUNT) {
img = this.getImgByCircuitpath(from ? mov.contocomfrom.path : mov.contocomto.path)
} else {
let myuser = from ? mov.userfrom : mov.userto
if (myuser && myuser.profile.img) {
img = costanti.DIR_UPLOAD + 'profile/' + myuser.username + '/' + myuser.profile.img
}
}
return img
} catch (e) {
//
}
if (!reale)
return 'images/noimg-user.svg'
else
return ''
},
IsAskedCircuitByName(name: string): boolean {
if (this.my.profile.asked_circuits && this.my.profile.asked_circuits.length > 0)
@@ -621,7 +651,7 @@ export const useUserStore = defineStore('UserStore', {
return this.getImgByCircuit(mycirc)
},
getImgByGroup(group: IMyGroup | null): string {
getImgByGroup(group: any): string {
try {
// ++Todo: Sistemare!
@@ -718,12 +748,12 @@ export const useUserStore = defineStore('UserStore', {
let name = ''
let myrec = this.getRecByCol(user, col)
let tipoconto = costanti.AccountType.USER
let tipoconto = shared_consts.AccountType.USER
if (col && col.hasOwnProperty('tipoconto')) {
tipoconto = col.tipoconto
}
if (tipoconto === costanti.AccountType.USER) {
if (tipoconto === shared_consts.AccountType.USER) {
if (!!myrec.name)
name = myrec.name + ' '
if (!!myrec.surname)
@@ -735,14 +765,14 @@ export const useUserStore = defineStore('UserStore', {
if (col && col.field === 'extrarec' && !name) {
name = myrec.dest
}
} else if (tipoconto === costanti.AccountType.COLLECTIVE_ACCOUNT) {
} else if (tipoconto === shared_consts.AccountType.COLLECTIVE_ACCOUNT) {
if (myrec.hasOwnProperty('descr'))
return myrec.descr
else if (myrec.hasOwnProperty('groupname'))
return myrec.groupname
else if (myrec.hasOwnProperty('grouporig'))
return myrec.grouporig
} else if (tipoconto === costanti.AccountType.COMMUNITY_ACCOUNT) {
} else if (tipoconto === shared_consts.AccountType.COMMUNITY_ACCOUNT) {
if (myrec.hasOwnProperty('name'))
return myrec.name
else if (myrec.hasOwnProperty('contocom'))
@@ -1451,8 +1481,8 @@ export const useUserStore = defineStore('UserStore', {
if (isLogged) {
// console.log('this.isLogged', this.isLogged)
if (!tools.isMobile)
globalStore.setleftDrawerOpen(localStorage.getItem(toolsext.localStorage.leftDrawerOpen) === 'true')
//if (!tools.isMobile)
// globalStore.setleftDrawerOpen(localStorage.getItem(toolsext.localStorage.leftDrawerOpen) === 'true')
globalStore.setCategorySel(localStorage.getItem(toolsext.localStorage.categorySel))
await globalStore.checkUpdates()