Enhance admin maintenance functionality with new endpoints and response types
CI / Backend (build + test) (push) Successful in 1m17s
CI / Frontend (lint + typecheck + build) (push) Successful in 33s

- Added new DELETE endpoints for managing audit logs and disabled apps in the admin maintenance section.
- Updated existing endpoint for closed tickets to use a unified response type, `MaintenanceCleanupResponseDto`.
- Enhanced API documentation to reflect the new operations and their expected request/response formats.
- Improved frontend integration with new functions for deleting old audit logs and disabled apps, including user confirmation prompts.
- Added localization support for new maintenance actions in both Russian and English.
This commit is contained in:
Leonid Pershin
2026-07-14 18:37:22 +03:00
parent 8dfeb05912
commit 94ba514b8e
15 changed files with 449 additions and 15 deletions
+1 -1
View File
@@ -270,7 +270,7 @@ export type TicketSummaryDto = {
messagePreview: string | null
}
export type DeleteClosedTicketsResponseDto = {
export type MaintenanceCleanupResponseDto = {
deletedCount: number
}
+32
View File
@@ -354,6 +354,22 @@ const resources = {
confirm: 'Удалить все закрытые обращения и файлы в них? Действие необратимо.',
deleted: 'Удалено обращений: {{count}}.',
},
audit: {
title: 'Журнал аудита',
description: 'Удалить записи журнала аудита старше указанного числа дней. Действие необратимо.',
olderThan: 'Старше',
days: 'дней',
action: 'Удалить старые записи',
confirm: 'Удалить записи аудита старше {{days}} дней? Действие необратимо.',
deleted: 'Удалено записей аудита: {{count}}.',
},
apps: {
title: 'Отключённые приложения',
description: 'Удалить все отключённые приложения из каталога. Действие необратимо.',
action: 'Удалить отключённые приложения',
confirm: 'Удалить все отключённые приложения? Действие необратимо.',
deleted: 'Удалено приложений: {{count}}.',
},
},
stats: {
totalUsers: 'Всего пользователей',
@@ -720,6 +736,22 @@ const resources = {
confirm: 'Delete all closed tickets and their files? This cannot be undone.',
deleted: 'Deleted tickets: {{count}}.',
},
audit: {
title: 'Audit log',
description: 'Delete audit log entries older than the given number of days. This cannot be undone.',
olderThan: 'Older than',
days: 'days',
action: 'Delete old entries',
confirm: 'Delete audit entries older than {{days}} days? This cannot be undone.',
deleted: 'Deleted audit entries: {{count}}.',
},
apps: {
title: 'Disabled apps',
description: 'Delete all disabled apps from the catalog. This cannot be undone.',
action: 'Delete disabled apps',
confirm: 'Delete all disabled apps? This cannot be undone.',
deleted: 'Deleted apps: {{count}}.',
},
},
stats: {
totalUsers: 'Total users',