72 lines
1.7 KiB
Markdown
72 lines
1.7 KiB
Markdown
# Story 7.5: New Booking Interface
|
|
|
|
## Epic Reference
|
|
**Epic 7:** Client Dashboard
|
|
|
|
## User Story
|
|
As a **client**,
|
|
I want **to submit new consultation booking requests**,
|
|
So that **I can schedule meetings with the lawyer**.
|
|
|
|
## Acceptance Criteria
|
|
|
|
### Access
|
|
- [ ] Quick access from dashboard
|
|
- [ ] Book Now button in navigation
|
|
|
|
### Calendar View
|
|
- [ ] Calendar showing available dates
|
|
- [ ] Available time slots for selected date
|
|
|
|
### Booking Form
|
|
- [ ] Selected date/time (display)
|
|
- [ ] Problem summary (required, textarea)
|
|
- [ ] Submit button
|
|
|
|
### Validation
|
|
- [ ] Enforce 1 booking per day limit
|
|
- [ ] Show warning if already booked that day
|
|
- [ ] Prevent booking on unavailable slots
|
|
|
|
### Submission Flow
|
|
- [ ] Confirmation before submission
|
|
- [ ] Success message with "Pending Review" status
|
|
- [ ] Redirect to consultations list
|
|
|
|
## Technical Notes
|
|
|
|
Reuse availability calendar from Story 3.3 and booking submission from Story 3.4.
|
|
|
|
```php
|
|
new class extends Component {
|
|
public ?string $selectedDate = null;
|
|
public ?string $selectedTime = null;
|
|
public string $problemSummary = '';
|
|
|
|
public function submit(): void
|
|
{
|
|
// Validation and submission logic from Story 3.4
|
|
}
|
|
|
|
public function canBookDate(string $date): bool
|
|
{
|
|
return !auth()->user()->consultations()
|
|
->whereDate('scheduled_date', $date)
|
|
->whereIn('status', ['pending', 'approved'])
|
|
->exists();
|
|
}
|
|
};
|
|
```
|
|
|
|
## Definition of Done
|
|
- [ ] Calendar displays correctly
|
|
- [ ] Time slots selectable
|
|
- [ ] 1-per-day limit enforced
|
|
- [ ] Problem summary required
|
|
- [ ] Confirmation shown
|
|
- [ ] Booking submitted successfully
|
|
- [ ] Tests pass
|
|
|
|
## Estimation
|
|
**Complexity:** Medium | **Effort:** 3-4 hours
|