generated sotries
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
# Story 8.9: Admin Notification - New Booking
|
||||
|
||||
## Epic Reference
|
||||
**Epic 8:** Email Notification System
|
||||
|
||||
## User Story
|
||||
As an **admin**,
|
||||
I want **to be notified when a client submits a booking request**,
|
||||
So that **I can review and respond promptly**.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
### Trigger
|
||||
- [ ] Sent on booking submission by client
|
||||
|
||||
### Recipient
|
||||
- [ ] Admin email address
|
||||
|
||||
### Content
|
||||
- [ ] "New Consultation Request"
|
||||
- [ ] Client name (individual or company)
|
||||
- [ ] Requested date and time
|
||||
- [ ] Problem summary (full)
|
||||
- [ ] Client contact info
|
||||
- [ ] "Review Request" button/link
|
||||
|
||||
### Priority
|
||||
- [ ] Clear indicator in subject line
|
||||
|
||||
### Language
|
||||
- [ ] Admin language preference (or default)
|
||||
|
||||
## Technical Notes
|
||||
|
||||
```php
|
||||
class NewBookingAdminNotification extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct(
|
||||
public Consultation $consultation
|
||||
) {}
|
||||
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
return (new MailMessage)
|
||||
->subject('[Action Required] New Consultation Request')
|
||||
->markdown('emails.admin.new-booking', [
|
||||
'consultation' => $this->consultation,
|
||||
'client' => $this->consultation->user,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger in booking submission
|
||||
$admin = User::where('user_type', 'admin')->first();
|
||||
$admin?->notify(new NewBookingAdminNotification($consultation));
|
||||
```
|
||||
|
||||
## Definition of Done
|
||||
- [ ] Email sent to admin on new booking
|
||||
- [ ] All client info included
|
||||
- [ ] Problem summary shown
|
||||
- [ ] Review link works
|
||||
- [ ] Priority clear in subject
|
||||
- [ ] Tests pass
|
||||
|
||||
## Estimation
|
||||
**Complexity:** Low | **Effort:** 2 hours
|
||||
Reference in New Issue
Block a user