@@ -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');
@@ -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;