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)
{
return $dataTable->render('staff.worklist.table');
return $dataTable->render('staff.worklist.index');
}
}

View File

@ -1,95 +1,75 @@
@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/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'
'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/moment/moment.js',
'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js'
'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>
<!-- Worklist Table -->
<div class="card">
<div class="card-datatable table-responsive">
<table class="invoice-list-table table">
<thead>
<tr>
<th>Accession Number</th>
<th>Patient ID</th>
<th>Patient Name</th>
<th>Patient Sex</th>
<th>Modality</th>
<th>Study Date</th>
<th>Receive Date</th>
<th>Series</th>
<th>Institute Name</th>
<th class="cell-fit">&nbsp;</th>
</tr>
</thead>
<tbody>
@foreach ($studies as $study)
<tr>
<td>{{ $study->accession_number }}</td>
<td>
<a href="{{ $study->getMetadataLink() }}">
{{ $study->patient_id }}
</a>
</td>
<td>
<a href="{{ $study->getHistoryLink() }}">
{{ $study->patient_name }}
</a>
</td>
<td>{{ $study->sexAge() }}</td>
<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 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

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