wip
This commit is contained in:
parent
58fa758826
commit
56c6012112
@ -267,7 +267,7 @@ private function renderCustomColumns(): array
|
|||||||
|
|
||||||
private function generateReportingButtons(Study $study): string
|
private function generateReportingButtons(Study $study): string
|
||||||
{
|
{
|
||||||
return 'x';
|
return $this->renderButton($study->hash, 'fa-circle-info', 'show-reports btn-outline', 'Rep');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderButton(string $data_id, string $fa_icon, string $data_class, string $text, string $url = '#', bool $blank = false): string
|
private function renderButton(string $data_id, string $fa_icon, string $data_class, string $text, string $url = '#', bool $blank = false): string
|
||||||
|
@ -65,6 +65,15 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('body').on('click', '.show-reports', function () {
|
||||||
|
var study_id = $(this).data('id');
|
||||||
|
$.get("{{ route('staff.report.popup') }}", {hashid: study_id}, function (data) {
|
||||||
|
$('#report-details').html(data);
|
||||||
|
$('#report-modal').modal('show');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -120,4 +129,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="modal fade" id="report-modal" tabindex="-1" aria-labelledby="label-report" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="label-report">Reports</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div id="report-details"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -84,8 +84,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => 'report', 'as' => 'report.'], function () {
|
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('view/{uuid}', [ReportController::class, 'view'])->name('view');
|
||||||
Route::get('download/{uuid}', [ReportController::class, 'view'])->name('download');
|
Route::get('download/{uuid}', [ReportController::class, 'download'])->name('download');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user