Ver Fonte

fixed null pointer

= há 3 anos atrás
pai
commit
056424fcaf
1 ficheiros alterados com 5 adições e 1 exclusões
  1. 5 1
      resources/views/app/patient/dashboard.blade.php

+ 5 - 1
resources/views/app/patient/dashboard.blade.php

@@ -34,7 +34,11 @@
             <div class="col-6">
 
                 {{-- rpm summary for current caremonth --}}
-                @include('app/patient/partials/caremonth-summary', ['careMonth' => $patient->currentCareMonth()])
+                @if($patient->currentCareMonth())
+                    @include('app/patient/partials/caremonth-summary', ['careMonth' => $patient->currentCareMonth()])
+                @else 
+                    <div class="alert alert-info">No caremonth for this month.</div>
+                @endif
 
                 {{-- appointments --}}
                 @include('app/patient/partials/appointments')