Skip to content

Commit 0df8146

Browse files
os-zhuangclaude
andauthored
chore(crm): demo CEL disabled on the Reassign Lead action (#1995)
`status == "converted"` greys the list-row action on converted leads (vs `visible` which hides). Pairs with the objectui renderer change that evaluates a CEL `disabled` on action buttons. Example-only. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d42004b commit 0df8146

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
---
3+
4+
chore(example): CRM "Reassign Lead" action gains a CEL `disabled` predicate
5+
(`status == "converted"`) — greys the row-menu item on converted leads,
6+
demonstrating `disabled` (greys) vs `visible` (hides). Example-only.

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ 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.
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.
2526
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"',
2632
params: [
2733
{ field: 'assigned_to', label: 'Reassign to', defaultValue: 'Triage Queue', required: true },
2834
],

0 commit comments

Comments
 (0)