From 13edae48dc7849df6ce49d53217d7de77ae45231 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sun, 22 Jan 2023 20:01:20 -0500 Subject: [PATCH] New Field for notifications so each user can get and dismiss their own notifications instead of them being shared --- client_overview.php | 4 ++-- database_updates.php | 13 ++++++++++--- database_version.php | 2 +- db.sql | 6 ++++-- inc_client_top_head.php | 2 +- tickets.php | 11 +++++------ 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/client_overview.php b/client_overview.php index 22f2f65a..e93c4ee0 100644 --- a/client_overview.php +++ b/client_overview.php @@ -31,9 +31,9 @@ $sql_domains_expiring = mysqli_query($mysqli,"SELECT * FROM domains -
+
-
+
Quick Notes
diff --git a/database_updates.php b/database_updates.php index d9b64ca0..aa6561e1 100644 --- a/database_updates.php +++ b/database_updates.php @@ -460,11 +460,18 @@ if(LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION){ mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.0'"); } - //if(CURRENT_DATABASE_VERSION == '0.3.0'){ - // Insert queries here required to update to DB version 0.3.1 + if(CURRENT_DATABASE_VERSION == '0.3.0'){ + mysqli_query($mysqli, "ALTER TABLE `notifications` ADD `notification_user_id` TINYINT(1) DEFAULT 0 AFTER `notification_client_id`"); + + mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.1'"); + } + + + //if(CURRENT_DATABASE_VERSION == '0.3.1'){ + // Insert queries here required to update to DB version 0.3.2 // Then, update the database to the next sequential version - // mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.1'"); + // mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.2'"); //} diff --git a/database_version.php b/database_version.php index e6d0a18f..d814941c 100644 --- a/database_version.php +++ b/database_version.php @@ -5,4 +5,4 @@ * It is used in conjunction with database_updates.php */ -DEFINE("LATEST_DATABASE_VERSION", "0.3.0"); \ No newline at end of file +DEFINE("LATEST_DATABASE_VERSION", "0.3.1"); \ No newline at end of file diff --git a/db.sql b/db.sql index f68ea689..22bae51f 100644 --- a/db.sql +++ b/db.sql @@ -722,6 +722,7 @@ CREATE TABLE `notifications` ( `notification_dismissed_at` datetime DEFAULT NULL, `notification_dismissed_by` int(11) DEFAULT NULL, `notification_client_id` int(11) DEFAULT NULL, + `notification_user_id` tinyint(1) DEFAULT 0, `company_id` int(11) NOT NULL, PRIMARY KEY (`notification_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; @@ -1066,7 +1067,7 @@ CREATE TABLE `settings` ( `config_ticket_from_name` varchar(200) DEFAULT NULL, `config_ticket_from_email` varchar(200) DEFAULT NULL, `config_ticket_email_parse` int(1) NOT NULL DEFAULT 0, - `config_ticket_client_general_notifications` int(1) NOT NULL DEFAULT 0, + `config_ticket_client_general_notifications` int(1) NOT NULL DEFAULT 1, `config_enable_cron` tinyint(1) DEFAULT NULL, `config_recurring_auto_send_invoice` tinyint(1) DEFAULT NULL, `config_enable_alert_domain_expire` tinyint(1) DEFAULT NULL, @@ -1080,6 +1081,7 @@ CREATE TABLE `settings` ( `config_module_enable_itdoc` tinyint(1) NOT NULL DEFAULT 1, `config_module_enable_accounting` tinyint(1) NOT NULL DEFAULT 1, `config_module_enable_ticketing` tinyint(1) NOT NULL DEFAULT 1, + `config_theme` varchar(200) DEFAULT 'blue', PRIMARY KEY (`company_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1517,4 +1519,4 @@ CREATE TABLE `vendors` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2023-01-18 20:12:49 +-- Dump completed on 2023-01-22 20:00:27 diff --git a/inc_client_top_head.php b/inc_client_top_head.php index 5582e69e..8dd4ba2d 100644 --- a/inc_client_top_head.php +++ b/inc_client_top_head.php @@ -6,7 +6,7 @@ $location_phone = formatPhoneNumber($location_phone); ?> -
+
diff --git a/tickets.php b/tickets.php index 7e0cfeab..249ad94d 100644 --- a/tickets.php +++ b/tickets.php @@ -167,15 +167,14 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];
- -
-
+
@@ -206,7 +205,7 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];
-
" id="advancedFilter">
@@ -408,7 +407,7 @@ $user_active_assigned_tickets = $row['total_tickets_assigned']; - +