fix bug list circuits and transactionsenabled
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user