Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mcoil.corals.io/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mcoil.corals.io/storage/framework/views/f742cd66f40032e00df51c8f9cb70e88.php
<?php $__env->startSection('stylesheets'); ?>
<link href="<?php echo e(asset('css/sweetalert2.min.css')); ?>" rel="stylesheet" type="text/css" />
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-md-12">
        <section class="content">
        <?php echo $__env->make('layouts.errors-and-messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <div class="box">
                <div class="box-body">
                    <div class="col-md-12">
                        <h3 class="bold">Assigned Drivers <span class="font-black">| Oil Orders</span></h3> 
                        <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="assigned_table">
                            <thead class="thead-dark">
                                <tr>
                                    <th scope="col" class="all">ID</th>
                                    <th scope="col" class="min-mobile-l">Address</th>
                                    <th scope="col" class="min-tablet-l">Delivery</th>
                                    <th scope="col" class="min-tablet-l">Product</th>
                                    <th scope="col" class="min-tablet-l">Quantity</th>
                                    <th scope="col" class="min-mobile-l">Status</th>
                                    <th scope="col" class="min-tablet-l">Driver</th>
                                    <th scope="col" class="min-mobile-l">Actions</th>
                                </tr>
                            </thead>
                            <tbody>



































                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <section class="content">
        <?php echo $__env->make('layouts.errors-and-messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <div class="box">
                <div class="box-body">
                    <div class="col-md-12">
                        <h3 class="bold">Unassigned Drivers <span class="font-black">| Oil Orders</span></h3> 
                        <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="unassigned_table">
                            <thead class="thead-dark">
                                <tr>
                                    <th scope="col" class="all">ID</th>
                                    <th scope="col" class="min-mobile-l">Address</th>
                                    <th scope="col" class="min-tablet-l">Delivery</th>
                                    <th scope="col" class="min-tablet-l">Product</th>
                                    <th scope="col" class="min-tablet-l">Quantity</th>
                                    <th scope="col" class="min-mobile-l">Status</th>
                                    <th scope="col" class="min-tablet-l">Driver</th>
                                    <th scope="col" class="min-mobile-l">Actions</th>
                                </tr>
                            </thead>
                            <tbody>

































                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>
<div id="myModal" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h3 class="modal-title bold">Assign a Driver</h3>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12">
                        <p>Please choose a driver that you want assigned to this order.</p>
                    </div>
                    <div class="col-md-12">
                        <select name="driver_list" id="driver_list" class="form-control input-lg">
                            <option value="">Select Driver</option>
                        </select>
                        <input type="hidden" name="popup_order_id" id="popup_order_id" value="">
                    </div>
                    <div class="col-md-6 btn-margin-top"><br>
                        <button type="submit" class="btn btn-lg btn-block btn-success assign_driver_class">Assign Driver</button>
                    </div>
                    <div class="col-md-6 btn-margin-top"><br>
                        <a href="javascript:void(0);" data-dismiss="modal" class="btn btn-lg btn-block btn-send " data-value="no">Back</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
<script src="<?php echo e(asset('js/sweetalert2.all.min.js')); ?>"></script>
<script type="text/javascript">
$(document).ready( function () {
    $.fn.DataTable.ext.pager.numbers_length = 5;
    $('#unassigned_table').DataTable({
		"responsive": true,
        "processing": true,
        "serverSide": true,
        "ajax":{
            "url": "<?php echo e(url('admin/driver/unassigned/orders/server-pagination')); ?>",
            "dataType": "json",
            "type": "POST",
            "data":{ _token: "<?php echo e(csrf_token()); ?>"}
        },
        "columns": [
            { "data": "id" },
            { "data": "address" },
            { "data": "delivery" },
            { "data": "product" },
            { "data": "quantity" },
            { "data": "status" },
            { "data": "driver" },
            { "data": "actions" },
        ],

        createdRow: function( row, data, dataIndex ) {
            $(row).find('td:eq(0)').addClass('dtr-control');
        },
        "order": [[ 0, "desc" ]],
        "bAutoWidth": false,
        "rowReorder": {
            selector: 'td:nth-child(2)'
        },
        "columnDefs": [
          { "width": "130px", "targets": 7 }
        ]
	});
    $('#assigned_table').DataTable({
		"responsive": true,
        "processing": true,
        "serverSide": true,
        "ajax":{
            "url": "<?php echo e(url('admin/driver/assigned/orders/server-pagination')); ?>",
            "dataType": "json",
            "type": "POST",
            "data":{ _token: "<?php echo e(csrf_token()); ?>"}
        },
        "columns": [
            { "data": "id" },
            { "data": "address" },
            { "data": "delivery" },
            { "data": "product" },
            { "data": "quantity" },
            { "data": "status" },
            { "data": "driver" },
            { "data": "actions" },
        ],

        createdRow: function( row, data, dataIndex ) {
            $(row).find('td:eq(0)').addClass('dtr-control');
        },
        "order": [[ 0, "desc" ]],
        "bAutoWidth": false,
        "rowReorder": {
            selector: 'td:nth-child(2)'
        },
        "columnDefs": [
          { "width": "150px", "targets": 7 }
        ]
	});
});
$(function(){
    $(document).on('click','.assign_order',function(){
        $("#myModal").modal('show');
        var order_id = $(this).attr('data-id');
        $('#popup_order_id').val(order_id);
        $.ajax({
            url:"<?php echo e(route('admin.driver.alldriver')); ?>",
            method: "POST",
            data: {"_token": "<?php echo e(csrf_token()); ?>"},
            success:function(data){
                data = JSON.parse(data);
                $("#driver_list").html(data);
            }
        });
    });
    $(document).on('click','.assign_driver_class',function(e){
        var popup_driver_id = $("#driver_list").val();
        var popup_order_id = $("#popup_order_id").val();
        if(popup_driver_id != ''){
            $('#myModal').hide();
            e.preventDefault();
			Swal.fire({
                title: 'Updated!',
    	        text: "A driver has been assigned.",
    	        type: 'success',
                showConfirmButton: false,
                timer: 1500
            });
            $.ajax({
                url:"<?php echo e(route('admin.driver.assignorder')); ?>",
                method: "POST",
                data: {'popup_driver_id':popup_driver_id, 'popup_order_id':popup_order_id ,"_token": "<?php echo e(csrf_token()); ?>"},
                success:function(data){
                    data = JSON.parse(data);
                    $('.assign_driver_class').hide();
                    $('.order_assign_success').css('display','block');
                    setTimeout(function(){
                        window.location.reload();
                    }, 1500);
                }
            });
        }   
    });

    $(document).on('click', '.unassign-driver',function (e){
        var id = $(this).data("id");
        var obj = $(this);
        e.preventDefault();
        e.stopPropagation();
        if (id != '') {
            Swal.fire({
                title: 'Are you sure?',
                text: "The driver will be unassigned from this order",
                type: 'warning',
                showCancelButton: true,
                confirmButtonColor: '#3085d6',
                cancelButtonColor: '#d33',
                confirmButtonText: 'Yes!'
            }).then((result) => {
                if (result.value) {
                    $(this).attr("disabled",true);
                    $.ajax({
                        url: "<?php echo e(route('admin.driver.unassignDriver')); ?>",
                        method: "POST",
                        data: {
                            "_token": "<?php echo e(csrf_token()); ?>",
                            "_method": "get",
                            id: id
                        },
                        success:function(response){
                            setTimeout(function() {
                                window.location.reload();
                            }, 1500);
                        }
                    });
                }
            });
        }
    });
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/corals/mcoil.corals.io/resources/views/admin/driver/assign.blade.php ENDPATH**/ ?>

Spamworldpro Mini