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,99 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
@php use Streamline\Enums\Details;use Streamline\Enums\Roles; @endphp
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="assetimage/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ asset('elite/bootstrap/dist/css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ asset('elite/bower_components/bootstrap-extension/css/bootstrap-extension.css') }}" rel="stylesheet">
<!-- animation CSS -->
<link href="{{ asset('elite/css/animate.css') }}" rel="stylesheet">
<!-- Custom CSS -->
<link href="{{ asset('elite/css/style.css') }}" rel="stylesheet">
<!-- color CSS -->
<link href="{{ asset('elite/css/colors/megna.css') }}" id="theme" rel="stylesheet">
<!-- Streamline - custom -->
<link href="{{ asset('css/streamline-custom.css') }}" id="theme" rel="stylesheet">
</head>
<body>
<!-- Preloader -->
<div class="preloader">
<div class="cssload-speeding-wheel"></div>
</div>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8" style="display: flex; align-items:center; justify-content:center; height:90vh;">
<div class="align-items-center">
<div class="col-sm-12 text-center mb-5" >
<h2 style="color: red;text-transform:uppercase;">
@if(auth()->user() &&Auth::user()->hasRole('Admin'))
{{ __('general_settings.renew_subscription') }}
@else
{{ __('general_settings.contact_hospital_admin') }}
@endif
</h2>
</div>
<div class="col-sm-12 text-center" >
<img src="{{ asset('uploads/logo/logo_2.png') }}" alt="Home" /><br/>
<h3 class="mt-5" style="color: green;">{{ __('general_settings.faciliate') }} </h3>
<h3 style="color: green;"> {{ __('general_settings.lose_money') }} </h3>
@if( auth()->user() && Auth::user()->hasRole('Admin') )
<h4 class="text-center mt-5 " style="color: green;">{{ __('general_settings.for_support') }}</h4>
<h4 class="text-center " style="color: green;">
Tel: {{ Details::Tele->value }} | Whatsapp : {{ Details::Whats_number->value }} | <a href="{{ Details::url->value }}">Support</a>
</h4>
@endif
</div>
</div>
</div>
<div class="col-md-2"></div>
</div>
<div id="wrapper">
<!-- Page Content -->
<div style="background: white;">
<div class="row container">
</div>
<!-- /.container-fluid -->
<footer class="footer text-center"> {{ date('Y')}} &copy; Stre@mline {{ __('layout.powered_by') }} Kisiizi Hospital {{ __('layout.and') }} Streamline Health Ltd - {{ __('layout.version_number') }} - </footer>
</div>
<!-- /#page-wrapper -->
</div>
</div>
{{-- <section id="wrapper" class="login-register" style="background:url(../../uploads/login/login-register1.jpg) center center/cover no-repeat!important;">
</section> --}}
<!-- jQuery -->
<script src="{{ asset('elite/bower_components/jquery/dist/jquery.min.js') }}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{{ asset('elite/bootstrap/dist/js/tether.min.js') }}"></script>
<script src="{{ asset('elite/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-extension/js/bootstrap-extension.min.js') }}"></script>
<!-- Menu Plugin JavaScript -->
<script src="{{ asset('elite/bower_components/sidebar-nav/dist/sidebar-nav.min.js') }}"></script>
<!--slimscroll JavaScript -->
<script src="{{ asset('elite/js/jquery.slimscroll.js') }}"></script>
<!--Wave Effects -->
<script src="{{ asset('elite/js/waves.js') }}"></script>
<!-- Custom Theme JavaScript -->
<script src="{{ asset('elite/js/custom.min.js') }}"></script>
<!--Style Switcher -->
<script src="{{ asset('elite/bower_components/styleswitcher/jQuery.style.switcher.js') }}"></script>
</body>
</html>
@@ -0,0 +1,67 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg- col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('general_settings.subscription_tracking') }}</h4>
</div>
<div class="col-lg-8 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('general_settings.dashboard') }}</a></li>
<li class="active">{{ __('general_settings.edit_general_settings') }}</li>
</ol>
</div>
</div>
@include('flash::message')
<div class="white-box">
{{ Form::open(['route' => ['general_settings.save_integrated_payment']]) }}
<h3 class="text-center">{{ __('layout.integrated_payment_solutions') }}</h3>
<h4>{{ __('general_settings.description') }}</h4>
<div class="card card-inverse card-secondary text-center text-white">
<div class="card-block">
<h4 class="text-white">{{ __('general_settings.save_integrated_payment_description') }}</h4>
</div>
</div>
<hr>
@foreach($integrated_payments as $integrated_payment)
<h4>{{ $integrated_payment->name }}</h4>
<div class="card card-outline-secondary text-dark">
<div class="card-block">
<input type="hidden" name="integrated_payment[]" value="{{ $integrated_payment->value }}" />
<select name="payment_method[]" class="form-control">
<option value="0" @if(!isset($integrated_methods[$integrated_payment->value])) selected @endif>Not Selected</option>
@if(isset($integrated_methods[$integrated_payment->value]))
<option value="{{ $integrated_methods[$integrated_payment->value] }}" selected>{{ get_name($integrated_methods[$integrated_payment->value], 'id', 'name', 'patient_payment_methods') }}</option>
@endif
{!! $payment_methods !!}
</select>
</div>
</div>
<hr>
@endforeach
{{ Form::button(__('general_settings.save_settings'), ['type' => 'submit', 'class' => 'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('general_settings.cancel'), ['type' => 'reset', 'class' => 'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
@endpush
@@ -0,0 +1,31 @@
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 style="color: red;"> {{ __('home.renew_subscription') }} <button type="button" class="close" data-dismiss="modal">&times;</button></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12 text-center" style="color: red;">
{{ show_subscription_reminder_message()}}
</div>
</div>
</div>
</div>
</div>
</div>
@push('scripts')
<script>
$(document).ready(function() {
var status = {!! json_encode(show_popup()) !!}
if (status){
$('#myModal').modal('show');
$(".modal-dialog").css({'margin': '300px auto',});
}
});
</script>
@endpush
@@ -0,0 +1,271 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<style>
.no-padding {
padding: 0px;
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg- col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('general_settings.subscription_tracking') }}</h4>
</div>
<div class="col-lg-8 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('general_settings.dashboard') }}</a></li>
<li class="active">{{ __('general_settings.edit_general_settings') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('flash::message')
<div class="white-box">
@if (session()->has('streamline_setup'))
<h3><font color="blue">{{ __('general_settings.streamline_setup_2') }}</font></h3>
@endif
{{ Form::open(['route' => isset($subscriptions) ? ['subscriptions.update_subscription_tracking', $subscriptions->id ]: 'subscriptions.save_subscription_tracking']) }}
<div class="row">
<div class="col-md-12">
<div>
<h3 class="text-center">{{ __('general_settings.subscription_tracking') }}</h3>
<h4>{{ __('general_settings.description') }}</h4>
<div class="card card-inverse card-secondary text-center text-white">
<div class="card-block">
<h4 class="text-white">{{ __('general_settings.subscription_tracking_description') }}</h4>
</div>
</div>
<h4>{{ __('general_settings.options') }}</h4>
<div class="card card-outline-secondary text-dark">
<div class="card-block">
{{ Form::radio('enable_subscription_tracking', 0,($general_settings->enable_subscription_tracking == 0 ? true : false),['id'=>'disable_subscription_tracking_radio']) }}&nbsp; {{ Form::label('disable_subscription_tracking_radio',__('general_settings.disable')) }}&nbsp;&nbsp;
<br>
{{ Form::radio('enable_subscription_tracking', 1, ($general_settings->enable_subscription_tracking == 1 ? true : false),['id'=>'enable_subscription_tracking_radio']) }}&nbsp;{{ Form::label('enable_subscription_tracking_radio',__('general_settings.enable'))}}
</div>
</div>
<div id="enable_subscription_tracking_div" class="text-dark mb-3 row" style="display: none;">
<div class="col-sm-3 mt-3">
<div class="form-group" id="searchby">
{{ Form::label('start_date', __('general_settings.current_sub_start')) }}
{{ Form::text('start_date',isset($subscriptions) ? $subscriptions->start_date : '', ['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'datepicker-autoclose']) }}
<div class="help-block with-errors" style="color: red;" id="start_date_errors"></div>
</div>
</div>
<div class="col-sm-3 mt-3">
<div class="form-group" id="">
{{ Form::label('duration', __('general_settings.set_interval_sub')) }}
{{ Form::number('duration',isset($subscriptions) ? $subscriptions->duration : '', ['class' => 'form-control compulsory','min'=>'1','max'=>'5', 'id' => 'duration']) }}
<div class="help-block with-errors" style="color: red;" id="duration_errors"></div>
</div>
</div>
<div class="col-sm-3 mt-3">
<div class="form-group" id="searchby">
{{ Form::label('end_date', __('general_settings.sub_expiry_date')) }}
<div class="help-block with-errors " style="color: red;"id="show_end_date">{{ isset($subscriptions) ? streamline_date($subscriptions->end_date) : '' }}</div>
{{ Form::hidden('end_date', isset($subscriptions) ? $subscriptions->end_date : '', ['class' => 'form-control', 'id' => 'end_date']) }}
</div>
{{ Form::hidden('suspension_period', $suspension_period, ['class' => 'form-control', 'placeholder' => '1', 'required' => 'true', 'disabled' => 'true', 'id' => 'suspension_period']) }}
{{ Form::hidden('warning_period', $warning_period, ['class' => 'form-control', 'placeholder' => '1', 'required' => 'true', 'disabled' => 'true', 'id' => 'warning_period']) }}
</div>
<div class="col-sm-2 mt-3">
<div class="form-group" id="">
{{ Form::label('suspension_date', __('general_settings.sub_suspension_date')) }}
{{ Form::text('suspension_date', isset($subscriptions) ? $subscriptions->suspension_date : '', ['class' => 'form-control','readonly', 'id' => 'show_suspension_date']) }}
</div>
</div>
<p>{{ Form::label('warning_date', __('general_settings.warning_date')) }} :&nbsp; <div class="help-block with-errors " style="color: red;"id="show_warning_date"> </div></p>
</div>
<div id="disable_subscription_tracking_div" class="" style="display: none;">
{{ Form::hidden('number_of_active_users_limit', 'unlimited', ['class' => 'form-control', 'placeholder' => '1', 'required' => 'true', 'disabled' => 'true', 'id' => 'unlimited_users_input']) }}
</div>
</div>
</div>
</div>
<br/>
<br/>
@if (session()->has('streamline_setup'))
{{ Form::button(__('general_settings.save_settings'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
@else
{{ Form::button( isset($subscriptions) ?__('general_settings.update_settings') : __('general_settings.save_settings'),['type'=>'submit','id'=> isset($subscriptions) ? 'update_submit' : 'sub_submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
@endif
{{ Form::close() }}
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$('#datepicker-autoclose,#datepicker-autoclose-1,#show_suspension_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy'
});
//function to validate the duration inserted is between 1 and 5 years
const validate_duration = (number) => {
// Check if the input is a number and an integer between 1 and 5
return Number.isInteger(number) && number >= 1 && number <= 5;
};
// function to calculate expiry date from start date and duration in years
const calculate_expiry_date = (start_date, duration) => {
// Check if start_date is a valid Date object and duration is a positive integer
if (typeof duration !== 'number' || duration <= 0) {
throw new TypeError('Invalid input: duration must be a positive integer.');
}
// Parse the start date string into a Date object
const [startDay, startMonth, startYear] = start_date.split('/');
const startDate = new Date(`${startMonth}/${startDay}/${startYear}`);
// Add the specified number of years to the start year
const expiryYear = parseInt(startYear, 10) + duration;
// Create a new Date object with the updated year and the same day and month
const expiryDate = new Date(startDate);
expiryDate.setFullYear(expiryYear);
// Format the expiry date as dd/mm/yyyy
const formattedExpiryDate = `${expiryDate.getDate()}/${expiryDate.getMonth() + 1}/${expiryDate.getFullYear()}`;
return formattedExpiryDate;
}
const calculate_suspension_date = (exp_date)=>{
var suspension_period = parseInt($('#suspension_period').val());
// Parse the expiry date string into a Date object
const [expiryDay, expiryMonth, expiryYear] = exp_date.split('/');
const expiryDate = new Date(`${expiryMonth}/${expiryDay}/${expiryYear}`);
// Add suspension_period months to the expiry date
const suspensionDate = new Date(expiryDate);
suspensionDate.setMonth(suspensionDate.getMonth() + suspension_period);
// Format the suspension date as dd/mm/yyyy
const formattedSuspensionDate = `${suspensionDate.getDate()}/${suspensionDate.getMonth() + 1}/${suspensionDate.getFullYear()}`;
return formattedSuspensionDate;
}
const calculate_warning_date = (exp_date)=>{
var warning_period = parseInt($('#warning_period').val());
// Parse the expiry date string into a Date object
const [expiryDay, expiryMonth, expiryYear] = exp_date.split('/');
const expiryDate = new Date(`${expiryMonth}/${expiryDay}/${expiryYear}`);
// substract warning period days from expiry date
const warningDate = new Date(expiryDate)
warningDate.setDate(warningDate.getDate() - warning_period);
// Format the suspension date as dd/mm/yyyy
const formattedWarningDate = `${warningDate.getDate()}/${warningDate.getMonth() + 1}/${warningDate.getFullYear()}`;
return formattedWarningDate;
}
const show_or_hide_limited_users_input = () => {
let selectedValue = $('input[name="enable_subscription_tracking"]:checked').val();
if(selectedValue === "1") {
document.getElementById('enable_subscription_tracking_div').style.display = '';
//disable submit button
$('#sub_submit').prop('disabled', true);
document.getElementById('disable_subscription_tracking_div').style.display = 'none';
} else {
document.getElementById('disable_subscription_tracking_div').style.display = '';
$('#sub_submit').prop('disabled', false);
document.getElementById('enable_subscription_tracking_div').style.display = 'none';
}
}
//set exipry date
const format_date = (inputDate)=>{
// format date to day, Month name , Year
// Split the input date string into day, month, and year components
var parts = inputDate.split('/');
var day = parseInt(parts[0]);
var month = parseInt(parts[1]);
var year = parseInt(parts[2]);
// Create a new Date object from the components
var formattedDate = new Date(year, month - 1, day);
// Get the day, month, and year in their respective formats
var formattedDay = formattedDate.toLocaleString('en', { weekday: 'short' });
var formattedMonth = formattedDate.toLocaleString('en', { month: 'long' });
var formattedYear = year;
// Construct the final formatted string
var formattedString = formattedDay+' ' + day+ ', ' + formattedMonth + ' ' + formattedYear;
return formattedString;
}
const set_expiry_date = (start_date,duration)=>{
if (duration == ''){ $('#sub_submit').prop('disabled', true); return $('#duration_errors').html('Please Set Interval ');}
if (!validate_duration(parseInt(duration))) { $('#sub_submit').prop('disabled', true); return $('#duration_errors').html('invalid interval ');}
$('#duration_errors').html('');
var expiry_date =calculate_expiry_date(start_date,parseInt(duration));
var suspension_date = calculate_suspension_date(expiry_date);
var warning_date =calculate_warning_date(expiry_date);
var warning_date_string = format_date(warning_date);
var expiry_date_string = format_date(expiry_date);
$('#end_date').val(expiry_date);
$('#show_end_date').html(expiry_date_string);
$('#show_warning_date').html(warning_date_string);
$("#show_suspension_date").datepicker("setDate", suspension_date);
$('#sub_submit').prop('disabled', false);
}
$(document).ready(function() {
show_or_hide_limited_users_input();
var duration_default = $('#duration').val();
var start_date_default = $('#datepicker-autoclose').val();
set_expiry_date(start_date_default,duration_default);
$('input[name="enable_subscription_tracking"]').on('change', function() {
show_or_hide_limited_users_input();
});
//event listener for the current date
$('#datepicker-autoclose').on('change', function(){
var start_date = $(this).val();
var duration = $('#duration').val();
set_expiry_date(start_date,duration);
});
// event listener for the duration
$('#duration').on('change',function(){
var start_date = $('#datepicker-autoclose').val();
if (start_date == '') { $('#sub_submit').prop('disabled', true); return $('#start_date_errors').html('Please Set Current Start Date ');}
var duration = $('#duration').val();
$('#start_date_errors').html('');
set_expiry_date(start_date,duration);
})
});
</script>
@endpush
@@ -0,0 +1,102 @@
@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">{{ __('general_settings.subscription_tracking') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('general_settings.dashboard') }}</a></li>
<li class="active">{{ __('general_settings.edit_general_settings') }}</li>
</ol>
</div>
</div>
@include('flash::message')
<div class="panel panel-default">
<div class="">
<div class="row mt-5">
<div class="col-md-12 p-5">
<a href="{{route('subscriptions.create_subscription_tracking') }}" class="btn btn-success pull-right">{{ __('general_settings.create_new_subscription') }}</a>
</div>
</div>
</div>
<div class="panel-body">
{{-- <p class="text-muted m-b-30">{{ __('drugs.export_data_to_csv_and_excel') }}</p> --}}
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table table-striped table-hover">
<thead>
<tr>
<th>{{ __('general_settings.start_date') }}</th>
<th>{{ __('general_settings.sub_expiry_date') }}</th>
<th>{{ __('general_settings.set_interval_sub') }}</th>
<th>{{ __('general_settings.sub_suspension_date') }}</th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th>{{ __('general_settings.start_date') }}</th>
<th>{{ __('general_settings.sub_expiry_date') }}</th>
<th>{{ __('general_settings.set_interval_sub') }}</th>
<th>{{ __('general_settings.sub_suspension_date') }}</th>
<th></th>
</tr>
</tfoot>
<tbody>
@forelse($subscriptions as $val)
<tr>
<td>{{ streamline_date($val->start_date) }}</td>
<td>{{ streamline_date($val->end_date) }}</td>
<td>{{ $val->duration }}</td>
<td>{{ streamline_date($val->suspension_date) }}</td>
<td>
@if($val->is_active == '1')
<a href="{{route('subscriptions.edit_subscription_tracking',$val->id )}}" class="btn btn-rounded btn-warning"><i class="fa fa-pencil"></i> {{ __('general_settings.update') }}</a>
@endif
{{-- {{ Form::model($drug->id ,['method' => 'POST', 'route' => ['drugs.activate', $drug->id]]) }}
<button type="submit" class="btn btn-warning" onclick="return confirm('<?php echo __('drugs.are_you_sure')?>')"><i class="fa fa-check"></i> {{ __('drugs.activate') }}</button>
{{ Form::close() }} --}}
</td>
</tr>
@empty
@endforelse
</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: [
'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,11 @@
@php use Streamline\Enums\Roles; @endphp
{{-- alert notification --}}
@if (Auth::user()->hasRole('Admin'))
@if(warning_duration())
<div class="{{ show_subscription_reminder_message('class')}} " style="margin-left: -25.5px; margin-bottom:0%; margin-right: -25.5px;">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
<span style="font-weight:600;line-height: 22px;">{{ show_subscription_reminder_message()}}</span>
</div>
@endif
@endif