feat(admin): enhance delete confirmation messages for areas, categories, teams, and users in admin panel
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user