remove moderator from update pending creation mutation args

This commit is contained in:
Moriz Wahl 2022-04-27 11:57:41 +02:00
parent 2e82f007e6
commit d14d4c5640
3 changed files with 1 additions and 21 deletions

View File

@ -11,7 +11,6 @@ const apolloMutateMock = jest.fn().mockResolvedValue({
amount: 500,
date: new Date(),
memo: 'Test Schöpfung 2',
moderator: 0,
},
},
})
@ -28,12 +27,6 @@ const mocks = {
mutate: apolloMutateMock,
},
$store: {
state: {
moderator: {
id: 0,
name: 'test moderator',
},
},
commit: stateCommitMock,
},
}
@ -104,7 +97,6 @@ describe('EditCreationFormular', () => {
creationDate: getCreationDate(0),
amount: 500,
memo: 'Test Schöpfung 2',
moderator: 0,
},
}),
)
@ -129,7 +121,6 @@ describe('EditCreationFormular', () => {
amount: 500,
date: expect.any(Date),
memo: 'Test Schöpfung 2',
moderator: 0,
row: expect.any(Object),
},
],

View File

@ -120,7 +120,6 @@ export default {
creationDate: this.selected.date,
amount: Number(this.value),
memo: this.text,
moderator: Number(this.$store.state.moderator.id),
},
})
.then((result) => {
@ -129,7 +128,6 @@ export default {
amount: Number(result.data.updatePendingCreation.amount),
date: result.data.updatePendingCreation.date,
memo: result.data.updatePendingCreation.memo,
moderator: Number(result.data.updatePendingCreation.moderator),
row: this.row,
})
this.toastSuccess(

View File

@ -1,27 +1,18 @@
import gql from 'graphql-tag'
export const updatePendingCreation = gql`
mutation (
$id: Int!
$email: String!
$amount: Decimal!
$memo: String!
$creationDate: String!
$moderator: Int!
) {
mutation ($id: Int!, $email: String!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
updatePendingCreation(
id: $id
email: $email
amount: $amount
memo: $memo
creationDate: $creationDate
moderator: $moderator
) {
amount
date
memo
creation
moderator
}
}
`