Skip to content

Commit 7de91d9

Browse files
committed
Client Tickets display Contact Email below Contact name, removed email column reworked the display handler
1 parent 8b90286 commit 7de91d9

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

client_tickets.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@
8888
<tr>
8989
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_number&o=<?php echo $disp; ?>">Number</a></th>
9090
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_subject&o=<?php echo $disp; ?>">Subject</a></th>
91-
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=contact_name&o=<?php echo $disp; ?>">Contact</a></th>
92-
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_subject&o=<?php echo $disp; ?>">Email</a></th>
91+
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=contact_name&o=<?php echo $disp; ?>">Contact</a></th>
9392
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_priority&o=<?php echo $disp; ?>">Priority</a></th>
9493
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_status&o=<?php echo $disp; ?>">Status</a>
9594
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=user_name&o=<?php echo $disp; ?>">Assigned</a></th>
@@ -144,6 +143,11 @@
144143
}
145144
$contact_id = $row['contact_id'];
146145
$contact_name = $row['contact_name'];
146+
if(empty($contact_name)){
147+
$contact_display = "-";
148+
}else{
149+
$contact_display = "$contact_name<br><small class='text-secondary'>$contact_email</small>";
150+
}
147151
$contact_title = $row['contact_title'];
148152
$contact_email = $row['contact_email'];
149153
$contact_phone = $row['contact_phone'];
@@ -160,11 +164,10 @@
160164

161165
<tr>
162166
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><span class="badge badge-pill badge-secondary p-3"><?php echo "$ticket_prefix$ticket_number"; ?></span></a></td>
163-
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><?php echo $ticket_subject; ?></a></td>
164-
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=tickets"><?php echo $contact_name; ?></a></td>
165-
<td><?php echo $contact_email; ?></td>
166-
<td><?php echo $ticket_priority_display; ?></td>
167-
<td><?php echo $ticket_status_display; ?></td>
167+
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><?php echo $ticket_subject; ?></a></td>
168+
<td><?php echo $contact_display; ?></td>
169+
<td><?php echo $ticket_priority_display; ?></td>
170+
<td><?php echo $ticket_status_display; ?></td>
168171
<td><?php echo $ticket_assigned_to_display; ?></td>
169172
<td><?php echo $ticket_updated_at_display; ?></td>
170173
<td><?php echo $ticket_created_at; ?></td>

tickets.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@
178178
<thead class="text-dark <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
179179
<tr>
180180
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_number&o=<?php echo $disp; ?>">Number</a></th>
181-
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_subject&o=<?php echo $disp; ?>">Subject</a></th>
182-
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_subject&o=<?php echo $disp; ?>">From</a></th>
181+
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_subject&o=<?php echo $disp; ?>">Subject</a></th>
183182
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=client_name&o=<?php echo $disp; ?>">Client</a></th>
184183
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_priority&o=<?php echo $disp; ?>">Priority</a></th>
185184
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_status&o=<?php echo $disp; ?>">Status</a>
@@ -254,7 +253,6 @@
254253
<tr>
255254
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><span class="badge badge-pill badge-secondary p-3"><?php echo "$ticket_prefix$ticket_number"; ?></span></a></td>
256255
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><?php echo $ticket_subject; ?></a></td>
257-
<td><?php echo $contact_email; ?></td>
258256
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=tickets"><?php echo $client_name; ?></a></td>
259257
<td><?php echo $ticket_priority_display; ?></td>
260258
<td><?php echo $ticket_status_display; ?></td>

0 commit comments

Comments
 (0)