From 09911663624c817ce7c3ea68111708cf97907be5 Mon Sep 17 00:00:00 2001 From: Kamila Date: Wed, 31 Jul 2024 12:38:10 +0200 Subject: [PATCH] add success toast for undeletion of user --- admin/src/components/Tables/SearchUserTable.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/admin/src/components/Tables/SearchUserTable.vue b/admin/src/components/Tables/SearchUserTable.vue index da0c59d51..b8addad98 100644 --- a/admin/src/components/Tables/SearchUserTable.vue +++ b/admin/src/components/Tables/SearchUserTable.vue @@ -139,7 +139,7 @@ import ChangeUserRoleFormular from '../ChangeUserRoleFormular.vue' const { t } = useI18n() const { confirm } = useModalController() const store = useStore() -const { toastError } = useAppToast() +const { toastError, toastSuccess } = useAppToast() const props = defineProps({ items: { @@ -218,6 +218,7 @@ const showDeleteModal = async () => { deletedUserForm.value.deleteUserMutation() } }) + .catch((error) => { toastError(error.message) }) @@ -240,6 +241,7 @@ const showUndeleteModal = async () => { .then((ok) => { if (ok) { undeletedUserForm.value.undeleteUserMutation() + toastSuccess(t('user_recovered')) } }) .catch((error) => { @@ -277,11 +279,7 @@ const onRowClicked = async (item) => { obj._showDetails = false } }) - await nextTick() - if (!status && rowDetails.value) { - // rowDetails.value.focus() - } } watch(