mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add pagination, add row prepared for linkList Count
This commit is contained in:
parent
33fb3bbe8c
commit
45c8a719bc
@ -4,6 +4,14 @@
|
||||
{{ $t('transactionlink.form_header') }}
|
||||
<b-table striped hover :fields="fields" :items="items"></b-table>
|
||||
</div>
|
||||
<b-pagination
|
||||
pills
|
||||
size="lg"
|
||||
v-model="currentPage"
|
||||
per-page="perPage"
|
||||
:total-rows="rows"
|
||||
align="center"
|
||||
></b-pagination>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -40,6 +48,9 @@ export default {
|
||||
},
|
||||
],
|
||||
items: [],
|
||||
rows: 0,
|
||||
currentPage: 1,
|
||||
perPage: 5,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -48,12 +59,13 @@ export default {
|
||||
.query({
|
||||
query: listTransactionLinksAdmin,
|
||||
variables: {
|
||||
currentPage: 1,
|
||||
pageSize: 5,
|
||||
currentPage: this.currentPage,
|
||||
pageSize: this.perPage,
|
||||
userId: this.userId,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
// this.rows = result.data.length
|
||||
this.items = result.data.listTransactionLinksAdmin
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -64,5 +76,10 @@ export default {
|
||||
created() {
|
||||
this.getListTransactionLinks()
|
||||
},
|
||||
watch: {
|
||||
currentPage() {
|
||||
this.getListTransactionLinks()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user