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 {
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)

View File

@ -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
}
}
}

View File

@ -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"
},

View File

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