diff --git a/admin/src/components/ConfirmRegisterMailFormular.vue b/admin/src/components/ConfirmRegisterMailFormular.vue index bb4a9963e..c14ee60b8 100644 --- a/admin/src/components/ConfirmRegisterMailFormular.vue +++ b/admin/src/components/ConfirmRegisterMailFormular.vue @@ -11,8 +11,8 @@ - - + + {{ $t('unregister_mail.button') }} @@ -26,6 +26,7 @@ import { sendActivationEmail } from '../graphql/sendActivationEmail' import { BButton, BFormInput, BInputGroup, BInputGroupText } from 'bootstrap-vue-next' import { useI18n } from 'vue-i18n' import { useMutation } from '@vue/apollo-composable' +import { useAppToast } from '@/composables/useToast' const props = defineProps({ checked: { @@ -40,6 +41,7 @@ const props = defineProps({ }) const { t } = useI18n() +const { toastError, toastSuccess } = useAppToast() const { mutate: activateEmail } = useMutation(sendActivationEmail) @@ -48,9 +50,9 @@ const sendRegisterMail = async () => { await activateEmail({ email: props.email, }) - // toast.success(t('unregister_mail.success', { email: props.email })) + toastSuccess(t('unregister_mail.success', { email: props.email })) } catch (error) { - // toast.error(t('unregister_mail.error', { message: error.message })) + toastError(t('unregister_mail.error', { message: error.message })) } } diff --git a/admin/src/components/CreationFormular.vue b/admin/src/components/CreationFormular.vue index 07da63618..ee73b0749 100644 --- a/admin/src/components/CreationFormular.vue +++ b/admin/src/components/CreationFormular.vue @@ -20,7 +20,11 @@ - + @@ -38,10 +42,10 @@
- - {{ $t('creation_form.reset') }} - -
+ + {{ $t('creation_form.reset') }} + +
import { ref, watch, computed } from 'vue' import { useI18n } from 'vue-i18n' +import { useAppToast } from '@/composables/useToast' import { useMutation, useQuery } from '@vue/apollo-composable' import { useStore } from 'vuex' import { adminCreateContribution } from '../graphql/adminCreateContribution' @@ -86,6 +91,7 @@ import { } from 'bootstrap-vue-next' const { radioOptions } = useCreationMonths() +const { toastError, toastSuccess } = useAppToast() const props = defineProps({ pagetype: { @@ -153,16 +159,16 @@ const submitCreation = async () => { store.commit('openCreationsPlus', 1) - // toast.success( - // t('creation_form.toasted', { - // value: value.value, - // email: props.item.email, - // }), - // ) + toastSuccess( + t('creation_form.toasted', { + value: value.value, + email: props.item.email, + }), + ) onReset() } catch (error) { - // toast.error(error.message) + toastError(error.message) onReset() } finally { refetch() @@ -180,7 +186,7 @@ watch( ) \ No newline at end of file + diff --git a/admin/src/components/TransactionLinkList.vue b/admin/src/components/TransactionLinkList.vue index 9dc2d1693..dd2b55ea8 100644 --- a/admin/src/components/TransactionLinkList.vue +++ b/admin/src/components/TransactionLinkList.vue @@ -22,12 +22,14 @@ import { useI18n } from 'vue-i18n' import { BTable, BPagination } from 'bootstrap-vue-next' import { listTransactionLinksAdmin } from '../graphql/listTransactionLinksAdmin.js' import { useQuery } from '@vue/apollo-composable' +import { useAppToast } from '@/composables/useToast' const props = defineProps({ userId: { type: Number, required: true }, }) const { t, d } = useI18n() +const { toastError } = useAppToast() const items = ref([]) const rows = ref(0) @@ -68,7 +70,7 @@ const { result, error, refetch } = useQuery(listTransactionLinksAdmin, () => ({ currentPage: currentPage.value, pageSize: perPage.value, userId: props.userId, -})); +})) watch(result, (newResult) => { if (newResult && newResult.listTransactionLinksAdmin) { @@ -79,11 +81,11 @@ watch(result, (newResult) => { watch(error, (err) => { if (err) { - // toast.error(error.message) + toastError(error.message) } }) watch([currentPage, perPage], () => { refetch() }) - \ No newline at end of file +