feat(showcase): Product catalog + invoice line product lookup with auto-fill#1639
Merged
Conversation
…to-fill Add a small showcase_product price-book (name, sku, description, unit_price, active) with seeded items, and a Products nav entry. Rewire the invoice line's `product` from free text to a lookup → showcase_product. Picking a product in the line-item grid auto-fills the line's description + unit_price (the grid copies same-named fields from the chosen record) — the catalog typeahead every invoicing tool has. Amount (= quantity × unit_price) then recomputes live. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Completes the line-item editor story: the invoice line's Product should be a catalog typeahead that auto-fills the line (description, unit price) — not free text.
What
showcase_productprice-book object:name,sku,description,unit_price,active. Seeded with a few items (Widget A/B, Gadget X, Consulting Hour). Added a Products nav entry.showcase_invoice_line.productfromtext→lookup('showcase_product'), and added adescriptionline field.description+unit_price(the objectui grid copies same-named fields from the chosen record);amount = quantity × unit_pricethen recomputes live and persists, so the parentInvoice.totalrolls it up.Verification
showcase_productandshowcase_invoice_line.productas a lookup →showcase_product; products seeded.🤖 Generated with Claude Code