 
<?php $__env->startSection('title', 'Import Client Registration Data'); ?>
<?php $__env->startSection('content'); ?>  
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>  
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/css/bootstrap-datetimepicker.min.css">

<?php 
    $getstatecodedata = DB::table('state_master')->get();
    $getdistrictcodedata = DB::table('district_master')->get();

    $adminstatecode = auth()->user()->state_code;
    $admindistcode = auth()->user()->dist_code;
    $art_centre_code = auth()->user()->art_centre_code;
    $role_name  = auth()->user()->roles->pluck('name');
    if($role_name[0] == "Super Admin" || $role_name[0] == "Admin")
    {
        $getartcentredata = DB::table('art_centre_master')->get();
    }
    else
    {
        $getartcentredata = DB::table('art_centre_master')->where(['art_centre_code'=>$art_centre_code])->get();
    }
?>

<div class="container-fluid">
    <div class="page-header">
        <div class="row align-items-end">
            <div class="col-lg-8">
                <div class="page-header-title">
                    <i class="ik ik-edit bg-blue"></i>
                    <div class="d-inline">
                        <h5><?php echo e(__('Import Client Registration Data')); ?></h5>
                    </div>
                </div>
            </div>
            <div class="col-lg-4">
                <nav class="breadcrumb-container" aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item">
                            <a href="<?php echo e(route('dashboard')); ?>"><i class="ik ik-home"></i></a>
                        </li>
                        <li class="breadcrumb-item"><a href="#"><?php echo e(__('Patient Register')); ?></a></li>
                    </ol>
                </nav>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-7 mx-auto">
            <div class="card">
                <div class="card-header">
                    <div class="col-md-9 pl-0">
                        <h3><?php echo e(__('Import Client Registration Data')); ?></h3>
                    </div>
                    <div class="col-md-3">
                        <a href="<?php echo e(asset('uploads/Sample_Client_Register.csv')); ?>" download="<?php echo e(asset('uploads/Sample_Client_Register.csv')); ?>" class='btn btn-primary'><?php echo e(__('Download Sample')); ?></a>
                    </div>
                </div>

                <div class="card-body">
                    <?php if(session()->has('success')): ?>                     
                    <div class="alert alert-success" role="alert" style="margin-top: 10px;">
                        <?php echo e(session()->get('success')); ?>

                    </div>
                    <?php endif; ?>
                    <?php if(session()->has('error')): ?>
                    <div class="alert alert-danger" role="alert" style="margin-top: 10px;">
                        <?php echo e(session()->get('error')); ?>

                    </div>
                    <?php endif; ?>
                    <form class="forms-sample" method='POST' action="<?php echo e(url('upload_patient_data')); ?>" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                        <div class="form-group">
                            <label for="upload_file"><?php echo e(__('1. Upload File')); ?></label>
                            <input type="file" class="form-control" name='upload_file' required>
                        </div>

                        <button type="submit" id="submit" class="btn btn-primary mr-2"><?php echo e(__('Submit')); ?></button>
                        <?php if(empty($showdata)): ?>
                        <a href="<?php echo e('patient-register-data'); ?>" class="btn btn-light"><?php echo e(__('Cancel')); ?></a>
                        <?php endif; ?>
                      </form>
                </div>
            </div>
        </div>
    </div>
</div>
    
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.full.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/js/bootstrap-datetimepicker.min.js"></script>
<?php $__env->startPush('script'); ?>
    <script src="<?php echo e(asset('js/form-components.js')); ?>"></script>
<?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/yrgdmc/public_html/treatment/resources/views/pages/upload-patient.blade.php ENDPATH**/ ?>