From 612d8b736b5a9d0918f1bd951b0a81fbf25b35ae Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Sun, 27 Apr 2025 15:49:25 +0200 Subject: [PATCH 1/3] show skeleton only as long as transactionslist is loaded --- .../src/components/GddTransactionList.vue | 2 +- frontend/src/graphql/transactions.graphql | 56 ++++++++++ frontend/src/layouts/DashboardLayout.vue | 104 +++++++----------- frontend/src/pages/Community.vue | 4 - frontend/src/pages/InfoStatistic.vue | 8 -- frontend/src/pages/Send.vue | 3 - 6 files changed, 98 insertions(+), 79 deletions(-) create mode 100644 frontend/src/graphql/transactions.graphql diff --git a/frontend/src/components/GddTransactionList.vue b/frontend/src/components/GddTransactionList.vue index 8396f8d52..b4d188374 100644 --- a/frontend/src/components/GddTransactionList.vue +++ b/frontend/src/components/GddTransactionList.vue @@ -101,7 +101,7 @@ export default { this.updateTransactions() }, timestamp: { - immediate: true, + immediate: false, handler: 'updateTransactions', }, }, diff --git a/frontend/src/graphql/transactions.graphql b/frontend/src/graphql/transactions.graphql new file mode 100644 index 000000000..eff0abbb5 --- /dev/null +++ b/frontend/src/graphql/transactions.graphql @@ -0,0 +1,56 @@ +fragment balanceFields on Balance { + balance + balanceGDT + count + linkCount +} + +fragment transactionFields on Transaction { + id + typeId + amount + balance + previousBalance + balanceDate + memo + linkedUser { + firstName + lastName + communityUuid + communityName + gradidoID + alias + } + decay { + decay + start + end + duration + } + linkId +} + +query transactionsQuery($currentPage: Int = 1, $pageSize: Int = 25, $order: Order = DESC) { + transactionList(currentPage: $currentPage, pageSize: $pageSize, order: $order) { + balance { + ...balanceFields + } + transactions { + ...transactionFields + } + } +} + +query transactionsUserCountQuery($currentPage: Int = 1, $pageSize: Int = 25, $order: Order = DESC) { + transactionList(currentPage: $currentPage, pageSize: $pageSize, order: $order) { + balance { + ...balanceFields + } + transactions { + ...transactionFields + } + } + communityStatistics { + totalUsers + } +} \ No newline at end of file diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vue index 95bd858f9..6ac0bcb51 100755 --- a/frontend/src/layouts/DashboardLayout.vue +++ b/frontend/src/layouts/DashboardLayout.vue @@ -187,11 +187,10 @@