Commit Graph

2 Commits

Author SHA1 Message Date
Bhanu Prakash Sai Potteri
0bccb9ad96 feat: dynamic riders in Recommend form, driven by product allowed_riders
Riders multiselect filters to the picked product's allowed_riders (newly
exposed on the product lookup). Disabled w/ hint until a product is chosen;
auto-prunes now-invalid selections on switch w/ a note. Legacy product values
(no allowed_riders key) fall back to all options. Brace-safe rider normalizer.
MultiSelect gains disabled + hint props.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 19:20:07 +05:30
Bhanu Prakash Sai Potteri
3b95cf8f81 fix: port designer field rules into bespoke activity forms
Custom frontend skipped designer custom_js / field_rules, so workflow
gates relying on computed fields never passed.

- Recommend: compute & send sa_valid (+ real rate-card premium) so the
  Meeting Scheduled -> Product Recommended stage gate passes; add inline
  validity hint; success copy now reflects whether the gate advanced
- Assign: thread form_data through LookupField so owner_agent options are
  region-filtered (field_rules filter_options cascade); clear agent on
  region change
- add src/lib/recommend.ts (faithful port of the Recommend custom_js)

Verified via live UI E2E: lead reaches Product Recommended (sa_valid=true,
premium=21000) and owner agent matches the chosen region.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 12:16:59 +05:30