mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
fix(admin): fix refetch data in edit creation form (#3353)
This commit is contained in:
parent
b7ffa94f1e
commit
f6b827d43b
@ -123,12 +123,15 @@ watch(selectedComputed, () => {
|
||||
})
|
||||
|
||||
const { mutate: updateMutation, onDone, onError } = useMutation(adminUpdateContribution)
|
||||
const { refetch: refetchCreations } = useQuery(adminOpenCreations, {
|
||||
userId: props.creationUserData.id,
|
||||
})
|
||||
|
||||
onDone(() => {
|
||||
emit('update-creation-data')
|
||||
toastSuccess(t('creation_form.toasted_update', { value: value.value, email: props.item.email }))
|
||||
resetForm()
|
||||
refetchOpenCreations()
|
||||
refetchCreations()
|
||||
})
|
||||
|
||||
onError((error) => {
|
||||
@ -136,8 +139,6 @@ onError((error) => {
|
||||
resetForm()
|
||||
})
|
||||
|
||||
const { refetch: refetchCreations } = useQuery(adminOpenCreations)
|
||||
|
||||
const submitCreation = () => {
|
||||
updateMutation({
|
||||
id: props.item.id,
|
||||
@ -150,8 +151,4 @@ const submitCreation = () => {
|
||||
const resetForm = () => {
|
||||
value.value = 0
|
||||
}
|
||||
|
||||
const refetchOpenCreations = () => {
|
||||
refetchCreations()
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user