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.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
Date Range Filter (table dateRange + batch builder Custom due)
Last tested: 2026-10-06
Routes: /x/production/jobs, /x/sales/orders, /x/invoicing/sales,
/x/inventory/stock-movements, /x/production/batches/new
Prerequisites
- A seeded company (dev seed / demo dataset) with jobs that have due dates,
sales orders, sales invoices with
dateDue, and item ledger rows. - Batch builder: a
processwithbatchable = trueand unbatched, unstarted operations on it at one location (demo data: Manufacturing Plant / PCB Assembly). - A "Forgot to Clock Out?" modal may cover the app after login. Click "I'm Still Working" (sessionStorage-only, writes nothing). Escape does not close it.
Steps
1. Table filter via UI (Jobs)
/x/production/jobs→ click Filter → option Due Date → a popover with From / To date fields (DD/MM/YYYY segments in an en-GB locale).- Click the
spinbutton "day, From"segment and type the digits (01102026). The URL updates after ~400 ms to?filter=dueDate:between:2026-10-01,. - Then the
spinbutton "day, To"segment →15102026→ URL…between:2026-10-01,2026-10-15.
2. Verify
- Compare the rows with the DB:
select "jobId" from job where "dueDate" between '…' and '…'. - Chip reads
Due Date · is between · 1 Oct 2026 – 15 Oct 2026; open-ended ranges readis on or after/is on or before. - A From after To leaves the URL unchanged and flags both fields.
- Chip Remove filter clears it.
- Faster for other lists: load the URL directly
(
?filter=<col>:between:<from>,<to>, either side empty) and read the pagination total (the text after100 rows→ "1", "N").
3. Batch builder Custom due
/x/production/batches/new→ process combobox → PCB Assembly.- Due toggle:
radio "All" / "7d" / "14d" / "30d", plus an unnamed radio = Custom. - Custom shows inline From / To fields, and the From calendar opens on its own.
Days with candidates due show a dot (navigate months with the
Previousbutton). - Type in the segments as above. The list filters client-side immediately.
Selector Notes
- Date segments:
spinbutton "day, From","month, From","year, From"(same for To). - Clearing a field: click each segment and press Backspace until it reads 0.
- Count job rows:
[...document.querySelectorAll('tbody tr')], then take theJ0…text. Lists have one extra non-datatbody tr, so use the pagination total for counts. - Candidates API (for expected values):
/api/production/batchable-operations?location=<id>&process=<id>. Effective due =dueDate ?? jobDueDate. Operations already in a batch render as aBAT…row, not as candidates.
Common Failures
- Escape in the batch builder closes the whole New Batch modal, not just the calendar popover.
- Typing a two-digit day passes through a one-digit intermediate ("2" then
"20"). Fixed 2026-10-06:
DateRangeFieldsemitsnullfor an invalid range, so the debounce restarts and the intermediate value is never applied. - Stock movements and other lists show one more
tbody trthan there are rows. Use the pagination total.