Selaa lähdekoodia

Patient single - show created by and at to ADMINs

Vijayakrishnan 3 vuotta sitten
vanhempi
commit
67f9638298
2 muutettua tiedostoa jossa 13 lisäystä ja 0 poistoa
  1. 5 0
      app/Models/Client.php
  2. 8 0
      resources/views/layouts/patient.blade.php

+ 5 - 0
app/Models/Client.php

@@ -85,6 +85,11 @@ class Client extends Model
         return $this->hasOne(Pro::class, 'id', 'default_na_pro_id');
         return $this->hasOne(Pro::class, 'id', 'default_na_pro_id');
     }
     }
 
 
+    public function creator()
+    {
+        return $this->hasOne(Pro::class, 'id', 'created_by_pro_id');
+    }
+
     public function prosInMeetingWith()
     public function prosInMeetingWith()
     {
     {
         return Pro::where('in_meeting_with_client_id', $this->id)->get();
         return Pro::where('in_meeting_with_client_id', $this->id)->get();

+ 8 - 0
resources/views/layouts/patient.blade.php

@@ -380,6 +380,14 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 													<i class="fa fa-info-circle ml-1 text-primary"></i>
 													<i class="fa fa-info-circle ml-1 text-primary"></i>
 													<div class="on-hover-content py-2 pl-3 text-nowrap">
 													<div class="on-hover-content py-2 pl-3 text-nowrap">
 														Joined <?=$memberSince?>
 														Joined <?=$memberSince?>
+														@if($pro->pro_type === 'ADMIN')
+															<div class="mt-1">
+																Created by <b>{{$patient->creator ? $patient->creator->displayName() : '-'}}</b>
+															</div>
+															<div class="mt-1">
+																Created on <b>{{friendly_date_time($patient->created_at)}}</b>
+															</div>
+														@endif
 													</div>
 													</div>
 												</span>
 												</span>
 											</div>
 											</div>