diff --git a/README.md b/README.md index c18560f..c7d022b 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,8 @@ docker compose exec backend sh | Feature | Status | Details | |---------|--------|---------| -| Notifications | Backend only | Admin notifications wired; no frontend panel, no push (email/SMS), no regular user notifications | +| Notifications | Backend only | Admin notifications wired; acknowledgment on confirm/cancel; no frontend panel, no push (email/SMS), no regular user notifications | +| User Notification Preferences | DB ready | Table `user_notification_preferences` exists; waiting on user notification system | | GDPR Compliance | DELETE only | `anonymize_user()`, `export_all_user_data()` exist but only DELETE is wired to endpoint | | Analytics | Handler exists | `handlers/admin/analytics.go` exists but NOT wired in router | @@ -341,6 +342,7 @@ grep -rn "console\.log" frontend/src/ --include="*.svelte" --include="*.ts" | `working_hours` | Default weekly schedule | | `exceptional_working_hours_groups` | Holiday/special schedules | | `admin_notifications` | Admin alerts | +| `user_notification_preferences` | User notification preferences (email/sms/push) | | `user_referrals` | Referral tracking | ### Validation Rules diff --git a/obsidian/Crussell/Crussell Nails.md b/obsidian/Crussell/Crussell Nails.md index f18b493..07c7e28 100644 --- a/obsidian/Crussell/Crussell Nails.md +++ b/obsidian/Crussell/Crussell Nails.md @@ -36,9 +36,12 @@ - [x] `/api/admin/users` - List, view with booking history - [x] `/api/admin/today` - Current/next appointment, today's appointments, pending approvals - [x] `/api/admin/notifications` - GET/acknowledge endpoint wired, but: + - [x] **Pending notification acknowledgment** - Acknowledged on confirm/cancel (not deleted) + - [x] **Cancelled booking notification** - Created when cancelling non-pending bookings - [ ] Frontend UI to display notifications - [ ] Push mechanism (currently only pull-based) - [ ] User notifications (only admin notifications exist) + - [ ] User notification preferences (DB table ready) #### Scheduling System - [x] `/api/scheduling/default-hours` - GET public, PUT admin @@ -284,6 +287,7 @@ admin_notification_reason: pending_booking | cancelled_booking | rescheduled_boo | `payments` | Payment transactions | | `business_settings` | Business configuration | | `admin_notifications` | Admin notification queue | +| `user_notification_preferences` | User notification preferences (email/sms/push) | ### Key Functions @@ -325,6 +329,7 @@ admin_notification_reason: pending_booking | cancelled_booking | rescheduled_boo |------|-------------| | **Notifications UI** | Frontend panel to display admin notifications | | **Notifications push** | Real-time notification mechanism (WebSocket/polling) | +| **User notification preferences** | [x] DB table ready, waiting on user notification system | | **User notifications** | Notification system for regular users (booking confirmations, reminders) | | **Remove debug logs** | `console.log` in BookingFlow.svelte:600 and BookingCreateModal.svelte:224 | | **S3/R2 image hosting** | Portfolio image storage with admin upload | @@ -432,6 +437,8 @@ src/lib/components/ - **GDPR functions exist in SQL** (`anonymize_user`, `export_all_user_data`, `delete_guest_user`) but only `DELETE /api/user/account` is wired - need user data export and admin tax export endpoints - **Debug console.logs** in `BookingFlow.svelte:600` and `BookingCreateModal.svelte:224` should be removed before production - **Notifications** are pull-based only (no push/WebSocket). Admin endpoint exists but no frontend UI. No user-facing notification system yet. +- **Notification acknowledgment**: When a booking is confirmed, any pending notification is acknowledged. When cancelled, pending is acknowledged and cancelled_booking notification is only created if the booking was not in pending status (e.g. was confirmed or in_progress). +- **User notification preferences**: `user_notification_preferences` table exists with email/sms/push enabled flags, waiting on user notification system to be implemented. ---