fix Conti Collettivi + messaggi
This commit is contained in:
@@ -6287,7 +6287,7 @@ export const tools = {
|
||||
})
|
||||
},
|
||||
|
||||
removeFromMyCircuits($q: any, username: string, circuitname: string, domanda: any = '') {
|
||||
removeFromMyCircuits($q: any, username: string, circuitname: string, groupname?: string, domanda: any = '') {
|
||||
const userStore = useUserStore()
|
||||
|
||||
$q.dialog({
|
||||
@@ -6297,7 +6297,7 @@ export const tools = {
|
||||
title: t('db.domanda')
|
||||
}).onOk(() => {
|
||||
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REMOVE_FROM_MYLIST, null).then((res) => {
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REMOVE_FROM_MYLIST, null, {groupname}).then((res) => {
|
||||
if (res && res.result) {
|
||||
if (userStore.my.profile.mycircuits && username === userStore.my.username) {
|
||||
userStore.my.profile.mycircuits = userStore.my.profile.mycircuits.filter((rec: IMyCircuit) => rec.circuitname !== circuitname)
|
||||
@@ -6428,7 +6428,6 @@ export const tools = {
|
||||
return true
|
||||
}
|
||||
})
|
||||
// console.log('ris', ris)
|
||||
if (ris && ris.admins) {
|
||||
const isadmin = ris.admins.find((user: IFriends) => user.username === userStore.my.username)
|
||||
risultato = !!isadmin
|
||||
|
||||
@@ -254,8 +254,15 @@ export const useUserStore = defineStore('UserStore', {
|
||||
}
|
||||
},
|
||||
|
||||
GroupsListWhereIAmAdmin(circuitname: string): any {
|
||||
console.log('GL', circuitname)
|
||||
GroupsListWhereIAmAdmin(): any {
|
||||
try {
|
||||
return this.my.profile.manage_mygroups
|
||||
} catch (e) {
|
||||
return []
|
||||
}
|
||||
},
|
||||
|
||||
GroupsListWhereIAmAdminInTheCircuit(circuitname: string): any {
|
||||
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)
|
||||
@@ -265,6 +272,15 @@ export const useUserStore = defineStore('UserStore', {
|
||||
}
|
||||
},
|
||||
|
||||
hoContiComunitariDaAmministrare(): boolean {
|
||||
try {
|
||||
const arr: any = this.my.profile.manage_mygroups.filter((group: IMyGroup) => (group.mycircuits!.length > 0))
|
||||
return !!arr
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
},
|
||||
|
||||
hoContiCollettiviDaAmministrare(): boolean {
|
||||
const arr = this.my.profile.manage_mygroups.find((group: IMyGroup) => group.account)
|
||||
return arr ? true : false
|
||||
|
||||
Reference in New Issue
Block a user