feat(admin): enhance delete confirmation messages for areas, categories, teams, and users in admin panel

This commit is contained in:
gabdevele
2026-06-15 15:55:01 +02:00 Unverified
parent 0808f763cf
commit 5599022f66
3 changed files with 22 additions and 6 deletions
+8 -2
View File
@@ -43,6 +43,12 @@ const teamPendingDelete = ref<Team | null>(null)
const categories = computed(() => categoriesRes.value?.categories || [])
const teams = computed(() => teamsRes.value?.teams || [])
const areas = computed(() => areasRes.value?.areas || [])
const categoryDeleteMessage = computed(() =>
categoryPendingDelete.value ? `Vuoi eliminare categoria "${categoryPendingDelete.value.name}"? Operazione irreversibile.` : ''
)
const teamDeleteMessage = computed(() =>
teamPendingDelete.value ? `Vuoi eliminare team "${teamPendingDelete.value.name}"? Operazione irreversibile.` : ''
)
const resetCategoryForm = () => {
editingCategoryId.value = null
@@ -418,7 +424,7 @@ const handleDeleteTeam = async () => {
<ConfirmModal
:open="categoryPendingDelete !== null"
title="Elimina categoria"
:message="categoryPendingDelete ? `Vuoi eliminare categoria \\\"${categoryPendingDelete.name}\\\"? Operazione irreversibile.` : ''"
:message="categoryDeleteMessage"
confirm-label="Elimina categoria"
confirm-class="btn-danger"
:pending="deletingCategoryId !== null"
@@ -429,7 +435,7 @@ const handleDeleteTeam = async () => {
<ConfirmModal
:open="teamPendingDelete !== null"
title="Elimina team"
:message="teamPendingDelete ? `Vuoi eliminare team \\\"${teamPendingDelete.name}\\\"? Operazione irreversibile.` : ''"
:message="teamDeleteMessage"
confirm-label="Elimina team"
confirm-class="btn-danger"
:pending="deletingTeamId !== null"