From 0dfa648b19c54200539d98101a63e746a45db550 Mon Sep 17 00:00:00 2001 From: jouls Date: Thu, 25 Apr 2024 18:21:15 +0800 Subject: [PATCH] Added total users and new vendors table, improvements on recent orders table --- admin/index.php | 180 ++++++++++++++++++++++++++---------------------- 1 file changed, 99 insertions(+), 81 deletions(-) diff --git a/admin/index.php b/admin/index.php index 1aea4b9..b4fbff9 100644 --- a/admin/index.php +++ b/admin/index.php @@ -734,9 +734,17 @@ $allSignups = array_merge($all_customers, $all_vendors);
-

79,503

-

Daily Visitors

- + +

+ +

Total Users

+
@@ -763,7 +771,7 @@ $allSignups = array_merge($all_customers, $all_vendors); $finalDailyRevenue = number_format($dailyRevenue, 2, '.', ','); ?>

-

Today's Order

+

Today's Orders

@@ -1040,7 +1048,7 @@ $allSignups = array_merge($all_customers, $all_vendors); style="width:100%"> - Order ID + Payment Method Customer Name Vendor Name Total Amount @@ -1055,11 +1063,12 @@ $allSignups = array_merge($all_customers, $all_vendors); foreach (array_reverse($all_orders) as $x => $val) { $paymentStatus = strtolower($val['payment']['status']); $formattedOrderDate = date('m-d-Y', strtotime($val['order_date'])); - $orderId = $val['_id']; + $paymentMethod = $val['payment_method']; $customerName = $val['customer'][0]['name']; $vendorName = $val['items'][0]['vendor_name']; $totalAmount = $val['total_amount']; $orderStatus = strtoupper($val['status']); + $statusClass = ''; if ($orderStatus === 'UNPAID' || $orderStatus === 'RETURNED') { @@ -1079,10 +1088,10 @@ $allSignups = array_merge($all_customers, $all_vendors); $displayDate = date('m-d-Y, g:i A', strtotime($val['order_date'])); ?> - + - + ₱ @@ -1103,12 +1112,11 @@ $allSignups = array_merge($all_customers, $all_vendors);
-
+

New Customers

@@ -1134,12 +1142,17 @@ $allSignups = array_merge($all_customers, $all_vendors); $val) { $formattedSignupDate = date('m-d-Y', strtotime($val['createdAt'])); - $imageUrl = $val['file_path_image']; + $imageUrl = $val['customer_image']; $fullName = $val['first_name'] . ' ' . $val['last_name']; $email = $val['user_email']; if ($formattedSignupDate >= $weekAgoDate && $formattedSignupDate <= $currentDate) { + $customersDisplayed = true; + ?> = 15) { + if ($iterationCount >= 8) { break; } } } + if (!$customersDisplayed) { + ?> + + + +
@@ -1160,11 +1173,18 @@ $allSignups = array_merge($all_customers, $all_vendors);
No new vendors in the past week
@@ -1172,83 +1192,81 @@ $allSignups = array_merge($all_customers, $all_vendors);
-
- -
-
-

Top Products

-
- +
+ +
+
+ +

New Vendors

+
From to
+
-
-
-
- customer image -
-
- -
Baby cotton shoes
-
-

58Sales

-

Statement belting with double-turnlock hardware - adds “swagger” to a simple.

-

- $520 - $580 -

-
-
-
-
- customer image -
-
- -
Hoodies for men
-
-

20Sales

-

Statement belting with double-turnlock hardware - adds “swagger” to a simple.

-

- $250 - $300 -

-
-
-
-
- customer image -
-
- -
Long slive t-shirt
-
-

10Sales

-

Statement belting with double-turnlock hardware - adds “swagger” to a simple.

-

- $480 - $654 -

-
-
+
+ + + $val) { + $formattedSignupDate = date('m-d-Y', strtotime($val['createdAt'])); + $imageUrl = $val['vendor_image']; + $fullName = $val['first_name'] . ' ' . $val['last_name']; + $email = $val['user_email']; + if ($formattedSignupDate >= $weekAgoDate && $formattedSignupDate <= $currentDate) { + $vendorsDisplayed = true; + ?> + + + + + = 8) { + break; + } + } + } + + if (!$vendorsDisplayed) { + ?> + + + + + +
+
+
+ customer image +
+
+
+ +
+
+
No new vendors in the past week