mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
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:
@@ -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`, {
|
||||
|
||||
Reference in New Issue
Block a user