feat: move user action buttons to detail page and fix full delete

- Add fullDeleteUser API method calling DELETE /admin/users/{id}/full
- Add Reset trial, Reset subscription, Disable, Delete buttons to AdminUserDetail info tab
- Implement inline confirm pattern (click → "Are you sure?" → execute, 3s timeout)
- Delete now calls /full endpoint removing user from bot DB and Remnawave panel
- Remove UserActionsMenu dropdown, ConfirmationModal and related code from AdminUsers list
- Update delete confirmation text in ru/en locales to reflect full deletion
This commit is contained in:
Fringg
2026-02-07 00:48:56 +03:00
parent 9e91b67660
commit 2490399f8e
5 changed files with 180 additions and 321 deletions

View File

@@ -415,7 +415,7 @@ export const adminUsersApi = {
return response.data;
},
// Delete user
// Delete user (soft delete, does NOT remove from Remnawave)
deleteUser: async (
userId: number,
softDelete = true,
@@ -427,6 +427,20 @@ export const adminUsersApi = {
return response.data;
},
// Full delete user (removes from bot DB + Remnawave panel)
fullDeleteUser: async (
userId: number,
): Promise<{
success: boolean;
message: string;
deleted_from_bot: boolean;
deleted_from_panel: boolean;
panel_error: string | null;
}> => {
const response = await apiClient.delete(`/cabinet/admin/users/${userId}/full`);
return response.data;
},
// Get referrals
getReferrals: async (userId: number, offset = 0, limit = 50): Promise<UsersListResponse> => {
const response = await apiClient.get(`/cabinet/admin/users/${userId}/referrals`, {