mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Fixed issues with ticket notifications
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
body{
|
body{
|
||||||
font-size: .875rem;
|
font-size: .875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="card-body py-2">
|
<div class="card-body py-2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<a href="#" data-toggle="collapse" data-target="#Collapse"><h4 class="text-secondary"><strong><?php echo $client_name; ?></strong></h4></a>
|
<a href="#" data-toggle="collapse" data-target="#clientHeader"><h4 class="text-secondary"><strong><?php echo $client_name; ?></strong></h4></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
@@ -32,9 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse show" id="Collapse">
|
<div class="collapse show" id="clientHeader">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ if (isset($_POST['assign_ticket'])) {
|
|||||||
|
|
||||||
|
|
||||||
// Notification
|
// Notification
|
||||||
if (intval($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_client_id = $client_id, notification_user_id = $assigned_to");
|
||||||
@@ -392,13 +392,13 @@ if (isset($_POST['add_ticket_reply'])) {
|
|||||||
//End Mail IF
|
//End Mail IF
|
||||||
|
|
||||||
// Notification for assigned ticket user
|
// Notification for assigned ticket user
|
||||||
if (intval($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_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 (intval($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_client_id = $client_id, notification_user_id = $ticket_created_by");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user