wip
This commit is contained in:
parent
47ffa9303b
commit
92545ac719
@ -60,6 +60,16 @@ public function create()
|
|||||||
return view('staff.reports.create', compact('study', 'report'));
|
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)
|
public function view(string $uuid)
|
||||||
{
|
{
|
||||||
abort_unless(me()->may([Permission::ReportEdit, Permission::ReportDictate, Permission::ReportApprove, Permission::ReportDownload]), 403);
|
abort_unless(me()->may([Permission::ReportEdit, Permission::ReportDictate, Permission::ReportApprove, Permission::ReportDownload]), 403);
|
||||||
|
@ -19,13 +19,17 @@
|
|||||||
href="{{ $report->pdfDownloadUrl() }}">
|
href="{{ $report->pdfDownloadUrl() }}">
|
||||||
<img class="me-1" src="{{ asset('imgs/pdf.png') }}" alt="PDF download">pdf
|
<img class="me-1" src="{{ asset('imgs/pdf.png') }}" alt="PDF download">pdf
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-reddit btn-xs me-1 fs-xsmall fw-ligth" target="_blank"
|
<a class="btn btn-reddit btn-xs me-1 fs-xsmall fw-light" target="_blank"
|
||||||
href="{{ $report->htmlDownloadUrl() }}">
|
href="{{ $report->htmlDownloadUrl() }}">
|
||||||
<img class="me-1" src="{{ asset('imgs/html.png') }}" alt="HTML download">htm
|
<img class="me-1" src="{{ asset('imgs/html.png') }}" alt="HTML download">htm
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
@if ($report->canEdit())
|
@if ($report->canEdit())
|
||||||
edit_button
|
<a class="btn btn-reddit btn-xs me-1 fs-xsmall fw-light" target="_blank"
|
||||||
|
href="{{ route('staff.report.edit', $report->accession_number) }}">
|
||||||
|
Edit
|
||||||
|
</a>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
@if ($report->canRemove())
|
@if ($report->canRemove())
|
||||||
remove_button
|
remove_button
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
Route::group(['prefix' => 'report', 'as' => 'report.'], function () {
|
Route::group(['prefix' => 'report', 'as' => 'report.'], function () {
|
||||||
Route::get('popup', [ReportController::class, 'popup'])->name('popup');
|
Route::get('popup', [ReportController::class, 'popup'])->name('popup');
|
||||||
Route::get('view/{uuid}', [ReportController::class, 'view'])->name('view');
|
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::get('create/{hashid}', [ReportController::class, 'create'])->name('create');
|
||||||
Route::post('save', [ReportController::class, 'save'])->name('save');
|
Route::post('save', [ReportController::class, 'save'])->name('save');
|
||||||
Route::get('download/{uuid}/{format}', ReportDownloadController::class)->name('download');
|
Route::get('download/{uuid}/{format}', ReportDownloadController::class)->name('download');
|
||||||
|
Loading…
Reference in New Issue
Block a user