Feature: Add WhatsApp notifications for collection-ready orders

- Implement WhatsApp Business API integration via Meta Cloud API
- Add phoneNumber field to Order model for storing customer phone numbers
- Update admin order detail page with phone number input for collection orders
- Send WhatsApp notification when admin marks order as ready for collection
- Add WhatsApp service module with phone number formatting and message sending
- Create database migrations for collection-related fields
- Add WhatsApp credentials to .env configuration

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-19 09:29:09 +01:00
co-authored by Claude Haiku 4.5
parent a105fdf660
commit 36cc6dddff
26 changed files with 553 additions and 80 deletions
+13 -3
View File
@@ -17,12 +17,22 @@ export default async function AdminNotifications() {
] = await Promise.all([
prisma.order.count({
where: {
status: 'PENDING',
createdAt: { gte: recentThreshold },
OR: [
{
status: 'PENDING',
archived: false,
createdAt: { gte: recentThreshold },
},
{
status: 'PAID',
archived: false,
trackingNumber: null,
},
],
},
}),
prisma.designApproval.count({
where: { status: 'IN_REVIEW' },
where: { status: { in: ['PENDING', 'IN_REVIEW'] } },
}),
prisma.customRequest.count({
where: { status: 'PENDING' },