This commit is contained in:
Masroor Ehsan 2025-01-08 20:57:33 +06:00
parent 8ce22fb4ea
commit 471f42147d
3 changed files with 25 additions and 0 deletions

View File

@ -56,4 +56,14 @@ protected function casts(): array
'content' => Compressed::class,
];
}
public function downloadUrl(): string
{
return route('staff.report.download', $this->accession_number);
}
public function viewUrl(): string
{
return route('staff.report.view', $this->accession_number);
}
}

View File

@ -0,0 +1,10 @@
<table>
@foreach($reports as $report)
<tr>
<td>{{ $report->created_at }}</td>
<td>{{ $report->report_status->name }}</td>
<td>{{ $report->radiologist?->name }}</td>
<td><a class="btn btn-primary btn-xs" target="_blank" href="{{ $report->viewUrl() }}"></a></td>
</tr>
@endforeach
</table>

View File

@ -7,6 +7,7 @@
use App\Http\Controllers\Staff\AssignmentController;
use App\Http\Controllers\Staff\AttachmentController;
use App\Http\Controllers\Staff\HistoryController;
use App\Http\Controllers\Staff\ReportController;
use App\Http\Controllers\Staff\StudiesController;
use App\Http\Controllers\Staff\StudyViewerController;
use App\Http\Controllers\Staff\WorklistController;
@ -82,6 +83,10 @@
Route::post('{hashid}', [StudyMetadataController::class, 'save'])->name('save');
});
Route::group(['prefix' => 'report', 'as' => 'report.'], function () {
Route::get('view/{uuid}', [ReportController::class, 'view'])->name('view');
Route::get('download/{uuid}', [ReportController::class, 'view'])->name('download');
});
});
});