diff --git a/admin/src/components/Tables/OpenCreationsTable.vue b/admin/src/components/Tables/OpenCreationsTable.vue index d141fc0a5..e4d289c8e 100644 --- a/admin/src/components/Tables/OpenCreationsTable.vue +++ b/admin/src/components/Tables/OpenCreationsTable.vue @@ -1,6 +1,12 @@ + + + + + + + + {{ row.item.messagesCount }} + {{ $t('contributions.denied') }} - + {{ $t('contributions.all') }} + @@ -57,6 +62,7 @@ import Overlay from '../components/Overlay.vue' import OpenCreationsTable from '../components/Tables/OpenCreationsTable.vue' import { listUnconfirmedContributions } from '../graphql/listUnconfirmedContributions' +import { listAllContributions } from '../graphql/listAllContributions' import { adminDeleteContribution } from '../graphql/adminDeleteContribution' import { confirmContribution } from '../graphql/confirmContribution' import { denyContribution } from '../graphql/denyContribution' @@ -70,6 +76,7 @@ export default { data() { return { pendingCreations: [], + allCreations: [], overlay: false, item: {}, variant: 'confirm', @@ -172,6 +179,30 @@ export default { { key: 'confirm', label: this.$t('save') }, ] }, + fieldsAllContributions() { + return [ + { key: 'state', label: 'state' }, + { key: 'messagesCount', label: 'mc' }, + { key: 'firstName', label: this.$t('firstname') }, + { key: 'lastName', label: this.$t('lastname') }, + { + key: 'amount', + label: this.$t('creation'), + formatter: (value) => { + return value + ' GDD' + }, + }, + { key: 'memo', label: this.$t('text'), class: 'text-break' }, + { + key: 'date', + label: this.$t('date'), + formatter: (value) => { + return this.$d(new Date(value), 'short') + }, + }, + { key: 'chatCreation', label: this.$t('chat') }, + ] + }, overlayTitle() { return `overlay.${this.variant}.title` }, @@ -218,6 +249,21 @@ export default { this.toastError(message) }, }, + AllContributions: { + query() { + return listAllContributions + }, + variables() { + // may be at some point we need a pagination here + return {} + }, + update({ listAllContributions }) { + this.allCreations = listAllContributions.contributionList + }, + error({ message }) { + this.toastError(message) + }, + }, }, }
{{ $t('contributions.denied') }}
{{ $t('contributions.all') }}