Remove Datatables in customer list

This commit is contained in:
Ibnu Maksum
2024-08-05 11:45:27 +07:00
parent 509658be9c
commit 46a4c5f24d
2 changed files with 30 additions and 36 deletions

View File

@ -655,6 +655,8 @@ switch ($action) {
'status' => 7
];
$append_url = "&order=" . urlencode($order) . "&filter=" . urlencode($filter) . "&orderby=" . urlencode($orderby);
if ($search != '') {
$query = ORM::for_table('tbl_customers')
->whereRaw("username LIKE '%$search%' OR fullname LIKE '%$search%' OR address LIKE '%$search%' " .
@ -668,8 +670,8 @@ switch ($action) {
} else {
$query->order_by_desc($order);
}
$d = $query->findMany();
if (_post('export', '') == 'csv') {
$d = $query->findMany();
$h = false;
set_time_limit(-1);
header('Pragma: public');
@ -710,6 +712,7 @@ switch ($action) {
fclose($fp);
die();
}
$d = Paginator::findMany($query, ['search' => $search], 30, $append_url);
$ui->assign('xheader', '<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">');
$ui->assign('d', $d);
$ui->assign('statuses', ORM::for_table('tbl_customers')->getEnum("status"));