Commit Graph
60 Commits
Author SHA1 Message Date
Andymick 60cb73f8a4 Fix: Calculate effectivePrice in design API endpoints
The design API was returning raw product data without calculating
effectivePrice, which caused prices to not be set when items were added
to the cart. Now uses toProductDTO to properly calculate the effective
price (accounting for sales) before returning design data.

Fixes issue where design reviews showed correct price but cart showed £0.00
2026-07-18 19:51:07 +01:00
Andymick 62ae2755f0 Fix price display issues and layout in design review page
- Add defensive checks in cart store to handle missing/NaN unitPrice values
- Display '—' for items with invalid prices instead of NaN
- Fix design review page grid layout to align buttons at top of page
- Ensure buttons don't get pushed below images on review page
2026-07-18 19:46:11 +01:00
AndymickandClaude Haiku 4.5 609cfdb7d6 Update local settings tracking
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-18 18:27:33 +01:00
AndymickandClaude Haiku 4.5 ac27cc554b Add design approval workflow infrastructure: PATCH endpoint, email notifications, and message types
- Add PATCH method to /api/designs/[id]/route.ts for status updates
- Create sendDesignReadyForReview email template for customer notifications
- Enhance /api/designs/[id]/messages to support messageType field (MESSAGE | CHANGE_REQUEST)
- Add database migration for messageType field with MESSAGE default

This completes the backend infrastructure for the multi-step design approval workflow:
1. Admin edits and sends design to customer for review
2. Customer approves design or requests changes
3. Admin receives notifications for change requests

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-18 17:11:10 +01:00
AndymickandClaude Haiku 4.5 4d124b1550 Add customer approval status messages and admin delete option
Customer-facing changes:
- Show approval status message when design is submitted
- Display pending approval notification with email confirmation
- Show approved confirmation when design is ready
- Show rejection message for designs needing changes

Admin-facing changes:
- Add delete button to design approval detail page
- Confirmation dialog before deletion
- Proper cleanup of design and associated messages
- Redirect to designs list after deletion

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-18 16:48:35 +01:00
AndymickandClaude Haiku 4.5 10af792261 Remove reviews section from product pages
- Delete Reviews.tsx component
- Remove Reviews from standard product page
- Remove Reviews from made-to-order product page
- Simplify page layout by removing review section

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-18 16:24:28 +01:00
AndymickandClaude Haiku 4.5 5c4774be84 Add design approval workflow and per-image dimension tracking
- Add DesignApproval and DesignApprovalMessage models for design review workflow
- Add design approval admin interface (list, detail, chat, approve/reject)
- Add per-image dimension tracking to OrderItem
- Add design submission API endpoint
- Add AdminDesignEditor for admin-side design modifications
- Add DesignApprovalChat component for customer-admin communication
- Update design specification generation with image dimension details
- Add design persistence across login with next parameter redirect
- Add font properties UI with font size and color display

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-18 16:21:19 +01:00
AndymickandClaude Haiku 4.5 39f54dedee Wire Stage 3 reports to real data
Created getReportData server action to fetch Orders, ManualSales, and
Expenses from database. Split reports page into server component (fetches
data) and client component (renders charts). Reports now display actual
business data instead of mock data - monthly profit, expense breakdown,
and cash flow tables.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-15 19:24:56 +01:00
AndymickandClaude Haiku 4.5 339b2d960e Remove AdminMenu from public site header
Hide admin interface completely from public site. Admins access /admin/login
directly. Cleaner separation between customer-facing UI and back office.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-15 19:18:51 +01:00
Andymick 41937ffc15 Initial commit: Craft2Prints with Stages 1-3 2026-07-15 18:09:59 +01:00