From b5e67eb3f612e63009327a4e2fc5a57bb3dbf57d Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 15 Jan 2024 22:18:55 -0500 Subject: [PATCH] Add Contact Types to Contact Details Cleanup code in asset details and contact details --- client_asset_details.php | 36 ++++++++++---------- client_contact_details.php | 69 +++++++++++++++++++------------------- 2 files changed, 52 insertions(+), 53 deletions(-) diff --git a/client_asset_details.php b/client_asset_details.php index ee0cd712..78e635aa 100644 --- a/client_asset_details.php +++ b/client_asset_details.php @@ -122,30 +122,30 @@ if (isset($_GET['asset_id'])) {

- +
- +
+ if ($asset_make) { ?>
+ if ($asset_os) { ?>
+ if ($asset_serial) { ?>
+ if ($asset_purchase_date) { ?>
+ if ($asset_install_date) { ?>
+ if ($asset_warranty_expire) { ?>
@@ -156,19 +156,19 @@ if (isset($_GET['asset_id'])) {
Network
- +
- +
+ if ($asset_mac) { ?>
+ if ($asset_uri) { ?> + if ($asset_uri_2) { ?>
@@ -180,19 +180,19 @@ if (isset($_GET['asset_id'])) {
Assignment
- +
+ if ($contact_name) { ?>
+ if ($contact_email) { ?>
+ if ($contact_phone) { ?>
+ if ($contact_mobile) { ?>
diff --git a/client_contact_details.php b/client_contact_details.php index f970c69a..863b94d8 100644 --- a/client_contact_details.php +++ b/client_contact_details.php @@ -28,18 +28,8 @@ if (isset($_GET['contact_id'])) { $contact_billing = intval($row['contact_billing']); $contact_technical = intval($row['contact_technical']); $contact_created_at = nullable_htmlentities($row['contact_created_at']); - if ($contact_primary == 1 ) { - $contact_primary_display = "Primary Contact"; - } else { - $contact_primary_display = false; - } $contact_location_id = intval($row['contact_location_id']); $location_name = nullable_htmlentities($row['location_name']); - if (empty($location_name)) { - $location_name_display = "-"; - } else { - $location_name_display = $location_name; - } $auth_method = nullable_htmlentities($row['contact_auth_method']); // Related Assets Query @@ -74,13 +64,16 @@ if (isset($_GET['contact_id'])) {
+

- +
- + contact_photo"> @@ -90,26 +83,34 @@ if (isset($_GET['contact_id'])) {

- -
+ +
-
+ if ($contact_email) { ?> +
- + if ($contact_phone) { ?> + -
+ if ($contact_mobile) { ?> +
-
+ if ($contact_pin) { ?> +
+ +
Primary Contact
+ +
Important
+ +
Technical
+ +
Billing
-
-
- +
@@ -119,11 +120,9 @@ if (isset($_GET['contact_id'])) {
-
Notes
-
-
- +
Notes
+
@@ -143,7 +142,7 @@ if (isset($_GET['contact_id'])) {
">
-

Assets

+

Related Assets

@@ -272,7 +271,7 @@ if (isset($_GET['contact_id'])) {
">
-

Logins

+

Related Logins

@@ -377,7 +376,7 @@ if (isset($_GET['contact_id'])) {
">
-

Licenses

+

Related Licenses

@@ -452,7 +451,7 @@ if (isset($_GET['contact_id'])) {
">
-

Tickets

+

Related Tickets