浏览代码

Visit UI - print for visit notes

Vijayakrishnan 3 年之前
父节点
当前提交
27bf6d9dd6

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

@@ -295,7 +295,7 @@ class NoteController extends Controller
         }
         else {
             $pdf = \PDF::loadView('app.patient.note.pdf', compact('note', 'patient'));
-            return $pdf->download($note->created_at .'_' . 'note.pdf');
+            return $pdf->stream($note->created_at .'_' . 'note.pdf');
         }
     }
 

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

@@ -49,7 +49,13 @@
                     <span class="text-secondary font-weight-normal">{{ $note->is_cancelled ? '(CANCELLED)' : '' }}</span>
                 </span>
                 @if($pro->pro_type === 'ADMIN')
-                    <a href="#" class="print-note ml-3 btn btn-sm btn-primary text-white font-weight-bold invisible"><i class="fa fa-print"></i> Print</a>
+                    @if(!!$note->visitTemplate)
+                        <a native target="_blank"
+                           href="{{route('note-pdf', ['note' => $note])}}"
+                           class="ml-3 btn btn-sm btn-primary text-white font-weight-bold"><i class="fa fa-print"></i> Print</a>
+                    @else
+                        <a href="#" class="print-note ml-3 btn btn-sm btn-primary text-white font-weight-bold invisible"><i class="fa fa-print"></i> Print</a>
+                    @endif
                     <?php
                     $isBad = false;
                     $isGood = false;

文件差异内容过多而无法显示
+ 0 - 1
resources/views/app/patient/note/pdf.blade.php


部分文件因为文件数量过多而无法显示