Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

3.4 KB
Raw Blame

Document page layout — rollout

Move the "single column with a big header card" pages onto DocumentPage (apps/erp/app/components/DocumentPage/): a flat, pinned DocumentPageHeader (id, copy, ⋯, status, a muted created/posted line, actions with the next step as the one primary) over flat detail fields, and a resizable, collapsible DocumentSidebar with Documents (one ungrouped RelatedDocumentGroup) and Activity (the inline AuditLogFeed).

Shipment is the reference: routes/x+/shipment+/$shipmentId.tsx, modules/inventory/ui/Shipments/Shipment{Header,Documents,Form}.tsx.

Per page

  1. XHeader.tsx — lift the title / status / ⋯ menu / actions / modals out of the form's DocumentHeader. Drop the ⋯ History item (Activity replaces it) and any cross-link buttons (Documents replaces them).
  2. XDocuments.tsx — the counterparty (customer / supplier) first, then the source document, downstream documents with their status, then generated files (external) only when they can be produced.
  3. XForm — flat: no Card, no DocumentHeader, hidden fields grouped in one div.hidden, grids on container queries (@xl:), not viewport breakpoints.
  4. Route shell — <DocumentPage header sidebar> with activity.entityType set to the audited table and refreshKey = updatedAt:status.
  5. Line components that sat in a max-w-5xl column: switch md: / lg: layouts to @container queries — the pane is now resizable.
  6. Verify at 1440 / 1024 / 390 px, the Activity tab with audit logging on, the panel collapse persisting across reloads; typecheck, Biome, lingui:extract.

Pages

  • Shipment — routes/x+/shipment+/$shipmentId.tsx
  • Receipt — routes/x+/receipt+/$receiptId.tsx (ReceiptForm + DocumentHeader)
  • Journal entry — routes/x+/journal-entry+/$journalEntryId.tsx
  • Warehouse transfer — routes/x+/warehouse-transfer+/$transferId.tsx (WarehouseTransferForm + DocumentHeader)
  • Stock transfer — routes/x+/stock-transfer+/$id.tsx (StockTransferHeader)

Same shape

  • Picking list — routes/x+/picking-list+/$pickingListId.tsx (PickingListHeader)
  • Reimbursement — routes/x+/reimbursements+/$reimbursementId.tsx
  • Fixed asset — routes/x+/fixed-asset+/$fixedAssetId.tsx (DocumentHeader)
  • Payment — modules/invoicing/ui/Payment/PaymentForm.tsx (DocumentHeader)
  • Memo (credit) — routes/x+/credits+/$memoId.tsx (MemoForm + DocumentHeader)
  • Depreciation run — routes/x+/depreciation-run+/$depreciationRunId.tsx
  • Revenue recognition run — routes/x+/revenue-recognition-run+/$runId.tsx

Every page passes activity: its record is in auditConfig.entities. Journal entry, payment, memo, reimbursement, picking list and the two runs were added for this (with their line tables; invoiceSettlement is a child of both payment and memo), and their tables queue events through events: true in event-system/attachments.ts (shipped by 20261006221901_posting-documents-audit-events.sql). A record that is not audited may omit activity; the panel then shows Documents alone.

When the last DocumentHeader caller is gone, delete components/DocumentHeader.tsx and update the posting-document archetype in .claude/skills/carbon-design/references/page-archetypes.md §7 and .claude/rules/shipments-receipts-ui-patterns.md (Components → Form).