Просмотр исходного кода

Note npx when opening old notes fix

Vijayakrishnan 3 лет назад
Родитель
Сommit
a7dc019d0a
1 измененных файлов с 7 добавлено и 2 удалено
  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):