Skip to content

Commit 955e9fa

Browse files
os-zhuangclaude
andauthored
chore(crm): surface Reassign Lead on the record header (#1999)
Extends the demo to `locations: ['list_item', 'record_header']` and adopts the `record.status == "converted"` predicate convention so the CEL `disabled` greys out consistently on both the row menu and the record header. Pairs with the objectui evaluateCondition fix that lets a bare-CEL `disabled` evaluate (instead of always-truthy), so a param-collecting header action opens its dialog. Example-only. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d99a75a commit 955e9fa

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
---
3+
4+
chore(example): CRM "Reassign Lead" action now also surfaces on the record
5+
header (`locations: ['list_item', 'record_header']`) and uses the
6+
`record.status == "converted"` predicate convention so its CEL `disabled` greys
7+
out consistently on both surfaces. Param collection, `dataSource.update`, and
8+
the Undo toast now all drive from the header too. Example-only.

examples/app-crm/src/actions/park-lead.action.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ export const ParkLeadAction: UI.Action = {
2121
// `dataSource.update` path (the row id comes from the list_item row record).
2222
type: 'api',
2323
target: 'crm_lead',
24-
// List-row only: the apiHandler needs the row record (to capture prior values
25-
// for Undo), and the list runtime drives param collection + the Undo toast.
26-
locations: ['list_item'],
27-
// Conditional disable (CEL): a converted lead is locked — the row-menu item
28-
// shows but greys out, rather than disappearing. Demonstrates `disabled`
29-
// (greys) vs `visible` (hides). Row-menu predicates resolve against the row's
30-
// fields directly (bare `status`, not `record.status`).
31-
disabled: 'status == "converted"',
24+
// From the list row AND the record header — both runtimes drive param
25+
// collection, the dataSource.update, and the Undo toast.
26+
locations: ['list_item', 'record_header'],
27+
// Conditional disable (CEL): a converted lead is locked — the action shows but
28+
// greys out, rather than disappearing. Demonstrates `disabled` (greys) vs
29+
// `visible` (hides). Evaluated against the record on every surface.
30+
disabled: 'record.status == "converted"',
3231
params: [
3332
{ field: 'assigned_to', label: 'Reassign to', defaultValue: 'Triage Queue', required: true },
3433
],

0 commit comments

Comments
 (0)