Replicated reworked tags code logic under client details and ticket details

This commit is contained in:
johnnyq
2023-08-16 14:07:25 -04:00
parent 86c36e08ab
commit 2915d7a1b7
2 changed files with 11 additions and 4 deletions

View File

@@ -56,7 +56,7 @@ if (isset($_GET['client_id'])) {
$location_phone = formatPhoneNumber($row['location_phone']);
$location_primary = intval($row['location_primary']);
//Client Tags
// Client Tags
$client_tag_name_display_array = array();
$client_tag_id_array = array();
@@ -66,13 +66,16 @@ if (isset($_GET['client_id'])) {
$client_tag_id = intval($row['tag_id']);
$client_tag_name = nullable_htmlentities($row['tag_name']);
$client_tag_color = nullable_htmlentities($row['tag_color']);
if (empty($client_tag_color)) {
$client_tag_color = "dark";
}
$client_tag_icon = nullable_htmlentities($row['tag_icon']);
if (empty($client_tag_icon)) {
$client_tag_icon = "tag";
}
$client_tag_id_array[] = $client_tag_id;
$client_tag_name_display_array[] = "$client_tag_name ";
$client_tag_name_display_array[] = "<a href='clients.php?q=$client_tag_name'><span class='badge bg-$client_tag_color'><i class='fa fa-fw fa-$client_tag_icon mr-2'></i>$client_tag_name</span></a> ";
}
$client_tags_display = "<i class='fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2'></i> " . implode('', $client_tag_name_display_array);