mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
feat: add promo group and promo offer management to AdminUserDetail
- Info tab: promo group card with inline dropdown to change/remove group - Balance tab: active promo offer display with deactivate button - Balance tab: send promo offer form (discount %, valid hours) - Add deactivateDiscount API method to promocodesApi - Add locale keys for ru/en/zh/fa - Fix race condition in subscription create (stale state read) - Fix unhandled promise in handleInlineConfirm - Remove unused legacy adminUsers block from ru.json
This commit is contained in:
@@ -183,4 +183,12 @@ export const promocodesApi = {
|
||||
deletePromoGroup: async (id: number): Promise<void> => {
|
||||
await apiClient.delete(`/cabinet/admin/promo-groups/${id}`);
|
||||
},
|
||||
|
||||
// Deactivate user's active discount (admin)
|
||||
deactivateDiscount: async (userId: number): Promise<{ success: boolean; message: string }> => {
|
||||
const response = await apiClient.post(
|
||||
`/cabinet/admin/promocodes/deactivate-discount/${userId}`,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user