mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge pull request #3338 from gradido/fix/creation-tab-disappearing-after-creating-creation
fix(admin): creation tab disappearing after creating creation
This commit is contained in:
commit
b2aabadbfb
@ -80,6 +80,7 @@ import { useAppToast } from '@/composables/useToast'
|
|||||||
import { useMutation, useQuery } from '@vue/apollo-composable'
|
import { useMutation, useQuery } from '@vue/apollo-composable'
|
||||||
import { useStore } from 'vuex'
|
import { useStore } from 'vuex'
|
||||||
import { adminCreateContribution } from '../graphql/adminCreateContribution'
|
import { adminCreateContribution } from '../graphql/adminCreateContribution'
|
||||||
|
import { adminOpenCreations } from '../graphql/adminOpenCreations'
|
||||||
import useCreationMonths from '../composables/useCreationMonths'
|
import useCreationMonths from '../composables/useCreationMonths'
|
||||||
import {
|
import {
|
||||||
BFormInput,
|
BFormInput,
|
||||||
@ -123,15 +124,13 @@ const props = defineProps({
|
|||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
|
|
||||||
const text = ref(props.creationUserData.memo || '')
|
const text = ref(!props.creationUserData.memo ? '' : props.creationUserData.memo)
|
||||||
const value = ref(props.creationUserData.amount || 0)
|
const value = ref(!props.creationUserData.amount ? 0 : props.creationUserData.amount)
|
||||||
const rangeMin = ref(0)
|
const rangeMin = ref(0)
|
||||||
const rangeMax = ref(1000)
|
const rangeMax = ref(1000)
|
||||||
const selected = ref()
|
const selected = ref()
|
||||||
const creationForm = ref(null)
|
const creationForm = ref(null)
|
||||||
|
|
||||||
const openCreations = computed(() => store.state.openCreations)
|
|
||||||
|
|
||||||
const radioOptions = computed(() => {
|
const radioOptions = computed(() => {
|
||||||
return creationDateObjects.value.map((obj, idx) => {
|
return creationDateObjects.value.map((obj, idx) => {
|
||||||
return {
|
return {
|
||||||
@ -140,6 +139,7 @@ const radioOptions = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const updateRadioSelected = (name) => {
|
const updateRadioSelected = (name) => {
|
||||||
text.value = `${t('creation_form.creation_for')} ${name?.short} ${name?.year}`
|
text.value = `${t('creation_form.creation_for')} ${name?.short} ${name?.year}`
|
||||||
rangeMin.value = 0
|
rangeMin.value = 0
|
||||||
@ -151,11 +151,9 @@ const onReset = () => {
|
|||||||
value.value = 0
|
value.value = 0
|
||||||
selected.value = null
|
selected.value = null
|
||||||
}
|
}
|
||||||
|
|
||||||
const { mutate: createContribution } = useMutation(adminCreateContribution)
|
const { mutate: createContribution } = useMutation(adminCreateContribution)
|
||||||
|
|
||||||
const { refetch } = useQuery(openCreations)
|
const { refetch: refetchCreations } = useQuery(adminOpenCreations, { userId: props.item.userId })
|
||||||
|
|
||||||
const emit = defineEmits(['update-user-data'])
|
const emit = defineEmits(['update-user-data'])
|
||||||
|
|
||||||
const submitCreation = async () => {
|
const submitCreation = async () => {
|
||||||
@ -183,7 +181,7 @@ const submitCreation = async () => {
|
|||||||
toastError(error.message)
|
toastError(error.message)
|
||||||
onReset()
|
onReset()
|
||||||
} finally {
|
} finally {
|
||||||
refetch()
|
refetchCreations()
|
||||||
selected.value = ''
|
selected.value = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,6 +123,7 @@ import ConfirmRegisterMailFormular from '../ConfirmRegisterMailFormular.vue'
|
|||||||
import CreationTransactionList from '../CreationTransactionList.vue'
|
import CreationTransactionList from '../CreationTransactionList.vue'
|
||||||
import TransactionLinkList from '../TransactionLinkList.vue'
|
import TransactionLinkList from '../TransactionLinkList.vue'
|
||||||
import ChangeUserRoleFormular from '../ChangeUserRoleFormular.vue'
|
import ChangeUserRoleFormular from '../ChangeUserRoleFormular.vue'
|
||||||
|
import DeletedUserFormular from '../DeletedUserFormular.vue'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { confirm } = useModalController()
|
const { confirm } = useModalController()
|
||||||
@ -255,7 +256,7 @@ const selectedRow = computed(() => {
|
|||||||
|
|
||||||
const onRowClicked = async (item) => {
|
const onRowClicked = async (item) => {
|
||||||
const status = myItems.value.find((obj) => {
|
const status = myItems.value.find((obj) => {
|
||||||
return obj.userId === item.userId
|
return obj?.userId === item?.userId
|
||||||
})?._showDetails
|
})?._showDetails
|
||||||
|
|
||||||
myItems.value.forEach((obj) => {
|
myItems.value.forEach((obj) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user