mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 19:21:33 +00:00
289 lines
13 KiB
PHP
Executable File
289 lines
13 KiB
PHP
Executable File
@extends('layouts.main')
|
|
|
|
@push('styles')
|
|
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet"
|
|
type="text/css" />
|
|
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
|
<style>
|
|
table.dataTable thead th:after {
|
|
content: "" !important;
|
|
}
|
|
|
|
.show-on-hover {
|
|
visibility: hidden !important;
|
|
}
|
|
|
|
.show-on-hover-sec:hover .show-on-hover,
|
|
.show-on-hover-sec:focus .show-on-hover {
|
|
visibility: initial !important;
|
|
}
|
|
|
|
.show-on-hover-none {
|
|
display: none !important;
|
|
}
|
|
|
|
.show-on-hover-sec:hover .show-on-hover-none,
|
|
.show-on-hover-sec:focus .show-on-hover-none {
|
|
display: flex !important;
|
|
gap: 4px
|
|
}
|
|
|
|
td .show-on-hover-none * {
|
|
text-transform: capitalize;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.show-on-hover-sec td {
|
|
position: relative;
|
|
}
|
|
|
|
td .show-on-hover-none {
|
|
position: absolute;
|
|
bottom: .5rem;
|
|
}
|
|
|
|
td .show-on-hover-none .dropdown ul {
|
|
transform: translate(5px, 20px) !important;
|
|
}
|
|
|
|
.active-box {
|
|
font-weight: bold;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
|
|
.text-content-view::after {
|
|
content: 'View';
|
|
}
|
|
|
|
.text-content-edit::after {
|
|
content: 'Edit';
|
|
}
|
|
|
|
.text-content-options::after {
|
|
content: 'Options ✢';
|
|
border: none;
|
|
}
|
|
|
|
.text-content-options.show::after {
|
|
content: 'Options --';
|
|
}
|
|
|
|
.text-content-archive::after {
|
|
content: 'Archive record';
|
|
}
|
|
|
|
.text-content-delete::after {
|
|
content: 'Delete item';
|
|
}
|
|
|
|
.text-content-delete-hard::after {
|
|
content: 'Permanently delete item';
|
|
}
|
|
|
|
.text-content-archive-restore::after {
|
|
content: 'Restore from archive'
|
|
}
|
|
|
|
.text-content-trash-restore::after {
|
|
content: 'Restore from trash'
|
|
}
|
|
|
|
.text-content-clear-logs::after {
|
|
content: 'Clear record logs'
|
|
}
|
|
|
|
|
|
.right-0 {
|
|
right: 0;
|
|
}
|
|
</style>
|
|
@endpush
|
|
|
|
@section('content')
|
|
<div class="row bg-title">
|
|
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
|
<h4 class="page-title">{{ __('labs.labs') }}</h4>
|
|
</div>
|
|
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
|
<ol class="breadcrumb">
|
|
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('labs.home') }}</a></li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
@include('investigations::labs.menu')
|
|
|
|
@include('flash::message')
|
|
|
|
<div class="white-box" style="border-radius: 5px;">
|
|
<div class="panel">
|
|
<div class="">
|
|
{{-- <span>{{ __('clinical_data.lab_usages_report') }} </span> --}}
|
|
<div class="">
|
|
@if (Auth::user()->can('labs-create'))
|
|
<a href="{{ route('labs.create') }}" class="mr-2 nav-item btn btn-default{{ url()->current() == route('labs.create') ? ' active-box ' : '' }} my-1">{{ __('labs.add_lab') }}</a>
|
|
<a href="{{ route('lab_forms.create') }}" class="mr-2 nav-item btn btn-default{{ url()->current() == route('lab_forms.create') ? ' active-box ' : '' }} my-1">{{ __('labs.add_lab_form') }}</a>
|
|
@endif
|
|
@if (Auth::user()->can('labs-bulk-create'))
|
|
<a href="{{ route('labs.add_bulk') }}" class="mr-2 nav-item btn btn-default{{ url()->current() == route('labs.add_bulk') ? ' active-box ' : '' }} my-1">{{ __('labs.add_multiple_labs') }}</a>
|
|
@endif
|
|
@if (Auth::user()->can('labs-delete'))
|
|
<a href="{{ route('labs.inactive') }}" class=" btn nav-item btn-danger{{ url()->current() == route('labs.inactive') ? ' active-box' : '' }} my-1">{{ __('labs.inactive_labs') }}</a>
|
|
@endif
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-hover color-bordered-table success-bordered-table table-striped">
|
|
<thead>
|
|
<tr>
|
|
{{-- <th>#</th> --}}
|
|
<th>{{ __('labs.name') }}</th>
|
|
{{-- <th>{{ __('labs.cost') }}</th> --}}
|
|
{{-- <th>{{ __('labs.insurance_status') }}</th> --}}
|
|
{{-- <th>{{ __('labs.non_insured_price') }}</th> --}}
|
|
{{-- <th>{{ __('labs.insured_price') }}</th> --}}
|
|
<th>{{ __('labs.lab_stock') }}</th>
|
|
<th>{{ __('labs.store_stock') }}</th>
|
|
{{-- <th>{{ __('labs.current_batch') }}</th> --}}
|
|
{{-- <th>{{ __('labs.expiry_date') }}</th> --}}
|
|
<th>{{ __('labs.expense_account') }}</th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($labs as $item)
|
|
<tr class="show-on-hover-sec">
|
|
{{-- <td><input type="checkbox" class="delete_ids" name="id[]"
|
|
value="{{ $item->id }}"></td> --}}
|
|
<td class="position-relative">
|
|
{{ $item->name }}
|
|
{{-- <div class="show-on-hover-none d-flex justify-content-start gap-2 right-0 position-absolute pull-right"
|
|
style="z-index: 5">
|
|
<a href="{{ route('labs.edit', $item->id) }}"
|
|
class="btn btn-rounded btn-warning text-content-edit btn-sm"><i
|
|
class="fa fa-pencil"></i>
|
|
</a>
|
|
{{ Form::model($item->id, ['method' => 'DELETE', 'route' => ['labs.destroy', $item->id]]) }}
|
|
<button onclick="return confirm('<?php echo __('labs.are_you_sure'); ?>')"
|
|
class="btn btn-rounded btn-danger text-content-delete btn-sm"><i
|
|
class="fa fa-trash"></i>
|
|
</button>
|
|
{{ Form::close() }}
|
|
</div> --}}
|
|
</td>
|
|
<td>{{ $item->total_lab_stock }} @if (get_name($item->form_id, 'id', 'name', 'lab_forms') != 'N/A') {{ get_name($item->form_id, 'id', 'name', 'lab_forms') }} @else {{ null }}@endif</td>
|
|
<td>{{ $item->total_store_stock }} @if (get_name($item->form_id, 'id', 'name', 'lab_forms') != 'N/A'){{ get_name($item->form_id, 'id', 'name', 'lab_forms') }}@else {{ null }}@endif</td>
|
|
|
|
<td>{{ get_name($item->expenses_account_id, 'id', 'name', 'chart_of_accounts') }}</td>
|
|
|
|
<td>
|
|
<a href="{{ route('labs.edit', $item->id) }}" class="btn btn-rounded btn-warning">
|
|
<i class="fa fa-pencil"></i>
|
|
{{ __('labs.edit') }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
@if(empty($item->total_stock)&& empty($item->store_stock))
|
|
{{ Form::model($item->id, ['method' => 'DELETE', 'route' => ['labs.destroy', $item->id]]) }}
|
|
<button type="submit" class="btn btn-rounded btn-danger"
|
|
onclick="return confirm('')"><i class="fa fa-trash"></i>
|
|
<span style="margin-left: 10px;">{{ __('labs.delete') }}</span>
|
|
</button>
|
|
{{ Form::close() }}
|
|
@elseif (!empty($item->total_stock) || !empty($item->store_stock))
|
|
<b class="text-success">Still Stocked</b>
|
|
@endif
|
|
</td>
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
{{-- <th>#</th> --}}
|
|
<th>{{ __('labs.name') }}</th>
|
|
{{-- <th>{{ __('labs.cost') }}</th> --}}
|
|
{{-- <th>{{ __('labs.insurance_status') }}</th> --}}
|
|
{{-- <th>{{ __('labs.non_insured_price') }}</th>
|
|
<th>{{ __('labs.insured_price') }}</th> --}}
|
|
<th>{{ __('labs.lab_stock') }}</th>
|
|
<th>{{ __('labs.store_stock') }}</th>
|
|
{{-- <th>{{ __('labs.current_batch') }}</th> --}}
|
|
{{-- <th>{{ __('labs.expiry_date') }}</th> --}}
|
|
<th>{{ __('labs.expense_account') }}</th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
|
|
<br />
|
|
{{-- <button onclick="delete_multiple()"
|
|
class="btn btn btn-danger">{{ __('labs.delete_multiple_labs') }}</button>
|
|
<a href="{{ route('labs.clear_stock') }}"
|
|
class="nav-item btn btn-danger">{{ __('labs.clear_stock') }}</a> --}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
|
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
|
|
|
<script>
|
|
$('.table').DataTable({
|
|
dom: 'Bfrtip',
|
|
order: [
|
|
[0, 'asc']
|
|
],
|
|
buttons: [
|
|
'copy', 'csv', 'excel', 'pdf', 'print'
|
|
],
|
|
'pageLength': 50,
|
|
});
|
|
|
|
function delete_multiple() {
|
|
var val = [];
|
|
$(':checkbox:checked').each(function(i) {
|
|
val[i] = $(this).val();
|
|
});
|
|
|
|
if (val.length === 0) {
|
|
alert('<?php echo __('labs.select_lab_to_delete'); ?>');
|
|
} else {
|
|
var confirmed = confirm('<?php echo __('labs.sure_to_delete'); ?>');
|
|
if (confirmed == true) {
|
|
$.ajax({
|
|
url: '/labs/delete_bulk',
|
|
type: 'DELETE',
|
|
data: {
|
|
'ids': val
|
|
},
|
|
_token: '{{ csrf_token() }}',
|
|
success: function(response) {
|
|
location.reload();
|
|
},
|
|
error: function(error) {
|
|
alert('<?php echo __('labs.error_deleting_labs'); ?>')
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
@endpush
|