From 12f6833ca5b08da5a54bc6d7dad1493c540edcc9 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 27 Mar 2020 11:11:51 +0100 Subject: [PATCH] Providers and services are ordered alphabetically (#568). --- application/models/Providers_model.php | 3 ++- application/models/Services_model.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/application/models/Providers_model.php b/application/models/Providers_model.php index f4fecd37..0f91955e 100755 --- a/application/models/Providers_model.php +++ b/application/models/Providers_model.php @@ -502,7 +502,8 @@ class Providers_Model extends CI_Model { ->select('ea_users.*') ->from('ea_users') ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner') - ->where('ea_roles.slug', DB_SLUG_PROVIDER); + ->where('ea_roles.slug', DB_SLUG_PROVIDER) + ->order_by('first_name ASC, last_name ASC, email ASC'); $providers = $this->db->get()->result_array(); diff --git a/application/models/Services_model.php b/application/models/Services_model.php index b0f34f72..c2327072 100644 --- a/application/models/Services_model.php +++ b/application/models/Services_model.php @@ -163,7 +163,7 @@ class Services_Model extends CI_Model { } } - // Availabilities type must have the correct value. + // Availabilities type must have the correct value. if ($service['availabilities_type'] !== NULL && $service['availabilities_type'] !== AVAILABILITIES_TYPE_FLEXIBLE && $service['availabilities_type'] !== AVAILABILITIES_TYPE_FIXED) { @@ -337,6 +337,7 @@ class Services_Model extends CI_Model { 'ea_services_providers.id_services = ea_services.id', 'inner') ->join('ea_service_categories', 'ea_service_categories.id = ea_services.id_service_categories', 'left') + ->order_by('name ASC') ->get()->result_array(); }