 <?php $__env->startSection('content'); ?>
    <div class="common-content">
        <div class="page-content">
            <div class="page-heading">
                <div class="headings">
                    <h6>Installation Status</h6>
                </div>
            </div>
            <input name="_token" type="hidden" id="token_user" value="<?php echo e(csrf_token()); ?>">
            <div class="boxings">
                <?php if(count($preorder) != 0): ?>
                    <?php $__currentLoopData = $preorder; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $summary): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="purchase-order pre-order">
                            <div class="order-id d-flex justify-content-end p-3">
                                <h4>Order ID <span class="green-order"><?php echo e($summary->po_id); ?></span></h4>
                            </div>
                            <div class="product_details-grd custom">
                                <div class="product-image custom pre-product-image">
                                    <?php if(!empty($summary->photo)): ?>
                                        <img src="<?php echo e(url('product_files')); ?>/<?php echo e($summary->photo); ?>">
                                    <?php else: ?>
                                        <img src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                                    <?php endif; ?>
                                </div>
                                <div class="product-details custom">
                                    <ul>
                                        <li>
                                            <h4 class="product-name"><?php echo e(ucfirst($summary->product_name)); ?></h4>
                                        </li>
                                        <li><label class="p-o-label">Equipment Id</label>: <span><?php echo e($summary->id); ?></span></li>
                                        
                                        <li><label class="p-o-label">Product Code</label>: <span><?php echo e($summary->product_code); ?></span></li>
                                        <li><label class="p-o-label">Department Name</label>: <span><?php echo e($summary->departmentname); ?></span></li>
                                        
                                        <?php if($summary->department_status==2): ?>  
                                        
                                            <?php if($summary->installation_request==0): ?>
                                            <button style="color: #fff;" class="btn medd-buttons medd-blue mt-3" id="send product" onclick="installation_request(<?php echo e($summary->id); ?>,<?php echo e($summary->po_id); ?>)">
                                                Send Installation Request
                                            </button>
                                            <?php endif; ?>
                                        <?php endif; ?>
                                        <?php if($summary->installation_request==1): ?>
                                        <li><label class="p-o-label">Installation Request</label>: <span>Pending</span></li>
                                        <?php endif; ?>
                                        <?php if($summary->installation_request==2): ?>
                                        <li><label class="p-o-label">Installation Request</label>: <span>Completed</span></li>
                                        <?php endif; ?>




                                    </ul>
                                    <ul class="">
                                        
                                        <li class="pre-list"><?php echo e(ucfirst($summary->prerequites_items)); ?></li>
                                   
                                    </ul>
                                </div>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php else: ?>
                    <div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
                        <div class="product-display">
                            <ul>
                                <li>
                                    <div class="details">
                                        <div>
                                            <h6>
                                                No Datas available
                                            </h6>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                <?php endif; ?>
            </div>
        </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('scripts'); ?>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
        <script src="https://cdn.ckeditor.com/4.5.1/standard/ckeditor.js"></script>
        <script src="<?php echo e(URL::to('assets/js/buyernew.js')); ?>"></script>
        
        <script type="text/javascript">


function installation_request(preorderid,order_id){

var data = {
    _token	:$(".token_user").val(),
    preorderid:preorderid,
    order_id:order_id
 }
   $.ajax({
      
       url: baseurl + 'buyers/sendinstallation_request',
       type: "POST",
       data: data,
       success: function (res) {

        console.log(res);

        if(res==1){


            swal({
                title: "",
                text: "Successfully send",
                type: "success",
                showCancelButton: false,
                dangerMode: false,
                confirmButtonText: 'OK'
            },function () {
                window.location = baseurl + 'buyers/received_products_biomedical';
            })
      

        }
      
       }


    });



}















            <?php if(Session::has('message')): ?>
                swal({
                    title: "",
                    text: "<?php echo e(Session::get('message')); ?>",
                    type: "success",
                    showCancelButton: false,
                    dangerMode: false,
                    confirmButtonText: 'OK',
                });
            <?php endif; ?>
        </script>
    <?php $__env->stopSection(); ?>

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