show table movements
This commit is contained in:
@@ -47,12 +47,14 @@ export default defineComponent({
|
||||
const filtroutente = ref(<any[]>[])
|
||||
const showPic = ref(false)
|
||||
|
||||
const tabcircuit = ref('info')
|
||||
|
||||
const mygrp = ref(<IMyGroup | null>{})
|
||||
const mystatus = ref(<number>0)
|
||||
const users_in_group = ref(<IFriends[]>[])
|
||||
|
||||
const showonlymine = ref(true)
|
||||
const tabellare = ref(false)
|
||||
const circuitIndex = ref(0)
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -68,6 +70,7 @@ export default defineComponent({
|
||||
const cities = ref(<ICity[]>[])
|
||||
|
||||
const circuitslist = ref(<ICircuit[]>[])
|
||||
const circuitslistOpt = ref(<any[]>[])
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
@@ -93,10 +96,12 @@ export default defineComponent({
|
||||
if (mygrp.value)
|
||||
circuitslist.value = circuitStore.getCircuitsListByGroup(mygrp.value)
|
||||
|
||||
/*if (mygrp.value && tools.iAmAdminGroup(groupname.value)) {
|
||||
}*/
|
||||
/*if (mygrp.value && tools.iAmAdminGroup(groupname.value)) {
|
||||
}*/
|
||||
if (circuitslist.value) {
|
||||
circuitslistOpt.value = []
|
||||
for (let i = 0; i < circuitslist.value.length; i++) {
|
||||
circuitslistOpt.value.push({label: circuitslist.value[i].name, value: i })
|
||||
let myc = data.mygroup.mycircuits.find((circ: IMyCircuit) => circ.circuitname === circuitslist.value[i].name)
|
||||
if (myc) {
|
||||
circuitslist.value[i].account = myc.account
|
||||
@@ -225,19 +230,11 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
|
||||
function getExtraparams_movs_grp (circuit: ICircuit): any {
|
||||
if (showonlymine.value) {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_LIST_MOVEMENTS_GROUPNAME,
|
||||
myid: circuit ? circuit._id : '',
|
||||
groupname: mygrp.value ? mygrp.value.groupname : '',
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_LIST_ALLMOVEMENTS,
|
||||
myid: circuit ? circuit._id : '',
|
||||
}
|
||||
|
||||
function getExtraparams_movs_grp(circuit: ICircuit): any {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_LIST_MOVEMENTS_GROUPNAME,
|
||||
myid: circuit ? circuit._id : '',
|
||||
groupname: mygrp.value ? mygrp.value.groupname : '',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,10 +280,12 @@ export default defineComponent({
|
||||
circuitslist,
|
||||
circuitStore,
|
||||
getExtraparams_movs_grp,
|
||||
showonlymine,
|
||||
tabellare,
|
||||
colmyMovementTable,
|
||||
colmyMovement,
|
||||
tabcircuit,
|
||||
circuitIndex,
|
||||
circuitslistOpt,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -488,6 +488,42 @@
|
||||
</q-tab-panels>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="circuits">
|
||||
<q-select
|
||||
v-model="circuitIndex"
|
||||
:options="circuitslistOpt"
|
||||
emit-value
|
||||
map-options
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon :name="iconsel" />
|
||||
</template>
|
||||
<template v-slot:option="scope">
|
||||
<q-item v-bind="scope.itemProps">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ scope.opt.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
|
||||
<q-tabs v-model="tabcircuit" class="text-blue" no-caps>
|
||||
<q-tab
|
||||
:label="t('shared.info1')"
|
||||
name="info"
|
||||
icon="fas fa-info"
|
||||
></q-tab>
|
||||
<q-tab
|
||||
:label="t('circuit.movements')"
|
||||
name="mov"
|
||||
icon="fas fa-coins"
|
||||
></q-tab>
|
||||
</q-tabs>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<q-tab-panels v-model="tabcircuit" animated>
|
||||
<q-tab-panel name="info" style="max-width: 500px">
|
||||
<div v-for="(circuit, ind) of circuitslist" :key="ind">
|
||||
<div class="circuit_name">{{ circuit.name }}:</div>
|
||||
<CInfoAccount
|
||||
@@ -496,11 +532,10 @@
|
||||
:account="circuit.account"
|
||||
:admin="tools.iAmAdminCircuit(circuit.name)"
|
||||
/>
|
||||
|
||||
<q-toggle
|
||||
v-model="showonlymine"
|
||||
:label="t('movement.onlymymov')"
|
||||
></q-toggle>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="mov">
|
||||
<div v-if="circuitslist && circuitslist.length > 0">
|
||||
<q-toggle v-model="tabellare" label="Tabella"></q-toggle>
|
||||
|
||||
<CGridTableRec
|
||||
@@ -532,7 +567,7 @@
|
||||
:showType="costanti.SHOW_MOVEMENTS"
|
||||
:showCol="true"
|
||||
:showHeaderCol="true"
|
||||
:extraparams="getExtraparams_movs_grp(circuit)"
|
||||
:extraparams="getExtraparams_movs_grp(circuitslist[circuitIndex])"
|
||||
extrafield=""
|
||||
:visufind="costanti.FRIENDS"
|
||||
>
|
||||
@@ -565,7 +600,7 @@
|
||||
:showType="costanti.SHOW_MOVEMENTS"
|
||||
:showCol="false"
|
||||
:showHeaderCol="false"
|
||||
:extraparams="getExtraparams_movs_grp(circuit)"
|
||||
:extraparams="getExtraparams_movs_grp(circuitslist[circuitIndex])"
|
||||
extrafield=""
|
||||
:visufind="costanti.FRIENDS"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user