This commit is contained in:
Dr Masroor Ehsan 2025-01-07 01:30:55 +06:00
parent 01a2868adb
commit 278f285e4b
5 changed files with 71 additions and 75 deletions

View File

@ -20,38 +20,16 @@
'resources/fontawesome/scss/light.scss', 'resources/fontawesome/scss/light.scss',
'resources/assets/vendor/libs/dropzone/dropzone.scss' 'resources/assets/vendor/libs/dropzone/dropzone.scss'
]) ])
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.27.3/ui/trumbowyg.min.css"
integrity="sha512-Fm8kRNVGCBZn0sPmwJbVXlqfJmPC13zRsMElZenX6v721g/H7OukJd8XzDEBRQ2FSATK8xNF9UYvzsCtUpfeJg=="
crossorigin="anonymous" referrerpolicy="no-referrer"/>
@endsection @endsection
@section('vendor-script') @section('vendor-script')
<script src="//code.jquery.com/jquery-3.7.1.min.js" crossorigin="anonymous"></script> <script src="//code.jquery.com/jquery-3.7.1.min.js" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.7.1.slim.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="js/vendor/jquery-3.7.1.slim.js"><\/script>')</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.27.3/trumbowyg.min.js"
integrity="sha512-YJgZG+6o3xSc0k5wv774GS+W1gx0vuSI/kr0E0UylL/Qg/noNspPtYwHPN9q6n59CTR/uhgXfjDXLTRI+uIryg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.27.3/plugins/cleanpaste/trumbowyg.cleanpaste.min.js"
integrity="sha512-UInqT8f+K1tkck6llPo0HDxlT/Zxv8t4OGeCuVfsIlXLrnP1ZKDGb+tBsBPMqDW15OcmV8NDfQe9+EaAG4aXeg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.js"></script>
@endsection @endsection
@section('page-script') @section('page-script')
<script> <script>
$('.tw_ed').trumbowyg({
btns: [
['strong', 'em'],
['removeformat'],
['viewHTML'],
['fullscreen']
],
removeformatPasted: true
});
(function () { (function () {
// previewTemplate: Updated Dropzone default previewTemplate // previewTemplate: Updated Dropzone default previewTemplate
// ! Don't change it unless you really know what you are doing // ! Don't change it unless you really know what you are doing
@ -108,31 +86,25 @@
<form action="{{ route('staff.history.save', $details->hash) }}" method="post"> <form action="{{ route('staff.history.save', $details->hash) }}" method="post">
@csrf @csrf
<input type="hidden" name="study_id" value="{{ $details->hash }}"> <input type="hidden" name="study_id" value="{{ $details->hash }}">
<h5>Clinical History</h5> <h5>Clinical History</h5>
<div class="p-4 border-gray-100"> <div class="form-floating form-floating-outline mb-6 border-gray-100">
<div class="tw_ed" name="clinical_history" id="clinical_history" <textarea name="clinical_history" id="clinical_history" class="form-control h-px-100">{!! $details->clinical_history !!}</textarea>
>{!! $details->clinical_history !!}</div class="tw_ed">
</div> </div>
<x-section-border/>
<h5>surgical history</h5> <h5>Surgical history</h5>
<div class="p-4 border-gray-100"> <div class="form-floating form-floating-outline mb-6 border-gray-100">
<div class="tw_ed" name="surgical_history" id="surgical_history" <textarea name="surgical_history" id="surgical_history" class="form-control h-px-100">{!! $details->surgical_history !!}</textarea>
>{!! $details->surgical_history !!}</div class="tw_ed">
</div> </div>
<x-section-border/>
<h5>lab results</h5> <h5>Laboratory Results</h5>
<div class="p-4 border-gray-100"> <div class="form-floating form-floating-outline mb-6 border-gray-100">
<div class="tw_ed" name="lab_results" id="lab_results" <textarea name="lab_results" id="lab_results" class="form-control h-px-100">{!! $details->lab_results !!}</textarea>
>{!! $details->lab_results !!}</div class="tw_ed">
</div> </div>
<x-section-border/>
<h5>clinical diagnosis</h5> <h5>Clinical Diagnosis</h5>
<div class="p-4 border-gray-100"> <div class="form-floating form-floating-outline mb-6 border-gray-100">
<div class="tw_ed" name="clinical_diagnosis" id="clinical_diagnosis" <textarea name="clinical_diagnosis" id="clinical_diagnosis" class="form-control h-px-100">{!! $details->clinical_diagnosis !!}</textarea>
>{!! $details->clinical_diagnosis !!}</div class="tw_ed">
</div> </div>
<button class="btn btn-primary btn-lg text-end" type="submit">Save</button> <button class="btn btn-primary btn-lg text-end" type="submit">Save</button>
@ -160,7 +132,7 @@
</div> </div>
<!-- List of uploaded files --> <!-- List of uploaded files -->
@include('staff.history.partials._uploaded-studies-list', ['study' => $study, 'allow_delete' => true]) @include('staff.history.partials._uploaded-studies-list', ['study' => $study, 'allow_delete' => true, 'table_header' => true])
</div> </div>

View File

@ -1,15 +1,20 @@
@if (!blank($details->surgical_history))
<div class="card shadow-none bg-transparent border mb-4"> <div class="card shadow-none bg-transparent border mb-4">
<div class="card-body"> <div class="card-body">
<h5 class="card-title">Clinical History</h5> <h5 class="card-title">Clinical History</h5>
{!! $details->clinical_history !!} <p class="card-text text-wrap">
{{ $details->clinical_history }}
</p>
</div> </div>
</div> </div>
@endif
@if (!blank($details->surgical_history)) @if (!blank($details->surgical_history))
<div class="card shadow-none bg-transparent border mb-4"> <div class="card shadow-none bg-transparent border mb-4">
<div class="card-body"> <div class="card-body">
<h5 class="card-title">Surgical History</h5> <h5 class="card-title">Surgical History</h5>
{!! $details->surgical_history !!} <p class="card-text text-wrap">
{{ $details->surgical_history }}
</p>
</div> </div>
</div> </div>
@endif @endif
@ -18,7 +23,9 @@
<div class="card shadow-none bg-transparent border mb-4"> <div class="card shadow-none bg-transparent border mb-4">
<div class="card-body"> <div class="card-body">
<h5 class="card-title">Lab Results</h5> <h5 class="card-title">Lab Results</h5>
{!! $details->lab_results !!} <p class="text-wrap">
{{ $details->lab_results }}
</p>
</div> </div>
</div> </div>
@endif @endif
@ -27,7 +34,9 @@
<div class="card shadow-none bg-transparent border mb-4"> <div class="card shadow-none bg-transparent border mb-4">
<div class="card-body"> <div class="card-body">
<h5 class="card-title">Clinical Diagnosis</h5> <h5 class="card-title">Clinical Diagnosis</h5>
{!! $details->clinical_diagnosis !!} <p class="text-wrap">
{{ $details->clinical_diagnosis }}
</p>
</div> </div>
</div> </div>
@endif @endif

View File

@ -1,5 +1,6 @@
<div class="table-responsive text-nowrap"> <div class="table-responsive text-nowrap">
<table class="table dataTable no-footer table-sm"> <table class="table dataTable no-footer table-sm">
@if ($table_header)
<thead> <thead>
<tr> <tr>
<th>File</th> <th>File</th>
@ -10,6 +11,7 @@
@endif @endif
</tr> </tr>
</thead> </thead>
@endif
<tbody> <tbody>
@foreach ($study->getMedia(\App\Models\Study::MEDIA_COLLECTION) as $media) @foreach ($study->getMedia(\App\Models\Study::MEDIA_COLLECTION) as $media)
@ -18,11 +20,14 @@
<div class="d-flex justify-content-start align-items-center"> <div class="d-flex justify-content-start align-items-center">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<div class="avatar me-2"> <div class="avatar me-2">
<a target="_blank" href="{{ $media->getUrl() }}">
<img class="rounded" src="{{ thumb_url($media) }}"/> <img class="rounded" src="{{ thumb_url($media) }}"/>
</a>
</div> </div>
</div> </div>
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<a data-bs-popper="{{ $media->file_name }}" class="text-heading fw-medium" target="_blank" href="{{ $media->getUrl() }}"> <a data-bs-popper="{{ $media->file_name }}" class="text-heading fw-medium" target="_blank"
href="{{ $media->getUrl() }}">
{{ chomp($media->file_name, 20) }} {{ chomp($media->file_name, 20) }}
</a> </a>
</div> </div>

View File

@ -36,7 +36,7 @@
<div class="col-4"> <div class="col-4">
<h5>Attachments</h5> <h5>Attachments</h5>
@include('staff.history.partials._uploaded-studies-list', ['study' => $study, 'allow_delete' => false]) @include('staff.history.partials._uploaded-studies-list', ['study' => $study, 'allow_delete' => false, 'table_header' => false])
</div> </div>
</div> </div>
@endsection @endsection

View File

@ -17,4 +17,14 @@
</table> </table>
@include('staff.history.partials._history', ['details' => $study->details]) @include('staff.history.partials._history', ['details' => $study->details])
<div class="card shadow-none bg-transparent border">
<div class="card-header">
Attachments
</div>
<div class="card-body">
@include('staff.history.partials._uploaded-studies-list', ['study' => $study, 'allow_delete' => false, 'table_header' => false])
</div>
</div>
</div> </div>