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() {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div v-if="!tools.isLogged()">
|
||||
<CCheckIfIsLogged></CCheckIfIsLogged>
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="circuit">
|
||||
|
||||
<div v-if="circuit.name" class="fit column no-wrap justify-evenly items-center content-start">
|
||||
|
||||
@@ -100,10 +100,10 @@
|
||||
|
||||
<q-tabs v-model="tabgrp" class="text-blue">
|
||||
<q-tab :label="t('shared.info1')" name="info" icon="fas fa-info"></q-tab>
|
||||
<q-tab v-if="userStore.IsMyCircuitByName(circuit.name)" :label="t('circuit.movements')" name="mov" icon="fas fa-coins"></q-tab>
|
||||
<q-tab v-if="!!circuit.note" :label="t('circuit.page')" name="page" icon="fas fa-file-word"></q-tab>
|
||||
<q-tab v-if="tools.iCanShowCircuitsMember(circuit) || tools.iAmAdminCircuit(circuit.name)"
|
||||
:label="t('shared.subscribes')" name="members" icon="fas fa-users"></q-tab>
|
||||
<q-tab v-if="userStore.IsMyCircuitByName(circuit.name)" :label="t('circuit.movements')" name="mov" icon="fas fa-coins"></q-tab>
|
||||
<q-tab v-if="!!circuit.note" :label="t('circuit.page')" name="page" icon="fas fa-file-word"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabgrp" animated>
|
||||
@@ -113,7 +113,7 @@
|
||||
<q-toggle v-model="tabellare" label="Tabella"></q-toggle>
|
||||
|
||||
<CGridTableRec
|
||||
v-if="tabellare"
|
||||
v-if="tabellare && !loading"
|
||||
prop_mytable="movements"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyMovementTable"
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
</CGridTableRec>
|
||||
<CGridTableRec
|
||||
v-else
|
||||
v-else-if="!loading"
|
||||
prop_mytable="movements"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyMovement"
|
||||
@@ -256,8 +256,11 @@
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="$q.screen.lt.sm ? '' : 'row'">
|
||||
<div class="sezioni">
|
||||
<q-icon name="fas fa-stats" class="iconcirc"></q-icon>
|
||||
{{ t('circuit.stats') }}:<br>
|
||||
</div>
|
||||
<div :class="$q.screen.lt.sm ? '' : 'row'">
|
||||
<div v-if="circuit.totTransato" class="sezioni">
|
||||
<CCurrencyValue
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
@@ -340,7 +343,7 @@
|
||||
<q-tabs
|
||||
v-show="tools.iAmAdminCircuit(circuit.name)"
|
||||
v-model="tabmembers" class="text-blue">
|
||||
<q-tab label="Tutti" name="all" icon="fas fa-users"></q-tab>
|
||||
<q-tab label="Iscritti" name="all" icon="fas fa-users"></q-tab>
|
||||
<q-tab v-if="tools.iAmAdminCircuit(circuit.name)" label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
|
||||
<q-tab v-if="tools.iAmAdminCircuit(circuit.name)" label="Rifiutati" name="refused" icon="fas fa-user-minus"></q-tab>
|
||||
</q-tabs>
|
||||
@@ -351,6 +354,7 @@
|
||||
<!--<q-toggle v-model="showsaldi" :label="t('movement.showsaldi')"></q-toggle>-->
|
||||
|
||||
<CGridTableRec
|
||||
v-if="!loading"
|
||||
ref="tabMembri"
|
||||
prop_mytable="users"
|
||||
prop_mytitle=""
|
||||
@@ -382,6 +386,7 @@
|
||||
<q-tab-panel name="rich">
|
||||
|
||||
<CGridTableRec
|
||||
v-if="!loading"
|
||||
prop_mytable="circuits"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
|
||||
Reference in New Issue
Block a user