Преглед изворни кода

Alert if note not signed by HCP

Samson Mutunga пре 3 година
родитељ
комит
5c7a2fd518
2 измењених фајлова са 10 додато и 0 уклоњено
  1. 5 0
      app/Models/SupplyOrder.php
  2. 5 0
      resources/views/app/patient/shipments.blade.php

+ 5 - 0
app/Models/SupplyOrder.php

@@ -49,4 +49,9 @@ class SupplyOrder extends Model
     {
         return $this->hasOne(Pro::class, 'id', 'created_by_pro_id');
     }
+
+    public function Note()
+    {
+        return $this->hasOne(Note::class, 'id', 'note_id');
+    }
 }

+ 5 - 0
resources/views/app/patient/shipments.blade.php

@@ -178,6 +178,11 @@
                                                     </div>
                                                 </form>
                                             </div>
+                                            @if($iSupplyOrder->note && !$iSupplyOrder->note->is_signed_by_hcp)
+                                                <small class="text-danger text-sm">
+                                                <i class="fas fa-exclamation-triangle text-danger"></i> Note not signed by HCP.
+                                                </small>
+                                            @endif
                                         </td>
                                     </tr>
                                 @endforeach