فهرست منبع

Appointment confirmation fixes

Vijayakrishnan 3 سال پیش
والد
کامیت
67f8eb937f
2فایلهای تغییر یافته به همراه11 افزوده شده و 1 حذف شده
  1. 4 0
      app/Models/AppointmentConfirmationDecision.php
  2. 7 1
      resources/views/app/guest/appointment-confirmation.blade.php

+ 4 - 0
app/Models/AppointmentConfirmationDecision.php

@@ -10,4 +10,8 @@ class AppointmentConfirmationDecision extends Model
 {
     protected $table = 'appointment_confirmation_decision';
 
+    public function session() {
+        return $this->hasOne(AppSession::class, 'id', 'created_by_session_id');
+    }
+
 }

+ 7 - 1
resources/views/app/guest/appointment-confirmation.blade.php

@@ -53,7 +53,13 @@
                     @else
 
                         @foreach($appointment->confirmationDecisions as $decision)
-                            <div class="mb-2"><b>{{$decision->accepted_or_rejected}}</b> on <b>{{friendlier_date_time($decision->created_at)}}</b></div>
+                            <div class="mb-2"><b>{{$decision->accepted_or_rejected}}</b> on <b>{{friendlier_date_time($decision->created_at)}}</b>
+                                @if($decision->session && $decision->session->pro)
+                                    by <b>{{$decision->session->pro->displayName()}}</b>
+                                @elseif($decision->session && $decision->session->client)
+                                    by <b>{{$decision->session->client->displayName()}}</b>
+                                @endif
+                            </div>
                         @endforeach
 
                     @endif