Skip to content

Commit 73da36a

Browse files
os-zhuangclaude
andauthored
feat(showcase): per-line Receipt attachment on invoice lines (upload-in-grid demo) (#3051)
Adds a `receipt: Field.file()` to showcase_invoice_line so the showcase exercises objectui#2360 end-to-end: the inline line-item grid auto-derives an upload column and renders a compact picker per row (the "attach the receipt to each expense line" pattern). Verified in-browser against this example: upload → save via /api/v1/batch → value persists with a canonical /api/v1/storage/files/<id> URL → reopening the form renders the stored chip. Claude-Session: https://claude.ai/code/session_01H5tsBSEhsDZmdcHBvfymYC Co-authored-by: Claude <noreply@anthropic.com>
1 parent dee7feb commit 73da36a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

examples/app-showcase/src/data/objects/invoice.object.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ export const InvoiceLine = ObjectSchema.create({
210210
min: 0,
211211
readonlyWhen: P`parent.status == 'paid'`,
212212
}),
213+
// Per-line attachment (objectui#2360): the inline line-item grid renders a
214+
// real upload cell for `file` fields — the "attach the receipt to each
215+
// expense line" pattern. Exercises upload-in-grid end-to-end (auto-derived
216+
// column, compact picker, persistence through the storage service).
217+
receipt: Field.file({ label: 'Receipt' }),
213218
// Amount = Qty × Unit Price. Kept as a *stored* currency column (so the
214219
// parent Invoice.total summary can roll it up — summary aggregation reads
215220
// stored columns, not on-read formula fields), but the `expression` makes

0 commit comments

Comments
 (0)