Add reference size fields to product admin editor

- Add referenceWidthCm and referenceHeightCm to ProductDTO
- Update toProductDTO to include reference size fields
- Add reference size inputs to admin product edit page
- Update updateProduct action to handle reference sizes
- Rulers on personalization page use product reference size

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-18 12:26:16 +01:00
co-authored by Claude Haiku 4.5
parent 740d2bbd29
commit 0e14fc7981
4 changed files with 47 additions and 0 deletions
+2
View File
@@ -21,6 +21,8 @@ export function toProductDTO(p: PrismaProduct, activePromotions: ActivePromotion
printAreaBack: p.printAreaBack ? JSON.parse(p.printAreaBack) : null,
printAreaWidthMm: p.printAreaWidthMm,
printAreaHeightMm: p.printAreaHeightMm,
referenceWidthCm: p.referenceWidthCm,
referenceHeightCm: p.referenceHeightCm,
imageUrl: p.imageUrl,
imageUrlBack: p.imageUrlBack,
photoRecolorable: p.photoRecolorable,
+2
View File
@@ -45,6 +45,8 @@ export type ProductDTO = {
printAreaBack: PrintArea | null;
printAreaWidthMm: number;
printAreaHeightMm: number;
referenceWidthCm: number | null;
referenceHeightCm: number | null;
imageUrl: string | null;
imageUrlBack: string | null;
photoRecolorable: boolean;