Add admin maintenance endpoints and file deletion functionality
- Introduced a new `/api/admin/maintenance` route for administrative maintenance tasks, requiring admin authorization. - Implemented the `DeleteAsync` method in `IFileStorage` to allow for the deletion of files associated with closed support tickets. - Updated API documentation to include details about the new maintenance operations and their effects on closed tickets. - Enhanced frontend routing to include the new maintenance section in the admin panel, improving navigation for administrators. - Added localization support for maintenance-related actions in both Russian and English.
This commit is contained in:
@@ -270,6 +270,10 @@ export type TicketSummaryDto = {
|
||||
messagePreview: string | null
|
||||
}
|
||||
|
||||
export type DeleteClosedTicketsResponseDto = {
|
||||
deletedCount: number
|
||||
}
|
||||
|
||||
export type TicketDetailDto = {
|
||||
id: string
|
||||
userId: string
|
||||
|
||||
@@ -196,8 +196,9 @@ const resources = {
|
||||
nodes: 'Ноды',
|
||||
apps: 'Приложения',
|
||||
news: 'Новости',
|
||||
support: 'Поддержка',
|
||||
support: 'Тикеты',
|
||||
audit: 'Аудит',
|
||||
maintenance: 'Обслуживание',
|
||||
},
|
||||
users: {
|
||||
searchPlaceholder: 'Поиск по имени пользователя',
|
||||
@@ -345,6 +346,15 @@ const resources = {
|
||||
source: 'Источник',
|
||||
empty: 'Журнал аудита пуст.',
|
||||
},
|
||||
maintenance: {
|
||||
closedTickets: {
|
||||
title: 'Закрытые обращения',
|
||||
description: 'Удалить все закрытые обращения вместе с перепиской и вложениями (файлами). Действие необратимо.',
|
||||
action: 'Удалить закрытые обращения',
|
||||
confirm: 'Удалить все закрытые обращения и файлы в них? Действие необратимо.',
|
||||
deleted: 'Удалено обращений: {{count}}.',
|
||||
},
|
||||
},
|
||||
stats: {
|
||||
totalUsers: 'Всего пользователей',
|
||||
activatedUsers: 'Активировано',
|
||||
@@ -552,8 +562,9 @@ const resources = {
|
||||
nodes: 'Nodes',
|
||||
apps: 'Apps',
|
||||
news: 'News',
|
||||
support: 'Support',
|
||||
support: 'Tickets',
|
||||
audit: 'Audit',
|
||||
maintenance: 'Maintenance',
|
||||
},
|
||||
users: {
|
||||
searchPlaceholder: 'Search by username',
|
||||
@@ -701,6 +712,15 @@ const resources = {
|
||||
source: 'Source',
|
||||
empty: 'The audit log is empty.',
|
||||
},
|
||||
maintenance: {
|
||||
closedTickets: {
|
||||
title: 'Closed tickets',
|
||||
description: 'Delete all closed tickets along with their comments and attachments (files). This cannot be undone.',
|
||||
action: 'Delete closed tickets',
|
||||
confirm: 'Delete all closed tickets and their files? This cannot be undone.',
|
||||
deleted: 'Deleted tickets: {{count}}.',
|
||||
},
|
||||
},
|
||||
stats: {
|
||||
totalUsers: 'Total users',
|
||||
activatedUsers: 'Activated',
|
||||
|
||||
Reference in New Issue
Block a user