mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Admin sends confirmPendingCreation to apollo.
This commit is contained in:
parent
d8a6ac8638
commit
e09121d854
@ -132,6 +132,7 @@
|
||||
<script>
|
||||
import CreationFormular from '../components/CreationFormular.vue'
|
||||
import EditCreationFormular from '../components/EditCreationFormular.vue'
|
||||
import { confirmPendingCreation } from '../graphql/confirmPendingCreation'
|
||||
|
||||
export default {
|
||||
name: 'UserTable',
|
||||
@ -228,9 +229,22 @@ export default {
|
||||
}
|
||||
},
|
||||
bookmarkConfirm(item) {
|
||||
alert('die schöpfung bestätigen und abschließen')
|
||||
alert(JSON.stringify(item))
|
||||
this.$emit('remove-confirm-result', item, 'remove')
|
||||
console.log('die schöpfung bestätigen und abschließen')
|
||||
console.log(JSON.stringify(item))
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: confirmPendingCreation,
|
||||
variables: {
|
||||
id: item.id,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
console.log('result', result)
|
||||
this.$emit('remove-confirm-result', item, 'remove')
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$toasted.error(error.message)
|
||||
})
|
||||
},
|
||||
editCreationUserTable(row, rowItem) {
|
||||
if (!row.detailsShowing) {
|
||||
@ -241,14 +255,6 @@ export default {
|
||||
row.toggleDetails()
|
||||
},
|
||||
updateCreationData(data) {
|
||||
// console.log('updateCreationData this.creationUserData11=> ', this.creationUserData)
|
||||
// console.log('updateCreationData data=> ', data)
|
||||
// this.creationUserData = {
|
||||
// ...this.creationUserData,
|
||||
// ...data,
|
||||
// }
|
||||
// console.log('updateCreationData this.creationUserData22=> ', this.creationUserData)
|
||||
|
||||
this.creationUserData.amount = data.amount
|
||||
this.creationUserData.date = data.date
|
||||
this.creationUserData.memo = data.memo
|
||||
|
||||
7
admin/src/graphql/confirmPendingCreation.js
Normal file
7
admin/src/graphql/confirmPendingCreation.js
Normal file
@ -0,0 +1,7 @@
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
export const createPendingCreation = gql`
|
||||
mutation ($id: Int!) {
|
||||
confirmPendingCreation(id: $id)
|
||||
}
|
||||
`
|
||||
Loading…
x
Reference in New Issue
Block a user