Surface only the agency door

This demo is about the individual agent who sources a lead and gets paid
when it onboards, so the console offers that one entry point and goes
straight to its form rather than showing a chooser with one option.

The direct and bancassurance INIT activities are hidden, not removed —
both still work over the API with their own permissions, and the
bancassurance door is what makes the cross-channel duplicate story
possible.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yashas 2026-08-24 16:48:05 +05:30
parent e750eb8287
commit f61d3a74cd
2 changed files with 19 additions and 9 deletions

View File

@ -73,12 +73,19 @@ export const ACTIONS = {
'zk-state-issued': [{ uid: 'zk-act-onboard', label: 'Complete Onboarding', by: 'Ops' }], 'zk-state-issued': [{ uid: 'zk-act-onboard', label: 'Complete Onboarding', by: 'Ops' }],
} }
/** The three doors. Each is a separate INIT activity with its own permissions. */ /**
* Entry points surfaced in the console.
*
* The workflow has THREE INIT activities direct, bancassurance and agency
* and all three still work over the API with their own permissions. Only the
* agency door is shown here, because this demo is about the individual agent
* who sources a lead and gets paid when it onboards.
*
* The other two are hidden, not removed: the bancassurance door is what makes
* the cross-channel duplicate story possible, and deleting it would take the
* skip-ahead behaviour with it.
*/
export const ENTRY = [ export const ENTRY = [
{ uid: 'zk-act-init-direct', label: 'Self-Serve Lead', channel: 'direct',
note: 'Customer or call centre. Self-declared, no KYC.' },
{ uid: 'zk-act-init-bank', label: 'Partner Bank Lead', channel: 'bancassurance',
note: 'Bank RM. Carries the banks CKYC, so it starts at Qualified.' },
{ uid: 'zk-act-init-agent', label: 'Partner Agent Lead', channel: 'agency', { uid: 'zk-act-init-agent', label: 'Partner Agent Lead', channel: 'agency',
note: 'POSP or broker. This is the door the demo is about.' }, note: 'POSP or broker sourcing a lead. Everything after this happens without them.' },
] ]

View File

@ -10,7 +10,8 @@ import './screens.css'
* did CKYC. Whichever door is used, everything after it is identical. * did CKYC. Whichever door is used, everything after it is identical.
*/ */
export default function AddLead() { export default function AddLead() {
const [entry, setEntry] = useState(null) // One door surfaced: skip the chooser entirely rather than show a list of one.
const [entry, setEntry] = useState(ENTRY.length === 1 ? ENTRY[0] : null)
const navigate = useNavigate() const navigate = useNavigate()
return ( return (
@ -39,7 +40,9 @@ export default function AddLead() {
<h2 className="panel__title">{entry.label}</h2> <h2 className="panel__title">{entry.label}</h2>
<p className="panel__sub">{entry.note}</p> <p className="panel__sub">{entry.note}</p>
</div> </div>
{ENTRY.length > 1 ? (
<button type="button" className="af__ghost" onClick={() => setEntry(null)}>Change door</button> <button type="button" className="af__ghost" onClick={() => setEntry(null)}>Change door</button>
) : null}
</div> </div>
<ActivityForm <ActivityForm
activityUid={entry.uid} activityUid={entry.uid}