
<?php $__env->startSection('content'); ?>
<?php
$UserType = Session::get('UserType');
?>
<input type="hidden" id="UserType" value="<?php echo e($UserType); ?>">
<?php if($UserType != 'Optical'): ?>
<div class="container-fluid flex-grow-1 container-p-y"
    style="background-image: url(<?php echo e(url('dashboard22.jpg')); ?>);width: 1300px;">

    <div class="modal fade" id="modal-report" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel"
        aria-hidden="true">
        <div class="modal-dialog" style="max-width: 70rem; ">
            <div class="modal-content">


                <div class="modal-header">
                    <h5 class="modal-title">Today Appointment</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                <div class="table-responsive" id="custresult">

                </div>
                </div>
            </div>
        </div>
    </div>

</div>
<?php else: ?>
<div class="container-fluid flex-grow-1 container-p-y">
    <h4 class="font-weight-bold py-3 mb-0">Vision Optical Dashboard</h4>

    <div class="row">
        <!-- customar project  start -->
        <div class="col-xl-4 col-md-6">
            <div class="card mb-4">
                <div class="card-body">
                    <div class="row align-items-center m-l-0">
                        <div class="col-auto">
                            <i class="fas fa-file-invoice-dollar f-36 text-danger"></i>
                        </div>
                        <div class="col-auto">
                            <h6 class="text-muted m-b-10">Today Sale</h6>
                            <h2 class="m-b-0">
                                <?php echo e(totalOpticalSale()); ?>

                            </h2>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xl-4 col-md-6">
            <div class="card mb-4">
                <div class="card-body">
                    <div class="row align-items-center m-l-0">
                        <div class="col-auto">
                            <i class="fas fa-user-injured f-36 text-danger"></i>
                        </div>
                        <div class="col-auto">
                            <h6 class="text-muted m-b-10">Total Customer</h6>
                            <h2 class="m-b-0">
                                <?php echo e(totalPatients()); ?>

                            </h2>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-xl-4 col-md-6">
            <div class="card mb-4">
                <div class="card-body">
                    <div class="row align-items-center m-l-0">
                        <div class="col-auto">
                            <i class="fas fa-user-tie f-36 text-primary"></i>
                        </div>
                        <div class="col-auto">
                            <h6 class="text-muted m-b-10">Today Customer</h6>
                            <h2 class="m-b-0">
                                <?php echo e(totalOpticalSale()); ?>

                            </h2>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>


</div>
<?php endif; ?>

<?php $__env->stopSection(); ?>
<script src="<?php echo e(url('assets/js/jquery-3.6.0.min.js')); ?>"></script>
<script type="text/javascript">
function checkAppointment() {
    $.ajax({
        url: "<?php echo e(url('checkAppointment')); ?>",
        method: "POST",
        data: {
            _token: '<?php echo e(csrf_token()); ?>'
        },
        success: function(data) {
           // console.log(data);
           if(data == 0){
            $('#modal-report').modal("hide"); 
           }
           else{
            $('#custresult').html(data);
            
            
           }
           
        }
    });
}
$(document).ready(function() {
    var UserType = $('#UserType').val();
    if(UserType == 'Consultant' || UserType == 'Admin' || UserType == 'Adreceptionmin'){
        $('#modal-report').modal("show"); 
       checkAppointment();
    }
    
});
</script>
<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/gssnagpu/public_html/hospsoft.in/deshmukh_hosp/resources/views/dashboard.blade.php ENDPATH**/ ?>