- Add server-side `/api/v1/dashboard` endpoint to reduce client-side payload and round trips - Implement invoice upload and order-item SKU update APIs with complete test suites - Refactor order and order-items list endpoints (including MCP tools) to support proper PocketBase filter and sort params - Fix pagination validation for order-items route to clamp page ≥1 and perPage 1-500 - Add redirects in next.config.ts to map underscore collection paths to hyphenated API routes - Improve buyer tasks page to avoid redundant tab count refetches when switching tabs - Refactor collection confirm components with editable SKUs and updated accessibility labels - Add cached admin PocketBase auth to minimize repeated authentication calls - Add performance testing scripts for dashboard endpoint latency - Update quotes list route to default to excluding archived counts - Fix photo strip component text and labels for non-invoice documents - Refactor sprint page to lazy load supplier/customer data for pricing modal - Clean up unused imports in test files - Add full test coverage for all new APIs, services, and components
26 lines
1.4 KiB
TypeScript
26 lines
1.4 KiB
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
// Dev server blocks cross-origin HMR requests by default in Next 16. The
|
|
// app is normally loaded on `localhost`, but we also load it on
|
|
// `127.0.0.1` (and on the LAN IP for phone testing). Listing both keeps
|
|
// the HMR client from hanging on the first load.
|
|
allowedDevOrigins: ["127.0.0.1", "localhost", "192.168.1.42", "192.168.1.122", "192.168.1.128", "*"],
|
|
// The agent (and any external tools) sometimes reach for the PocketBase
|
|
// collection name verbatim — `order_items`, `stock_items`, `quote_items`
|
|
// — and get a 404 because the route folders use hyphens (`order-items`).
|
|
// Redirect the underscore variants to the hyphenated route so the agent
|
|
// stops confusing the PB collection name with the URL path.
|
|
async redirects() {
|
|
return [
|
|
{ source: "/api/v1/order_items", destination: "/api/v1/order-items", permanent: true },
|
|
{ source: "/api/v1/stock_items", destination: "/api/v1/stock-items", permanent: true },
|
|
{ source: "/api/v1/quote_items", destination: "/api/v1/quote-items", permanent: true },
|
|
{ source: "/api/v1/stock_purchases", destination: "/api/v1/stock-purchases", permanent: true },
|
|
{ source: "/api/v1/stock_quick_draft", destination: "/api/v1/stock-quick-draft", permanent: true },
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|