Overhaul the app's color system by replacing all hardcoded Tailwind color classes with semantic theme variables to ensure consistent theming across all components, pages, and tests.
Additional changes:
- Add assigned date support for order item status updates: add `assignedDate` field to the order item status PATCH API, implement server-side normalization/validation, and add corresponding tests
- Refactor purchase order PDF workflows to use the consolidated `purchase_orders.documents` field instead of the legacy separate `purchase_order_pdfs` collection
- Fix quote number parsing and formatting to support both dashed (Q-YYYY-MM-NNN) and dashless (QYYYYMMNNN) formats
- Rename `driver_pool` item status to `collection_pool` across the codebase
- Add null handling for order item quantities and pricing to display "—" for missing values
- Improve filter tab styling: make mobile tabs scrollable, prevent text wrapping, hide scrollbar
- Add new utility scripts, API routes, migrations, and polish small UI/UX fixes including tsconfig updates and theme hook improvements
The list page had grown 10 colour-coded tabs (one per legacy PB status)
that fragmented the workflow rather than grouping it. Merging the
overlapping concepts into workflow buckets per the operator's flow:
- new ← new + follow_up (follow-up rows show a bell chip)
- claimed ← claimed
- pending_approval ← processed + approval_pending + sending
- completed ← approved + complete + emailed + cancelled + rejected
(emailed renders as 'Awaiting reply', cancelled + rejected
are substatus pills inside the Completed tab)
- email_failed ← email_failed + mail_failed + unmatched_bounce (new tab)
- problem ← problem
- templates ← is_template = true
- all ← catch-all
Two row-level indicators added next to the quote number:
- Bell chip for follow-up rows (status=follow_up OR follow_up_due set
on an actionable status). Colour flips to red when overdue.
- Reply-bubble chip for rows where last_reply_at is set, so the
operator can distinguish 'fresh new' from 'replied new' at a glance.
Implementation notes:
- getQuotes now accepts string[] statuses and OR-chains them in the
PB filter (PB 0.26 has no IN operator). getQuoteStatusCounts sums
per-status totals into the new tab buckets in one batch.
- formatQuoteStatus gains workflow-friendly label overrides
('Awaiting reply', 'Sending…', 'Pending approval', etc.) shared by
the list, archived, and process pages.
- The detail page's local statusLabels map is kept in sync so toast
+ history-row interpolations read correctly.
Tests: 229/230 vitest (the 1 failure is the pre-existing attachments
off-by-one, unrelated to this change). Updated quote-status.test.ts
for the new label overrides.
Add complete quote template functionality, enhanced outbound email sending, new quote statuses, and supporting infrastructure:
- Add new quote statuses (template, sending, mail_failed) with tailored UI styling for status pills
- Implement full template workflows: save real quotes as templates, create new quotes from existing templates
- Add support for custom quote dates and extended validity periods on generated PDF documents
- Build out improved email pipeline with persisted compose fields and retry functionality for failed sends
- Add attachment direction tracking to categorize inbound, outbound, and generated quote attachments
- Fix tooltip component to properly handle Radix `asChild` prop to avoid React DOM attribute errors
- Add comprehensive test coverage, schema migrations, and update sample test and production data
Fix inconsistent line endings across all project files for cross-environment consistency.
Add complete unit test suite covering core utilities, API routes, and server services.
Add Playwright E2E test setup with smoke, auth, and agent API tests.
Update all project configuration files to match standardized formatting.
Fix MCP API error handling to properly propagate HTTP status codes and use correct JSON-RPC error codes.
Add VSCode workspace configuration, extensions, and example MCP config files.
Update .gitignore to exclude new test and build artifacts.