File: /var/www/html/owlcrm/storage/framework/views/9aee28ac9f3761b71cf1ea3ed7028220.php
<?php $__env->startSection('title', 'OWL CRM Dashboard'); ?>
<?php $__env->startSection('content_header'); ?>
<h1>Reminder</h1>
<small>Manage Reminder</small>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title"></h3>
<div class="card-tools">
<a href="<?php echo e(route('reminder.create')); ?>" class="btn btn-dark"><i class="fas fa-plus"></i> Add Reminder</a>
</div>
</div>
<div class="card-body">
<?php if(session('success')): ?>
<h6 class = 'alert alert-success'>
<?php echo e(Session('success')); ?>
</h6>
<?php endif; ?>
<?php if(session('error')): ?>
<h6 class="alert alert-danger">
<?php echo e(session('error')); ?>
</h6>
<?php endif; ?>
<form method="POST" id="search-form" role="form">
<div class="form-group">
<label for="status">Status</label>
<?php
$options = ['all' => 'All', STATUS_DISABLED => 'Disabled', STATUS_ENABLED => 'Active'];
?>
<?php if (isset($component)) { $__componentOriginal377f5828c1076ae12e071b1688061877 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal377f5828c1076ae12e071b1688061877 = $attributes; } ?>
<?php $component = JeroenNoten\LaravelAdminLte\View\Components\Form\Select::resolve(['name' => 'status_filter','id' => 'status_filter'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('adminlte-select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(JeroenNoten\LaravelAdminLte\View\Components\Form\Select::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php if (isset($component)) { $__componentOriginal1e9af52466c1670f554542c6e6d1a065 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal1e9af52466c1670f554542c6e6d1a065 = $attributes; } ?>
<?php $component = JeroenNoten\LaravelAdminLte\View\Components\Form\Options::resolve(['options' => $options,'emptyOption' => 'Select an option...'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('adminlte-options'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(JeroenNoten\LaravelAdminLte\View\Components\Form\Options::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal1e9af52466c1670f554542c6e6d1a065)): ?>
<?php $attributes = $__attributesOriginal1e9af52466c1670f554542c6e6d1a065; ?>
<?php unset($__attributesOriginal1e9af52466c1670f554542c6e6d1a065); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1e9af52466c1670f554542c6e6d1a065)): ?>
<?php $component = $__componentOriginal1e9af52466c1670f554542c6e6d1a065; ?>
<?php unset($__componentOriginal1e9af52466c1670f554542c6e6d1a065); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal377f5828c1076ae12e071b1688061877)): ?>
<?php $attributes = $__attributesOriginal377f5828c1076ae12e071b1688061877; ?>
<?php unset($__attributesOriginal377f5828c1076ae12e071b1688061877); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal377f5828c1076ae12e071b1688061877)): ?>
<?php $component = $__componentOriginal377f5828c1076ae12e071b1688061877; ?>
<?php unset($__componentOriginal377f5828c1076ae12e071b1688061877); ?>
<?php endif; ?>
</div>
<?php
$config = [
'showDropdowns' => true,
'cancelButtonClasses' => 'btn-danger',
'locale' => ['format' => 'YYYY/MM/DD'],
];
?>
</form>
<div class="table-responsive w-100">
<table class="table table-bordered w-100 yajra-datatable">
<thead>
<tr>
<th>Reminder To</th>
<th>Created By</th>
<th>Entity Type</th>
<th>Description</th>
<th>Reminder Date</th>
<th>Is Notified</th>
<th>Email Notification</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
<script type="text/javascript">
$(function() {
var dataTable = $('.yajra-datatable').DataTable({
processing: true,
serverSide: true,
pageLength: 10,
searching: false,
'ajax': {
'url': "<?php echo e(route('reminder.index')); ?>",
'data': function(data) {
// Read values
var shop_filter = $('#shop_filter option:selected').val();
var status_filter = $('#status_filter option:selected').val();
// Append to data
data.shop_filter = shop_filter;
data.status_filter = status_filter;
}
},
columns: [
/*{data: 'checkbox', name: 'checkbox', orderable: false, searchable: false},*/
/* {data: 'id', name: 'ID'}, */
{
data: 'reminder_to',
name: 'Reminder To'
},
{
data: 'created_by',
name: 'Created By'
},
{
data: 'entity_type',
name: 'Entity Type'
},
// {
// data: 'entity_id',
// name: 'Entity Id'
// },
{
data: 'description',
name: 'Description'
},
{
data: 'reminder_date',
name: 'Reminder Date',
},
{
data: 'is_notified',
name: 'Is Notified',
},
{
data: 'email_notification',
name: 'Email Notification',
},
{
data: 'status',
name: 'Status',
},
{
data: 'action',
name: 'Actions',
},
]
});
$('#shop_filter').on('change', function() {
dataTable.draw();
});
$('#status_filter').on('change', function() {
dataTable.draw();
});
$(document).on('click', '.update_status', function(e) {
e.preventDefault();
var $statusLink = $(this);
var current_status = $statusLink.data('current-status');
var new_status = current_status == 0 ? 1 : 0;
var new_status_label = new_status == 1 ? 'Active' : 'Inactive';
var url = $statusLink.data('update-url');
axios.put(url, {
new_status: new_status
})
.then(response => {
// Handle success response
if (response.data.status === 'success') {
$statusLink.hide();
$statusLink.siblings('.update_status').show();
$statusLink.data('current-status', new_status);
$('#success-container').html(response.data.message).show('slow');
// Hide success message after 5 seconds
setTimeout(function() {
$('#success-container').hide('slow');
}, 5000);
} else {
$('#error-container').html(response.data.message).show('slow');
// Hide error message after 5 seconds
setTimeout(function() {
$('#error-container').hide('slow');
}, 5000);
}
})
.catch(error => {
console.error(error);
});
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('adminlte::page', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/owlcrm/resources/views/users/reminder/index.blade.php ENDPATH**/ ?>