Add to the Circuit

Remove to the Circuit
Revoke request
Users Admins
This commit is contained in:
paoloar77
2022-09-02 02:25:17 +02:00
parent 1f414e19ea
commit 037ce99485
27 changed files with 438 additions and 206 deletions

View File

@@ -67,14 +67,10 @@ export default defineComponent({
return userStore.my.profile
}
function circuitname() {
return userStore.my.username
}
async function loadCircuit() {
// Carica il profilo di quest'utente
if (path.value) {
await userStore.loadCIrcuit(path.value, idnotif.value).then(({ data, status }: {data: any, status: number}) => {
await userStore.loadCircuit(path.value, idnotif.value).then(({ data, status }: {data: any, status: number}) => {
console.log('data', data)
if (data) {
circuit.value = data.circuit
@@ -99,7 +95,9 @@ export default defineComponent({
await loadCircuit()
searchList.value = []
filtercustom.value = [{ 'profile.listUserAccounts': { $elemMatch: {circuitId: {$eq: path.value }} } } ]
if (circuit.value) {
filtercustom.value = [{ 'profile.mycircuits': { $elemMatch: { circuitname: { $eq: circuit.value.name } } } }]
}
arrfilterand.value = []
filtercustom_rich.value = []
@@ -118,8 +116,6 @@ export default defineComponent({
}
function extraparams() {
let lk_tab = 'users'
let lk_LF = 'userId'
@@ -175,7 +171,6 @@ export default defineComponent({
onMounted(mounted)
return {
name,
profile,
tools,
costanti,
@@ -186,7 +181,6 @@ export default defineComponent({
filtroutente,
showPic,
circuitname,
userStore,
t,
animation,