From 2365ac1ca73205152828a2a2c5fabaa853f4a37c Mon Sep 17 00:00:00 2001 From: Dr Masroor Ehsan Date: Sat, 18 Jan 2025 14:51:24 +0600 Subject: [PATCH] UI fixes --- app/DataTables/WorklistDataTable.php | 12 +-- .../Controllers/Staff/ReportController.php | 4 +- .../reports/viewer/html-report.blade.php | 75 ++++++++++++++++--- 3 files changed, 72 insertions(+), 19 deletions(-) diff --git a/app/DataTables/WorklistDataTable.php b/app/DataTables/WorklistDataTable.php index 9a9b084..58a402d 100644 --- a/app/DataTables/WorklistDataTable.php +++ b/app/DataTables/WorklistDataTable.php @@ -209,11 +209,6 @@ public function getColumns(): array return $columns; } - private function columTitle(string $str): string - { - return Str::of($str)->slug()->replace('-', ' ')->title()->toString(); - } - /** * Get the filename for export. */ @@ -228,12 +223,17 @@ protected function filename(): string return Str::slug(implode(' ', $parts), '_'); } + private function columTitle(string $str): string + { + return Str::of($str)->slug()->replace('-', ' ')->title()->toString(); + } + private function physicianColumn(Study $study): ?string { $user = $study->readingPhysician; if ($user === null) { if ($study->assigned_at !== null) { - return ''; + return ''; } return null; diff --git a/app/Http/Controllers/Staff/ReportController.php b/app/Http/Controllers/Staff/ReportController.php index 5ac12a2..2988ac8 100644 --- a/app/Http/Controllers/Staff/ReportController.php +++ b/app/Http/Controllers/Staff/ReportController.php @@ -83,15 +83,17 @@ public function view(string $uuid) $manager = ReportManager::fromReport($uuid); $title = 'Report Quick View ' . $manager->getStudy()->getPatientDemographic(); $report = $manager->getReport(); + $copy_button = false; if ($report->isFinalized()) { $stamper = new StampService($report->read_by_id); $signature = $stamper->hasSignatureImage() ? $stamper->signatureImageUrl() : null; $notice = null; + $copy_button = true; } else { $signature = null; $notice = 'This is a preliminary radiology interpretation that has not been finalized or approved by a radiologist. It is not intended for diagnostic purposes.'; } - return view('staff.reports.viewer.html-report', compact('report', 'title', 'signature', 'notice')); + return view('staff.reports.viewer.html-report', compact('report', 'title', 'signature', 'notice', 'copy_button')); } } diff --git a/resources/views/staff/reports/viewer/html-report.blade.php b/resources/views/staff/reports/viewer/html-report.blade.php index 89f1da2..eed203a 100644 --- a/resources/views/staff/reports/viewer/html-report.blade.php +++ b/resources/views/staff/reports/viewer/html-report.blade.php @@ -1,5 +1,10 @@ @extends('staff.reports.viewer.layout') +@push('header') + +@endpush + @section('content')
@@ -58,21 +63,31 @@ class="fa-solid fs-4 fa-circle-radiation me-2">Notice
-
-
-
- {!! $report->getContent() !!} -
-
-
- - @isset($signature) -
+
+
- +
+ {!! $report->getContent() !!} +
- @endisset + + @isset($signature) +
+
+ +
+
+ @endisset +
+ + @if ($copy_button) +
+ +
+ @endif @endsection @@ -84,4 +99,40 @@ class="fa-solid fs-4 fa-circle-radiation me-2">Notice + + + + + @endpush