Viewing file: 2e4f38549fd617adab6e31475a255f45e4b4ec54.php (25.82 KB) -rwxrwxrwx Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?> Order <?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-css'); ?> <link rel="stylesheet" href="<?php echo e(asset('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css')); ?>"> <link rel="stylesheet" href="<?php echo e(asset('plugins/datatables-responsive/css/responsive.bootstrap4.min.css')); ?>"> <style> .custom-modal-dialog { max-width: 1000px !important; }
.table thead th { vertical-align: bottom; border-bottom: 2px solid #dee2e6; font-size: 13px !important; } </style> <?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header order-card-header d-flex"> <h2 class="card-title"><?php echo app('translator')->get('admin.order_request'); ?></h2>
<ul class="nav nav-pills ml-5" id="pills-tab" role="tablist"> <li class="nav-item contact-data"> <a class="nav-link custom nav-link-hover active order-nav-tabs trigger-first-btn" data-data-order-status=<?php echo e("all"); ?> id="pills-all" data-toggle="pill" href="#pills__all" role="tab" aria-controls="pills-all" aria-selected="true">All</a> </li> <li class="nav-item contact-data"> <a class="nav-link custom nav-link-hover order-nav-tabs" data-data-order-status=<?php echo e("processing"); ?> id="pills-processing-tab" data-toggle="pill" href="#pills-processing" role="tab" aria-controls="pills-processing" aria-selected="false">Processing (<?php echo e(isset($processing_orders)?$processing_orders:'0'); ?>)</a> </li> <li class="nav-item contact-data"> <a class="nav-link custom nav-link-hover order-nav-tabs" data-data-order-status=<?php echo e("inprogress"); ?> id="pills-progress-tab" data-toggle="pill" href="#pills-progress" role="tab" aria-controls="pills-progress" aria-selected="false">In Progress (<?php echo e(isset($inprogress_orders)?$inprogress_orders:'0'); ?>)</a> </li> <li class="nav-item contact-data"> <a class="nav-link custom nav-link-hover order-nav-tabs" data-data-order-status=<?php echo e("pending"); ?> id="pills-pending-tab" data-toggle="pill" href="#pills-pending" role="tab" aria-controls="pills-pending" aria-selected="false">Pending (<?php echo e(isset($pending_orders)?$pending_orders:'0'); ?>)</a> </li> <li class="nav-item contact-data"> <a class="nav-link custom nav-link-hover order-nav-tabs" data-data-order-status=<?php echo e("completed"); ?> id="pills-completed-tab" data-toggle="pill" href="#pills-completed" role="tab" aria-controls="pills-completed" aria-selected="false">Completed (<?php echo e(isset($completed_orders)?$completed_orders:'0'); ?>)</a> </li> <li class="nav-item contact-data"> <a class="nav-link custom nav-link-hover order-nav-tabs" data-data-order-status=<?php echo e("partial"); ?> id="pills-partial-tab" data-toggle="pill" href="#pills-partial" role="tab" aria-controls="pills-partial" aria-selected="false">Partial (<?php echo e(isset($partial_orders)?$partial_orders:'0'); ?>)</a> </li> <li class="nav-item contact-data"> <a class="nav-link custom nav-link-hover order-nav-tabs" data-data-order-status=<?php echo e("cancelled"); ?> id="pills-cancel-tab" data-toggle="pill" href="#pills-cancel" role="tab" aria-controls="pills-cancel" aria-selected="false">Cancelled (<?php echo e(isset($cancelled_orders)?$cancelled_orders:'0'); ?>)</a> </li> </ul> </div> <!-- /.card-header --> <div class="card-body table-body"> <div class="tab-content" id="myTabContent"> <div class="tab-pane fade show active" id="pills__all" role="tabpanel" aria-labelledby="approved-tab"> <table id="categories-all" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th><?php echo app('translator')->get('customer.order_number'); ?></th> <th><?php echo app('translator')->get('admin.table.name'); ?></th> <th><?php echo app('translator')->get('customer.order_basic_details'); ?></th> <th><?php echo app('translator')->get('admin.table.status'); ?></th> <th><?php echo app('translator')->get('admin.table.action'); ?></th> </tr> </thead> </table> </div>
<div class="tab-pane fade" id="pills-pending" role="tabpanel" aria-labelledby="pending-tab"> <table id="categories_pending" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th><?php echo app('translator')->get('customer.order_number'); ?></th> <th><?php echo app('translator')->get('admin.table.name'); ?></th> <th><?php echo app('translator')->get('customer.order_basic_details'); ?></th> <th><?php echo app('translator')->get('admin.table.status'); ?></th> <th><?php echo app('translator')->get('admin.table.action'); ?></th> </tr> </thead> </table> </div> <div class="tab-pane fade" id="pills-completed" role="tabpanel" aria-labelledby="approved-tab"> <table id="categories-completed" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th><?php echo app('translator')->get('customer.order_number'); ?></th> <th><?php echo app('translator')->get('admin.table.name'); ?></th> <th><?php echo app('translator')->get('customer.order_basic_details'); ?></th> <th><?php echo app('translator')->get('admin.table.status'); ?></th> <th><?php echo app('translator')->get('admin.table.action'); ?></th> </tr> </thead> </table> </div> <div class="tab-pane fade" id="pills-progress" role="tabpanel" aria-labelledby="approved-tab"> <table id="categories-progress" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th><?php echo app('translator')->get('customer.order_number'); ?></th> <th><?php echo app('translator')->get('admin.table.name'); ?></th> <th><?php echo app('translator')->get('customer.order_basic_details'); ?></th> <th><?php echo app('translator')->get('admin.table.status'); ?></th> <th><?php echo app('translator')->get('admin.table.action'); ?></th> </tr> </thead> </table> </div> <div class="tab-pane fade" id="pills-cancel" role="tabpanel" aria-labelledby="approved-tab"> <table id="categories-cancelled" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th><?php echo app('translator')->get('customer.order_number'); ?></th> <th><?php echo app('translator')->get('admin.table.name'); ?></th> <th><?php echo app('translator')->get('customer.order_basic_details'); ?></th> <th><?php echo app('translator')->get('admin.table.status'); ?></th> <th><?php echo app('translator')->get('admin.table.action'); ?></th> </tr> </thead> </table> </div> <div class="tab-pane fade" id="pills-partial" role="tabpanel" aria-labelledby="approved-tab"> <table id="categories-partial" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th><?php echo app('translator')->get('customer.order_number'); ?></th> <th><?php echo app('translator')->get('admin.table.name'); ?></th> <th><?php echo app('translator')->get('customer.order_basic_details'); ?></th> <th><?php echo app('translator')->get('admin.table.status'); ?></th> <th><?php echo app('translator')->get('admin.table.action'); ?></th> </tr> </thead> </table> </div> <div class="tab-pane fade" id="pills-processing" role="tabpanel" aria-labelledby="approved-tab"> <table id="categories-processing" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th><?php echo app('translator')->get('customer.order_number'); ?></th> <th><?php echo app('translator')->get('admin.table.name'); ?></th> <th><?php echo app('translator')->get('customer.order_basic_details'); ?></th> <th><?php echo app('translator')->get('admin.table.status'); ?></th> <th><?php echo app('translator')->get('admin.table.action'); ?></th> </tr> </thead> </table> </div> </div> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <div class="modal fade" id="massOrderRequestModal" tabindex="-1" role="dialog" aria-labelledby="massOrdereModalLabel" aria-hidden="true"> <div class="modal-dialog custom-modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="massOrdereModalLabel"><?php echo app('translator')->get('admin.order_request'); ?></h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <form action="" id="massOrderRequestFrom" method="post"> <?php echo csrf_field(); ?> <div class="modal-body" id="massOrderRequestService"> <div class="row"> <div class="col-lg-6"> <div class="form-group"> <label for="service_id"><?php echo app('translator')->get('admin.order_service'); ?></label> <select class="form-control" name="service_id" id="service_id"> <option selected disabled><?php echo app('translator')->get('admin.choose_a_option'); ?></option> </select> </div> </div> <div class="col-lg-6"> <div class="form-group"> <label for="status"><?php echo app('translator')->get('admin.form.status'); ?></label> <select class="form-control" name="status" id="status"> <option value="processing"><?php echo app('translator')->get('customer.processing'); ?></option> <option value="inprogress"><?php echo app('translator')->get('customer.inProgress'); ?></option> <option value="completed"><?php echo app('translator')->get('customer.completed'); ?></option> <option value="partial"><?php echo app('translator')->get('customer.partial'); ?></option> </select> </div> </div> </div> <div id="mass-service">
</div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo app('translator')->get('admin.form.button.close'); ?></button> <button type="submit" class="btn btn-primary"><?php echo app('translator')->get('admin.form.button.save'); ?></button> </div> </form>
</div> </div> </div> <!-- /.content --> <!-- Button trigger modal --> <!-- Modal --> <?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-scripts'); ?> <script src="<?php echo e(asset('plugins/datatables/jquery.dataTables.min.js')); ?>"></script> <script src="<?php echo e(asset('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js')); ?>"></script> <script src="<?php echo e(asset('plugins/datatables-responsive/js/dataTables.responsive.min.js')); ?>"></script> <script src="<?php echo e(asset('plugins/datatables-responsive/js/responsive.bootstrap4.min.js')); ?>"></script>
<script> "use strict"; function initializeDataTable(selector, status) { return $(selector).DataTable({ processing: true, serverSide: true, responsive: true, ajax: { url: '<?php echo e(route('admin.order.request.get.all')); ?>', data: { status: status } }, columns: [ { "data": "order_number" }, { "data": "name" }, { "data": "order_basic_details" }, { "data": "status" }, { "data": "action" }, ] }); } $(document).ready(function() { var dataTablePending; var dataTable_complted; var dataTable_in_progress; var dataTable_processing; var dataTable_cancelled; var dataTable_partial; var dataTable_all;
$('#pills-all').on('click', function (e) { if(!dataTable_all){ dataTable_all = initializeDataTable('#categories-all', 'all'); }else{ dataTable_all.ajax.reload(); } }); $('#pills-pending-tab').on('click', function (e) { if(!dataTablePending){ dataTablePending = initializeDataTable('#categories_pending', 'pending'); }else{ dataTablePending.ajax.reload(); } }); $('#pills-completed-tab').on('click', function (e) { if(!dataTable_complted){ dataTable_complted = initializeDataTable('#categories-completed', 'completed'); }else{ dataTable_complted.ajax.reload(); } });
$('#pills-processing-tab').on('click', function (e) { if(!dataTable_processing){ dataTable_processing = initializeDataTable('#categories-processing', 'processing'); }else{ dataTable_processing.ajax.reload(); } }); $('#pills-progress-tab').on('click', function (e) { if(!dataTable_in_progress){ dataTable_in_progress = initializeDataTable('#categories-progress', 'inprogress'); }else{ dataTable_in_progress.ajax.reload(); } }); $('#pills-partial-tab').on('click', function (e) { if(!dataTable_partial){ dataTable_partial = initializeDataTable('#categories-partial', 'partial'); }else{ dataTable_partial.ajax.reload(); } }); $('#pills-cancel-tab').on('click', function (e) { if(!dataTable_cancelled){ dataTable_cancelled = initializeDataTable('#categories-cancelled', 'cancelled'); }else{ dataTable_cancelled.ajax.reload(); } }); });
$(document).on('click', '.massOrderModal', function() { const action = $(this).attr('data-action') $('#massOrderRequestFrom').attr('action',action); const id = $(this).attr('data-order')
$.ajax({ url: '<?php echo e(route('admin.order.request.get.service')); ?>', method: "GET", data: { id: id, }, success: function (res) { if (res.status == 'success') { let html = '<option value="">--select option--</option>'; $.each(res.data, function (index, value) { html += `<option value="${value.service_id}" data-id="${value.id}" data-counter="${value.counter}" data-charges="${value.charges}" data-quantity="${value.order_quantity}" data-link="${value.link}" data-name="${value.name}">${value.name}</option>`; }); $('#service_id').html(html); } } }); $('#massOrderRequestModal').modal('show'); });
$(document).ready(function(){ $('.trigger-first-btn').trigger('click'); });
$('#service_id').change(function(){ const id = $('option:selected', this).attr('data-id') const link = $('option:selected', this).attr('data-link') const quantity = $('option:selected', this).attr('data-quantity') const charges = $('option:selected', this).attr('data-charges') const counter = $('option:selected', this).attr('data-counter') const name = $('option:selected', this).attr('data-name'); const remains = Number(quantity) - Number(counter); let html = `<div class="row"> <div class="col-lg-6"> <div class="row"> <div class="col-lg-6"> <div class="form-group"> <label for="mass_order_quantity"><?php echo app('translator')->get('customer.order_quantity'); ?></label> <input type="hidden" class="massOrderId" name="mass_order_id" value="${id}"> <input value="${quantity}" type="number" class="form-control mass_order_quantity" disabled placeholder="<?php echo app('translator')->get('customer.enter_order_quantity'); ?>"> </div> </div> <div class="col-lg-6"> <div class="form-group"> <label for="mass_link"><?php echo app('translator')->get('admin.link'); ?></label> <input value="${link}" type="text" class="form-control" disabled placeholder="<?php echo app('translator')->get('https://'); ?>"> </div> </div> <div class="col-lg-12"> <div class="form-group"> <label for="start_counter"><?php echo app('translator')->get('customer.start_counter'); ?></label> <input value="" type="number" class="form-control" name="order_counter" placeholder="<?php echo app('translator')->get('customer.start_counter'); ?>"> </div> </div> </div> </div> <div class="col-lg-6"> <div class="row"> <div class="col-lg-12"> <div class="row"> <div class="col-lg-6"> <div class="form-group"> <label for="link"><?php echo app('translator')->get('admin.service_name'); ?></label> <input value="${name}" type="text" class="form-control" disabled placeholder="<?php echo app('translator')->get('admin.service_name_input'); ?>">
</div> </div> <div class="col-lg-6"> <div class="form-group"> <label for="link"><?php echo app('translator')->get('customer.total_charges'); ?></label> <input value="${charges}" type="number" class="form-control" disabled placeholder="<?php echo app('translator')->get('customer.total_charges'); ?>"> </div> </div> <div class="col-lg-12"> <div class="form-group"> <label for="remains"><?php echo app('translator')->get('customer.remains'); ?></label> <input value="${remains}" type="number" name="remains" class="form-control" id="remains" disabled placeholder="<?php echo app('translator')->get('customer.remains'); ?>"> </div> </div> </div> </div> </div> </div> </div>`; const values = $(".mass_order_id").map(function(){return $(this).val();}).get(); $('#mass-service').html(html); });
</script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/test.smm.picotech.app/public_html/resources/views/admin/order_request/index.blade.php ENDPATH**/ ?>
|