Viewing file: 16fe916777e154078f96836af8547b46.php (5.7 KB) -rwxrwxrwx Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title', trans('customer.dynamic_campaign')); ?>
<?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 mt-3"> <div class="card"> <div class="card-header"> <h2 class="card-title"><?php echo app('translator')->get('customer.list'); ?> <i data-toggle="tooltip" data-placement="right" class="fa fa-question-circle alert-tooltip" title="Before creating a campaign you have to create SMS template & make contact group. Otherwise you can not create a campaign."></i> </h2> <div class="float-right"> <a href="<?php echo e(route('customer.campaign.report')); ?>" class="btn btn-info" target="_blank"><?php echo e(trans('customer.reports')); ?></a> <a class="btn btn-primary" href="<?php echo e(route('customer.dynamic.campaign.create')); ?>"><?php echo app('translator')->get('customer.new'); ?></a> </div> </div> <!-- /.card-header --> <div class="card-body"> <table id="contacts" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th><?php echo app('translator')->get('customer.title'); ?></th> <th><?php echo app('translator')->get('customer.start_date'); ?></th> <th><?php echo app('translator')->get('customer.end_date'); ?></th> <th><?php echo app('translator')->get('customer.start_time'); ?></th> <th><?php echo app('translator')->get('customer.end_time'); ?></th> <th><?php echo app('translator')->get('customer.status'); ?></th> <th><?php echo app('translator')->get('customer.action'); ?></th> </tr> </thead>
</table> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content --> <?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"; let interval; let contactDataTable=$('#contacts').DataTable({ processing: true, serverSide: true, responsive:true, ajax:'<?php echo e(route('customer.get.all.dynamic.campaign')); ?>', columns: [ { "data": "title","name":"campaigns.title" }, { "data": "start_date" }, { "data": "end_date" }, { "data": "start_time" }, { "data": "end_time" }, { "data": "status" }, { "data": "action" }, ], fnInitComplete: function(oSettings, json) { interval=setInterval(checkImportingStatus, 5000); } });
function checkImportingStatus() { let ids = []; $('.importing').each(function () { let text = $(this).text(); text = text.replace(/ /g, ''); const id = $(this).attr('data-id'); if(text=='importing') { ids.push(id); } }); if(ids && ids.length > 0){ $.ajax({ type:'GET', url:'<?php echo e(route('customer.campaign.check.import.status')); ?>', data:{ ids:JSON.stringify(ids) }, success:function(res){ if(res.status=='success'){ if(res.data>0){ contactDataTable.ajax.reload(()=>{ //TODO:: Need ids of completed import so that we can check and pop the ids and send new ids to the server and check if(interval && ids.length==res.data){ clearInterval(interval); } }); } } } }) } }
</script> <?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.customer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/test.sms.picotech.app/public_html/resources/views/customer/dynamic_campaign/index.blade.php ENDPATH**/ ?>
|