feat(discount): apply rule-based discounts on the session payment step

PaymentStep now loads /session/{uuid}/discount-suggestions and lets the
operator apply a suggested rule (PATCH discount_rule_uuid) or remove it,
alongside the existing manual discount. Adds an amount summary (before /
discount + source rule label / final payable). Verified end-to-end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-07-17 12:04:56 +03:30
co-authored by Claude Fable 5
parent 18d9cc9812
commit 2691751e70
2 changed files with 57 additions and 6 deletions
@@ -27,6 +27,7 @@ export interface SessionCardData {
discount_type?: 'percent' | 'fixed' | null;
discount_value?: number;
discount_rials?: number;
applied_discount_rule_label?: string | null;
paid_total_rials?: number;
paid_at?: number | null;
payments?: SessionPaymentEntry[];