resolved conflicts

This commit is contained in:
2025-03-31 03:46:05 +03:00
6454 changed files with 1520539 additions and 9 deletions
@@ -0,0 +1,72 @@
@extends('layouts.main')
@push('styles')
<link rel="stylesheet" href="{{ asset('elite/bower_components/dropify/dist/css/dropify.min.css') }}">
@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">{{ __('heads_of_family.edit_head_of_family') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('heads_of_family.dashboard') }}</a></li>
<li><a href="/heads_of_family/">{{ __('heads_of_family.heads_of_family') }}</a></li>
<li class="active">{{ __('heads_of_family.edit') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
@include ('errors.list')
@include('insurance::heads_of_family.menu')
<div class="panel panel-default">
<div class="panel-body">
{{ Form::model($family_head, ['method' => 'PUT', 'route' => ['heads_of_family.update',$family_head], 'files' => 'required']) }}
{{ Form::hidden('patient_id', $family_head->patient_id, ['class' => 'patient_id']) }}
<div class="form-group">
{{ Form::label('name', __('heads_of_family.head_of_family_name')) }}
{{ Form::text('name', $family_head->name, ['class' => 'form-control compulsory', 'readonly' => 'true']) }}
</div>
<div class="form-group">
{{ Form::label('group_id', __('heads_of_family.insurance_group')) }}
{{ Form::select('group_id', $insurance_groups, null, ['class' => 'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('photo', __('heads_of_family.profile_photo')) }}
{{ Form::file('photo', ['class' => 'dropify', 'data-default-file' => $uploaded_photo]) }}
<br>
@php
$insurance_member_id = get_name($family_head->patient_id, "patient_id", "id", "insurance_members");
@endphp
<a href="/insurance_members/{{ $insurance_member_id }}/edit/"><i class="fa fa-pencil"></i> {{ __('insurance_members.edit_family_head_details') }}</a>
</div>
{{ Form::button(__('heads_of_family.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('heads_of_family.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/dropify/dist/js/dropify.min.js') }}"></script>
<script>
$(document).ready(function() {
$('.dropify').dropify();
});
</script>
@endpush
@@ -0,0 +1,85 @@
@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" />
@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">{{ __('heads_of_family.inactive_head_of_family') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('heads_of_family.dashboard') }}</a></li>
<li><a href="/heads_of_family/"></a>{{ __('heads_of_family.heads_of_family') }}</li>
<li class="active">{{ __('heads_of_family.activate') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
@include('flash::message')
@include('insurance::heads_of_family.menu')
<div class="panel panel-default">
<div class="panel-body">
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('heads_of_family.patient_number') }}</th>
<th>{{ __('heads_of_family.name') }}</th>
<th>{{ __('heads_of_family.insurance_group') }}</th>
<th>{{ __('heads_of_family.contact') }}</th>
<th>{{ __('heads_of_family.action') }}</th>
</tr>
</thead>
<tbody>
@foreach($family_heads as $family_head)
<tr>
<td>{{ $family_head->number }}</td>
<td>{!! insurance_flag($family_head->patient_id) !!}</td>
<td>{{ isset($insurance_groups[$family_head->group_id]) ? $insurance_groups[$family_head->group_id] : 'N/A' }}</td>
<td>{{ $family_head->phone }}</td>
<td>
{{ Form::model($family_head->id ,['method' => 'POST', 'route' => ['heads_of_family.activate', $family_head->id]]) }}
<button type="submit" class="btn btn-rounded btn-warning" onclick="return confirm('<?php echo __('heads_of_family.are_you_sure');?>')"><i class="fa fa-check"></i> {{ __('heads_of_family.activate') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</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', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,217 @@
@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" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
@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">{{ __('heads_of_family.heads_of_family') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('heads_of_family.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li class="active">{{ __('heads_of_family.heads_of_family') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
@include('insurance::heads_of_family.menu')
@include('flash::message')
<div class="white-box">
{{ Form::open(['route' => 'heads_of_family.search', 'method' => 'ANY', 'role' => 'search']) }}
<div class="row pb-3">
<div class="col">
<div class="form-group" id="full_names">
{{ Form::text('full_name', '', ['class' => 'form-control typeahead', 'placeholder' => 'Search for Family Head by Name or Number', 'autocomplete' => 'off', 'spellcheck' => false]) }}
</div>
</div>
<div class="col">
<div class="form-group">
{{ Form::select('member_type',[0 => __('heads_of_family.all_family_heads'), 1 => __('heads_of_family.family_heads_with_active_insurance'), 2 => __('heads_of_family.family_heads_with_inactive_insurance')],0,['class' => 'form-control']) }}
</div>
</div>
<div class="col">
<button type="submit" class="btn btn-success pull-right" style="border-radius: 5px;"><span class="glyphicon glyphicon-search"></span> {{ __('insurance_members.search') }}</button>
</div>
</div>
{{ Form::close() }}
@if(isset($criteria))
<div class="row">
<div class="col">
<p>{{ __('insurance_members.search_criteria') }} : <code>{{ $criteria }}</code> &nbsp;&nbsp;&nbsp;<a href="{{ route('heads_of_family.index') }}">{{ __('insurance_members.clear_search') }}</a></p>
</div>
</div>
@endif
<div class="row">
<div class="col table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('heads_of_family.patient_number') }}</th>
<th>{{ __('heads_of_family.name') }}</th>
<th>{{ __('heads_of_family.insurance_group') }}</th>
<th>{{ __('heads_of_family.contact') }}</th>
<th>{{ __('heads_of_family.insurance_status') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($family_heads as $family_head)
@php
// get payment details for this group
$insurance_subscriptions_details = explode("/", check_insurance_family_status($family_head->group_id, $family_head->family_id));
@endphp
<tr>
<td>{{ $family_head->number }}</td>
<td>{!! insurance_flag($family_head->patient_id) !!}</td>
<td>{{ isset($insurance_groups[$family_head->group_id]) ? $insurance_groups[$family_head->group_id] : 'N/A' }}</td>
<td>{{ $family_head->phone }}</td>
<td>
@if($insurance_subscriptions_details[0] == 1)
<span style="color:green "><strong>{{ __('heads_of_family.active') }}</strong></span>
@else
<span style="color:red "><strong>{{ __('heads_of_family.inactive') }}</strong></span>
@endif
</td>
<td>
<a href="/insurance_members/{{ get_name($family_head->patient_id, 'patient_id', 'id', 'insurance_members') }}/edit/" class="btn btn-rounded btn-info btn-sm"><i class="fa fa-pencil"></i> {{ __('insurance_members.edit') }}</a>
</td>
<td>
<a href="#view_family_members" data-toggle="modal" id="view_chi_family_{{$family_head->id}}">View members</a>
</td>
<td>
@if (empty($family_head->family_members_ids))
{{ Form::model($family_head->id ,['method' => 'DELETE', 'route' => ['heads_of_family.destroy', $family_head->id]]) }}
<button type="submit" class="btn btn-rounded btn-danger" onclick="return confirm('<?php echo ( __('insurance_groups.delete_family'))?>')"><i class="fa fa-trash"></i> {{ __('drugs.delete') }}</button>
{{ Form::close() }}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
{{ $family_heads->links() }}
</div>
</div>
</div>
{{-- modal --}}
<div class="modal fade" id="view_family_members" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('insurance.family_members') }}</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12" id="family_members_table">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.min.js') }}"></script>
<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 src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
pageLength: 100,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
],
aaSorting: [],
columnDefs: [{
targets: [5, 6, 7], /* column index */
orderable: false, /* true or false */
}],
});
$("#table").on('click', "[id^=view_chi_family_]", function () {
var id = /\d+(?=\D*$)/.exec($(this).attr('id'));
var id_string = id.toString();
//console.log(id_string);
//console.log(family_head_and_group_id_array);
var family_head_id = id.toString();
$.ajax({
method: 'GET',
url: '/view_family_members_of_head/' + family_head_id,
success: function(response){
$('#family_members_table').html(response);
},
error: function () {
//
}
});
});
var substringMatcher = function (strs) {
return function findMatches(q, cb) {
var matches, substringRegex;
// an array that will be populated with substring matches
matches = [];
// regex used to determine if a string contains the substring `q`
substrRegex = new RegExp(q, 'i');
// iterate through the pool of strings and for any string that
// contains the substring `q`, add it to the `matches` array
$.each(strs, function (i, str) {
if (substrRegex.test(str)) {
matches.push(str);
}
});
cb(matches);
};
};
$('#full_names .typeahead').typeahead(
{
hint: true,
highlight: true,
minLength: 1
},
{
name: 'full_names',
source: substringMatcher(<?php echo json_encode($full_names); ?>)
}
);
</script>
@endpush
@@ -0,0 +1,6 @@
<div class="panel panel-default">
<div class="panel-body">
<a href="/heads_of_family/" class="nav-item btn btn-info" style="border-radius: 5px;"><i class="fa fa-eye"></i> <span style="margin-left: 10px">{{ __('heads_of_family.view_head_of_family') }}</span></a>
<a href="/heads_of_family/inactive" class="nav-item btn btn-danger" style="border-radius: 5px;"><i class="fa fa-trash"></i> <span style="margin-left: 10px">{{ __('heads_of_family.inactive_head_of_family') }}</span></a>
</div>
</div>