wip studies

This commit is contained in:
Dr Masroor Ehsan 2025-01-03 08:28:45 +06:00
parent 4d7c5e1440
commit f9914486fd
2 changed files with 163 additions and 113 deletions

View File

@ -2,6 +2,7 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Facades\Vite; use Illuminate\Support\Facades\Vite;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
@ -20,6 +21,7 @@ public function register(): void
*/ */
public function boot(): void public function boot(): void
{ {
Paginator::useBootstrapFive();
Vite::useStyleTagAttributes(function (?string $src, string $url, ?array $chunk, ?array $manifest) { Vite::useStyleTagAttributes(function (?string $src, string $url, ?array $chunk, ?array $manifest) {
if ($src !== null) { if ($src !== null) {
return [ return [

View File

@ -1,86 +1,136 @@
<x-app-layout> @extends('layouts/layoutMaster')
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('Dashboard') }}
</h2>
</x-slot>
<div class="py-12"> @section('title', 'Studies List')
<div class="max-w-9xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-xl sm:rounded-lg mb-4">
<table class="min-w-full divide-y divide-gray-200"> @section('vendor-style')
<thead class="bg-gray-50"> @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'
])
@endsection
@section('vendor-script')
@vite([
'resources/assets/vendor/libs/moment/moment.js',
'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js'
])
@endsection
@section('page-script')
@vite('resources/assets/js/app-invoice-list.js')
@endsection
@section('content')
<!-- Invoice List Widget -->
<div class="card mb-6">
<div class="card-widget-separator-wrapper">
<div class="card-body card-widget-separator">
<div class="row gy-4 gy-sm-1">
<div class="col-sm-6 col-lg-3">
<div
class="d-flex justify-content-between align-items-start card-widget-1 border-end pb-4 pb-sm-0">
<div>
<h4 class="mb-0">24</h4>
<p class="mb-0">Clients</p>
</div>
<div class="avatar me-sm-6">
<span class="avatar-initial rounded-3">
<i class="ri-user-line text-heading ri-26px"></i>
</span>
</div>
</div>
<hr class="d-none d-sm-block d-lg-none me-6">
</div>
<div class="col-sm-6 col-lg-3">
<div
class="d-flex justify-content-between align-items-start card-widget-2 border-end pb-4 pb-sm-0">
<div>
<h4 class="mb-0">165</h4>
<p class="mb-0">Invoices</p>
</div>
<div class="avatar me-lg-6">
<span class="avatar-initial rounded-3">
<i class="ri-pages-line text-heading ri-26px"></i>
</span>
</div>
</div>
<hr class="d-none d-sm-block d-lg-none">
</div>
<div class="col-sm-6 col-lg-3">
<div
class="d-flex justify-content-between align-items-start border-end pb-4 pb-sm-0 card-widget-3">
<div>
<h4 class="mb-0">$2.46k</h4>
<p class="mb-0">Paid</p>
</div>
<div class="avatar me-sm-6">
<span class="avatar-initial rounded-3">
<i class="ri-wallet-line text-heading ri-26px"></i>
</span>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="d-flex justify-content-between align-items-start">
<div>
<h4 class="mb-0">$876</h4>
<p class="mb-0">Unpaid</p>
</div>
<div class="avatar">
<span class="avatar-initial rounded-3">
<i class="ri-money-dollar-circle-line text-heading ri-26px"></i>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Invoice List Table -->
<div class="card">
<div class="card-datatable table-responsive">
<table class="invoice-list-table table">
<thead>
<tr> <tr>
<th scope="col" <th>Accession Number</th>
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> <th>Patient ID</th>
Accession Number <th>Patient Name</th>
</th> <th>Patient Sex</th>
<th scope="col" <th>Patient Birth Date</th>
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> <th>Modality</th>
Patient ID <th>Study Date</th>
</th> <th>Receive Date</th>
<th scope="col" <th>Series</th>
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> <th>Institute Name</th>
Patient Name <th class="cell-fit">&nbsp;</th>
</th>
<th scope="col"
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Patient Sex
</th>
<th scope="col"
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Patient Birth Date
</th>
<th scope="col"
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Modality
</th>
<th scope="col"
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Study
Date
</th>
<th scope="col"
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Receive Date
</th>
<th scope="col"
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Series
</th>
<th scope="col"
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Institute Name
</th>
<th scope="col"
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
&nbsp;
</th>
</tr> </tr>
</thead> </thead>
<tbody class="bg-white divide-y divide-gray-200"> <tbody>
@foreach($studies as $study) @foreach($studies as $study)
<tr> <tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->accession_number }}</td> <td>{{ $study->accession_number }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900"> <td>
<a href="{{ $study->getMetadataLink() }}"> <a href="{{ $study->getMetadataLink() }}">
{{ $study->patient_id }} {{ $study->patient_id }}
</a> </a>
</td> </td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900"> <td>
<a href="{{ $study->getHistoryLink() }}"> <a href="{{ $study->getHistoryLink() }}">
{{ $study->patient_name }} {{ $study->patient_name }}
</a> </a>
</td> </td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->patient_sex }}</td> <td>{{ $study->patient_sex }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->patient_birthdate }}</td> <td>{{ $study->patient_birthdate }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->study_modality }}</td> <td>{{ $study->study_modality }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->study_date }}</td> <td>{{ $study->study_date }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->received_at }}</td> <td>{{ $study->received_at }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->image_count }} <td>{{ $study->image_count }} / {{ $study->series_count }}</td>
/ {{ $study->series_count }}</td> <td>{{ $study->institution_name }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->institution_name }}</td>
<td> <td>
@can(\App\Models\Enums\Permission::StudyDownload) @can(\App\Models\Enums\Permission::StudyDownload)
<a target="_blank" <a target="_blank"
@ -111,12 +161,10 @@ class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
<div class="mb-4 me-4"> <div class="mb-4 me-4">
{!! $studies->links() !!} {!! $studies->links() !!}
</div> </div>
</div> </div>
</div> </div>
</div> @endsection
</x-app-layout>