use admin list contributions for contribution transaction list

This commit is contained in:
Moriz Wahl 2023-03-07 17:51:55 +01:00
parent ecd9efac4f
commit 77a415236e
3 changed files with 7 additions and 5 deletions

View File

@ -6,7 +6,7 @@ const localVue = global.localVue
const apolloQueryMock = jest.fn().mockResolvedValue({
data: {
creationTransactionList: {
adminListContributions: {
contributionCount: 2,
contributionList: [
{

View File

@ -42,7 +42,7 @@
</div>
</template>
<script>
import { creationTransactionList } from '../graphql/creationTransactionList'
import { adminListContributions } from '../graphql/adminListContributions'
export default {
name: 'CreationTransactionList',
props: {
@ -96,7 +96,7 @@ export default {
getTransactions() {
this.$apollo
.query({
query: creationTransactionList,
query: adminListContributions,
variables: {
currentPage: this.currentPage,
pageSize: this.perPage,
@ -105,8 +105,8 @@ export default {
},
})
.then((result) => {
this.rows = result.data.creationTransactionList.contributionCount
this.items = result.data.creationTransactionList.contributionList
this.rows = result.data.adminListContributions.contributionCount
this.items = result.data.adminListContributions.contributionList
})
.catch((error) => {
this.toastError(error.message)

View File

@ -6,12 +6,14 @@ export const adminListContributions = gql`
$pageSize: Int = 25
$order: Order = DESC
$statusFilter: [ContributionStatus!]
$userId: Int
) {
adminListContributions(
currentPage: $currentPage
pageSize: $pageSize
order: $order
statusFilter: $statusFilter
userId: $userId
) {
contributionCount
contributionList {