mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
128 lines
6.2 KiB
PHP
Executable File
128 lines
6.2 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 type="text/css">
|
|
.color-bordered-table.success-bordered-table {
|
|
border-top: 0px;
|
|
}
|
|
</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">{{ __('blood_donations.blood_donations') }}</h4>
|
|
</div>
|
|
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
|
<ol class="breadcrumb">
|
|
<li><a href="{{ route('home') }}">{{ __('blood_donations.dashboard') }}</a></li>
|
|
<li><a href="{{ route('blood_donations.index') }}">{{ __('blood_donations.blood_donors') }}</a></li>
|
|
<li class="active">{{ __('blood_donations.view') }}</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="white-box">
|
|
<div class="row">
|
|
<div class="col-sm-4"></div>
|
|
<div class="col-sm-4">
|
|
{{ Form::open(['method' => 'post', 'route'=>'select.blood_group'])}}
|
|
|
|
{{ Form::label('blood_group_id', __('blood_donations.select_blood_group')) }}
|
|
{{ Form::select('blood_group_id', $blood_groups, null, ['class'=>'form-control compulsory','required']) }}
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="col-sm-3 form-group" style="padding-top: 28px;">
|
|
{{ Form::button(__('blood_donations.search'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
|
</div>
|
|
{{ Form::close() }}
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
|
<div class="table-responsive">
|
|
<table class="table color-bordered-table success-bordered-table">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ __('blood_donations.name') }}</th>
|
|
<th>{{ __('blood_donations.blood_group') }}</th>
|
|
<th>{{ __('blood_donations.phone') }}</th>
|
|
<th>{{ __('blood_donations.last_donated') }}</th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if(count($willing_donors) > 0)
|
|
@foreach($willing_donors as $donor)
|
|
<tr>
|
|
<td>{{ $donor->first_name }} {{ $donor->last_name }}</td>
|
|
@php $blood_group = \Streamline\Models\BloodGroup::find($donor->blood_group_id); @endphp
|
|
<td>{{ is_null($blood_group) ? '' : $blood_group->name }}</td>
|
|
<td>{{ $donor->phone }}</td>
|
|
<td>
|
|
{{ (get_name($donor->id, "donor_id", "last_donation_date", "blood_donations") != 'N/A') ? streamline_date(get_name($donor->id, "donor_id", "last_donation_date", "blood_donations")) : 'N/A' }}
|
|
</td>
|
|
<td>
|
|
{{ Form::open(['method' => 'POST', 'route' => ['blood_donations.create_donation', $donor->id]]) }}
|
|
<input type="hidden" name="donor_id" value="{{ $donor->id }}">
|
|
<button type="submit" class="btn btn-success btn-rounded btn-sm"><i class="fa fa-plus"></i><span style="margin-left: 10px;">{{ __('blood_donations.add_donation') }}</span></button>
|
|
{{ Form::close() }}
|
|
</td>
|
|
<td>
|
|
<a class="btn btn-primary btn-rounded btn-sm" href="blood_donations/{{$donor->id}}"><i class="fa fa-eye"></i><span style="margin-left: 10px;">{{ __('blood_donations.view_details') }}</span></a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@else
|
|
<tr><td colspan="5"><font color="red">{{ __('blood_donations.no_records_found') }}</font></td></tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</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',
|
|
buttons: [
|
|
'copy', 'csv', {
|
|
extend: 'pdf',
|
|
exportOptions: {
|
|
columns: [ 0, 1, 2, 3 ]
|
|
},
|
|
title: '<?php echo __('blood_donations.blood_donations'); ?>'
|
|
},
|
|
{
|
|
extend: 'print',
|
|
exportOptions: {
|
|
columns: [ 0, 1, 2, 3 ]
|
|
},
|
|
title: '<?php echo __('blood_donations.blood_donations'); ?>'
|
|
},
|
|
{
|
|
extend: 'excel',
|
|
exportOptions: {
|
|
columns: [ 0, 1, 2, 3 ]
|
|
},
|
|
title: '<?php echo __('blood_donations.blood_donations'); ?>'
|
|
}
|
|
]
|
|
});
|
|
</script>
|
|
@endpush
|