From 94f6fc7050755641418c8675f1c4ad8dbf3a81af Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 27 May 2021 18:45:30 +0200 Subject: [PATCH] pagination works in frontend but the API call does not work --- frontend/src/components/PaginationButtons.vue | 24 ++- .../src/views/Layout/DashboardLayout_gdd.vue | 10 +- frontend/src/views/Pages/AccountOverview.vue | 156 ++++++++-------- .../GddTransactionList.spec.js | 4 +- .../AccountOverview/GddTransactionList.vue | 169 +++++++++--------- .../Pages/UserProfileTransactionList.vue | 4 +- 6 files changed, 182 insertions(+), 185 deletions(-) diff --git a/frontend/src/components/PaginationButtons.vue b/frontend/src/components/PaginationButtons.vue index 3ef7588ae..82440a40e 100644 --- a/frontend/src/components/PaginationButtons.vue +++ b/frontend/src/components/PaginationButtons.vue @@ -3,8 +3,7 @@ - - + @@ -12,21 +11,20 @@ - - + diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index d6b9f44ff..b7dfe2b93 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -106,9 +106,13 @@ export default { this.$store.dispatch('logout') this.$router.push('/login') }, - async updateTransactions() { + async updateTransactions(pagination) { this.pending = true - const result = await communityAPI.transactions(this.$store.state.sessionId) + const result = await communityAPI.transactions( + this.$store.state.sessionId, + pagination.firstPage, + pagination.items, + ) if (result.success) { this.GdtBalance = Number(result.result.data.gdtSum) this.transactions = result.result.data.transactions @@ -129,7 +133,7 @@ export default { this.initScrollbar() }, created() { - this.updateTransactions() + this.updateTransactions({ firstPage: 1, items: 5 }) }, } diff --git a/frontend/src/views/Pages/AccountOverview.vue b/frontend/src/views/Pages/AccountOverview.vue index 33e1c99fb..f25cce48b 100644 --- a/frontend/src/views/Pages/AccountOverview.vue +++ b/frontend/src/views/Pages/AccountOverview.vue @@ -41,86 +41,86 @@