Make the search method order_by and offset use the provided values

This commit is contained in:
Alex Tselegidis 2024-05-11 15:02:12 +02:00
parent 8c3731a2c3
commit cc5331e1dc
10 changed files with 20 additions and 20 deletions

View file

@ -89,11 +89,11 @@ class Admins extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$admins = $this->admins_model->search($keyword, $limit, $offset, $order_by);

View file

@ -62,11 +62,11 @@ class Appointments extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$appointments = $this->appointments_model->search($keyword, $limit, $offset, $order_by);

View file

@ -90,11 +90,11 @@ class Blocked_periods extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$blocked_periods = $this->blocked_periods_model->search($keyword, $limit, $offset, $order_by);

View file

@ -147,11 +147,11 @@ class Customers extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$customers = $this->customers_model->search($keyword, $limit, $offset, $order_by);

View file

@ -102,11 +102,11 @@ class Providers extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$providers = $this->providers_model->search($keyword, $limit, $offset, $order_by);

View file

@ -98,11 +98,11 @@ class Secretaries extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$secretaries = $this->secretaries_model->search($keyword, $limit, $offset, $order_by);

View file

@ -87,11 +87,11 @@ class Service_categories extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$service_categories = $this->service_categories_model->search($keyword, $limit, $offset, $order_by);

View file

@ -88,11 +88,11 @@ class Services extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$services = $this->services_model->search($keyword, $limit, $offset, $order_by);

View file

@ -47,11 +47,11 @@ class Unavailabilities extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$unavailabilities = $this->unavailabilities_model->search($keyword, $limit, $offset, $order_by);

View file

@ -106,11 +106,11 @@ class Webhooks extends EA_Controller
$keyword = request('keyword', '');
$order_by = 'update_datetime DESC';
$order_by = request('order_by', 'update_datetime DESC');
$limit = request('limit', 1000);
$offset = 0;
$offset = (int) request('offset', '0');
$webhooks = $this->webhooks_model->search($keyword, $limit, $offset, $order_by);