From 53550e509281805bb1cbf0f99b1aafd3216d4578 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 5 Jul 2024 15:31:01 -0400 Subject: [PATCH 01/83] Updated Client Export Fields, and added Client Import along with download client sample file --- client_import_modal.php | 28 ++++++ clients.php | 6 ++ post/client.php | 189 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 221 insertions(+), 2 deletions(-) create mode 100644 client_import_modal.php diff --git a/client_import_modal.php b/client_import_modal.php new file mode 100644 index 00000000..eb447ebe --- /dev/null +++ b/client_import_modal.php @@ -0,0 +1,28 @@ + diff --git a/clients.php b/clients.php index 8922cecb..c7549d94 100644 --- a/clients.php +++ b/clients.php @@ -101,6 +101,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - - - - - - + + \ No newline at end of file diff --git a/client_contacts.php b/client_contacts.php index 3b3625d3..537659e4 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -156,6 +156,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); Assign Tags + + + Send Email + - - -
-
-
- - - - - - - - - - - - - - - - - - - - - -
Invoice NumberDateDue DateAmountBalance
- - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - -
Payment ReferencePayment DatePayment AmountInvoice Number
- - - - - - - -
-
-
-
- - - From d35b9ee161290560f4a1ee4334743a5ad5bad6f1 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 23 Aug 2024 15:43:50 -0400 Subject: [PATCH 34/83] Removed Client Audit log, now located under Recent under client Overview can click View More to see the main audit log if your an admin also added client filter to the main audit log --- admin_logs.php | 54 +++++++++++++++++---- client_logs.php | 114 -------------------------------------------- client_overview.php | 5 ++ client_side_nav.php | 13 ----- inc_all_client.php | 3 -- 5 files changed, 49 insertions(+), 140 deletions(-) delete mode 100644 client_logs.php diff --git a/admin_logs.php b/admin_logs.php index 99cc103c..124968ef 100644 --- a/admin_logs.php +++ b/admin_logs.php @@ -16,6 +16,16 @@ if (isset($_GET['user']) & !empty($_GET['user'])) { $user = ''; } +// Client Filter +if (isset($_GET['client']) & !empty($_GET['client'])) { + $client_query = 'AND (log_client_id = ' . intval($_GET['client']) . ')'; + $client = intval($_GET['client']); +} else { + // Default - any + $client_query = ''; + $client = ''; +} + // Log Type Filter if (isset($_GET['type']) & !empty($_GET['type'])) { $log_type_query = "AND (log_type = '" . sanitizeInput($_GET['type']) . "')"; @@ -42,14 +52,15 @@ $url_query_strings_sort = http_build_query($get_copy); $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM logs - LEFT JOIN users ON log_user_id = user_id - LEFT JOIN clients ON log_client_id = client_id - WHERE (log_type LIKE '%$q%' OR log_action LIKE '%$q%' OR log_description LIKE '%$q%' OR log_ip LIKE '%$q%' OR log_user_agent LIKE '%$q%' OR user_name LIKE '%$q%' OR client_name LIKE '%$q%') - AND DATE(log_created_at) BETWEEN '$dtf' AND '$dtt' - $user_query - $log_type_query - $log_action_query - ORDER BY $sort $order LIMIT $record_from, $record_to" + LEFT JOIN users ON log_user_id = user_id + LEFT JOIN clients ON log_client_id = client_id + WHERE (log_type LIKE '%$q%' OR log_action LIKE '%$q%' OR log_description LIKE '%$q%' OR log_ip LIKE '%$q%' OR log_user_agent LIKE '%$q%' OR user_name LIKE '%$q%' OR client_name LIKE '%$q%') + AND DATE(log_created_at) BETWEEN '$dtf' AND '$dtt' + $user_query + $client_query + $log_type_query + $log_action_query + ORDER BY $sort $order LIMIT $record_from, $record_to" ); $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); @@ -72,6 +83,27 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); + +
+
+ +
+
+
-
- -
-
- -
- -
-
-
- -
-
- -
- -
-
- - "> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TimestampUserTypeActionDescriptionIP AddressUser AgentEntity ID
$log_user_browser"; ?>
-
- -
-
- - + + + diff --git a/client_side_nav.php b/client_side_nav.php index 4f3ebc52..074073be 100644 --- a/client_side_nav.php +++ b/client_side_nav.php @@ -339,19 +339,6 @@ - - diff --git a/inc_all_client.php b/inc_all_client.php index 0793590c..f1545712 100644 --- a/inc_all_client.php +++ b/inc_all_client.php @@ -213,9 +213,6 @@ if (isset($_GET['client_id'])) { $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('item_id') AS num FROM shared_items WHERE item_client_id = $client_id")); $num_shared_links = $row['num']; - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('log_id') AS num FROM logs WHERE log_client_id = $client_id")); - $num_logs = $row['num']; - // Expiring Items // Count Domains Expiring within 30 Days From 5ef9d76a3c0bba9ee295dc8326c882af7553ad30 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 23 Aug 2024 15:59:03 -0400 Subject: [PATCH 35/83] Removed Shared Items from the side menu and merged them inot client overview --- client_overview.php | 92 +++++++++++++++++++++++++++++ client_shared_items.php | 125 ---------------------------------------- client_side_nav.php | 15 ----- inc_all_client.php | 3 - 4 files changed, 92 insertions(+), 143 deletions(-) delete mode 100644 client_shared_items.php diff --git a/client_overview.php b/client_overview.php index 326ddf98..2864b1b9 100644 --- a/client_overview.php +++ b/client_overview.php @@ -33,6 +33,16 @@ $sql_recent_logins = mysqli_query( ORDER BY login_updated_at DESC LIMIT 5" ); +$sql_shared_items = mysqli_query( + $mysqli, + "SELECT * FROM shared_items + WHERE item_client_id = $client_id + AND item_active = 1 + AND item_views != item_view_limit + AND item_expire_at > NOW() + ORDER BY item_created_at DESC LIMIT 10" +); + /* * EXPIRING/ACTION ITEMS */ @@ -159,6 +169,88 @@ $sql_asset_retire = mysqli_query( + 0) { ?> + +
+ +
+
+
Shared Items
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Item NameItem TypeShare NoteViewsExpiresAction
+ + + +
+
+
+
+ + + 0 || mysqli_num_rows($sql_asset_warranties_expiring) > 0 diff --git a/client_shared_items.php b/client_shared_items.php deleted file mode 100644 index e9578d27..00000000 --- a/client_shared_items.php +++ /dev/null @@ -1,125 +0,0 @@ - NOW() - AND (item_note LIKE '%$q%') ORDER BY $sort $order LIMIT $record_from, $record_to" -); - -$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - -?> - -
-
-

Shared Items (Links)

-
-
-
- -
- -
-
- -
- -
-
-
- -
-
-
-
- - "> - - - - - - - - - - - - - - - - - - - - - - - -
Item NameItem TypeShare NoteViewsExpiresAction
- - - -
-
- -
-
- - - - - - diff --git a/inc_all_client.php b/inc_all_client.php index f1545712..5ae324e3 100644 --- a/inc_all_client.php +++ b/inc_all_client.php @@ -210,9 +210,6 @@ if (isset($_GET['client_id'])) { $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('trip_id') AS num FROM trips WHERE trip_archived_at IS NULL AND trip_client_id = $client_id")); $num_trips = $row['num']; - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('item_id') AS num FROM shared_items WHERE item_client_id = $client_id")); - $num_shared_links = $row['num']; - // Expiring Items // Count Domains Expiring within 30 Days From 37ddf87ef0a164ab0e7921792b01c705cd44a4ba Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 23 Aug 2024 16:01:31 -0400 Subject: [PATCH 36/83] Removed Client ID from the Side Nav as its hidden in a popover on the client name in the client header --- client_side_nav.php | 1 - 1 file changed, 1 deletion(-) diff --git a/client_side_nav.php b/client_side_nav.php index 6d81d0a8..aa658331 100644 --- a/client_side_nav.php +++ b/client_side_nav.php @@ -7,7 +7,6 @@ Back | -

From 0556f0b9a4cd32d40b57e8f02fe42aefe90c7494 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 23 Aug 2024 16:09:34 -0400 Subject: [PATCH 37/83] Moved Admin Section from side nav to User Drop Down at the top --- side_nav.php | 12 +----------- top_nav.php | 3 +++ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/side_nav.php b/side_nav.php index e89feca8..dd890cb4 100644 --- a/side_nav.php +++ b/side_nav.php @@ -175,23 +175,13 @@ - - - - - diff --git a/top_nav.php b/top_nav.php index 6713fcd2..aa5bd5aa 100644 --- a/top_nav.php +++ b/top_nav.php @@ -130,6 +130,9 @@ From 6d7ffdd133d041ba22321cc0cd1954225e33da8b Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 23 Aug 2024 16:11:47 -0400 Subject: [PATCH 38/83] Updated Admin and Account Icons in the user drop down menu --- top_nav.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/top_nav.php b/top_nav.php index aa5bd5aa..227c6ba0 100644 --- a/top_nav.php +++ b/top_nav.php @@ -131,9 +131,9 @@ From e1cac4556a0af7e8a0c4653aed3a88fc4f0f6286 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 23 Aug 2024 16:33:35 -0400 Subject: [PATCH 39/83] Rounded out the top navbar notification count badge --- top_nav.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/top_nav.php b/top_nav.php index 227c6ba0..8ac07d6c 100644 --- a/top_nav.php +++ b/top_nav.php @@ -42,8 +42,8 @@ 0) { ?> From b583e7f8c96129eda46b5b6e1bcaac4f0e9a0df0 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 23 Aug 2024 16:40:47 -0400 Subject: [PATCH 40/83] Update Text from light to dark for warning badges on client nav --- client_side_nav.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client_side_nav.php b/client_side_nav.php index aa658331..7f41be8e 100644 --- a/client_side_nav.php +++ b/client_side_nav.php @@ -189,7 +189,7 @@ 0) { ?> - +

@@ -203,7 +203,7 @@ 0) { ?> - +

From 436b10c577f0d566c919dcc5a75671bab3d3cae4 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 23 Aug 2024 17:29:03 -0400 Subject: [PATCH 41/83] Updated the Shared items box UI/UX on Client overview --- client_contact_edit_modal.php | 2 +- client_contacts.php | 2 +- client_edit_modal.php | 2 +- client_overview.php | 43 +++++++++++------------------------ client_side_nav.php | 2 +- side_nav.php | 2 +- 6 files changed, 18 insertions(+), 35 deletions(-) diff --git a/client_contact_edit_modal.php b/client_contact_edit_modal.php index 5053f805..44533ce3 100644 --- a/client_contact_edit_modal.php +++ b/client_contact_edit_modal.php @@ -21,7 +21,7 @@