From 8989b6f50ed4314d5bb7b39c5e8494c696095b45 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 21 Sep 2022 13:33:32 +0200 Subject: [PATCH] Change query of the creationTransactionList, add new parameters to CreationTransactionList and add translations. --- .../components/CreationTransactionList.vue | 30 ++++++++++++------- admin/src/graphql/creationTransactionList.js | 17 ++++++----- admin/src/locales/de.json | 2 ++ admin/src/locales/en.json | 2 ++ 4 files changed, 32 insertions(+), 19 deletions(-) diff --git a/admin/src/components/CreationTransactionList.vue b/admin/src/components/CreationTransactionList.vue index ed0b911a5..8bf27c275 100644 --- a/admin/src/components/CreationTransactionList.vue +++ b/admin/src/components/CreationTransactionList.vue @@ -28,19 +28,34 @@ export default { return { fields: [ { - key: 'creationDate', + key: 'createdAt', label: this.$t('transactionlist.submitted'), formatter: (value, key, item) => { return this.$d(new Date(value)) }, }, { - key: 'balanceDate', - label: this.$t('transactionlist.confirmed'), + key: 'contributionDate', + label: this.$t('transactionlist.period'), formatter: (value, key, item) => { return this.$d(new Date(value)) }, }, + { + key: 'confirmedAt', + label: this.$t('transactionlist.confirmed'), + formatter: (value, key, item) => { + if (value) { + return this.$d(new Date(value)) + } else { + return null + } + }, + }, + { + key: 'state', + label: this.$t('transactionlist.state'), + }, { key: 'amount', label: this.$t('transactionlist.amount'), @@ -48,13 +63,6 @@ export default { return `${value} GDD` }, }, - { - key: 'linkedUser', - label: this.$t('transactionlist.community'), - formatter: (value, key, item) => { - return `${value.firstName} ${value.lastName}` - }, - }, { key: 'memo', label: this.$t('transactionlist.memo') }, ], items: [], @@ -73,7 +81,7 @@ export default { }, }) .then((result) => { - this.items = result.data.creationTransactionList + this.items = result.data.creationTransactionList.contributionList }) .catch((error) => { this.toastError(error.message) diff --git a/admin/src/graphql/creationTransactionList.js b/admin/src/graphql/creationTransactionList.js index 327221814..fc3a80b18 100644 --- a/admin/src/graphql/creationTransactionList.js +++ b/admin/src/graphql/creationTransactionList.js @@ -8,14 +8,15 @@ export const creationTransactionList = gql` order: $order userId: $userId ) { - id - amount - balanceDate - creationDate - memo - linkedUser { - firstName - lastName + contributionCount + contributionList { + id + amount + createdAt + confirmedAt + contributionDate + memo + state } } } diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index b688e95fc..8c5c3b40f 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -144,6 +144,8 @@ "community": "Gemeinschaft", "confirmed": "Bestätigt", "memo": "Nachricht", + "period": "Zeitraum", + "state": "Status", "submitted": "Eingereicht", "title": "Alle geschöpften Transaktionen für den Nutzer" }, diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 7267fbeec..0b428fa20 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -144,6 +144,8 @@ "community": "Community", "confirmed": "Confirmed", "memo": "Message", + "period": "Period", + "state": "State", "submitted": "Submitted", "title": "All creation-transactions for the user" },