Parcourir la source

Note npx when opening old notes fix

Vijayakrishnan il y a 3 ans
Parent
commit
a7dc019d0a
1 fichiers modifiés avec 7 ajouts et 2 suppressions
  1. 7 2
      resources/views/app/patient/note/dashboard.blade.php

+ 7 - 2
resources/views/app/patient/note/dashboard.blade.php

@@ -26,8 +26,13 @@
     $doesVisitTemplateUiConfigExist = $uiConfigsPath && file_exists($uiConfigsPath);
     $visitTemplateUiConfig = $doesVisitTemplateUiConfigExist ? json_decode(file_get_contents($uiConfigsPath), true) : null;
 
-    $visitLayoutPath = "app.patient.note.visit-template-ui-layouts.{$note->visitTemplate->internal_name}";
-    $doesVisitTemplateLayoutExist = $isVisitTemplateBased && \Illuminate\Support\Facades\View::exists($visitLayoutPath);
+    $visitLayoutPath = '';
+    $doesVisitTemplateLayoutExist = false;
+
+    if($isVisitTemplateBased) {
+        $visitLayoutPath = "app.patient.note.visit-template-ui-layouts.{$note->visitTemplate->internal_name}";
+        $doesVisitTemplateLayoutExist = $isVisitTemplateBased && \Illuminate\Support\Facades\View::exists($visitLayoutPath);
+    }
 
     $segmentMap = [];
     foreach($note->segments as $segment):