diff --git a/app/Http/Controllers/Staff/ReportController.php b/app/Http/Controllers/Staff/ReportController.php
index a73148a..2a01c9c 100644
--- a/app/Http/Controllers/Staff/ReportController.php
+++ b/app/Http/Controllers/Staff/ReportController.php
@@ -60,6 +60,16 @@ public function create()
return view('staff.reports.create', compact('study', 'report'));
}
+ public function edit(string $uuid)
+ {
+ abort_unless(me()->may([Permission::ReportEdit, Permission::ReportDictate, Permission::ReportApprove]), 403);
+ $report = StudyReport::with(['study', 'radiologist'])->where('accession_number', $uuid)->firstOrFail();
+ $study = $report->study;
+ $title = 'View Report';
+
+ return view('staff.reports.create', compact('study', 'report'));
+ }
+
public function view(string $uuid)
{
abort_unless(me()->may([Permission::ReportEdit, Permission::ReportDictate, Permission::ReportApprove, Permission::ReportDownload]), 403);
diff --git a/resources/views/staff/reports/popup.blade.php b/resources/views/staff/reports/popup.blade.php
index cbc59c6..f96a2ca 100644
--- a/resources/views/staff/reports/popup.blade.php
+++ b/resources/views/staff/reports/popup.blade.php
@@ -19,13 +19,17 @@
href="{{ $report->pdfDownloadUrl() }}">
pdf
-
htm
@else
@if ($report->canEdit())
- edit_button
+
+ Edit
+
+
@endif
@if ($report->canRemove())
remove_button
diff --git a/routes/web.php b/routes/web.php
index 2ef432b..5dfabd9 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -87,6 +87,7 @@
Route::group(['prefix' => 'report', 'as' => 'report.'], function () {
Route::get('popup', [ReportController::class, 'popup'])->name('popup');
Route::get('view/{uuid}', [ReportController::class, 'view'])->name('view');
+ Route::get('edit/{uuid}', [ReportController::class, 'edit'])->name('edit');
Route::get('create/{hashid}', [ReportController::class, 'create'])->name('create');
Route::post('save', [ReportController::class, 'save'])->name('save');
Route::get('download/{uuid}/{format}', ReportDownloadController::class)->name('download');