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>
This commit is contained in:
Andymick
2026-07-18 17:11:10 +01:00
co-authored by Claude Haiku 4.5
parent 4d124b1550
commit ac27cc554b
10 changed files with 431 additions and 42 deletions
+4 -1
View File
@@ -52,7 +52,10 @@
"Bash(git commit -m 'Reorganize design canvas layout to be more compact *)",
"Bash(git commit -m 'Make image dimensions and font properties collapsible sections *)",
"Bash(rm -rf \"D:\\\\Craft2Prints\\\\src\\\\app\\\\api\\\\designs\\\\[id]\\\\delete\" && echo \"Deleted unnecessary delete folder\")",
"Bash(git commit -m 'Add customer approval status messages and admin delete option *)"
"Bash(git commit -m 'Add customer approval status messages and admin delete option *)",
"Bash(grep -n '`' \"D:\\\\Craft2Prints\\\\src\\\\components\\\\DesignCanvas.tsx\")",
"Bash(npx prettier *)",
"Bash(git commit -m 'Add design approval workflow infrastructure: PATCH endpoint, email notifications, and message types *)"
]
}
}