mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Remove Departments table and remove it from the client side nav, takes up too much space, added it as a text input on contact add/edit instead
This commit is contained in:
@@ -24,7 +24,6 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM contacts
|
||||
LEFT JOIN locations ON location_id = contact_location_id
|
||||
LEFT JOIN departments ON contact_department_id = department_id
|
||||
WHERE contact_archived_at IS NULL
|
||||
AND (contact_name LIKE '%$q%' OR contact_title LIKE '%$q%' OR location_name LIKE '%$q%' OR contact_email LIKE '%$q%' OR department_name LIKE '%$q%' OR contact_phone LIKE '%$n%' OR contact_extension LIKE '%$q%' OR contact_mobile LIKE '%$n%')
|
||||
AND contact_client_id = $client_id ORDER BY $sb $o LIMIT $record_from, $record_to");
|
||||
@@ -70,7 +69,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
||||
<thead class="thead-light <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
|
||||
<tr>
|
||||
<th class="text-center"><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=contact_name&o=<?php echo $disp; ?>">Name</a></th>
|
||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=department_name&o=<?php echo $disp; ?>">Department</a></th>
|
||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=$contact_department&o=<?php echo $disp; ?>">Department</a></th>
|
||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=contact_email&o=<?php echo $disp; ?>">Email</a></th>
|
||||
<th>Phone</th>
|
||||
<th>Mobile</th>
|
||||
@@ -90,11 +89,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
||||
}else{
|
||||
$contact_title_display = "<small class='text-secondary'>$contact_title</small>";
|
||||
}
|
||||
$department_name = $row['department_name'];
|
||||
if(empty($department_name)){
|
||||
$department_name_display = "-";
|
||||
$contact_department = $row['contact_department'];
|
||||
if(empty($contact_department)){
|
||||
$contact_department_display = "-";
|
||||
}else{
|
||||
$department_name_display = $department_name;
|
||||
$contact_department_display = $contact_department;
|
||||
}
|
||||
$contact_phone = formatPhoneNumber($row['contact_phone']);
|
||||
if(empty($contact_phone)){
|
||||
@@ -131,7 +130,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
||||
}else{
|
||||
$location_name_display = $location_name;
|
||||
}
|
||||
$department_id = $row['department_id'];
|
||||
$auth_method = $row['contact_auth_method'];
|
||||
|
||||
// Related Assets Query
|
||||
@@ -181,7 +179,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
||||
</a>
|
||||
</th>
|
||||
|
||||
<td><?php echo $department_name_display; ?></td>
|
||||
<td><?php echo $contact_department_display; ?></td>
|
||||
<td><?php echo $contact_email_display; ?></td>
|
||||
<td><?php echo $contact_phone_display; ?> <?php if(!empty($contact_extension)){ echo "x$contact_extension"; } ?></td>
|
||||
<td><?php echo $contact_mobile_display; ?></td>
|
||||
|
||||
Reference in New Issue
Block a user