Skip to content

feat(showcase): lock invoice lines when the invoice is paid (#1581)#1666

Merged
os-zhuang merged 1 commit into
mainfrom
feat/showcase-invoice-parent-lock-rules
Jun 8, 2026
Merged

feat(showcase): lock invoice lines when the invoice is paid (#1581)#1666
os-zhuang merged 1 commit into
mainfrom
feat/showcase-invoice-parent-lock-rules

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Backend counterpart of objectstack-ai/objectui#1607 — B2 follow-up: "paid invoice → lock lines".

What

Add parent-scoped readonlyWhen rules to showcase_invoice_line's product, quantity, and unit_price:

readonlyWhen: "parent.status == 'paid'"

The inline line-item grid evaluates these per row against the live header invoice (bound as parent by MasterDetailForm), so a paid invoice renders its lines read-only. description keeps its existing row-scoped requiredWhen unchanged.

Verified: the dev server serves the rules and the ObjectUI grid locks/unlocks as the header status toggles.

🤖 Generated with Claude Code

Add parent-scoped readonlyWhen rules to showcase_invoice_line's product,
quantity and unit_price: readonlyWhen "parent.status == 'paid'". The inline
line-item grid evaluates these per row against the live header invoice, so a
paid invoice's lines render read-only — the "paid invoice → lock lines" case.

Pairs with objectui#1607 (MasterDetailForm binds the header as `parent`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 8, 2026 1:53pm

Request Review

@github-actions github-actions Bot added the size/s label Jun 8, 2026
@os-zhuang os-zhuang merged commit 1dd84c3 into main Jun 8, 2026
10 of 11 checks passed
@os-zhuang os-zhuang deleted the feat/showcase-invoice-parent-lock-rules branch June 8, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants