Add to the Circuit
Remove to the Circuit Revoke request Users Admins
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
import {
|
||||
ICircuit,
|
||||
ICircuit, IMyCircuit,
|
||||
IFriends, IMsgGlobParam,
|
||||
ISigninOptions,
|
||||
ISignupOptions, IUserFields, IUserNotifType, IUserProfile, IUserState,
|
||||
@@ -54,6 +54,7 @@ export const DefaultUser: IUserFields = {
|
||||
friends: [],
|
||||
req_friends: [],
|
||||
mygroups: [],
|
||||
mycircuits: [],
|
||||
manage_mygroups: [],
|
||||
asked_friends: [],
|
||||
asked_groups: [],
|
||||
@@ -66,7 +67,6 @@ export const DefaultUser: IUserFields = {
|
||||
notif_sector_goods: [],
|
||||
asked_circuits: [],
|
||||
refused_circuits: [],
|
||||
listUserAccounts: [],
|
||||
manage_mycircuits: [],
|
||||
},
|
||||
cart: {
|
||||
@@ -110,6 +110,7 @@ export const DefaultProfile: IUserProfile = {
|
||||
friends: [],
|
||||
req_friends: [],
|
||||
mygroups: [],
|
||||
mycircuits: [],
|
||||
manage_mygroups: [],
|
||||
asked_friends: [],
|
||||
asked_groups: [],
|
||||
@@ -123,7 +124,6 @@ export const DefaultProfile: IUserProfile = {
|
||||
|
||||
asked_circuits: [],
|
||||
refused_circuits: [],
|
||||
listUserAccounts: [],
|
||||
manage_mycircuits: [],
|
||||
}
|
||||
|
||||
@@ -288,26 +288,26 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
|
||||
IsAskedCircuitByName(groupname: string): boolean {
|
||||
IsAskedCircuitByName(name: string): boolean {
|
||||
if (this.my.profile.asked_circuits)
|
||||
return this.my.profile.asked_circuits.findIndex((rec: IMyGroup) => rec.groupname === groupname) >= 0
|
||||
return this.my.profile.asked_circuits.findIndex((rec: ICircuit) => rec.name === name) >= 0
|
||||
else
|
||||
return false
|
||||
},
|
||||
|
||||
|
||||
IsMyCircuitByName(name: string): boolean {
|
||||
IsMyCircuitByName(circuitname: string): boolean {
|
||||
|
||||
if (this.my.profile.manage_mycircuits)
|
||||
return this.my.profile.manage_mycircuits.findIndex((rec: ICircuit) => rec.name === name) >= 0
|
||||
if (this.my.profile.mycircuits)
|
||||
return this.my.profile.mycircuits.findIndex((rec: IMyCircuit) => rec.circuitname === circuitname) >= 0
|
||||
else
|
||||
return false
|
||||
|
||||
},
|
||||
|
||||
IsRefusedCircuitByName(name: string): boolean {
|
||||
IsRefusedCircuitByName(circuitname: string): boolean {
|
||||
if (this.my.profile.refused_circuits)
|
||||
return this.my.profile.refused_circuits.findIndex((rec: ICircuit) => rec.name === name) >= 0
|
||||
return this.my.profile.refused_circuits.findIndex((rec: ICircuit) => rec.name === circuitname) >= 0
|
||||
else
|
||||
return false
|
||||
},
|
||||
@@ -1108,7 +1108,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
async loadCIrcuit(path: string, idnotif: string) {
|
||||
async loadCircuit(path: string, idnotif: string) {
|
||||
const data = {
|
||||
path,
|
||||
idnotif,
|
||||
@@ -1210,8 +1210,8 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
async setCircuitCmd($q: any, t: any, usernameOrig: string, name: string, cmd: number, value: any) {
|
||||
return Api.SendReq('/users/circuits/cmd', 'POST', { usernameOrig, name, cmd, value })
|
||||
async setCircuitCmd($q: any, t: any, usernameOrig: string, circuitname: string, cmd: number, value: any) {
|
||||
return Api.SendReq('/users/circuits/cmd', 'POST', { usernameOrig, circuitname, cmd, value })
|
||||
.then((res) => {
|
||||
this.updateTables = true
|
||||
return res.data
|
||||
|
||||
Reference in New Issue
Block a user