From 37ed01ed3e23035f4d8891e9cef230cc4408c636 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Fri, 13 Oct 2017 20:17:28 +0100 Subject: [PATCH] Move Office Icons to the right (#1624) --- ..._3_2_0.php => 20171013150000_upgrade_to_3_2_0.php} | 0 application/migrations/sqlscripts/3.1.1_to_3.2.0.sql | 11 +++++++++++ application/models/Module.php | 2 +- database/database.sql | 4 ++-- database/migrate_phppos_dist.sql | 4 ++-- database/tables.sql | 4 ++-- 6 files changed, 18 insertions(+), 7 deletions(-) rename application/migrations/{20170924150000_upgrade_to_3_2_0.php => 20171013150000_upgrade_to_3_2_0.php} (100%) diff --git a/application/migrations/20170924150000_upgrade_to_3_2_0.php b/application/migrations/20171013150000_upgrade_to_3_2_0.php similarity index 100% rename from application/migrations/20170924150000_upgrade_to_3_2_0.php rename to application/migrations/20171013150000_upgrade_to_3_2_0.php diff --git a/application/migrations/sqlscripts/3.1.1_to_3.2.0.sql b/application/migrations/sqlscripts/3.1.1_to_3.2.0.sql index bc3b5db3b..427e95b0b 100644 --- a/application/migrations/sqlscripts/3.1.1_to_3.2.0.sql +++ b/application/migrations/sqlscripts/3.1.1_to_3.2.0.sql @@ -101,3 +101,14 @@ ALTER TABLE `ospos_items` DELETE FROM `ospos_modules` WHERE `ospos_modules`.`module_id` = 'migrate'; DELETE FROM `ospos_permissions` WHERE `ospos_permissions`.`permission_id` = 'migrate'; DELETE FROM `ospos_grants` WHERE `ospos_grants`.`permission_id` = 'migrate' AND `ospos_grants`.`person_id` = 1; + + +-- Move Office Module to Right side of Modules list + +UPDATE `ospos_modules` +SET `sort` = 999 +WHERE `name_lang_key` = 'module_office'; + +UPDATE `ospos_modules` +SET `sort` = 98 +WHERE `name_lang_key` = 'module_messages'; diff --git a/application/models/Module.php b/application/models/Module.php index 1b95375c7..fa01397bc 100644 --- a/application/models/Module.php +++ b/application/models/Module.php @@ -97,7 +97,7 @@ class Module extends CI_Model { if($show_office_group) { - $sort = 1; + $sort = 999; } else { diff --git a/database/database.sql b/database/database.sql index a6315c4ab..941db7d8b 100644 --- a/database/database.sql +++ b/database/database.sql @@ -365,8 +365,8 @@ INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_i ('module_home', 'module_home_desc', 1, 'home'), ('module_items', 'module_items_desc', 20, 'items'), ('module_item_kits', 'module_item_kits_desc', 30, 'item_kits'), -('module_messages', 'module_messages_desc', 100, 'messages'), -('module_office', 'module_office_desc', 1, 'office'), +('module_messages', 'module_messages_desc', 98, 'messages'), +('module_office', 'module_office_desc', 999, 'office'), ('module_receivings', 'module_receivings_desc', 60, 'receivings'), ('module_reports', 'module_reports_desc', 50, 'reports'), ('module_sales', 'module_sales_desc', 70, 'sales'), diff --git a/database/migrate_phppos_dist.sql b/database/migrate_phppos_dist.sql index 394cb7c85..f10fd01b9 100644 --- a/database/migrate_phppos_dist.sql +++ b/database/migrate_phppos_dist.sql @@ -365,8 +365,8 @@ INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_i ('module_home', 'module_home_desc', 1, 'home'), ('module_items', 'module_items_desc', 20, 'items'), ('module_item_kits', 'module_item_kits_desc', 30, 'item_kits'), -('module_messages', 'module_messages_desc', 100, 'messages'), -('module_office', 'module_office_desc', 1, 'office'), +('module_messages', 'module_messages_desc', 98, 'messages'), +('module_office', 'module_office_desc', 999, 'office'), ('module_receivings', 'module_receivings_desc', 60, 'receivings'), ('module_reports', 'module_reports_desc', 50, 'reports'), ('module_sales', 'module_sales_desc', 70, 'sales'), diff --git a/database/tables.sql b/database/tables.sql index 20060a563..5e893daa3 100644 --- a/database/tables.sql +++ b/database/tables.sql @@ -365,8 +365,8 @@ INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_i ('module_home', 'module_home_desc', 1, 'home'), ('module_items', 'module_items_desc', 20, 'items'), ('module_item_kits', 'module_item_kits_desc', 30, 'item_kits'), -('module_messages', 'module_messages_desc', 100, 'messages'), -('module_office', 'module_office_desc', 1, 'office'), +('module_messages', 'module_messages_desc', 98, 'messages'), +('module_office', 'module_office_desc', 999, 'office'), ('module_receivings', 'module_receivings_desc', 60, 'receivings'), ('module_reports', 'module_reports_desc', 50, 'reports'), ('module_sales', 'module_sales_desc', 70, 'sales'),