Implement new server-side ranked quote search endpoint at `/api/v1/quotes/search`, replacing the legacy 500-row client-side substring scan that missed older quotes and didn't rank results by relevance. The new search scores matches across quote identifiers, customer/company headers, and line item fields. Update PO number generation and validation to use a dashless format (POYYYYMMNNNXXX) with per-company scoped sequence numbers, and ignore legacy PO formats when calculating new sequences. Remove legacy `searchQuotesWithItems` function and its associated test file, then update the quotes page to use the new server-side search API. Add comprehensive unit and integration tests for the new quote search service and updated PO number logic. |
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| lib | ||
| styles | ||
| middleware.ts | ||
| test-setup.ts | ||