ver: 0.5.62
Conti Collettivi visibili solo se sei admin...
This commit is contained in:
@@ -254,8 +254,15 @@ export const useUserStore = defineStore('UserStore', {
|
||||
}
|
||||
},
|
||||
|
||||
GroupsListWhereIAmAdmin(): IMyGroup[] {
|
||||
return this.my.profile.manage_mygroups
|
||||
GroupsListWhereIAmAdmin(circuitname: string): any {
|
||||
console.log('GL', circuitname)
|
||||
try {
|
||||
const arr: any = this.my.profile.manage_mygroups.filter((group: IMyGroup) => (group.mycircuits!.findIndex((circ: IMyCircuit) => circ.circuitname === circuitname) >= 0))
|
||||
console.log('arr', arr)
|
||||
return arr
|
||||
} catch (e) {
|
||||
return []
|
||||
}
|
||||
},
|
||||
|
||||
hoContiCollettiviDaAmministrare(): boolean {
|
||||
@@ -1288,13 +1295,21 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
async loadCircuit(path: string, idnotif: string) {
|
||||
const notifStore = useNotifStore()
|
||||
const data = {
|
||||
path,
|
||||
idnotif,
|
||||
lastdr: notifStore.getLastDataRead(this.my.username),
|
||||
}
|
||||
|
||||
return Api.SendReq('/circuit/load', 'POST', data)
|
||||
.then((res) => {
|
||||
if (res && res.data.arrrecnotif) {
|
||||
notifStore.updateArrRecNotifFromServer(res.data.arrrecnotif)
|
||||
}
|
||||
if (res.data.useraccounts && res.data.useraccounts.length > 0) {
|
||||
this.my.profile.useraccounts = res.data.useraccounts
|
||||
}
|
||||
return { data: res.data, status: res.status }
|
||||
}).catch((error) => {
|
||||
return { data: null, status: error.status }
|
||||
|
||||
Reference in New Issue
Block a user