mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
refactor: align tariff builder with bot functionality
- Remove unused fields: custom_days, custom_traffic (bot doesn't use them) - Add promo groups selection to tariff form - Add API endpoint for fetching available promo groups - Make traffic topup packages dynamic (add/remove any number) - Fix stuck 0 in number inputs when clearing - Add validation messages explaining why save button is blocked - Match bot validation: name 2-50 chars, device_limit >= 1, tier_level 1-10 - Add missing i18n translations for new fields and validation errors
This commit is contained in:
@@ -236,4 +236,10 @@ export const tariffsApi = {
|
||||
const response = await apiClient.get('/cabinet/admin/tariffs/available-servers');
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Get available promo groups for selection
|
||||
getAvailablePromoGroups: async (): Promise<{ id: number; name: string }[]> => {
|
||||
const response = await apiClient.get('/cabinet/admin/payment-methods/promo-groups');
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user