File: /www/wwwroot/erp.nhatnamsst.com/storage/framework/views/30a31648fbddca0f3d032fba6ced8a32.php
<?php $__env->startSection('title', trans('Phương thức thanh toán')); ?>
<?php $__env->startSection('datatable'); ?>
<div class="mb-3">
<div class="d-flex justify-content-between align-items-center mb-2">
<div class="d-flex align-items-center gap-2">
<button type="button" class="btn small btn-primary" id="btn-toggle-search">
<i class="ti ti-search"></i> Tìm kiếm
</button>
</div>
<div class="d-flex align-items-center gap-2">
<a href="<?php echo e(route('cms.payment_method.create')); ?>" class="btn small btn-primary">
<i class="ti ti-plus"></i> Nhập PHƯƠNG THỨC THANH TOÁN
</a>
</div>
</div>
<div id="filter-form" style="display: none; background: white; padding: 15px; border-radius: 4px; margin-bottom: 20px;">
<div class="row">
<div class="col-md-6 mb-3">
<label for="filter_name" class="form-label">Phương thức thanh toán:</label>
<input type="text" class="form-control" id="filter_name" name="filter_name" placeholder="Nhập phương thức thanh toán...">
</div>
</div>
<div class="row">
<div class="col-12">
<button type="button" class="btn small btn-primary" id="btn-search">
<i class="ti ti-search"></i> Tìm
</button>
<button type="button" class="btn small btn-secondary" id="btn-clear-search">
<i class="ti ti-x"></i> Xóa tìm
</button>
</div>
</div>
</div>
</div>
<div class="table-responsive position-relative">
<?php echo $dataTable->table(['class' => 'table table-bordered'], true); ?>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('js'); ?>
<script>
$(document).ready(function() {
var tableId = '<?php echo e($dataTable->getTableAttribute('id')); ?>';
var datatable = window.LaravelDataTables[tableId];
var originalUrl = datatable.ajax.url();
$('#btn-toggle-search').on('click', function() {
$('#filter-form').slideToggle();
});
$('#btn-search').on('click', function() {
var name = $('#filter_name').val();
var params = [];
if (name) params.push('filter_name=' + encodeURIComponent(name));
var newUrl = originalUrl;
if (params.length > 0) {
var separator = originalUrl.indexOf('?') > -1 ? '&' : '?';
newUrl = originalUrl.split('?')[0] + separator + params.join('&');
} else {
newUrl = originalUrl.split('?')[0];
}
datatable.ajax.url(newUrl).load();
});
$('#btn-clear-search').on('click', function() {
$('#filter_name').val('');
datatable.ajax.url(originalUrl.split('?')[0]).load();
});
});
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('cms.layouts.datatable', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /www/wwwroot/erp.nhatnamsst.com/resources/views/cms/payment_methods/index.blade.php ENDPATH**/ ?>