<?php $__env->startSection('content'); ?>
<?php
$hospitaldetails  			= App\Helpers\CustomHelper::hospitalinner($hosppitalid);
?>  

<style>

.owl-item .grids.fill{
   background: #cb0910; 
    color: #fff;
}


</style>
<link rel="stylesheet" href="<?php echo e(url('assets/css/style_new.css')); ?>">
<link rel="stylesheet" href="<?php echo e(url('assets/css/owl.carousel.min.css')); ?>">

  <div class="common-content">
      <div class="page-content">
          <section>
    <div class="content">
        <div class="home-boards d-flex align-items-center justify-content-center">
            <div class="boards d-flex">
                <div class="single-boards2">
                    <h4><?php echo e(ucfirst($hospitaldetails['hospdetails']->name)); ?></h4>
                    <p><?php echo e(ucfirst($hospitaldetails['hospdetails']->address)); ?></p>
                   
                </div>
                <div class="single-boards">
                    <h2><?php echo e($hospitaldetails['equipmentcount']); ?>+</h2>
                    <h3>Equipments</h3>
                </div>
                
                <div class="single-boards">
                    <h2><?php echo e($hospitaldetails['vendorscount']); ?>+</h2>
                    <h3>Vendors</h3>
                </div>
                <div class="single-boards srt">
                    <h2><?php echo e(count($registeredproducts)); ?>+</h2>
                    <h3>No of Equipment Up in Running</h3>
                </div>
                <div class="single-boards2 img-h">
                    <?php if(!empty($hospitaldetails['hospdetails']->photo)): ?>
                      <img src="<?php echo e(url('user_files')); ?>/<?php echo e($hospitaldetails['hospdetails']->photo); ?>">
                    <?php else: ?>
                      <img src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                    <?php endif; ?>
                   
                </div>
            </div>
        </div>
        

        <div class="features">
            <div class="clients_slider">
                        <div id="clients" class="owl-carousel owl-theme">
                            <?php
                            $i=1;
                            ?>
                        <?php if(!empty($departmentlist)): ?>

                            <?php $__currentLoopData = $departmentlist; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dep): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php
                                    $departmentdetail  			= App\Helpers\CustomHelper::departmentdetails($dep->department_id,$hosppitalid);
                                ?> 
                               
                                    <div class="item grids" onclick="gridclick(<?php echo e($departmentdetail['pendingcomplaints']); ?>,<?php echo e($departmentdetail['criticalcomplaint']); ?>,<?php echo e($departmentdetail['validationreqcount']); ?>,<?php echo e($departmentdetail['amc_cmcrequest']); ?>,<?php echo e($departmentdetail['warrantyexpired']); ?>)">
                                        <div class="hd-fg"><h5><?php echo e(ucfirst($dep->name)); ?></h5></div>
                                        <div class="table-status">
                                            <div class="st d-flex"><div>Pending complaints  </div><div>:</div><div style="color: green;" ><?php echo e($departmentdetail['pendingcomplaints']); ?></div></div>
                                            <div class="st d-flex"><div>Critical Pending complaint  </div><div>:</div><div style="color: red;"><?php echo e($departmentdetail['criticalcomplaint']); ?></div></div>
                                            <div class="st d-flex"><div>Validation request count   </div><div>:</div><div style="color: dimgrey;"><?php echo e($departmentdetail['validationreqcount']); ?></div></div>
                                            <div class="st d-flex"><div>AMC and CMC request  </div><div>:</div><div style="color: lightblue;"><?php echo e($departmentdetail['amc_cmcrequest']); ?></div></div>
                                            <div class="st d-flex"><div> Warranty expiry      </div><div>:</div><div style="color: deeppink;"><?php echo e($departmentdetail['warrantyexpired']); ?></div></div>
                                        </div>
                                    </div>
                               <?php
                               $i++;
                               ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>

                        </div>
                    </div>
            <!--<h3>Equipment usage of the Cardiology Department : 78%</h3>-->
        </div>

        
        <div class="features">
                    <div class="clients_slider">
                                <div id="clients" class="owl-carousel owl-theme">
                                    <a class="departments" href="#">
                                        <div class="item grids">
                                            <div class="hd-fg">   <h5>Cardiology</h5></div>
                                            <div class="table-status">
                                                <div class="st d-flex"><div>Pending complaints  </div><div>:</div><div style="color: green;" ></div></div>
                                                <div class="st d-flex"><div>Critical Pending complaint  </div><div>:</div><div style="color: red;"></div></div>
                                                <div class="st d-flex"><div>Validation request count   </div><div>:</div><div style="color: dimgrey;"></div></div>
                                                <div class="st d-flex"><div>AMC and CMC request  </div><div>:</div><div style="color: lightblue;"></div></div>
                                                <div class="st d-flex"><div> Warranty expiry      </div><div>:</div><div style="color: deeppink;"></div></div>
                                            </div>
                                         </div>
                                    </a> 
                                    
                                </div>
                            </div>
                    
                </div>







        <div class="row g-4">
          <?php if(count($departmentlist)!=0): ?>
            <div class="col-lg-12" st>
                <div class="status mobile-view">
                    <div class="hosp-st ">
                        <ul>
                            <li data-bs-toggle="modal" data-bs-target="#exampleModal" ><div class="w-50">Pending complaints</div>:<div class="w-50 px-2" id="pc"></div></li>
                            <li><div class="w-50">Critical Pending complaint</div>:<div class="w-50 px-2" id="cpc"></div></li>
                        </ul>
                    </div>
                    <div class="hosp-st">
                        <ul>
                            <li><div class="w-50">Validation request count</div>:<div class="w-50 px-2" id="vrc"></div></li>
                            <li><div class="w-50">AMC and CMC request </div>:<div class="w-50 px-2" id="amc"></div></li>
                        </ul>
                    </div>
                    <div class="hosp-st">
                        <ul>
                            <li><div class="w-50"> Warranty expiry </div>:<div class="w-50 px-2" id="we"></div></li>
                            
                        </ul>
                    </div>
                </div>
            </div>
        <?php endif; ?>

       <?php if(count($registeredproducts_filter)!=0): ?>

        <div class="row w-100 mb-3" st>

           <div class="col-lg-4">
                <div class="form-inputs">
                <div class="form-group">
                  <label>Equipment Name</label>
                  <select class="form-control selectmanufacturer invoiceselect" id="equipment_filter" name="equipment_filter">
                    <option value="all">All</option>
                  <?php if(!empty($registeredproducts_filter)): ?>
                    <?php $__currentLoopData = $registeredproducts_filter; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $reg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
          
                  <?php if($reg->type=='existing'): ?>
          
                    <?php
                      $pname  			= App\Helpers\CustomHelper::product_existing_name($reg->existing_product_id);
                    ?>
          
                  <?php else: ?>
                      <?php
                      $pname  			= App\Helpers\CustomHelper::product_name($reg->product_id);
                      ?>
                   <?php endif; ?>
          
                     <option value="<?php echo e($reg->product_id); ?>"><?php echo e(ucfirst($pname)); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  <?php endif; ?>
                  </select>
                </div>

            </div>
            </div>

        </div>

        <?php endif; ?>

 <div class="row w-100"  st>
     <?php if(!empty($registeredproducts)): ?>
        <?php $__currentLoopData = $registeredproducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $regproducts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>   
            <div class="col-lg-4 js-category-filterable" data-category="<?php echo $regproducts->product_id?>">
                <div class="products">
                    <?php
                     $regprdcount  			= App\Helpers\CustomHelper::regproductdetails($hosppitalid,$regproducts->id);
                    ?>

                    <?php
                    $equipmentusage  		= App\Helpers\CustomHelper::equipment_day_individual($regproducts->buyer_id,$regproducts->id,$regproducts->equipment_val,'');
                    ?> 

                    <?php
                    $monthlyusage  			= App\Helpers\CustomHelper::equipment_monthly_individual($regproducts->buyer_id,$regproducts->id,$regproducts->equipment_month,$regproducts->equipment_val);
                    ?>

                    <?php if($regprdcount['criticalcomplaint']!=0): ?>
                        <div class="badges">
                            <h5><?php echo e($regprdcount['criticalcomplaint']); ?></h5>
                            <p>Critical</p>
                            <p>Pending Complaint</p>
                        </div>
                    <?php endif; ?>
                    <?php if($regproducts->type=='existing'): ?>

                      <?php
                        $pname  			= App\Helpers\CustomHelper::product_existing_name($regproducts->existing_product_id);
                      ?>

                    <?php else: ?>
                        <?php
                        $pname  			= App\Helpers\CustomHelper::product_name($regproducts->product_id);
                        ?>

                        <?php
                        $pdetails  			= App\Helpers\CustomHelper::vendorproduct_details($regproducts->product_id);
                        $photo 			    = $pdetails->photo;
                        ?>

                    <?php endif; ?>
                   
                    <h5><?php echo e(ucfirst($pname)); ?></h5>
                    <?php if(!empty($photo)): ?>
                        <img src="<?php echo e(url('product_files')); ?>/<?php echo e($photo); ?>">
                    <?php else: ?>
                        <img src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                    <?php endif; ?>

                    <div class="table-status w-100">

                        <div class="st d-flex"><div>Pending complaints  </div><div>:</div><div ><?php echo e($regprdcount['pendingcomplaints']); ?></div></div>
                        <div class="st d-flex"><div>Critical Pending complaint  </div><div>:</div><div ><?php echo e($regprdcount['criticalcomplaint']); ?></div></div>
                        <div class="st d-flex"><div>Validation request count   </div><div>:</div><div><?php echo e($regprdcount['validationreqcount']); ?></div></div>
                        <div class="st d-flex"><div>AMC and CMC request  </div><div>:</div><div><?php echo e($regprdcount['amc_cmcrequest']); ?></div></div>
                        <div class="st d-flex"><div> Warranty expiry      </div><div>:</div><div ><?php echo e($regprdcount['warrantyexpired']); ?></div></div>
                        <div class="st d-flex"><div>No. of Days can be used in a Month      </div><div>:</div><div><?php echo e($regproducts->equipment_month); ?></div></div>
                        <div class="st d-flex"><div><?php if($regproducts->equipment_default=='hours'): ?>No. of Hours  can be used in a Day <?php else: ?> No. of Test  can be used <?php endif; ?></div><div>:</div><div><?php echo e($regproducts->equipment_val); ?></div></div>
                        <div class="st d-flex"><div> Daily Utilization      </div><div>:</div><div><?php echo e(round($equipmentusage['dailyusage_perproduct'])); ?>%</div></div>
                        <div class="st d-flex"><div> Monthly Utilization      </div><div>:</div><div ><?php echo e(round($monthlyusage['monthlyusage_perproduct'])); ?>%</div></div>
                    
                    </div>
<!--
                    Daily Utilization : <?php echo e(round($equipmentusage['dailyusage_perproduct'])); ?>%
                    Monthly Utilization : <?php echo e(round($monthlyusage['monthlyusage_perproduct'])); ?>%
-->
                    <a class="product-link" href="<?php echo e(url('/buyers/preventive_card')); ?>/<?php echo e($regproducts->id); ?>">Preventive Maintenance Card</a>
                    
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php endif; ?>
     </div>
        </div>
    </div>

    <?php echo $__env->make('include.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
   </section>
      </div>
</div> 
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
    
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

 <script src="<?php echo e(URL::to('assets/js/owl.carousel.min.js')); ?>"> </script> 
<!--    <script src="<?php echo e(URL::to('assets/js/custom_new.js')); ?>"></script>-->


<?php echo $__env->make('include.script_new', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<script>
    $( document ).ready(function() {
        $(".item:first").trigger('click');
        $('#clients').owlCarousel({
                     loop:true,
                     margin:10,
                     nav:true,
                     dot:true,
                     responsiveClass: true,
                     autoplay:true,
                responsive:{
            0:{
                items:1,
                nav:true
            },
            600:{
                items:5,
                nav:true
            },
            1000:{
                items:6,
                nav:true,
                loop:false
            }
        }
         })
     });  
        </script>
       
        <script>
        $(".menu-icon").click(function(){
            $(".sidebar").toggleClass("open");
        });
          
        </script>
  
<script>

$(function () {
  $(".invoiceselect").select2();
  
});

$(function() {

$('#equipment_filter').change(function() {

var $select = $(this);
if ($select.val() == 'all') {
  // No filter selected.  Show all categories
  $('.js-category-filterable').show();
  //$('.js-current-category').text('All');
} else {
  $('.js-category-filterable').each(function() {
    if ($(this).data('category') == $select.val()) {
      $(this).show();
    } else {
      $(this).hide();
    }
  });
  //$('.js-current-category').text( $select.find('option:selected').text() );
}
// Reset select box so it's easier to use repeatedly.
//$select.val('');
});

    $('.item').on('click', function() {
        $(".item").removeClass("fill");
        $(this).addClass('fill');
    });
});
function gridclick(pc,cc,vrc,amc,we){
            $("#pc").html(pc);
            $("#cpc").html(cc);
            $("#vrc").html(vrc);
            $("#amc").html(amc);
            $("#we").html(we);
}

    
    
    
    
</script>


<?php echo $__env->make('layouts.main_assetmanage', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meddbot/public_html/resources/views/buyers/hospitaldetails_proc.blade.php ENDPATH**/ ?>