Repository navigation
Conversation
|
Thanks a lot for picking this up, and for the care that went into it! The revision and retry handling, the PNG re-encode path, the event scoping on the admin routes and the backup coverage are really solid, and the docs page made the PR easy to follow. I ran the branch locally end to end (catalogue → assign to a gallery → client submits → lock → client sees it read-only) to get a feel for the flow. Your draft also helped us think through the open questions in #1924, and in doing so we realised we need something broader than the issue described. So before you spend more time polishing this shape, here's where we'd like to take it. Very happy to discuss! Where we'd like to take #1924What we need is a generic product configurator, not one tailored to albums. Products with several attributes and optional add-ons should be modelled freely by the admin. To illustrate, one example among many: a large-format print in 60×40 / 90×60 / 120×80, with an optional wood frame (oak / walnut / black) and an optional passe-partout. A photobook with size, cover, paper and page count would be another. Neither fits exactly one model and one colour per product, and the design shouldn't assume any particular product. So:
We understand keeping it separate from quotes was deliberate, because historical quote contents must not change. Snapshot-on-accept covers that: the accepted quote keeps a frozen copy, the same way your choice history already does. Choosing in the gallery after the photo selection can stay as an additional entry point that uses the same picker and the same snapshot. Things to fix regardless of directionBlockers
Concerns
UI/UX guide (
Migrations
PR body
Happy to talk through the direction on #1924 before you put more time into this shape. |
|
Thanks for the detailed review. I agree with the broader direction and am revising this draft accordingly. CRM integration is in scope now, alongside the standalone gallery entry point. Proposed shared contract:
I will first land the four blockers and regression coverage (including actual core migrations on PostgreSQL), then the shared catalogue/picker and CRM path in reviewable commits on this draft. The album layout/proofing/export work remains separate from this product foundation. I will also address the native UI, notification, permission and migration concerns you listed. Does this match the intended ownership and snapshot boundaries? I am proceeding with those boundaries while keeping the PR draft so adjustments remain reviewable. |
14d09f3 to
389447c
Compare
|
The four blockers are fixed in 389447c, rebased onto fb6702f (including the inquiry change):
Also covered: description-only changes do not block locking; submitted choices cannot silently return to draft; boolean no-op writes do not create fake revisions. Validation for this commit: The shared generic catalogue/CRM design is proposed in the comment above. I have kept the wider implementation out of this blocker commit so this milestone can be reviewed independently; the PR remains draft. Updated screenshot attachments and PR-body corrections follow. |
|
Thanks for the quick turnaround! I checked out
I also ran One remaining gap of the same kind as blocker 4:
On the shared designYes, this matches the ownership and snapshot boundaries we had in mind: one library, the CRM item owning prices, quotes copying the definition when authored, server-side recompute against the confirmed total, and a frozen spec on acceptance that contracts and invoices carry.
Thanks again for taking this on! |
|
Thanks, Luca — I agree with the adjustments and have brought the CRM work into this PR. The shared design document now records the agreement. The updates cover the archived-gallery deletion blocker, the shared option/image library, frozen CRM configurations, gallery billing, quote pre-fill and locked choices, retained document images, and native VAT, decimal-input and money handling. Gallery prices default to hidden, and attribute dependencies remain limited to one prerequisite per attribute. One deliberate billing safeguard: automatic append is limited to exactly one compatible unissued, unarmed project invoice. Ambiguous, armed or incompatible invoices leave the item open for photographer review; issued invoices are never changed. Unlock removes an unbilled item, while billed choices require the native cancellation/Storno path. A revision check also prevents issuing a stale PDF if a product is appended during rendering. Validation passed: 194 SQLite tests across 15 related suites, 19 CRM and 13 gallery tests on PostgreSQL 15 using real core migrations, and 16 frontend tests, plus focused lint and the production frontend build. The PR description includes updated synthetic UI screenshots and the existing unrelated TypeScript limitations. The PR remains draft pending upstream review and workflow approval. All of this is included in #2222. |

Problem and resulting behaviour
Clients can configure a shared catalogue product from their gallery or while booking an included/optional product on a quote. A quote keeps the offered definition and prices; acceptance freezes its exact specification for contracts and invoices. A later gallery choice becomes a new billable product item rather than changing an accepted quote or issued invoice.
Implements the direction agreed with Luca-Timo in #2222 (comment) and contributes to #1924. The CRM foundation and requested adjustments are now in this same PR, as separate commits. The PR remains draft for upstream review; no production activation, payment collection or supplier ordering is included.
Main changes
hasTableguards and a native HTTP regression. Normal/archived deletion erase client names/session digests while audited financial items survive with the gallery link cleared.DecimalInput; amounts use native money helpers. New controls have English/German translations. Gallery entry remains compact/collapsed inside gallery content. The separate album layout/proofing/export roadmap is not bundled here.Migration and docs
Migration 316 retains the original storage/disabled
albumProductsflag. Additive 317 introduces the generic library and CRM fields and preserves role grants while renamingalbums.edittoproducts.configure. Additive 318 introduces quote locks, gallery price/customer links, audited product billable items, retained image references and the invoice product revision. Upstream main was refreshed before publication; 315 remains its latest core migration.See setup and client workflows, agreed direction, and CRM integration details.
Validation
All database tests use real core migrations, not a hand-built stub schema.
Limitations: full TypeScript checking still reports seven existing errors in
SelfUpdatePanel, event settings andAttachDocumentDialog; no changed-feature type errors were reported. The bundle build has the existing large-chunk warning. This is related local regression coverage, not a claim that every upstream suite has run. Fork GitHub workflows still require maintainer approval. No real R2 supplier order, payment or physical-print acceptance is claimed.Screenshots
Uploaded through GitHub from the signed-in PR page; no client photos, supplier artwork or studio prices are included.
Gallery choice locked into an open billable item:
Quote author pre-fill and client lock (expanded for review; collapsed by default):
Dark and phone-sized review previews