<?php echo $__env->make('dashboard.include.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

  
  <div class="content-wrapper">
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0">Colombo Orders Packing</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="/home">Home</a></li>
              <li class="breadcrumb-item active">Colombo Orders Packing</li>
            </ol>
          </div>
        </div>
      </div>
    </div>
    
    <section class="content">
      <div class="container-fluid">
      <div class="card">
        <div class="card-body">

    <form method="post" action="/searchinventorycolombo2">
        <?php echo e(csrf_field()); ?>

        <div class="row">
        <div class="col-md-1"></div>
                <div class="col-md-4">
                    <div class="form-group">
                        <label>Filter orders by rider name</label>
                        <select class="form-control" name="delivery_name" id="delivery_name" style="width: 100%;" required>
                            <option value="" selected="selected" disabled>Select</option>
                            <option value="all" <?php if($deli=="all"): ?>selected <?php endif; ?>>All</option>
                                <?php $__currentLoopData = $delise; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if($data->type=="Delivery_Guy"): ?>
                                <option value="<?php echo e($data->id); ?>"  <?php if($deli==$data->id ): ?>selected <?php endif; ?>><?php echo e($data->name); ?></option>
                                <?php endif; ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                </div>

                <div class="col-md-4">
                <div class="form-group row">
                    <label for="">Delivery Date :</label>
                        <div class="input-group date" id="reservationdate" data-target-input="nearest">
                            <input type="text" class="form-control datetimepicker-input" value="<?php echo e($ldate); ?>" id="delivery_date" name="delivery_date" data-target="#reservationdate"/  required>
                            <div class="input-group-append" data-target="#reservationdate" data-toggle="datetimepicker">
                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                            </div>
                        </div>
                </div>
            </div>
            <div class="col-md-2" style="padding-top:32px;"><button type="submit" class="btn btn-primary btn-block">Search</button></div>

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

     

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




  <?php echo $__env->make('dashboard.include.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>;


<!-- <script type="text/javascript">
    $(document).ready(function() {
       $("#myButton").click(function() {
            $("#myForm").submit();
    
       });
    });
</script> -->


<script>



$('input[name=barcode]').change(function() { 
    // var min = $(this).val();
    $("#deliveryupdateform").submit();
 });



    $('#deliveryupdateform').on('submit', function(event){
    let ele = this;
        event.preventDefault();
        var form_data = $(this).serialize();
        $.ajax({
            url:"/checklistbarcode",
            method:"POST",
            data:form_data,
            dataType:"json",      
            success: function (result, code, ex) {
                // swal("Done!", "It was successfully!", "success");
                // $("#deliverymodel").modal('hide');  
                // $("#here").load(location.href + " #here");
                // location.reload();
                toastr.success('Delivery Charges Added successfully!')
                

            },
            error: function (jqXHR, textStatus, errorThrown) {
                swal("Warning", "Unable to Process your request", "error");
            },
            
        })
    });



$('#reservationdate').datetimepicker({
    format: 'YYYY/MM/DD'
    });

$(function () {
    $("#example1").DataTable({
      "responsive": true, "lengthChange": true, "autoWidth": false,
      "buttons": [ "colvis"]
    }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
  });
</script>
<script type="text/javascript">
jQuery(function($) {
    $('body').on('click', '#selectall', function() {
        $('.singlechkbox').prop('checked', this.checked);
    });
 
    $('body').on('click', '.singlechkbox', function() {
        if($('.singlechkbox').length == $('.singlechkbox:checked').length) {
            $('#selectall').prop('checked', true);
        } else {
            $("#selectall").prop('checked', false);
        }
 
    });
});

</script>

<script>
<?php if(session('success')): ?>
        // swal("Success!","<?php echo e(session('success')); ?>","success");
        toastr.success('Your work has been successfully!')
// Swal.fire({
  
//   type: 'success',
//   title: 'Your work has been saved',
//   text: "<?php echo e(session('success')); ?>",
//   showConfirmButton: false,
//   timer: 1500
// });


<?php endif; ?>
<?php if(session('error')): ?>
    swal({
            title: "Error!",
            text: "<?php echo e(session('error')); ?>",
            icon: "error",
            button: "OK",
        });
<?php endif; ?>

</script>
