<link rel="stylesheet" src="<?php echo e(URL::to('assets/calender/theme.css')); ?>">
<link rel="stylesheet" src="<?php echo e(URL::to('assets/calender/style.css')); ?>">
<style>
    .orderLists.newDesg .imgBoxs {
        height: 170px;
        object-fit: cover;
        width: 120px;
    }

    p.msg-sts {
        padding: 6px 10px !important;
    }

    button.submit-popup.create,
    button.submit-popup.createinpack.mt-3 {
        margin-top: 50px !important;
    }

    .main-popup-contents .rs-flex {
        width: 100%;
    }

    .main-popup-contents p {
        margin-bottom: 30px;
        font-weight: 600;
        font-size: 20px;
    }

    input#datepickerinproduction,
    #datepickerinpackage,
    #datepicker {
        border-radius: 30px;
    }

    /*  calender css start*/
    .buttons-container {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
    }

    .buttons-container .label-container {
        display: inline-block;
        -webkit-box-flex: 1;
        -moz-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
        text-align: center;
        text-transform: uppercase;
        font-weight: bold;
    }

    .year-dropdown {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border: none;
        font-size: inherit;
        font-weight: inherit;
        font-family: inherit;
        padding: 5px 20px;
    }

    .prev-button,
    .next-button {
        background: transparent;
        border: none;
        padding: 10px;
    }

    .week {
        margin: 10px 0;
    }

    .week.highlight {
        border-radius: 5px;
    }

    .weeks-wrapper.header {
        border-bottom: 1px solid #eee;
    }

    .week .day.header {
        font-weight: bold;
        text-transform: uppercase;
        font-size: 120%;
    }

    .day span {
        display: inline-block;
        width: 40px;
        height: 40px;
        line-height: 40px;
        border-radius: 50%;
        vertical-align: middle;
    }

    .day.today span {
        position: relative;
        display: inline-block;
        font-size: 110%;
    }

    /* weekend */
    .week:not(.start-on-monday) .day:first-child,
    .week:not(.start-on-monday) .day:last-child {
        color: orange;
    }

    /* sunday */
    .week:not(.start-on-monday) .day:first-child {
        color: red;
    }

    /* start on monday - weekend */
    .week.start-on-monday .day:nth-child(6),
    .week.start-on-monday .day:last-child {
        color: orange;
    }

    /* start on monday - sunday */
    .week.start-on-monday .day:last-child {
        color: red;
    }

    .day.today span::after {
        content: "";
        position: absolute;
        bottom: 7px;
        left: 50%;
        transform: translateX(-50%);
        border-bottom: 2px solid orange;
        width: 10px;
        height: 1px;
    }

    .day.sunday span {
        color: #ff8a80;
    }

    .week .day.highlight span {
        color: #2196f3;
    }

    .week .day.selected span {
        background: #1565c0;
        color: white;
    }

    .week .day[disabled="disabled"] span {
        color: #aaa;
        cursor: not-allowed;
    }

    .months-wrapper .month span {
        display: inline-block;
        padding: 10px;
        text-transform: capitalize;
        margin-bottom: 10px;
    }

    .special-buttons {
        text-align: center;
        border-top: 1px solid #eee;
        padding-top: 10px;
    }

    .today-button {
        margin: 0 auto;
        background: transparent;
        border: none;
        padding: 5px;
    }

    .calendar-box {}

    .buttons-container {
        cursor: pointer;
    }

    .week {
        overflow: hidden;
    }

    .week.highlight {
        background: #efefef;
    }

    /* weekend */
    .week .day:first-child,
    .week .day:last-child {
        /*color: orange;*/
    }

    /* sunday */
    .week .day:first-child {
        /*color: red;*/
    }

    .day {
        display: inline-block;
        float: left;
        width: 14.28%;
        text-align: center;
        cursor: pointer;
        box-sizing: border-box;
    }

    .day.disabled span {
        color: #AAA;
    }

    /* vertical highlight */
    .week .day.highlight span {
        /*color: blue;*/
    }

    .day.selected span {
        /*background: orange;*/
    }

    .day.today span {
        font-weight: bold;
    }

    .months-container.hidden,
    .weeks-container.hidden {
        display: none;
    }

    .months-wrapper {
        overflow: hidden;
    }

    .months-wrapper .month {
        display: inline-block;
        float: left;
        width: 25%;
        text-align: center;
        cursor: pointer;
    }

    .months-wrapper .month.one-third {
        width: 33.33%;
    }

    /*   calender css end */
</style>

<?php $__env->startSection('content'); ?>
    <div class="common-content">
        <div class="page-content">
            <div class="page-heading">
                <div class="headings">
                    <h6>Inspection Status</h6>
                    <input name="_token" type="hidden" id="token_po" value="<?php echo e(csrf_token()); ?>">
                </div>
            </div>
    <div class="search-bar order-search">
                                <?php if($buyer_type == 'proc'): ?>
                                <div class="form-inputs">
                                    <div class="form-group">
                                      <label>Consignee</label>
                                      <select class="form-control invoiceselect" id="buyer_filter" name="buyer_filter">
                                        <option value="all">All</option>
                                        <?php $__currentLoopData = $individual_buyers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $individual_buyers): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($individual_buyers->id); ?>"><?php echo e($individual_buyers->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                      </select>
                                    </div>
                                </div>
                                <?php endif; ?>
                              </div>




            <div class="dashboard-cnts">
                <div class="row">
                    <div class="col-lg-12">
                        <div class=" po-sum" style="border-radius: 15px;">
                            <div class="boxings po-sum" style="border-radius: 15px;">
                                <ul class="nav nav-tabs meddbot-tab">

                                    <li class="active"><a href="<?php echo e(url('/buyers/inspection_status_all')); ?>">All</a></li>
                                    <li><a href="<?php echo e(url('/buyers/inspection_status_pass')); ?>" >Inventory Product Waiting</a></li>                                
                                    <li><a  class="active show" href="<?php echo e(url('/buyers/inspection_status_issued')); ?>">Inventory Product Issued</a></li>
                                    <li><a href="<?php echo e(url('/buyers/inspection_status_fail')); ?>">Inventory Product Rejected</a></li>
                                </ul>
                                <div class="tab-content meddbot-tabcontent">
 

                                    <div id="menu3" class="tab-pane fade in active show">
                                        <div class="row mt-3">
                                            <?php if(count($issued) != 0): ?>
                                                <?php $__currentLoopData = $issued; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $summary): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <div class="col-lg-4  js-category-filterable" data-category="<?php echo $summary->individual_buyerid ?>">
                                                       
                                                            <div class="eqipment-itm" style="border: 1px solid #ccc;
    padding: 10px;">
                                                                <div class="eqp-img">
                                                                    <?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="eqp-details">
                                                                    <h4 class="product-name">
                                                                        <?php echo e(ucfirst($summary->product_name)); ?></h4>
                                                                    <div class="d-flex justify-content-between flex-column">
                                                                        <div class="order-id-eqp d-flex justify-content-between">
                                                                            <span>Order Id</span>
                                                                            <span><?php echo e($summary->po_id); ?></span>
                                                                        </div>
                                                                        <div class="order-id-eqp d-flex justify-content-between">
                                                                            <span>Equipment Id</span>
                                                                            <span><?php echo e($summary->id); ?></span>
                                                                        </div>
                                                                        <div class="order-id-eqp d-flex justify-content-between">
                                                                            <span>Issued On</span>
                                                                            <span><?php echo e(date('d-m-Y h:i A', strtotime($summary->issue_datetime))); ?></span>
                                                                        </div>
                                                                        <?php if($summary->inspection_pass_fail == 1): ?>
                                                                        <?php if($summary->inspection_challan != null): ?>
                                                                            <a href='<?php echo e(url('assets/pdf/inspection-challan/' . $summary->inspection_challan)); ?>'
                                                                                target="_blank"><button
                                                                                    class="status-eqp view-challan p-0 mt-2">View
                                                                                    Challan</button></a>
                                                                        <?php endif; ?>
                                                                    <?php endif; ?>
                                                                    </div>
                                                                    
                                                                   
                                                                </div>
                                                            </div>
                                                       
                                                    </div>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                                <?php echo e($issued->links()); ?>

                                            <?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>

                                </div>
                            </div>
                            <div class="modal fade  new-modal" id="challan" tabindex="-1"
                                aria-labelledby="exampleModalLabel" aria-hidden="true">
                                <div class="modal-dialog modal-lg cutom-modal">
                                    <div class="modal-content">
                                        <div class="modal-body">
                                            <button type="button" class="close" data-dismiss="modal"
                                                aria-label="Close">
                                                <span aria-hidden="true">&times;</span>
                                            </button>
                                            <div class="consignee-certificate">
                                                <h5 class="text-center">CONSIGNEE RECEIPT CERTIFICATE</h5>
                                                <p class="mt-3">The following store (s) has/have been received in good
                                                    condition:</p>
                                                <div class="table-responsive">
                                                    <table class="table table-striped">
                                                        <tbody>
                                                            <tr>
                                                                <th scope="row">1</th>
                                                                <td>Contract no & date</td>
                                                                <td>HITES NOA No HITES/PCD/AIIMS-
                                                                    Bibinagar/21-22/2672 dated 03 sep 2021</td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">2</th>
                                                                <td>Supplier’s Name</td>
                                                                <td>M/s York Scientific Industries Pvt. Ltd, 8/6E, Site IV,
                                                                    Sahibabad Industrial Area, Ghaziabad (U.P)-201010</td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">2a</th>
                                                                <td>Supplier's Invoice Detail</td>
                                                                <td>TI/21-22/204 dated 12 Oct 2021</td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">3</th>
                                                                <td>Supplier’s Name</td>
                                                                <td>All India Institute of Medical Sciences
                                                                    Bibinagar, Hyderabad</td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">4</th>
                                                                <td>Name of the item supplied</td>
                                                                <td>Refrigerator (300-380L). Make : Yorco, Model: YSI-580
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">5</th>
                                                                <td>Quantity Supplied</td>
                                                                <td>01 No </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">6</th>
                                                                <td>Date of Receipt by the Consignee</td>
                                                                <td>20 Dec 2021 </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">7</th>
                                                                <td>Name and designation of Authorized
                                                                    Representative of Consignee</td>
                                                                <td>01 No </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">8</th>
                                                                <td>Signature of Authorized Representative
                                                                    of Consignee with date</td>
                                                                <td> </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">9</th>
                                                                <td>Seal of the Consignee</td>
                                                                <td> </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div class="d-flex align-items-center justify-content-between w-100">
                                                    <div class="consignment">
                                                        <h4>Department</h4>
                                                        <p>Shajila Prabhala</p>
                                                    </div>
                                                    <div
                                                        class="consignment consignment d-flex flex-column align-items-end">
                                                        <h4>Superintendent</h4>
                                                        <p>AIIMS Bibinagar</p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="modal-footer">
                                            <div class="d-flex align-items-center justify-content-end w-100">
                                                <button class="btn medd-buttons medd-blue rounded" data-toggle="modal"
                                                    data-target="#add-pbg">Download</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="modal fade  new-modal" id="add-pbg" tabindex="-1"
                                aria-labelledby="exampleModalLabel" aria-hidden="true">
                                <div class="modal-dialog modal-lg cutom-modal">
                                    <div class="modal-content">
                                        <div class="modal-body">
                                            <button type="button" class="close" data-dismiss="modal"
                                                aria-label="Close">
                                                <span aria-hidden="true">&times;</span>
                                            </button>
                                            <div class="consignee-certificate">
                                                <h5 class="text-center">CONSIGNEE RECEIPT CERTIFICATE</h5>
                                                <p class="mt-3">The following store (s) has/have been received in good
                                                    condition:</p>
                                                <div class="table-responsive">
                                                    <table class="table table-striped">
                                                        <tbody>
                                                            <tr>
                                                                <th scope="row">1</th>
                                                                <td>Contract no & date</td>
                                                                <td>HITES NOA No HITES/PCD/AIIMS-
                                                                    Bibinagar/21-22/2672 dated 03 sep 2021</td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">2</th>
                                                                <td>Supplier’s Name</td>
                                                                <td>M/s York Scientific Industries Pvt. Ltd, 8/6E, Site IV,
                                                                    Sahibabad Industrial Area, Ghaziabad (U.P)-201010</td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">2a</th>
                                                                <td>Supplier's Invoice Detail</td>
                                                                <td>TI/21-22/204 dated 12 Oct 2021</td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">3</th>
                                                                <td>Supplier’s Name</td>
                                                                <td>All India Institute of Medical Sciences
                                                                    Bibinagar, Hyderabad</td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">4</th>
                                                                <td>Name of the item supplied</td>
                                                                <td>Refrigerator (300-380L). Make : Yorco, Model: YSI-580
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">5</th>
                                                                <td>Quantity Supplied</td>
                                                                <td>01 No </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">6</th>
                                                                <td>Date of Receipt by the Consignee</td>
                                                                <td>20 Dec 2021 </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">7</th>
                                                                <td>Name and designation of Authorized
                                                                    Representative of Consignee</td>
                                                                <td>01 No </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">8</th>
                                                                <td>Signature of Authorized Representative
                                                                    of Consignee with date</td>
                                                                <td> </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">9</th>
                                                                <td>Seal of the Consignee</td>
                                                                <td> </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div class="d-flex align-items-center justify-content-between w-100">
                                                    <div class="consignment">
                                                        <h4>Department</h4>
                                                        <p>Shajila Prabhala</p>
                                                    </div>
                                                    <div
                                                        class="consignment consignment d-flex flex-column align-items-end">
                                                        <h4>Superintendent</h4>
                                                        <p>AIIMS Bibinagar</p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="modal-footer">
                                            <div class="d-flex align-items-center justify-content-end w-100">
                                                <button class="btn medd-buttons medd-blue rounded" data-toggle="modal"
                                                    data-target="#add-pbg">Download</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="modal fade  new-modal" id="assigndepartment" tabindex="-1"
                                aria-labelledby="exampleModalLabel" aria-hidden="true">
                                <div class="modal-dialog modal-lg cutom-modal">
                                    <form id="sendproduct_biomedical" method="POST"  action="<?php echo e(url('buyers/sendproduct_biomedical')); ?>"  enctype="multipart/form-data">
                                       
                                        <?php echo csrf_field(); ?>
                                        <div class="modal-content">
                                            <div class="modal-body">
                                                <button type="button" class="close" data-dismiss="modal"
                                                    aria-label="Close">
                                                    <span aria-hidden="true">&times;</span>
                                                </button>
                                                <div class="p-3">
                                                    Department
                                                </div>


                                                <select name="department" id="department">
                                                    <option value=""> Select Department </option>
                                                    <?php $__currentLoopData = $departmentlist; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $department): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($department->id); ?>">
                                                            <?php echo e(ucfirst($department->name)); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                                <input type="hidden" name="inspection_order_id" id="inspection_order_id">
                                            </div>
                                            <div class="modal-footer">

                                               
                                                <div class="d-flex align-items-center justify-content-end w-100">
                                                    <button class="btn medd-blue medd-buttons ml-2" type="submit"
                                                        style=" margin-right: 10px;">Submit</button>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div class="modal fade  new-modal" id="generate-challan-modal" tabindex="-1"
                                aria-labelledby="exampleModalLabel" aria-hidden="true">
                                <div class="modal-dialog modal-lg cutom-modal">
                                    <div class="modal-content">
                                        <div class="modal-body">
                                            <button type="button" class="close" data-dismiss="modal"
                                                aria-label="Close">
                                                <span aria-hidden="true">&times;</span>
                                            </button>
                                            <div class="consignee-certificate">
                                                <h5 class="text-center">CONSIGNEE RECEIPT CERTIFICATE</h5>
                                                <p class="mt-3">The following store (s) has/have been received in good
                                                    condition:</p>
                                                <div class="table-responsive">
                                                    <table class="table table-striped">
                                                        <tbody>
                                                            <tr>
                                                                <th scope="row">1</th>
                                                                <td>Contract no & date</td>
                                                                <td id='contract_no'></td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">2</th>
                                                                <td>Supplier’s Name</td>
                                                                <td id='supplier'></td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">2a</th>
                                                                <td>Supplier's Invoice Detail</td>
                                                                <td id='supplier_inv_detail'></td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">3</th>
                                                                <td>Manufacturer Name</td>
                                                                <td id='manufacturer'></td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">4</th>
                                                                <td>Name of the item supplied</td>
                                                                <td id='item'></td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">5</th>
                                                                <td>Quantity Supplied</td>
                                                                <td id='qty'></td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">6</th>
                                                                <td>Date of Receipt by the Consignee</td>
                                                                <td id='receipt_date'></td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">7</th>
                                                                <td>Name and designation of Authorized
                                                                    Representative of Consignee</td>
                                                                <td id='consignee_authorized_representative'> </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">8</th>
                                                                <td>Signature of Authorized Representative
                                                                    of Consignee with date</td>
                                                                <td id='consignee_authorized_representative_sign'> </td>
                                                            </tr>
                                                            <tr>
                                                                <th scope="row">9</th>
                                                                <td>Seal of the Consignee</td>
                                                                <td id='consignee_seal'> </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div class="d-flex align-items-center justify-content-between w-100">
                                                    <div class="consignment">
                                                        <h4>Department</h4>
                                                        <p id='department'></p>
                                                    </div>
                                                    <div
                                                        class="consignment consignment d-flex flex-column align-items-end">
                                                        <h4>Superintendent</h4>
                                                        <p id='superintendent'></p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="modal-footer">
                                            <div class="d-flex align-items-center justify-content-end w-100">
                                                <span id='download-challan'></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <div class="modal fade  new-modal" id="proc_dispatch" tabindex="-1" aria-labelledby="exampleModalLabel"
                            aria-hidden="true">
                            <div class="modal-dialog modal-lg cutom-modal">
                                <div class="modal-content">
                                    <div class="modal-body">
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                        <div class="purchase-order purchase-order-no-border">
                                            <div class="product_details-grd custom flex-column">
                                                <div class="product-details custom">
                                                    <form id="proc_dispatchs" method="POST" action="#"
                                                    enctype="multipart/form-data"> <?php echo csrf_field(); ?>

                                                    <div class="form-group">
                                                        <label>Vehicle Number <sub>*</sub></label>
                                                        <input type="text" class="form-control" name="vehicle_no"
                                                            id="vehicle_no"> 
                                                    
                                                    </div>
                                                    <div class="medd-pop-buttons">
                                                        <button type="submit" class="btn medd-blue medd-buttons ml-2"
                                                            style="margin-right: 10px;">Submit</button>
                                                    </div>

                                                    </form>



                                                </div>
                                                <div class="medd-pop-buttons pt-3" id="docview">
                                                </div>
                                            </div>
                                        </div>
                                        <!--
                                      <div class="medd-pop-buttons pt-3" id="docview">
                                      </div>
                            -->
                                    </div>
                                </div>
                            </div>
                        </div>


















                        <?php $__env->stopSection(); ?>
                        <?php $__env->startSection('scripts'); ?>
                            <script src="<?php echo e(URL::to('assets/js/buyernew.js')); ?>"></script>
                            <script src="<?php echo e(URL::to('assets/calender/calendar.min.js')); ?>"></script>
                            <script>

$(function() {

$('#buyer_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 {
    var x=0;
  $('.js-category-filterable').each(function() {
    if ($(this).data('category') == $select.val()) {  
       x=1;
      $(this).show();
    } else {
      $(this).hide();
      x=0;
     
    }

    if(x==0){
        $(".not").css("display","block");
    }
    else{
        $(".not").css("display","none");  
    }
  });
  //$('.js-current-category').text( $select.find('option:selected').text() );
}
// Reset select box so it's easier to use repeatedly.
//$select.val('');
});

});






                                function downloadpdf(oid) {
                                    window.location = baseurl + 'generate-pdf?id=' + oid;
                                }
                                $(document).ready(function() {
                                    //OTP VERIFICATION
                                    $('#otpverify').on('click', function(event) {
                                        var oid = $("#order_id").val();
                                        event.preventDefault();
                                        if (($('#otp1').val() == '') && ($('#otp2').val() == '') && ($('#otp3').val() == '') && ($(
                                                '#otp4').val() == '') && ($('#otp5').val() == '') && ($('#otp6').val() == '')) {
                                            swal("", "Please Enter a valid OTP", "warning");
                                        } else {
                                            var email = $('#email').val();
                                            var phoneno = $('#phone_no').val();
                                            var otp = $('#otp1').val() + $('#otp2').val() + $('#otp3').val() + $('#otp4').val() + $(
                                                '#otp5').val() + $('#otp6').val();
                                            var APP_URL = <?php echo json_encode(url('/verifyotpuser')); ?>;
                                            var saveData = $.ajax({
                                                type: 'GET',
                                                url: APP_URL + '/' + email + '/' + phoneno + '/' + otp + '/' + oid,
                                                data: {
                                                    email: email,
                                                    phoneno: phoneno,
                                                    _token: '<?php echo e(csrf_token()); ?>',
                                                    oid: oid
                                                },
                                                dataType: "text",
                                                success: function(resultData) {
                                                    if (resultData == '1') {
                                                        swal({
                                                            title: "",
                                                            text: "OTP is verified successfully",
                                                            type: "success",
                                                        }, function() {
                                                            window.location = baseurl + 'buyers/order_summary/';
                                                        });
                                                    } else if (resultData == '0') {
                                                        swal("", "Please Enter a valid OTP", "warning");
                                                        //alert('Please Enter a valid otp');
                                                    } else {
                                                        swal("", "Please Enter a valid OTP", "warning");
                                                        // alert('Please Enter a valid otp');
                                                    }
                                                }
                                            });
                                        }
                                    });
                                    $('#approvepo').on('click', function() {
                                        $(".pageloader").show();
                                        var oid = $(this).data("orderid");
                                        $("#order_id").val(oid);
                                        var email = $('#email').val();
                                        var phoneno = $('#phone_no').val();
                                        var otp = Math.floor(100000 + Math.random() * 900000);
                                        var APP_URL = <?php echo json_encode(url('/setotpuser')); ?>;
                                        var saveData = $.ajax({
                                            type: 'GET',
                                            url: APP_URL + '/' + email + '/' + phoneno + '/' + otp,
                                            data: {
                                                email: email,
                                                phoneno: phoneno,
                                                otp: otp,
                                                _token: '<?php echo e(csrf_token()); ?>'
                                            },
                                            dataType: "text",
                                            success: function(resultData) {
                                                console.log(resultData);
                                                /*if(resultData == 'success'){
                                                    alert('success');
                                                }*/
                                            }
                                        });
                                        var SMS_URL = 'https://www.meddbot.com/twiliosms/';
                                        var saveData = $.ajax({
                                            type: 'POST',
                                            url: SMS_URL,
                                            data: {
                                                phoneno: phoneno,
                                                otp: otp,
                                                _token: '<?php echo e(csrf_token()); ?>'
                                            },
                                            dataType: "text",
                                            success: function(resultData) {
                                                swal({
                                                    title: "",
                                                    text: "OTP send to your registered Phone Number",
                                                    type: "success",
                                                    showCancelButton: false,
                                                    dangerMode: false,
                                                    confirmButtonText: 'OK'
                                                }, function() {
                                                    $('#approve').modal({
                                                        backdrop: 'static',
                                                        keyboard: false
                                                    });
                                                    $(".pageloader").hide();
                                                })
                                            }
                                        });
                                    });
                                });
                                <?php if(Session::has('message')): ?>
                                    swal({
                                        title: "",
                                        text: "<?php echo e(Session::get('message')); ?>",
                                        type: "success",
                                        showCancelButton: false,
                                        dangerMode: false,
                                        confirmButtonText: 'OK',
                                    });
                                <?php endif; ?>
                                <?php if(Session::has('errormessage')): ?>
                                    swal({
                                        title: "",
                                        text: "<?php echo e(Session::get('errormessage')); ?>",
                                        type: "error",
                                        showCancelButton: false,
                                        dangerMode: true,
                                        confirmButtonText: 'OK',
                                    });
                                <?php endif; ?>
                            </script>
                            <script type="text/javascript">
                                var config = `
function selectDate(date) {
  $('#calendar-wrapper').updateCalendarOptions({
    date: date
  });
  console.log(calendar.getSelectedDate());
}
var defaultConfig = {
  weekDayLength: 1,
  date: '08/05/2021',
  onClickDate: selectDate,
  showYearDropdown: true,
  startOnMonday: false,
};
var calendar = $('#calendar-wrapper').calendar(defaultConfig);
console.log(calendar.getSelectedDate());
`;
                                eval(config);
                                const flask = new CodeFlask('#editor', {
                                    language: 'js',
                                    lineNumbers: true
                                });
                                flask.updateCode(config);
                                flask.onUpdate((code) => {
                                    try {
                                        eval(code);
                                    } catch (e) {}
                                });
                            </script>
                            <script>
                                function remindBioMedical(dataOrderId) {
                                    $.ajax({
                                        type: "POST", 
                                        dataType: "json", 
                                        url: "<?php echo e(url('buyers/remind-biomedical')); ?>",
                                        data: {
                                        orderId : dataOrderId,
                                        _token: '<?php echo e(csrf_token()); ?>'
                                        },
                                        success: function(response) {
                                        swal({
                                                title: "",
                                                text: "Alert send to Biomedical",
                                                type: "success",
                                            }, function() {
                                                // window.location = baseurl + 'buyers/equipment_status/';
                                            });
                                        }
                                    });
                                }
                                function sendProduct(id) {
                                    $(".pageloader").show();
                                    $.ajax({
                                        type: "POST",
                                        dataType: "json",
                                        url: "<?php echo e(url('buyers/send-product')); ?>",
                                        data: {
                                            id: id,
                                            _token: '<?php echo e(csrf_token()); ?>'
                                        },
                                        success: function(response) {
                                            console.log(response);
                                            if (response.status == true) {
                                                $("input[name='inspection_order_id']").val(id)
                                                $(".pageloader").hide();
                                                $('#assigndepartment').modal({
                                                    backdrop: 'static',
                                                    keyboard: false
                                                });


                                            }
                                            if (response.status == false) {
                                                $(".pageloader").hide();
                                                swal({
                                                    title: "",
                                                    text: "Pre Requisites are not yet ready.",
                                                    type: "warning",
                                                }, function() {
                                                    // window.location = baseurl + 'buyers/equipment_status/';
                                                });
                                            }

                                        },
                                        error: function(request, status, error) {
                                            console.log("ajax call went wrong:" + request.responseText);
                                        }
                                    });
                                }
                            </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/inspection_status_issued.blade.php ENDPATH**/ ?>