complete story 8.9 with qa tests
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<x-mail::message>
|
||||
<div dir="rtl" style="text-align: right;">
|
||||
# طلب استشارة جديد
|
||||
|
||||
تم تقديم طلب استشارة جديد ويتطلب مراجعتك.
|
||||
|
||||
**معلومات العميل:**
|
||||
|
||||
@if($client->user_type === 'company')
|
||||
- **الشركة:** {{ $client->company_name }}
|
||||
- **الشخص المسؤول:** {{ $client->contact_person_name }}
|
||||
@else
|
||||
- **الاسم:** {{ $client->full_name }}
|
||||
@endif
|
||||
- **البريد الإلكتروني:** {{ $client->email }}
|
||||
- **الهاتف:** {{ $client->phone }}
|
||||
- **نوع العميل:** {{ $client->user_type === 'company' ? 'شركة' : 'فرد' }}
|
||||
|
||||
**تفاصيل الموعد:**
|
||||
|
||||
- **التاريخ:** {{ $formattedDate }}
|
||||
- **الوقت:** {{ $formattedTime }}
|
||||
|
||||
**ملخص المشكلة:**
|
||||
|
||||
{{ $consultation->problem_summary }}
|
||||
|
||||
<x-mail::button :url="$reviewUrl">
|
||||
مراجعة الطلب
|
||||
</x-mail::button>
|
||||
|
||||
مع أطيب التحيات،<br>
|
||||
{{ config('app.name') }}
|
||||
</div>
|
||||
</x-mail::message>
|
||||
@@ -0,0 +1,33 @@
|
||||
<x-mail::message>
|
||||
# New Consultation Request
|
||||
|
||||
A new consultation request has been submitted and requires your review.
|
||||
|
||||
**Client Information:**
|
||||
|
||||
@if($client->user_type === 'company')
|
||||
- **Company:** {{ $client->company_name }}
|
||||
- **Contact Person:** {{ $client->contact_person_name }}
|
||||
@else
|
||||
- **Name:** {{ $client->full_name }}
|
||||
@endif
|
||||
- **Email:** {{ $client->email }}
|
||||
- **Phone:** {{ $client->phone }}
|
||||
- **Client Type:** {{ ucfirst($client->user_type) }}
|
||||
|
||||
**Appointment Details:**
|
||||
|
||||
- **Date:** {{ $formattedDate }}
|
||||
- **Time:** {{ $formattedTime }}
|
||||
|
||||
**Problem Summary:**
|
||||
|
||||
{{ $consultation->problem_summary }}
|
||||
|
||||
<x-mail::button :url="$reviewUrl">
|
||||
Review Request
|
||||
</x-mail::button>
|
||||
|
||||
Regards,<br>
|
||||
{{ config('app.name') }}
|
||||
</x-mail::message>
|
||||
@@ -3,13 +3,14 @@
|
||||
use App\Enums\ConsultationStatus;
|
||||
use App\Enums\PaymentStatus;
|
||||
use App\Mail\BookingSubmittedMail;
|
||||
use App\Mail\NewBookingRequestMail;
|
||||
use App\Mail\NewBookingAdminEmail;
|
||||
use App\Models\AdminLog;
|
||||
use App\Models\Consultation;
|
||||
use App\Models\User;
|
||||
use App\Services\AvailabilityService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Livewire\Volt\Component;
|
||||
|
||||
@@ -147,8 +148,12 @@ new class extends Component
|
||||
$admin = User::query()->where('user_type', 'admin')->first();
|
||||
if ($admin) {
|
||||
Mail::to($admin)->queue(
|
||||
new NewBookingRequestMail($consultation)
|
||||
new NewBookingAdminEmail($consultation)
|
||||
);
|
||||
} else {
|
||||
Log::warning('No admin user found to notify about new booking', [
|
||||
'consultation_id' => $consultation->id,
|
||||
]);
|
||||
}
|
||||
|
||||
// Log action
|
||||
|
||||
Reference in New Issue
Block a user