diff --git a/admin/src/components/ContributionMessages/ContributionMessagesList.spec.js b/admin/src/components/ContributionMessages/ContributionMessagesList.spec.js
index bbb2f3806..46773c7d8 100644
--- a/admin/src/components/ContributionMessages/ContributionMessagesList.spec.js
+++ b/admin/src/components/ContributionMessages/ContributionMessagesList.spec.js
@@ -68,6 +68,16 @@ const defaultData = {
},
}
+const defaultUser = {
+ firstName: 'Peter',
+ lastName: 'Lustig',
+ humhubUsername: 'peter.lustig',
+ createdAt: new Date().toString(),
+ emailContact: {
+ email: 'peter.lustig@example.com',
+ },
+}
+
describe('ContributionMessagesList', () => {
let wrapper
let mockMessages
@@ -98,6 +108,7 @@ describe('ContributionMessagesList', () => {
memo: 'test memo',
userId: 108,
status: 'PENDING',
+ user: defaultUser,
},
hideResubmission: true,
},
@@ -139,7 +150,12 @@ describe('ContributionMessagesList', () => {
})
it('does not render the ContributionMessagesFormular when status is not PENDING or IN_PROGRESS', async () => {
- await wrapper.setProps({ contribution: { status: 'COMPLETED' } })
+ await wrapper.setProps({
+ contribution: {
+ status: 'COMPLETED',
+ user: defaultUser,
+ },
+ })
expect(wrapper.find('contribution-messages-formular-stub').exists()).toBe(false)
})
diff --git a/admin/src/components/ContributionMessages/ContributionMessagesList.vue b/admin/src/components/ContributionMessages/ContributionMessagesList.vue
index 9b0d11cbe..3ba3b0b56 100644
--- a/admin/src/components/ContributionMessages/ContributionMessagesList.vue
+++ b/admin/src/components/ContributionMessages/ContributionMessagesList.vue
@@ -3,16 +3,16 @@
- {{ contribution.firstName }} {{ contribution.lastName }}
+ {{ contribution.user.firstName }} {{ contribution.user.lastName }}
- {{ contribution.email }}
+ {{ contribution.user.emailContact.email }}
{{ $t('filter.byEmail') }}
- {{ contribution.username }}
+ {{ contribution.user.humhubUsername }}
- {{ $t('registered') }}: {{ new Date(contribution.createdAt).toLocaleString() }}
+ {{ $t('registered') }}: {{ new Date(contribution.user.createdAt).toLocaleString() }}
diff --git a/admin/src/components/CreationTransactionList.spec.js b/admin/src/components/CreationTransactionList.spec.js
index fa626ab32..4b6b43b66 100644
--- a/admin/src/components/CreationTransactionList.spec.js
+++ b/admin/src/components/CreationTransactionList.spec.js
@@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils'
import { describe, it, expect, beforeEach, vi } from 'vitest'
import CreationTransactionList from './CreationTransactionList.vue'
import { useQuery } from '@vue/apollo-composable'
-import { adminListContributions } from '../graphql/adminListContributions'
+import { adminListContributionsShort } from '../graphql/adminListContributions.graphql'
import { useI18n } from 'vue-i18n'
import { useAppToast } from '@/composables/useToast'
@@ -65,13 +65,17 @@ describe('CreationTransactionList', () => {
it('calls useQuery with correct parameters', () => {
expect(useQuery).toHaveBeenCalled()
const call = useQuery.mock.calls[0]
- expect(call[0]).toBe(adminListContributions)
+ expect(call[0]).toBe(adminListContributionsShort)
expect(call[1]).toEqual(
expect.objectContaining({
- currentPage: expect.any(Number),
- pageSize: expect.any(Number),
- order: 'DESC',
- userId: 1,
+ filter: {
+ userId: 1,
+ },
+ paginated: {
+ currentPage: expect.any(Number),
+ pageSize: expect.any(Number),
+ order: 'DESC',
+ },
}),
)
})
diff --git a/admin/src/components/CreationTransactionList.vue b/admin/src/components/CreationTransactionList.vue
index 9eeb9055a..09dd41901 100644
--- a/admin/src/components/CreationTransactionList.vue
+++ b/admin/src/components/CreationTransactionList.vue
@@ -45,7 +45,7 @@