mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-19 05:58:34 +02:00
Added notif after successful deletion of account/alias
This commit is contained in:
@@ -270,11 +270,16 @@ async function deleteDomain(domain) {
|
||||
if (!result) {
|
||||
return
|
||||
}
|
||||
const data = { keep_folder: keepDomainFolder.value }
|
||||
await domainsApi.deleteDomain(domain.pk, data)
|
||||
reloadDomains()
|
||||
busStore.displayNotification({ msg: $gettext('Domain deleted') })
|
||||
keepDomainFolder.value = false
|
||||
loading.value = true
|
||||
try {
|
||||
const data = { keep_folder: keepDomainFolder.value }
|
||||
await domainsApi.deleteDomain(domain.pk, data)
|
||||
reloadDomains()
|
||||
busStore.displayNotification({ msg: $gettext('Domain deleted') })
|
||||
keepDomainFolder.value = false
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function editDomain(domain) {
|
||||
|
||||
@@ -117,12 +117,14 @@ import { useGettext } from 'vue3-gettext'
|
||||
import MenuItems from '@/components/tools/MenuItems.vue'
|
||||
import ConfirmDialog from '@/components/tools/ConfirmDialog.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useBusStore } from '@/stores'
|
||||
import accountsApi from '@/api/accounts'
|
||||
import aliasesApi from '@/api/aliases'
|
||||
import identitiesApi from '@/api/identities'
|
||||
|
||||
const { $gettext, $pgettext } = useGettext()
|
||||
const router = useRouter()
|
||||
const { displayNotification } = useBusStore()
|
||||
|
||||
const headers = ref([
|
||||
{ title: $gettext('Name'), key: 'identity' },
|
||||
@@ -233,6 +235,7 @@ async function deleteAccount(account) {
|
||||
try {
|
||||
await accountsApi.delete(account.pk, { keepdir: keepAccountFolder.value })
|
||||
fetchIdentities()
|
||||
displayNotification({ msg: $gettext('Account deleted') })
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -259,6 +262,7 @@ async function deleteAlias(alias) {
|
||||
try {
|
||||
await aliasesApi.delete(alias.pk)
|
||||
fetchIdentities()
|
||||
displayNotification({ msg: $gettext('Alias deleted') })
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user