Conto Comunitario all'interno di un Circuito
This commit is contained in:
@@ -5653,7 +5653,11 @@ export const tools = {
|
||||
acceptCoins($q: any, username: string, notif: any) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const notifStore = useNotifStore()
|
||||
|
||||
notif.extrarec.notifId = notif._id
|
||||
notif.extrarec.lastdr = notifStore.getLastDataRead(username)
|
||||
|
||||
userStore.setCircuitCmd($q, t, username, notif.extrarec.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT, 0, notif.extrarec)
|
||||
.then((res: any) => {
|
||||
if (res) {
|
||||
@@ -5671,7 +5675,10 @@ export const tools = {
|
||||
refuseCoins($q: any, username: string, notif: any) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const notifStore = useNotifStore()
|
||||
|
||||
notif.extrarec.notifId = notif._id
|
||||
notif.extrarec.lastdr = notifStore.getLastDataRead(username)
|
||||
userStore.setCircuitCmd($q, t, username, notif.extrarec.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_REFUSE, 0, notif.extrarec)
|
||||
.then((res: any) => {
|
||||
if (res && res.result) {
|
||||
@@ -7306,9 +7313,13 @@ export const tools = {
|
||||
let type = costanti.TypeMov.Nessuno
|
||||
if (rec && rec.userfrom) {
|
||||
const userStore = useUserStore()
|
||||
if (userStore.my.username === rec.userfrom.username) {
|
||||
if (rec.userfrom && userStore.my.username === rec.userfrom.username) {
|
||||
type = costanti.TypeMov.Uscita
|
||||
} else if (userStore.my.username === rec.userto.username) {
|
||||
} else if (rec.userto && userStore.my.username === rec.userto.username) {
|
||||
type = costanti.TypeMov.Entrata
|
||||
} else if (rec.groupfrom && tools.isUserAdminGroup(rec.groupfrom.groupname, userStore.my.username)) {
|
||||
type = costanti.TypeMov.Uscita
|
||||
} else if (rec.groupto && tools.isUserAdminGroup(rec.groupto.groupname, userStore.my.username)) {
|
||||
type = costanti.TypeMov.Entrata
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user