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>
This commit is contained in:
Andymick
2026-07-18 16:48:35 +01:00
co-authored by Claude Haiku 4.5
parent 95c1255811
commit 4d124b1550
4 changed files with 80 additions and 1 deletions
+16
View File
@@ -1125,6 +1125,22 @@ export default function DesignCanvas({ product }: { product: ProductDTO }) {
</div>
</div>
{approvalStatus === 'PENDING' && (
<p className="text-sm text-orange-600 bg-orange-50 border border-orange-200 px-4 py-3 rounded">
Your design is pending admin approval. You'll receive an email when it's ready to add to your bag.
</p>
)}
{approvalStatus === 'APPROVED' && (
<p className="text-sm text-pine bg-green-50 border border-green-200 px-4 py-3 rounded">
Your design has been approved! You can now add it to your bag.
</p>
)}
{approvalStatus === 'REJECTED' && (
<p className="text-sm text-splash-pink bg-red-50 border border-splash-pink/30 px-4 py-3 rounded">
Your design needs changes. Check your messages for feedback.
</p>
)}
<div className="grid grid-cols-2 gap-4">
<div>
<p className="tag-label mb-2">Color</p>