fix bug list circuits and transactionsenabled

This commit is contained in:
Paolo Arena
2022-09-24 20:21:29 +02:00
parent bc2080c42c
commit 201d148e31
29 changed files with 299 additions and 332 deletions

View File

@@ -85,14 +85,17 @@ export default defineComponent({
}
async function loadCircuit() {
loading.value = true
// Carica il profilo di quest'utente
if (path.value) {
circuit.value = null
users_in_circuit.value = []
await userStore.loadCircuit(path.value, idnotif.value).then(({ data, status }: {data: any, status: number}) => {
console.log('data', data)
if (data) {
circuit.value = data.circuit
notifStore.setAsRead(idnotif.value)
users_in_circuit.value = data.users_in_circuit
circuit.value = data.circuit
} else {
circuit.value = null
users_in_circuit.value = []
@@ -100,34 +103,32 @@ export default defineComponent({
mystatus.value = status
loading.value = false
searchList.value = []
if (circuit.value) {
filtercustom.value = [
{
'profile.mycircuits':
{
$elemMatch: {
circuitname:
{ $eq: circuit.value.name }
}
}
},
]
}
arrfilterand.value = []
filtercustom_rich.value = []
// filtroutente.value = [{ userId: userStore.my._id }]
})
}
loading.value = false
}
async function mounted() {
loading.value = true
await loadCircuit()
searchList.value = []
if (circuit.value) {
filtercustom.value = [
{
'profile.mycircuits':
{
$elemMatch: {
circuitname:
{ $eq: circuit.value.name }
}
}
},
]
}
arrfilterand.value = []
filtercustom_rich.value = []
}
function getImgCircuit() {