mirror of
https://github.com/itflow-org/itflow
synced 2026-03-26 15:25:38 +00:00
Ticket Notifications now are clickable and will go to the ticket details
This commit is contained in:
@@ -221,7 +221,7 @@ if (isset($_POST['assign_ticket'])) {
|
|||||||
if ($session_user_id != $assigned_to && $assigned_to != 0) {
|
if ($session_user_id != $assigned_to && $assigned_to != 0) {
|
||||||
|
|
||||||
// App Notification
|
// App Notification
|
||||||
mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Ticket', notification = 'Ticket $ticket_prefix_escaped$ticket_number - Subject: $ticket_subject_escaped has been assigned to you by $session_name', notification_client_id = $client_id, notification_user_id = $assigned_to");
|
mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Ticket', notification = 'Ticket $ticket_prefix_escaped$ticket_number - Subject: $ticket_subject_escaped has been assigned to you by $session_name', notification_action = 'ticket.php?ticket_id=$ticket_id', notification_client_id = $client_id, notification_user_id = $assigned_to");
|
||||||
|
|
||||||
// Email Notification
|
// Email Notification
|
||||||
if (!empty($config_smtp_host)) {
|
if (!empty($config_smtp_host)) {
|
||||||
@@ -394,13 +394,13 @@ if (isset($_POST['add_ticket_reply'])) {
|
|||||||
// Notification for assigned ticket user
|
// Notification for assigned ticket user
|
||||||
if ($session_user_id != $ticket_assigned_to && $ticket_assigned_to != 0) {
|
if ($session_user_id != $ticket_assigned_to && $ticket_assigned_to != 0) {
|
||||||
|
|
||||||
mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Ticket', notification = '$session_name updated Ticket $ticket_prefix_escaped$ticket_number - Subject: $ticket_subject_escaped that is assigned to you', notification_client_id = $client_id, notification_user_id = $ticket_assigned_to");
|
mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Ticket', notification = '$session_name updated Ticket $ticket_prefix_escaped$ticket_number - Subject: $ticket_subject_escaped that is assigned to you', notification_action = 'ticket.php?ticket_id=$ticket_id', notification_client_id = $client_id, notification_user_id = $ticket_assigned_to");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notification for user that opened the ticket
|
// Notification for user that opened the ticket
|
||||||
if ($session_user_id != $ticket_created_by && $ticket_created_by != 0) {
|
if ($session_user_id != $ticket_created_by && $ticket_created_by != 0) {
|
||||||
|
|
||||||
mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Ticket', notification = '$session_name updated Ticket $ticket_prefix_escaped$ticket_number - Subject: $ticket_subject_escaped that you opened', notification_client_id = $client_id, notification_user_id = $ticket_created_by");
|
mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Ticket', notification = '$session_name updated Ticket $ticket_prefix_escaped$ticket_number - Subject: $ticket_subject_escaped that you opened', notification_action = 'ticket.php?ticket_id=$ticket_id', notification_client_id = $client_id, notification_user_id = $ticket_created_by");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
|
|||||||
@@ -60,16 +60,17 @@
|
|||||||
$notification_id = intval($row['notification_id']);
|
$notification_id = intval($row['notification_id']);
|
||||||
$notification_type = nullable_htmlentities($row['notification_type']);
|
$notification_type = nullable_htmlentities($row['notification_type']);
|
||||||
$notification = nullable_htmlentities($row['notification']);
|
$notification = nullable_htmlentities($row['notification']);
|
||||||
|
$notification_action = nullable_htmlentities($row['notification_action']);
|
||||||
$notification_timestamp = date('M d g:ia',strtotime($row['notification_timestamp']));
|
$notification_timestamp = date('M d g:ia',strtotime($row['notification_timestamp']));
|
||||||
$notification_client_id = intval($row['notification_client_id']);
|
$notification_client_id = intval($row['notification_client_id']);
|
||||||
if($notification_client_id > 0){
|
if(!empty($notification_action)){
|
||||||
$notification_link = "client_overview.php?client_id=$notification_client_id";
|
$notification_action = $notification_action;
|
||||||
} else {
|
} else {
|
||||||
$notification_link = "#";
|
$notification_action = "#";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="dropdown-item">
|
<div class="dropdown-item">
|
||||||
<a class="text-dark" href="<?php echo $notification_link; ?>">
|
<a class="text-dark" href="<?php echo $notification_action; ?>">
|
||||||
<p class="mb-1">
|
<p class="mb-1">
|
||||||
<span class="text-bold"><i class="fas fa-bullhorn mr-2"></i><?php echo $notification_type; ?></span>
|
<span class="text-bold"><i class="fas fa-bullhorn mr-2"></i><?php echo $notification_type; ?></span>
|
||||||
<small class="text-muted mt-1 float-right"><?php echo $notification_timestamp; ?></small>
|
<small class="text-muted mt-1 float-right"><?php echo $notification_timestamp; ?></small>
|
||||||
|
|||||||
Reference in New Issue
Block a user