feat/frontend-phase2 #9
|
|
@ -1,6 +1,6 @@
|
|||
# Phase 2 implementation verification — 13 October 2026
|
||||
|
||||
Final local gate: 29 tests passed, strict TypeScript and lint passed, production build passed with all 27 JavaScript chunks below 500 kB (largest approximately 494 kB). The dependency audit reported zero vulnerabilities.
|
||||
Final local gate: 30 tests passed, strict TypeScript and lint passed, production build passed with all 27 JavaScript chunks below 500 kB (largest approximately 494 kB). The dependency audit reported zero vulnerabilities.
|
||||
|
||||
| Area | Evidence / outcome |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { z } from "zod";
|
||||
export const uuid = z.string().uuid();
|
||||
export const uuid = z.string().uuid().toLowerCase();
|
||||
export const currency = z.enum(["INR", "USD", "EUR", "GBP"]);
|
||||
export const decimal = z.string().regex(/^\d+(?:\.\d{1,2})?$/);
|
||||
export const amount = z.string().regex(/^(0|[1-9]\d{0,9})\.\d{2}$/);
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ export default function CatalogAdminPage({ id }: { id?: string }) {
|
|||
{id && !uuid.safeParse(id).success ? (
|
||||
<Alert severity="error">Invalid product identifier.</Alert>
|
||||
) : id ? (
|
||||
<ProductEditor key={id} id={id} />
|
||||
<ProductEditor key={uuid.parse(id)} id={uuid.parse(id)} />
|
||||
) : (
|
||||
<Products />
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ export default function InventoryPage({ id }: { id?: string }) {
|
|||
{id && !uuid.safeParse(id).success ? (
|
||||
<Alert severity="error">Invalid stock identifier.</Alert>
|
||||
) : id ? (
|
||||
<StockEditor key={id} id={id} />
|
||||
<StockEditor key={uuid.parse(id)} id={uuid.parse(id)} />
|
||||
) : (
|
||||
<StockList />
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ export default function OrdersPage({
|
|||
{id && !uuid.safeParse(id).success ? (
|
||||
<Alert severity="error">Invalid order identifier.</Alert>
|
||||
) : id ? (
|
||||
<OrderDetail key={id} admin={admin} id={id} />
|
||||
<OrderDetail key={uuid.parse(id)} admin={admin} id={uuid.parse(id)} />
|
||||
) : (
|
||||
<OrderList admin={admin} />
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import {
|
|||
variant,
|
||||
warehouse,
|
||||
stock,
|
||||
stockInput,
|
||||
adminProductSummary,
|
||||
pricing,
|
||||
checkoutInput,
|
||||
|
|
@ -27,6 +28,15 @@ const id = "d66c798a-f764-4b88-8d13-ace328ff1010";
|
|||
test("organization UUIDs normalize case before session organization checks", () => {
|
||||
assert.equal(organizationSchema.parse(id.toUpperCase()), id);
|
||||
});
|
||||
test("stock identifiers normalize case before request and retry scopes", () => {
|
||||
assert.equal(
|
||||
stockInput.parse({
|
||||
variantId: id.toUpperCase(),
|
||||
warehouseId: id.toUpperCase(),
|
||||
}).variantId,
|
||||
id,
|
||||
);
|
||||
});
|
||||
test("response schemas accept persisted metadata while write schemas stay strict", () => {
|
||||
const extra = {
|
||||
id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue