Viewing file: f5aba1773a211d816967a89d9a4df15656498fe0.php (15.72 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title','Overview | SmsBox'); ?>
<?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')); ?>">
<script>
let orderDataTable = '';
</script>
<style>
.custom-dp-for-ov{
left: -22px!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">
<div class="row">
<div class="col-lg-5">
<h2 class="card-title"><?php echo app('translator')->get('customer.messages'); ?></h2>
</div>
<div class="col-lg-7">
<a href="<?php echo e(route('customer.smsbox.compose')); ?>" class="btn btn-info float-right ml-2 d-none" type="button">New</a>
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle drop-btn float-right" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-filter"></i> Filter
</button>
<div class="dropdown-menu custom-dp-for-ov pull-left" aria-labelledby="dropdownMenuButton">
<form method="get" id="filtering-form">
<div class="row m-3">
<div class="col-lg-6">
<div class="form-group">
<label for="confirm_message"><?php echo app('translator')->get('customer.from_time'); ?></label>
<input type="date" value="<?php echo e(request()->get('from_date')); ?>" name="from_date" class="form-control">
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="confirm_message"><?php echo app('translator')->get('customer.to_time'); ?></label>
<input type="date" value="<?php echo e(request()->get('to_date')); ?>" name="to_date" class="form-control">
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="type"><?php echo app('translator')->get('customer.type'); ?></label>
<select class="form-control" name="type" id="compose_type">
<option selected value="" ><?php echo app('translator')->get('customer.select_type'); ?></option>
<option <?php echo e(request()->get('type') == 'inbox'?'selected':''); ?> value="inbox">Inbox</option>
<option <?php echo e(request()->get('type') == 'sent'?'selected':''); ?> value="sent">Sent</option>
<option <?php echo e(request()->get('type') == 'trash'?'selected':''); ?> value="trash">Trash</option>
<option <?php echo e(request()->get('type') == 'draft'?'selected':''); ?> value="draft">Draft</option>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group <?php echo e(request()->get('type') != 'sent'?'d-none':''); ?>" id="sent_status">
<label for="status"><?php echo app('translator')->get('customer.status'); ?></label>
<select class="form-control" name="status">
<option <?php echo e(request()->get('status') == 'pending'?'selected':''); ?> value="pending">Pending</option>
<option <?php echo e(request()->get('status') == 'succeed'?'selected':''); ?> value="succeed">Succeed</option>
<option <?php echo e(request()->get('status') == 'failed'?'selected':''); ?> value="failed">Failed</option>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="select_device"><?php echo app('translator')->get('customer.select_any_device'); ?></label>
<select class="form-control" name="select_device" id="select_device">
<?php if($devices->isNotEmpty()): ?>
<option selected value=""><?php echo app('translator')->get('customer.select_any_device'); ?></option>
<?php $__currentLoopData = $devices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $device): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option data-sim="<?php echo e($device->sim_info); ?>" value="<?php echo e($device->id); ?>"><?php echo e($device->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<option selected disabled><?php echo app('translator')->get('customer.no_data_available'); ?></option>
<?php endif; ?>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group d-none" id="sim">
<label for="sim"><?php echo app('translator')->get('customer.sim'); ?></label>
<select class="form-control sim-info" name="sim_name">
</select>
</div>
</div>
<div class="col-lg-12">
<button type="submit" class="btn btn-primary float-right">Submit</button>
</div>
</div>
</form>
</div>
</div>
<button type="button" class="btn drop-btn btn-danger float-right mr-2" data-toggle="modal" data-target="#bulkDeleteModal"><i class="fa fa-times mr-2"></i>Delete</button>
</div>
</div>
</div>
<!-- /.card-header -->
<div class="card-body table-body filter-table">
<table id="overview_list" class="table table-striped table-bordered dt-responsive nowrap">
<thead>
<tr>
<th><?php echo app('translator')->get('customer.time'); ?></th>
<th><?php echo app('translator')->get('customer.message'); ?></th>
<th><?php echo app('translator')->get('customer.from'); ?></th>
<th><?php echo app('translator')->get('customer.to'); ?></th>
<th><?php echo app('translator')->get('customer.type'); ?></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 -->
<!-- Modal -->
<div class="modal fade" id="bulkDeleteModal" tabindex="-1" role="dialog" aria-labelledby="bulkDeleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="bulkDeleteModalLabel"><?php echo e(trans('customer.bulk_delete')); ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form action="<?php echo e(route('customer.smsbox.bulk.delete')); ?>" method="post">
<?php echo csrf_field(); ?>
<div class="modal-body">
<div class="row">
<div class="col-sm-6">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="inbox" value="yes" id="flexCheckInbox">
<label class="form-check-label" for="flexCheckInbox">
Inbox
</label>
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="sent" value="yes" id="flexCheckSent">
<label class="form-check-label" for="flexCheckSent">
Sent
</label>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-danger"><?php echo e(trans('customer.delete')); ?></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 !src="">
"use strict";
const queryString=window.location.search;
orderDataTable = $('#overview_list').DataTable({
processing: true,
serverSide: true,
responsive:true,
ajax: {
"url": '<?php echo e(route('customer.smsbox.overview.get.data')); ?>'+queryString,
"dataSrc": "data",
"type": "GET",
"data": function(d){
d.form = $("#filtering-form").serializeArray();
}
},
columns: [
{ "data": "updated_at" },
{ "data": "body"},
{ "data": "from" },
{ "data": "to" },
{ "data": "type" },
{ "data": "status" },
{ "data": "action" },
],
fnInitComplete: function(oSettings, json) {
$(".show-more").css('overflow', 'hidden').readmore({collapsedHeight: 20,moreLink: '<a href="#">More</a>',lessLink: '<a href="#">Less</a>'});
}
});
</script>
<script>
$('#compose_type').change(function(e) {
const type = $('#compose_type').val();
if(type == 'sent'){
$('#sent_status').removeClass('d-none');
}else {
$('#sent_status').addClass('d-none');
}
});
$(".show-more").css('overflow', 'hidden').readmore({collapsedHeight: 20});
$(".show-more-message").css('overflow', 'hidden').readmore({collapsedHeight: 20});
</script>
<script>
$('#select_device').change(function(e) {
const device = $('#select_device').val();
if(device){
$('#sim').removeClass('d-none');
}else {
$('#sim').addClass('d-none');
}
});
$(".show-more").css('overflow', 'hidden').readmore({collapsedHeight: 20});
$(".show-more-message").css('overflow', 'hidden').readmore({collapsedHeight: 20});
</script>
<script>
$('#select_device').on('change', function (e) {
e.preventDefault();
let sim_info = $('option:selected', this).attr('data-sim');
if (sim_info) {
sim_info = JSON.parse(sim_info);
if (sim_info && typeof sim_info == 'object') {
let options = '';
for (let sim of sim_info) {
let singleSimInfo = sim.split(':');
options += `<option value="${sim}">${singleSimInfo[2]} (SIM ${parseInt(singleSimInfo[0])+1})</option>`
}
$('.sim-info').html(options);
}
}
})
</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/gateway.picotech.app/public_html/resources/views/customer/smsbox/overview.blade.php ENDPATH**/ ?>
|