migrated to index view

This commit is contained in:
Masroor Ehsan 2025-01-06 18:31:24 +06:00
parent 923721b05d
commit ca4b510743
3 changed files with 56 additions and 151 deletions

View File

@ -9,6 +9,6 @@ class WorklistController extends HashidControllerBase
{ {
public function index(WorklistDataTable $dataTable) public function index(WorklistDataTable $dataTable)
{ {
return $dataTable->render('staff.worklist.table'); return $dataTable->render('staff.worklist.index');
} }
} }

View File

@ -1,9 +1,24 @@
@php
$configData = App\Services\ThemeHelper::appClasses();
$container = 'container-fluid';
$containerNav = 'container-fluid';
/*
$isNavbar = false;
$navbarType = 'layout-navbar-hidden';
$isMenu = false;
$navbarHideToggle = false;
*/
@endphp
@extends('layouts.layoutMaster') @extends('layouts.layoutMaster')
@section('title', 'Worklist') @section('title', 'Worklist')
@section('vendor-style') @section('vendor-style')
@vite([ @vite([
'resources/fontawesome/scss/fontawesome.scss',
'resources/fontawesome/scss/solid.scss',
'resources/fontawesome/scss/light.scss',
'resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss', 'resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss',
'resources/assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.scss', 'resources/assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.scss',
'resources/assets/vendor/libs/datatables-checkboxes-jquery/datatables.checkboxes.scss', 'resources/assets/vendor/libs/datatables-checkboxes-jquery/datatables.checkboxes.scss',
@ -12,84 +27,49 @@
@endsection @endsection
@section('vendor-script') @section('vendor-script')
<script src="//code.jquery.com/jquery-3.7.1.slim.js" crossorigin="anonymous"></script>
@vite([ @vite([
'resources/assets/vendor/libs/moment/moment.js', 'resources/assets/vendor/libs/jquery/jquery.js',
'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js' 'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js',
]) ])
@endsection @endsection
@section('content') @section('page-script')
{{ $dataTable->scripts(attributes: ['type' => 'module']) }}
<!-- Worklist Table --> <script type="text/javascript">
<div class="card"> $(document).ready(function () {
<div class="card-datatable table-responsive"> $('body').on('click', '.showStudy', function () {
<table class="invoice-list-table table"> var study_id = $(this).data('id');
<thead> $.get("{{ route('staff.studies.show') }}", {hashid: study_id}, function (data) {
<tr> $('#studyDetails').html(data);
<th>Accession Number</th> $('#studyModal').modal('show');
<th>Patient ID</th> });
<th>Patient Name</th> });
<th>Patient Sex</th> });
<th>Modality</th> </script>
<th>Study Date</th>
<th>Receive Date</th> @endsection
<th>Series</th>
<th>Institute Name</th> @section('content')
<th class="cell-fit">&nbsp;</th> @include('staff.worklist.partials._stats')
</tr> <div class="table-responsive text-nowrap">
</thead> {{ $dataTable->table(['class' => 'table table-sm'], true) }}
<tbody> </div>
@foreach ($studies as $study)
<tr> <div class="modal fade" id="studyModal" tabindex="-1" aria-labelledby="studyModalLabel" aria-hidden="true">
<td>{{ $study->accession_number }}</td> <div class="modal-dialog modal-lg">
<td> <div class="modal-content">
<a href="{{ $study->getMetadataLink() }}"> <div class="modal-header">
{{ $study->patient_id }} <h5 class="modal-title" id="studyModalLabel">Study Information</h5>
</a> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</td> </div>
<td> <div class="modal-body">
<a href="{{ $study->getHistoryLink() }}"> <div id="studyDetails"></div>
{{ $study->patient_name }} </div>
</a> </div>
</td> </div>
<td>{{ $study->sexAge() }}</td> </div>
<td>{{ $study->study_modality }}</td>
<td>{{ $study->study_date }}</td>
<td>{{ $study->received_at }}</td>
<td>{{ $study->numInstances() }}</td>
<td>{{ $study->institution_name }}</td>
<td>
@if ($study->allowed()['stone'])
<a target="_blank" href="{{ route('viewer.stone', $study->hash) }}">St</a> |
@endif
@if ($study->allowed()['ohif'])
<a target="_blank" href="{{ route('viewer.ohif', $study->hash) }}">Oh</a> |
@endif
@if ($study->allowed()['ohif.mpr'])
<a target="_blank" href="{{ $study->links()['ohif.mpr'] }}">OM</a> |
@endif
@if ($study->allowed()['ohif.seg'])
<a target="_blank" href="{{ $study->links()['ohif.seg'] }}">OS</a> |
@endif
@if ($study->allowed()['zip'])
<a target="_blank" href="{{ $study->links()['zip'] }}">Z</a> |
@endif
<span class="badge bg-success">Reported</span>
@can(\App\Models\Enums\Permission::ReportCreate)
<a target="_blank" class="btn"
href="{{ route('radiologist.report-write', $study->id) }}">TXT</a>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mb-4 me-4">
{!! $studies->links() !!}
</div>
</div>
</div>
@endsection @endsection

View File

@ -1,75 +0,0 @@
@php
$configData = App\Services\ThemeHelper::appClasses();
$container = 'container-fluid';
$containerNav = 'container-fluid';
/*
$isNavbar = false;
$navbarType = 'layout-navbar-hidden';
$isMenu = false;
$navbarHideToggle = false;
*/
@endphp
@extends('layouts.layoutMaster')
@section('title', 'Worklist')
@section('vendor-style')
@vite([
'resources/fontawesome/scss/fontawesome.scss',
'resources/fontawesome/scss/solid.scss',
'resources/fontawesome/scss/light.scss',
'resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss',
'resources/assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.scss',
'resources/assets/vendor/libs/datatables-checkboxes-jquery/datatables.checkboxes.scss',
'resources/assets/vendor/libs/datatables-buttons-bs5/buttons.bootstrap5.scss'
])
@endsection
@section('vendor-script')
<script src="//code.jquery.com/jquery-3.7.1.slim.js" crossorigin="anonymous"></script>
@vite([
'resources/assets/vendor/libs/jquery/jquery.js',
'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js',
])
@endsection
@section('page-script')
{{ $dataTable->scripts(attributes: ['type' => 'module']) }}
<script type="text/javascript">
$(document).ready(function () {
$('body').on('click', '.showStudy', function () {
var study_id = $(this).data('id');
$.get("{{ route('staff.studies.show') }}", {hashid: study_id}, function (data) {
$('#studyDetails').html(data);
$('#studyModal').modal('show');
});
});
});
</script>
@endsection
@section('content')
@include('staff.worklist.partials._stats')
<div class="table-responsive text-nowrap">
{{ $dataTable->table(['class' => 'table table-sm'], true) }}
</div>
<div class="modal fade" id="studyModal" tabindex="-1" aria-labelledby="studyModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="studyModalLabel">Study Information</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="studyDetails"></div>
</div>
</div>
</div>
</div>
@endsection