Ver Fonte

fixed patients table timezone

Josh há 4 anos atrás
pai
commit
18ae600570

+ 1 - 1
app/Http/Controllers/HomeController.php

@@ -335,7 +335,7 @@ class HomeController extends Controller
             default:
                 break;
         }
-        $patients = $query->orderBy('name_last', 'asc')->orderBy('name_first', 'asc')->get();
+        $patients = $query->orderBy('created_at', 'asc')->orderBy('name_last', 'asc')->orderBy('name_first', 'asc')->get();
         return view('app/patients', compact('patients', 'filter'));
     }
 

+ 3 - 1
resources/views/app/patients.blade.php

@@ -19,6 +19,7 @@
             <table class="table table-condensed p-0 m-0">
                 <thead class="bg-light">
                 <tr>
+                    <th></th>
                     <th class="px-3 border-0">#</th>
                     <th class="border-0">Name</th>
                     <th class="border-0">Created At</th>
@@ -33,6 +34,7 @@
                 <tbody>
                 @foreach($patients as $patient)
                     <tr>
+                        <td>{{$loop->index + 1}}</td>
                         <td class="px-3">
                             <a href="{{route('patients.view.dashboard', $patient)}}">
                                 {{$patient->chart_number}}
@@ -44,7 +46,7 @@
                             <span title="MCP Onboarding Visit Pending"><i class="fa fa-exclamation-triangle"></i></span>
                             @endif
                         </td>
-                        <td>{{friendly_date_time($patient->created_at)}}</td>
+                        <td>{{friendly_date_time_short_with_tz($patient->created_at, true, 'EASTERN')}}</td>
                         <td>{{ friendly_date_time($patient->dob, false) }}</td>
                         <td>{{ $patient->sex === 'M' ? 'Male' : ($patient->sex === 'F' ? 'Female' : '-') }}</td>
                         <td>