fix(subscription): display promo group discounts in device/traffic purchase and tariff switch

- Add discount fields to TrafficPackage and TariffSwitchPreview types
- Show strikethrough original price and discount badge for device purchase
- Show discount badge and original price for traffic packages
- Show discount info and free label for tariff switch with 100% discount
This commit is contained in:
Fringg
2026-02-05 06:26:27 +03:00
parent 35f499673f
commit 46b93ef098
3 changed files with 106 additions and 14 deletions

View File

@@ -122,6 +122,10 @@ export interface TariffSwitchPreview {
missing_amount_kopeks: number;
missing_amount_label: string;
is_upgrade: boolean;
// Discount fields (from promo group)
base_upgrade_cost_kopeks?: number;
discount_percent?: number;
discount_kopeks?: number;
}
export interface RenewalOption {
@@ -137,6 +141,10 @@ export interface TrafficPackage {
price_kopeks: number;
price_rubles: number;
is_unlimited: boolean;
// Discount fields (from promo group)
base_price_kopeks?: number;
discount_percent?: number;
discount_kopeks?: number;
}
export interface TrialInfo {