feat: color-code referral network nodes by subscription status

Add subscription status colors: green (paid active), blue (trial active),
red (paid expired), orange (trial expired). Extract NODE_COLORS constant
as single source of truth. Add SubscriptionStatus union type. Show status
badge in user detail panel. Add i18n for all 4 locales.
This commit is contained in:
Fringg
2026-03-22 09:07:32 +03:00
parent 8e59af96c5
commit b289ea9c23
9 changed files with 134 additions and 22 deletions

View File

@@ -1,3 +1,5 @@
export type SubscriptionStatus = 'trial_active' | 'paid_active' | 'trial_expired' | 'paid_expired';
export interface NetworkUserNode {
id: number;
tg_id: number | null;
@@ -14,6 +16,7 @@ export interface NetworkUserNode {
personal_spent_kopeks: number;
subscription_name: string | null;
subscription_end: string | null;
subscription_status: SubscriptionStatus | null;
registered_at: string | null;
}
@@ -68,6 +71,7 @@ export interface NetworkUserDetail {
personal_spent_kopeks: number;
subscription_name: string | null;
subscription_end: string | null;
subscription_status: SubscriptionStatus | null;
registered_at: string | null;
}