feat: tariff selector for trial subscription promo codes

- Add tariff_id/tariff_name to PromoCode types
- AdminPromocodeCreate: tariff dropdown for trial_subscription type
- Shows default trial tariff or warns if none configured
This commit is contained in:
c0mrade
2026-03-26 20:09:29 +03:00
parent 6de864ac43
commit 94b9b9eb94
2 changed files with 33 additions and 17 deletions

View File

@@ -25,6 +25,8 @@ export interface PromoCode {
valid_from: string;
valid_until: string | null;
promo_group_id: number | null;
tariff_id: number | null;
tariff_name: string | null;
created_by: number | null;
created_at: string;
updated_at: string;
@@ -63,6 +65,7 @@ export interface PromoCodeCreateRequest {
is_active?: boolean;
first_purchase_only?: boolean;
promo_group_id?: number | null;
tariff_id?: number | null;
}
export interface PromoCodeUpdateRequest {
@@ -76,6 +79,7 @@ export interface PromoCodeUpdateRequest {
is_active?: boolean;
first_purchase_only?: boolean;
promo_group_id?: number | null;
tariff_id?: number | null;
}
// ============== PromoGroup Types ==============