Change query of the creationTransactionList, add new parameters to CreationTransactionList and add translations.

This commit is contained in:
elweyn 2022-09-21 13:33:32 +02:00
parent 5aa499a073
commit 8989b6f50e
4 changed files with 32 additions and 19 deletions

View File

@ -28,19 +28,34 @@ export default {
return { return {
fields: [ fields: [
{ {
key: 'creationDate', key: 'createdAt',
label: this.$t('transactionlist.submitted'), label: this.$t('transactionlist.submitted'),
formatter: (value, key, item) => { formatter: (value, key, item) => {
return this.$d(new Date(value)) return this.$d(new Date(value))
}, },
}, },
{ {
key: 'balanceDate', key: 'contributionDate',
label: this.$t('transactionlist.confirmed'), label: this.$t('transactionlist.period'),
formatter: (value, key, item) => { formatter: (value, key, item) => {
return this.$d(new Date(value)) 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', key: 'amount',
label: this.$t('transactionlist.amount'), label: this.$t('transactionlist.amount'),
@ -48,13 +63,6 @@ export default {
return `${value} GDD` 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') }, { key: 'memo', label: this.$t('transactionlist.memo') },
], ],
items: [], items: [],
@ -73,7 +81,7 @@ export default {
}, },
}) })
.then((result) => { .then((result) => {
this.items = result.data.creationTransactionList this.items = result.data.creationTransactionList.contributionList
}) })
.catch((error) => { .catch((error) => {
this.toastError(error.message) this.toastError(error.message)

View File

@ -8,14 +8,15 @@ export const creationTransactionList = gql`
order: $order order: $order
userId: $userId userId: $userId
) { ) {
id contributionCount
amount contributionList {
balanceDate id
creationDate amount
memo createdAt
linkedUser { confirmedAt
firstName contributionDate
lastName memo
state
} }
} }
} }

View File

@ -144,6 +144,8 @@
"community": "Gemeinschaft", "community": "Gemeinschaft",
"confirmed": "Bestätigt", "confirmed": "Bestätigt",
"memo": "Nachricht", "memo": "Nachricht",
"period": "Zeitraum",
"state": "Status",
"submitted": "Eingereicht", "submitted": "Eingereicht",
"title": "Alle geschöpften Transaktionen für den Nutzer" "title": "Alle geschöpften Transaktionen für den Nutzer"
}, },

View File

@ -144,6 +144,8 @@
"community": "Community", "community": "Community",
"confirmed": "Confirmed", "confirmed": "Confirmed",
"memo": "Message", "memo": "Message",
"period": "Period",
"state": "State",
"submitted": "Submitted", "submitted": "Submitted",
"title": "All creation-transactions for the user" "title": "All creation-transactions for the user"
}, },