docs(orders): sync spec/plan/CLAUDE.md to as-built (Vydané-first tabs, month filter, shared PDF template, Prisma 7 / React 19)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2412,3 +2412,34 @@ If the smoke test surfaced fixes, commit them. Then use **superpowers:finishing-
|
||||
- **Permissions:** reuse `orders.view/create/edit/delete/export` (verified to exist in `seed.ts`) — no permission migration, matching the spec.
|
||||
- **VAT regime:** NET + VAT-on-top in `computeIssuedOrderTotals`, the PDF, and the form's live totals — consistent across all three, and deliberately opposite to `received_invoices` (gross).
|
||||
- **Naming consistency:** `issued_orders` / `issued_order_items` / `po_number` / `issued_orders_status` / `generateIssuedOrderNumber` / `issuedOrderListOptions` / `entityType: "issued_order"` are used identically in every task.
|
||||
|
||||
---
|
||||
|
||||
## Post-plan consistency pass (as-built, 2026-06-09)
|
||||
|
||||
All tasks above executed as written. The following changes landed **after** the
|
||||
plan ran, to align the feature with the existing Invoices page and shared
|
||||
document suite (these supersede the corresponding sketches above):
|
||||
|
||||
- **Vydané-first tabs + shared month filter.** Tabs ship as **`Vydané | Přijaté`**
|
||||
(Vydané default, mirroring Invoices; tab values `vydane`/`prijate`, persisted in
|
||||
`?tab=`). An **Invoices-style chevron month/year selector** sits above the tabs
|
||||
and filters **both** lists: Vydané by `order_date`, Přijaté by `created_at`. The
|
||||
pre-existing **Přijaté search bug** (search term sent but ignored by the backend)
|
||||
was also fixed.
|
||||
- **Shared-template PDF.** The issued-order PDF was **rebuilt on the shared
|
||||
invoice / order-confirmation red-accent template** (titled **OBJEDNÁVKA**)
|
||||
instead of the custom layout in Task 7. PO direction is flipped vs an invoice:
|
||||
the **customer = "Dodavatel" (supplier)** and the **company = "Odběratel" (buyer)**.
|
||||
Still on-demand `application/pdf`, no NAS persistence.
|
||||
- **Orders.tsx parent shell.** `Orders.tsx` was restructured into a **parent shell**
|
||||
owning the `PageHeader` + month/year selector + tabs; `IssuedOrders.tsx` and
|
||||
`OrdersReceived.tsx` became **content-only children** taking `month`/`year` props.
|
||||
`OrdersReceived`'s create modal was **hoisted** to the shell (`createOpen`/
|
||||
`setCreateOpen`, the ReceivedInvoices pattern). **No KPI/stat cards** on the
|
||||
landing (deliberate — orders have no paid/overdue semantics).
|
||||
- **Two review-fix commits** also landed: cross-year number release (release the
|
||||
PO number against the correct sequence year, not always the current year);
|
||||
authenticated PDF open from the list (open the PDF via the token-aware fetch
|
||||
rather than a bare link); and the detail-page back button routing to
|
||||
`/orders?tab=vydane`.
|
||||
|
||||
Reference in New Issue
Block a user