Lista Richieste e Rifiutati dei Conti Collettivi

This commit is contained in:
Surya Paolo
2023-02-16 20:13:55 +01:00
parent 239cfbe835
commit 1f5be4624f
8 changed files with 323 additions and 126 deletions

View File

@@ -277,6 +277,8 @@ export const costanti = {
REQ_REMOVE_USER_TO_GROUP: 101,
REQ_ADD_USER_TO_CIRCUIT: 110,
REQ_REMOVE_USER_TO_CIRCUIT: 111,
REQ_ADD_GROUP_TO_CIRCUIT: 120,
REQ_REMOVE_GROUP_TO_CIRCUIT: 121,
FILTER_NESSUNO: 0,
FILTER_TUTTI: -100,

View File

@@ -5632,6 +5632,38 @@ export const tools = {
})
},
addGroupToMyCircuits($q: any, groupname: string, circuitname: string) {
const userStore = useUserStore()
const notifStore = useNotifStore()
$q.dialog({
message: t('db.domanda_addgrouptocircuit', { groupname, circuitname }),
ok: { label: t('dialog.yes'), push: true },
cancel: { label: t('dialog.cancel') },
title: t('db.domanda')
}).onOk(() => {
let extrarec = {
groupname,
}
userStore.setCircuitCmd($q, t, userStore.my.username, circuitname, shared_consts.CIRCUITCMD.SET, true, extrarec)
.then((res: any) => {
if (res && res.result) {
this.updateMyData(res)
notifStore.updateNotification = true
if (res.circuit) {
if (userStore.my.profile.mycircuits)
userStore.my.profile.mycircuits = [...userStore.my.profile.mycircuits, res.circuit]
else
userStore.my.profile.mycircuits = [res]
}
tools.showPositiveNotif($q, t('db.addedcircuit', { circuitname }))
}
})
})
},
addToMyGroups($q: any, username: string, groupnameDest: string) {
const userStore = useUserStore()