ver "0.5.8"
Lista movimenti in formato Tabella
This commit is contained in:
@@ -21,6 +21,7 @@ export const shared_consts = {
|
||||
QUERYTYPE_CIRCUIT: 10,
|
||||
QUERYTYPE_REFUSED_USER_CIRCUIT: 12,
|
||||
QUERYTYPE_LIST_MOVEMENTS: 15,
|
||||
QUERYTYPE_LIST_ALLMOVEMENTS: 16,
|
||||
|
||||
FILTER_EXTRALIST_NOT_REGISTERED: 1,
|
||||
FILTER_EXTRALIST_NOT_CONTACTED: 2,
|
||||
|
||||
@@ -326,6 +326,21 @@ export default defineComponent({
|
||||
refresh()
|
||||
}
|
||||
})
|
||||
watch(() => props.prop_mycolumns, (to: any, from: any) => {
|
||||
// console.log('watch searchlist', to)
|
||||
if (mycolumns.value !== props.prop_mycolumns) {
|
||||
mycolumns.value = props.prop_mycolumns
|
||||
refresh()
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => props.prop_mycolumns, (to: any, from: any) => {
|
||||
// console.log('watch searchlist', to)
|
||||
if (myvertical.value != props.vertical) {
|
||||
myvertical.value = props.vertical
|
||||
refresh()
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => showfilter.value, (newval: any, from: any) => {
|
||||
tools.setCookie('s_adv', newval ? '1' : '0')
|
||||
@@ -339,6 +354,13 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => props.extraparams, (to: any, from: any) => {
|
||||
// console.log('filtercustom', to)
|
||||
if (to != from) {
|
||||
refresh()
|
||||
}
|
||||
})
|
||||
|
||||
$router.beforeResolve((to: any) => {
|
||||
// console.log('beforeResolve', visupagedialog.value, 'to', to)
|
||||
|
||||
@@ -963,7 +985,7 @@ export default defineComponent({
|
||||
|
||||
serverData.value = []
|
||||
numRecLoaded.value = 0
|
||||
|
||||
pagination.value.page = 0
|
||||
search.value = search.value.trim()
|
||||
|
||||
// console.log('refresh')
|
||||
|
||||
@@ -197,9 +197,18 @@
|
||||
|
||||
<div v-if="pagination.rowsNumber === 1 && prop_search">{{ pagination.rowsNumber }} elemento trovato</div>
|
||||
<div v-if="pagination.rowsNumber > 1 && prop_search">{{ pagination.rowsNumber }} elementi trovati</div>
|
||||
|
||||
<div v-if="choose_visutype && $q.screen.gt.xs" class="">
|
||||
<q-radio v-model="myvertical" :val="2" label="Lista"/>
|
||||
<!--<q-radio v-if="mytable === toolsext.TAB" v-model="myvertical" :val="costanti.VISUTABLE_SCHEDA_GROUP"
|
||||
label="Scheda"
|
||||
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>
|
||||
<q-radio v-else-if="mytable !== toolsext.TABMYGROUPS && !finder" v-model="myvertical"
|
||||
:val="costanti.VISUTABLE_SCHEDA_USER" slabel="Scheda"
|
||||
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>-->
|
||||
<q-radio v-if="$q.screen.gt.xs" v-model="myvertical" :val="0" label="Tabella"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<q-infinite-scroll
|
||||
ref="myinfscroll"
|
||||
v-if="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
|
||||
@@ -339,7 +348,6 @@
|
||||
</div>
|
||||
</template>
|
||||
</q-infinite-scroll>
|
||||
|
||||
<q-table
|
||||
v-else
|
||||
:grid="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
|
||||
@@ -599,7 +607,7 @@
|
||||
<div v-if="pagination.rowsNumber === 1 && prop_search">{{ pagination.rowsNumber }} elemento trovato</div>
|
||||
<div v-if="pagination.rowsNumber > 1 && prop_search">{{ pagination.rowsNumber }} elementi trovati</div>
|
||||
|
||||
<div v-if="choose_visutype && $q.screen.gt.xs && isAdmin()" class="">
|
||||
<div v-if="choose_visutype && $q.screen.gt.xs" class="">
|
||||
<q-radio v-model="myvertical" :val="2" label="Lista"/>
|
||||
<!--<q-radio v-if="mytable === toolsext.TAB" v-model="myvertical" :val="costanti.VISUTABLE_SCHEDA_GROUP"
|
||||
label="Scheda"
|
||||
|
||||
@@ -553,6 +553,18 @@ export const colmyMovement = [
|
||||
|
||||
]
|
||||
|
||||
export const colmyMovementTable = [
|
||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
AddCol({ name: 'transactionDate', label_trans: 'movement.transactionDate', fieldtype: costanti.FieldType.date }),
|
||||
AddCol({ name: 'userfrom.username', field: 'userfrom', subfield: 'username', label_trans: 'movement.accountFromId', fieldtype: costanti.FieldType.string, required: true }),
|
||||
AddCol({ name: 'userto.username', field: 'userto', subfield: 'username', label_trans: 'movement.accountToId', fieldtype: costanti.FieldType.string, required: true }),
|
||||
|
||||
AddCol({ name: 'amount', label_trans: 'movement.amount',
|
||||
fieldtype: costanti.FieldType.currency, required: true, tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
AddCol({ name: 'causal', label_trans: 'movement.causal', tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
|
||||
]
|
||||
|
||||
export const colmyUserPeople = [
|
||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
|
||||
@@ -21,7 +21,7 @@ import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
||||
import { costanti } from '@costanti'
|
||||
import { ICity, IFriends, ICircuit, ISearchList, IUserFields, IAccount } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { colmyUserPeople, colmyUserCircuit, colmyMovement } from '@store/Modules/fieldsTable'
|
||||
import { colmyUserPeople, colmyUserCircuit, colmyMovement, colmyMovementTable } from '@store/Modules/fieldsTable'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
|
||||
@@ -39,6 +39,9 @@ export default defineComponent({
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const showonlymine = ref(true)
|
||||
const tabellare = ref(false)
|
||||
|
||||
const animation = ref('fade')
|
||||
|
||||
const path = computed(() => $route.params.path ? $route.params.path.toString() : '')
|
||||
@@ -161,13 +164,21 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function extraparams_movs() {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_LIST_MOVEMENTS,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
username: userStore.my.username,
|
||||
const extraparams_movs = (() => {
|
||||
if (showonlymine.value) {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_LIST_MOVEMENTS,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
username: userStore.my.username,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_LIST_ALLMOVEMENTS,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function extraparams_refused() {
|
||||
return {
|
||||
@@ -209,6 +220,7 @@ export default defineComponent({
|
||||
filtercustom_rich,
|
||||
searchList,
|
||||
colmyMovement,
|
||||
colmyMovementTable,
|
||||
colmyUserPeople,
|
||||
colmyUserCircuit,
|
||||
extraparams,
|
||||
@@ -230,6 +242,8 @@ export default defineComponent({
|
||||
circuitStore,
|
||||
qtarem,
|
||||
saldo,
|
||||
showonlymine,
|
||||
tabellare,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -107,7 +107,42 @@
|
||||
<q-tab-panels v-model="tabgrp" animated>
|
||||
<q-tab-panel name="mov">
|
||||
|
||||
<q-toggle v-model="showonlymine" label="Mostra solo i miei movimenti"></q-toggle>
|
||||
<q-toggle v-model="tabellare" label="Tabella"></q-toggle>
|
||||
|
||||
<CGridTableRec
|
||||
v-if="tabellare"
|
||||
prop_mytable="movements"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyMovementTable"
|
||||
prop_colkey="_id"
|
||||
col_title="Lista Movimenti"
|
||||
:vertical="0"
|
||||
nodataLabel="Nessun Movimento effettuato"
|
||||
:prop_search="true"
|
||||
hint="nota da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="false"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="movimenti non trovati con questa ricerca"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom_rich"
|
||||
:prop_searchList="searchList"
|
||||
:prop_pagination="{ sortBy: 'transactionDate', descending: true, page: 1, rowsNumber: 20, rowsPerPage: 20 }"
|
||||
:showType="costanti.SHOW_MOVEMENTS"
|
||||
keyMain=""
|
||||
:showCol="true"
|
||||
:showHeaderCol="true"
|
||||
:extraparams="extraparams_movs()"
|
||||
extrafield=""
|
||||
:visufind="costanti.FRIENDS"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
<CGridTableRec
|
||||
v-else
|
||||
prop_mytable="movements"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyMovement"
|
||||
@@ -115,14 +150,14 @@
|
||||
col_title="Lista Movimenti"
|
||||
:vertical="costanti.VISUTABLE_LISTA"
|
||||
nodataLabel="Nessun Movimento effettuato"
|
||||
:prop_search="false"
|
||||
hint="Username da trovare"
|
||||
:prop_search="true"
|
||||
hint="nota da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="false"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username non trovato"
|
||||
noresultLabel="movimenti non trovati con questa ricerca"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom_rich"
|
||||
:prop_searchList="searchList"
|
||||
|
||||
Reference in New Issue
Block a user