Viewing file: 7f82712e5a66d2f9eb12968af90a56afa1a068f5.php (7.08 KB) -rwxrwxrwx Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?> <?php echo e(trans('admin.reseller')); ?> <?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')); ?>"> <?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"> <h2 class="card-title"><?php echo e(trans('admin.reseller')); ?></h2> <a class="btn btn-primary float-right" href="<?php echo e(route('admin.customers.create')); ?>"><?php echo app('translator')->get('admin.form.button.new'); ?></a> </div> <!-- /.card-header --> <div class="card-body table-body"> <table id="customers" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th><?php echo app('translator')->get('admin.profile'); ?></th> <th><?php echo app('translator')->get('admin.plan_details'); ?></th> <th><?php echo e(trans('admin.wallet_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> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content -->
<div class="modal fade" id="addSubstrack" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content"> <form action="<?php echo e(route('admin.customer.credit.subtract')); ?>" method="post"> <?php echo csrf_field(); ?> <input type="hidden" name="customer_id"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLongTitle">Add / Subtract</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="form-group"> <div> <strong>Credit:</strong> <span class="show_credit">0</span> </div> </div>
<div class="form-group mt-2"> <label for="">Select Type</label> <select name="select_type" class="form-control" id=""> <option value="add">Add</option> <option value="subtract">Subtract</option> </select> </div>
<div class="row custom_credit credit_add" id="addSection"> <div class="col-md-12 form-group"> <label for="">Credit</label> <input type="number" class="form-control" placeholder="Enter Credit" name="credit"> </div> </div>
<div class="row custom_credit credit_subtract" id="subtractSection" style="display: none"> <div class="col-md-12 form-group"> <label for="">Credit</label> <input type="number" class="form-control" placeholder="Enter Credit" name="pre_credit"> </div> </div>
</div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary">Save</button> </div> </form> </div> </div> </div>
<?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> $(document).on('click', '.addSubstract', function (e){
const id = $(this).attr('data-id'); $('input[name=customer_id]').val(id);
$.ajax({ type:'GET', url:'<?php echo e(route('admin.customer.get.info')); ?>', data:{ id:id }, success:function(res){
if(res.data.credit){ $('.show_credit').text(res.data.credit); $('input[name=pre_credit]').val(res.data.credit); } }
});
$('#addSubstrack').modal('show'); })
$(document).on('change', 'select[name=select_type]', function (e){ const type= $(this).val(); $('.custom_credit').hide();
$('.credit_'+type).show();
}) </script>
<script> "use strict"; $('#customers').DataTable({ processing: true, serverSide: true, responsive:true, ajax:'<?php echo e(route('admin.customer.get.all',['type'=>'reseller'])); ?>', columns: [ { "data": "profile" }, { "data": "plan_details" }, { "data": "unit" }, { "data": "status" }, { "data": "action" }, ] }); </script> <script> <?php if(request()->get('type')): ?> $(document).on('click', '.customer_section', function(e){ console.log('working') }); <?php endif; ?> </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.sms.picotech.app/public_html/resources/views/admin/customers/reseller.blade.php ENDPATH**/ ?>
|