From 7206477c0f7fe11b77ae7bf35eb656ecc8a742e0 Mon Sep 17 00:00:00 2001 From: frasermuller Date: Thu, 4 Dec 2025 23:59:03 -0800 Subject: [PATCH] fixed export feature, frontend wasnt working, now it works --- backend/data/cart.json | 30 +- backend/data/penalties.json | 73 +-- backend/data/products_test.json | 13 - backend/data/refunds.json | 84 +--- backend/data/transactions.json | 742 +---------------------------- backend/data/users.json | 64 +-- frontend/app/admin/export/page.tsx | 5 +- frontend/lib/api.ts | 2 +- 8 files changed, 28 insertions(+), 985 deletions(-) diff --git a/backend/data/cart.json b/backend/data/cart.json index 4d12f06..5094abe 100644 --- a/backend/data/cart.json +++ b/backend/data/cart.json @@ -1,19 +1,4 @@ { - "00000000-0000-0000-0000-000000000006": { - "items": [ - { - "product_id": "B07JW9H4J1", - "product_name": "Wayona Nylon Braided USB to Lightning Cable", - "img_link": "https://example.com/cable.jpg", - "product_link": "https://example.com/cable", - "discounted_price": 299.0, - "quantity": 2 - } - ] - }, - "00000000-0000-0000-0000-000000000103": { - "items": [] - }, "428391c9-ec68-4a25-9d66-0580cec3ce6a": { "items": [] }, @@ -31,5 +16,20 @@ }, "a7977848-4f94-4cb5-beea-6aa0604d3dda": { "items": [] + }, + "00000000-0000-0000-0000-000000000006": { + "items": [ + { + "product_id": "B07JW9H4J1", + "product_name": "Wayona Nylon Braided USB to Lightning Cable", + "img_link": "https://example.com/cable.jpg", + "product_link": "https://example.com/cable", + "discounted_price": 299.0, + "quantity": 2 + } + ] + }, + "00000000-0000-0000-0000-000000000103": { + "items": [] } } \ No newline at end of file diff --git a/backend/data/penalties.json b/backend/data/penalties.json index e76adff..0637a08 100644 --- a/backend/data/penalties.json +++ b/backend/data/penalties.json @@ -1,72 +1 @@ -[ - { - "penalty_id": "7449b7ee-a743-425c-8e70-7b0bf2833e6a", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "reason": "refunding too many products", - "timestamp": "2025-12-04T09:35:08.730552+00:00", - "status": "resolved" - }, - { - "penalty_id": "00c7296d-00c0-40ee-a31d-710c52403f92", - "user_id": "1cb86309-e8b2-45e3-8da7-1c2f54c65ae5", - "reason": "you are spamming", - "timestamp": "2025-12-04T09:43:45.939387+00:00", - "status": "resolved" - }, - { - "penalty_id": "25e7bb8e-a632-4c95-8867-eae62d624923", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "reason": "youve been bad", - "timestamp": "2025-12-04T09:46:06.251422+00:00", - "status": "resolved" - }, - { - "penalty_id": "dcbd8143-49c9-4ed1-900a-5c00839afb1f", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "reason": "this is a test\n", - "timestamp": "2025-12-04T09:51:32.112239+00:00", - "status": "resolved" - }, - { - "penalty_id": "fcc4f1f7-b804-47b7-aabd-df60422581e1", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "reason": "this will be resolved\n", - "timestamp": "2025-12-04T09:51:39.294157+00:00", - "status": "resolved" - }, - { - "penalty_id": "acea54ce-b852-4278-a61c-0c5ce22e1f4a", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "reason": "another one, bad", - "timestamp": "2025-12-04T21:36:26.127889+00:00", - "status": "active" - }, - { - "penalty_id": "e540b446-4cc6-4fce-bb97-0391ad57a113", - "user_id": "0bffca91-1c49-47a5-87b7-b0248da35d16", - "reason": "youve been spamming orders", - "timestamp": "2025-12-04T23:16:53.220112+00:00", - "status": "active" - }, - { - "penalty_id": "ad972921-23d0-4d17-918e-8d540c16a2aa", - "user_id": "a7977848-4f94-4cb5-beea-6aa0604d3dda", - "reason": "bad bad", - "timestamp": "2025-12-04T23:27:44.655761+00:00", - "status": "active" - }, - { - "penalty_id": "ee63d5ff-75ab-4e8f-87a4-07b11e9f0c72", - "user_id": "a7977848-4f94-4cb5-beea-6aa0604d3dda", - "reason": "terrible", - "timestamp": "2025-12-04T23:27:53.185321+00:00", - "status": "resolved" - }, - { - "penalty_id": "78900127-1853-499f-a3bb-33b92c2539aa", - "user_id": "a7977848-4f94-4cb5-beea-6aa0604d3dda", - "reason": "okay.", - "timestamp": "2025-12-04T23:27:59.267582+00:00", - "status": "resolved" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/backend/data/products_test.json b/backend/data/products_test.json index 08d7752..ff37549 100644 --- a/backend/data/products_test.json +++ b/backend/data/products_test.json @@ -24,18 +24,5 @@ "product_link": "https://example.com/tv", "rating": 4.8, "rating_count": 43994 - }, - { - "product_id": "B09NX5K7QP", - "product_name": "Dell XPS 13 Laptop", - "category": "Electronics|Computers", - "discounted_price": 89999.0, - "actual_price": 119999.0, - "discount_percentage": 25.0, - "about_product": "Ultra-portable laptop", - "img_link": "https://example.com/laptop.jpg", - "product_link": "https://example.com/laptop", - "rating": 4.6, - "rating_count": 7928 } ] \ No newline at end of file diff --git a/backend/data/refunds.json b/backend/data/refunds.json index 82a5de7..0637a08 100644 --- a/backend/data/refunds.json +++ b/backend/data/refunds.json @@ -1,83 +1 @@ -[ - { - "refund_id": "8579dcea-5176-44c1-908c-34c331c9a5ad", - "transaction_id": "6687dda3-0598-4de0-ad13-a12921e44f9f", - "user_id": "428391c9-ec68-4a25-9d66-0580cec3ce6a", - "message": "testing\n", - "status": "approved", - "created_at": "2025-12-04T02:06:23.538296", - "updated_at": "2025-12-04T02:06:39.740320" - }, - { - "refund_id": "53a14e4e-79b4-42e2-911f-a2092fd0cca1", - "transaction_id": "29ce33c7-ccc3-48b2-b1ed-e4bc0c88ad82", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "message": "These chargers do no work\n", - "status": "approved", - "created_at": "2025-12-04T08:36:22.238907", - "updated_at": "2025-12-04T08:39:12.578734" - }, - { - "refund_id": "d2ef512f-9992-4e1a-b55e-864688ada23c", - "transaction_id": "9b099db3-fe2c-48b2-afbb-f55ccfd678f3", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "message": "no work\n", - "status": "denied", - "created_at": "2025-12-04T08:52:08.053921", - "updated_at": "2025-12-04T09:21:09.454366" - }, - { - "refund_id": "4f54ec90-d394-4492-aad0-a675a248c6db", - "transaction_id": "a8506de4-375e-44a5-ba48-b65859cbe3cc", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "message": "refund me pls", - "status": "denied", - "created_at": "2025-12-04T09:20:19.147848", - "updated_at": "2025-12-04T09:21:06.675910" - }, - { - "refund_id": "a9542e94-2679-443a-92bd-3d09cb3d570d", - "transaction_id": "e0db5af0-bd0e-476a-b86d-1bb743cb609f", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "message": "me no want\n", - "status": "approved", - "created_at": "2025-12-04T10:12:33.057054", - "updated_at": "2025-12-04T10:12:45.085243" - }, - { - "refund_id": "71f83598-299a-447f-849e-3b68bf9e8cd0", - "transaction_id": "c46e0b79-7826-456c-bdce-6dd3c6925455", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "message": "doesnt work", - "status": "pending", - "created_at": "2025-12-04T20:46:11.739573", - "updated_at": null - }, - { - "refund_id": "13a0b241-346a-4190-8afa-5e0c3b91b8a7", - "transaction_id": "0f782aad-2231-4e57-8e8a-372c549afa39", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "message": "too many remotes, not enough Tv's", - "status": "approved", - "created_at": "2025-12-04T21:33:17.094571", - "updated_at": "2025-12-04T21:34:32.033344" - }, - { - "refund_id": "404885a2-860f-4205-82eb-a302f64e244d", - "transaction_id": "a0ed719b-2c7e-4b33-923f-34678914c794", - "user_id": "0bffca91-1c49-47a5-87b7-b0248da35d16", - "message": "I dont like these items, too expensive", - "status": "approved", - "created_at": "2025-12-04T23:10:46.971177", - "updated_at": "2025-12-04T23:11:51.938404" - }, - { - "refund_id": "f6b3f3e4-f7f6-4aeb-b54c-055f5297d166", - "transaction_id": "57517be3-1662-4780-9e2f-bf6c22ceb909", - "user_id": "a7977848-4f94-4cb5-beea-6aa0604d3dda", - "message": "Not a fan of the charger", - "status": "approved", - "created_at": "2025-12-04T23:23:57.599942", - "updated_at": "2025-12-04T23:24:42.470210" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/backend/data/transactions.json b/backend/data/transactions.json index 0fc07f0..2f4122e 100644 --- a/backend/data/transactions.json +++ b/backend/data/transactions.json @@ -1,7 +1,7 @@ { "00000000-0000-0000-0000-000000000103": [ { - "transaction_id": "da8c2f83-a709-4bb6-90df-b7b7b33ff7cf", + "transaction_id": "c336eccb-a244-4459-83c6-0c27750d15c8", "user_id": "00000000-0000-0000-0000-000000000103", "customer_name": "Test User Multi", "customer_email": "testmulti@test.com", @@ -16,745 +16,9 @@ } ], "total_price": 598.0, - "timestamp": "2025-12-03T00:32:20.657700+00:00", - "estimated_delivery": "2025-12-08", + "timestamp": "2025-12-05T07:56:05.142129+00:00", + "estimated_delivery": "2025-12-10", "status": "completed" } - ], - "428391c9-ec68-4a25-9d66-0580cec3ce6a": [ - { - "transaction_id": "6dd4050a-e56a-4303-ad37-ec5bae2fbbfc", - "user_id": "428391c9-ec68-4a25-9d66-0580cec3ce6a", - "customer_name": "testing", - "customer_email": "testing@ubc.ca", - "items": [ - { - "product_id": "B08HDJ86NZ", - "product_name": "boAt Deuce USB 300 2 in 1 Type-C & Micro USB Stress Resistant, Tangle-Free, Sturdy Cable with 3A Fast Charging & 480mbps Data Transmission, 10000+ Bends Lifespan and Extended 1.5m Length(Martian Red)", - "img_link": "https://m.media-amazon.com/images/I/41V5FtEWPkL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Deuce-300-Resistant-Tangle-Free-Transmission/dp/B08HDJ86NZ/ref=sr_1_4?qid=1672909124&s=electronics&sr=1-4", - "discounted_price": 329.0, - "quantity": 1 - } - ], - "total_price": 329.0, - "timestamp": "2025-12-04T01:47:28.127454+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "356cb008-30f7-453c-b5e2-fa56a7006c9a", - "user_id": "428391c9-ec68-4a25-9d66-0580cec3ce6a", - "customer_name": "testing", - "customer_email": "testing@ubc.ca", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 3 - } - ], - "total_price": 597.0, - "timestamp": "2025-12-04T01:53:18.216490+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "6687dda3-0598-4de0-ad13-a12921e44f9f", - "user_id": "428391c9-ec68-4a25-9d66-0580cec3ce6a", - "customer_name": "testing", - "customer_email": "testing@ubc.ca", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 1 - } - ], - "total_price": 199.0, - "timestamp": "2025-12-04T02:06:14.000714+00:00", - "estimated_delivery": "2025-12-09", - "status": "refunded" - } - ], - "79be980f-d83d-4c63-b3b6-77c13193e1a5": [ - { - "transaction_id": "d7408dc7-e942-4f6a-86f4-546a6985ade3", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B008IFXQFU", - "product_name": "TP-Link USB WiFi Adapter for PC(TL-WN725N), N150 Wireless Network Adapter for Desktop - Nano Size WiFi Dongle Compatible with Windows 11/10/7/8/8.1/XP/ Mac OS 10.9-10.15 Linux Kernel 2.6.18-4.4.3", - "img_link": "https://m.media-amazon.com/images/I/31dDGr5uhaL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/TP-Link-TL-WN725N-150Mbps-Wireless-Adapter/dp/B008IFXQFU/ref=sr_1_10?qid=1672909124&s=electronics&sr=1-10", - "discounted_price": 499.0, - "quantity": 1 - } - ], - "total_price": 499.0, - "timestamp": "2025-12-04T06:45:30.087624+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "6762713d-37a5-4cf4-a2e9-dda06b41a03a", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B07KSMBL2H", - "product_name": "AmazonBasics Flexible Premium HDMI Cable (Black, 4K@60Hz, 18Gbps), 3-Foot", - "img_link": "https://m.media-amazon.com/images/I/51u78zL8y8L._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/AmazonBasics-Flexible-HDMI-Cable-3-Foot/dp/B07KSMBL2H/ref=sr_1_14?qid=1672909124&s=electronics&sr=1-14", - "discounted_price": 219.0, - "quantity": 2 - } - ], - "total_price": 438.0, - "timestamp": "2025-12-04T08:18:13.684292+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "3b14600a-729d-457f-a8b2-8b303c5ae88a", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B07KSMBL2H", - "product_name": "AmazonBasics Flexible Premium HDMI Cable (Black, 4K@60Hz, 18Gbps), 3-Foot", - "img_link": "https://m.media-amazon.com/images/I/51u78zL8y8L._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/AmazonBasics-Flexible-HDMI-Cable-3-Foot/dp/B07KSMBL2H/ref=sr_1_14?qid=1672909124&s=electronics&sr=1-14", - "discounted_price": 219.0, - "quantity": 1 - } - ], - "total_price": 219.0, - "timestamp": "2025-12-04T08:18:38.597700+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "844e130c-e8e8-460d-aa98-746ec28433e0", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B00NH11KIK", - "product_name": "AmazonBasics USB 2.0 Cable - A-Male to B-Male - for Personal Computer, Printer- 6 Feet (1.8 Meters), Black", - "img_link": "https://m.media-amazon.com/images/I/318RrRPyQcL._SX300_SY300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/AmazonBasics-USB-2-0-Cable-Male/dp/B00NH11KIK/ref=sr_1_44?qid=1672909125&s=electronics&sr=1-44", - "discounted_price": 209.0, - "quantity": 1 - } - ], - "total_price": 209.0, - "timestamp": "2025-12-04T08:22:28.531994+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "29ce33c7-ccc3-48b2-b1ed-e4bc0c88ad82", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 1 - } - ], - "total_price": 199.0, - "timestamp": "2025-12-04T08:36:00.675774+00:00", - "estimated_delivery": "2025-12-09", - "status": "refunded" - }, - { - "transaction_id": "e95d3012-70a3-455a-8964-8346a17e9950", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B0789LZTCJ", - "product_name": "boAt Rugged v3 Extra Tough Unbreakable Braided Micro USB Cable 1.5 Meter (Black)", - "img_link": "https://m.media-amazon.com/images/I/41HLa-Z5PrL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Rugged-Extra-Tough-Unbreakable-Braided/dp/B0789LZTCJ/ref=sr_1_13?qid=1672909124&s=electronics&sr=1-13", - "discounted_price": 299.0, - "quantity": 1 - }, - { - "product_id": "B08HDJ86NZ", - "product_name": "boAt Deuce USB 300 2 in 1 Type-C & Micro USB Stress Resistant, Tangle-Free, Sturdy Cable with 3A Fast Charging & 480mbps Data Transmission, 10000+ Bends Lifespan and Extended 1.5m Length(Martian Red)", - "img_link": "https://m.media-amazon.com/images/I/41V5FtEWPkL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Deuce-300-Resistant-Tangle-Free-Transmission/dp/B08HDJ86NZ/ref=sr_1_4?qid=1672909124&s=electronics&sr=1-4", - "discounted_price": 329.0, - "quantity": 1 - } - ], - "total_price": 628.0, - "timestamp": "2025-12-04T08:39:57.304385+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "9b099db3-fe2c-48b2-afbb-f55ccfd678f3", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B01FSYQ2A4", - "product_name": "boAt Rockerz 400 Bluetooth On Ear Headphones With Mic With Upto 8 Hours Playback & Soft Padded Ear Cushions(Grey/Green)", - "img_link": "https://m.media-amazon.com/images/I/41zejggGzLL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Super-Rockerz-400-Bluetooth-Headphones/dp/B01FSYQ2A4/ref=sr_1_307?qid=1672895835&s=electronics&sr=1-307", - "discounted_price": 1399.0, - "quantity": 3 - }, - { - "product_id": "B09MT84WV5", - "product_name": "Samsung EVO Plus 128GB microSDXC UHS-I U3 130MB/s Full HD & 4K UHD Memory Card with Adapter (MB-MC128KA), Blue", - "img_link": "https://m.media-amazon.com/images/I/31R6RP26dzL._SX300_SY300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Samsung-microSDXC-Memory-Adapter-MB-MC128KA/dp/B09MT84WV5/ref=sr_1_66?qid=1672895762&s=electronics&sr=1-66", - "discounted_price": 1149.0, - "quantity": 2 - } - ], - "total_price": 6495.0, - "timestamp": "2025-12-04T08:51:56.742027+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "036e3b9d-14d6-4738-a2d9-dc327174dbbc", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 1 - } - ], - "total_price": 199.0, - "timestamp": "2025-12-04T08:53:13.578543+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "d60b3546-ee75-4966-adcb-45f8b4f23a75", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 1 - } - ], - "total_price": 199.0, - "timestamp": "2025-12-04T09:11:05.709958+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "61d848cf-3a0e-438b-bb2c-3441329c2a81", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B08HDJ86NZ", - "product_name": "boAt Deuce USB 300 2 in 1 Type-C & Micro USB Stress Resistant, Tangle-Free, Sturdy Cable with 3A Fast Charging & 480mbps Data Transmission, 10000+ Bends Lifespan and Extended 1.5m Length(Martian Red)", - "img_link": "https://m.media-amazon.com/images/I/41V5FtEWPkL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Deuce-300-Resistant-Tangle-Free-Transmission/dp/B08HDJ86NZ/ref=sr_1_4?qid=1672909124&s=electronics&sr=1-4", - "discounted_price": 329.0, - "quantity": 1 - } - ], - "total_price": 329.0, - "timestamp": "2025-12-04T09:12:29.348110+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "a8506de4-375e-44a5-ba48-b65859cbe3cc", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 1 - } - ], - "total_price": 199.0, - "timestamp": "2025-12-04T09:19:58.266513+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "0f782aad-2231-4e57-8e8a-372c549afa39", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B01N90RZ4M", - "product_name": "Tata Sky Universal Remote", - "img_link": "https://m.media-amazon.com/images/I/315GdnF+LcL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/TATASKY-Universal-Remote/dp/B01N90RZ4M/ref=sr_1_60?qid=1672909126&s=electronics&sr=1-60", - "discounted_price": 230.0, - "quantity": 1 - }, - { - "product_id": "B07B275VN9", - "product_name": "Airtel DigitalTV DTH Television, Setup Box Remote Compatible for SD and HD Recording (Black)", - "img_link": "https://m.media-amazon.com/images/I/41v00lhhdbL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Airtel-Digital-Remote-Compatible-Recording/dp/B07B275VN9/ref=sr_1_66_mod_primary_new?qid=1672909126&s=electronics&sbo=RZvfv%2F%2FHxDF%2BO5021pAnSA%3D%3D&sr=1-66", - "discounted_price": 179.0, - "quantity": 1 - }, - { - "product_id": "B0BCZCQTJX", - "product_name": "Firestick Remote", - "img_link": "https://m.media-amazon.com/images/I/31BAOmjUAOL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Basesailor-2nd-generation-Firestick-Remote/dp/B0BCZCQTJX/ref=sr_1_88?qid=1672909128&s=electronics&sr=1-88", - "discounted_price": 1434.0, - "quantity": 1 - } - ], - "total_price": 1843.0, - "timestamp": "2025-12-04T21:23:45.083282+00:00", - "estimated_delivery": "2025-12-09", - "status": "refunded" - }, - { - "transaction_id": "5c1a24e9-ca40-4240-896f-90471d536858", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B08B42LWKN", - "product_name": "OnePlus 80 cm (32 inches) Y Series HD Ready LED Smart Android TV 32Y1 (Black)", - "img_link": "https://m.media-amazon.com/images/I/41WE9ZGEC4L._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/OnePlus-inches-Ready-Android-32Y1/dp/B08B42LWKN/ref=sr_1_29?qid=1672909125&s=electronics&sr=1-29", - "discounted_price": 14999.0, - "quantity": 1 - }, - { - "product_id": "B09L8DSSFH", - "product_name": "7SEVENĀ® Compatible for Samsung Smart 4K Ultra HD TV Monitor Remote Control Replacement of Original Samsung TV Remote for LED OLED UHD QLED and Suitable for 6 7 8 Series Samsung TV with Hot Keys BN59-01259E", - "img_link": "https://m.media-amazon.com/images/I/21bnr4EWt0L._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/7SEVENTM-Compatible-Replacement-Original-BN59-01259E/dp/B09L8DSSFH/ref=sr_1_52?qid=1672909126&s=electronics&sr=1-52", - "discounted_price": 399.0, - "quantity": 1 - } - ], - "total_price": 15398.0, - "timestamp": "2025-12-04T21:32:42.152434+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "490fe43e-4332-41dc-a7da-6832463bb6ad", - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "customer_name": "Fraser Muller", - "customer_email": "frasermuller2005@gmail.com", - "items": [ - { - "product_id": "B08HDJ86NZ", - "product_name": "boAt Deuce USB 300 2 in 1 Type-C & Micro USB Stress Resistant, Tangle-Free, Sturdy Cable with 3A Fast Charging & 480mbps Data Transmission, 10000+ Bends Lifespan and Extended 1.5m Length(Martian Red)", - "img_link": "https://m.media-amazon.com/images/I/41V5FtEWPkL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Deuce-300-Resistant-Tangle-Free-Transmission/dp/B08HDJ86NZ/ref=sr_1_4?qid=1672909124&s=electronics&sr=1-4", - "discounted_price": 329.0, - "quantity": 1 - } - ], - "total_price": 329.0, - "timestamp": "2025-12-04T21:37:44.248536+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - } - ], - "ae993132-12a6-40c6-a91a-3fe889d95edd": [ - { - "transaction_id": "e0db5af0-bd0e-476a-b86d-1bb743cb609f", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "customer_name": "Admin", - "customer_email": "admin@example.com", - "items": [ - { - "product_id": "B08HDJ86NZ", - "product_name": "boAt Deuce USB 300 2 in 1 Type-C & Micro USB Stress Resistant, Tangle-Free, Sturdy Cable with 3A Fast Charging & 480mbps Data Transmission, 10000+ Bends Lifespan and Extended 1.5m Length(Martian Red)", - "img_link": "https://m.media-amazon.com/images/I/41V5FtEWPkL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Deuce-300-Resistant-Tangle-Free-Transmission/dp/B08HDJ86NZ/ref=sr_1_4?qid=1672909124&s=electronics&sr=1-4", - "discounted_price": 329.0, - "quantity": 1 - } - ], - "total_price": 329.0, - "timestamp": "2025-12-04T09:20:52.049183+00:00", - "estimated_delivery": "2025-12-09", - "status": "refunded" - }, - { - "transaction_id": "aed414f4-702d-46bd-ad55-c59d74d4db80", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "customer_name": "Admin", - "customer_email": "admin@example.com", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 1 - }, - { - "product_id": "B08CF3B7N1", - "product_name": "Portronics Konnect L 1.2M Fast Charging 3A 8 Pin USB Cable with Charge & Sync Function for iPhone, iPad (Grey)", - "img_link": "https://m.media-amazon.com/images/I/41XfpyH4-JL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Portronics-Konnect-POR-1080-Charging-Function/dp/B08CF3B7N1/ref=sr_1_5?qid=1672909124&s=electronics&sr=1-5", - "discounted_price": 154.0, - "quantity": 1 - }, - { - "product_id": "B08HDJ86NZ", - "product_name": "boAt Deuce USB 300 2 in 1 Type-C & Micro USB Stress Resistant, Tangle-Free, Sturdy Cable with 3A Fast Charging & 480mbps Data Transmission, 10000+ Bends Lifespan and Extended 1.5m Length(Martian Red)", - "img_link": "https://m.media-amazon.com/images/I/41V5FtEWPkL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Deuce-300-Resistant-Tangle-Free-Transmission/dp/B08HDJ86NZ/ref=sr_1_4?qid=1672909124&s=electronics&sr=1-4", - "discounted_price": 329.0, - "quantity": 1 - } - ], - "total_price": 682.0, - "timestamp": "2025-12-04T11:50:41.535383+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "29cd8440-9b8a-4372-a7cf-a171ef50e2d6", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "customer_name": "Admin", - "customer_email": "admin@example.com", - "items": [ - { - "product_id": "B0B1YVCJ2Y", - "product_name": "Acer 80 cm (32 inches) I Series HD Ready Android Smart LED TV AR32AR2841HDFL (Black)", - "img_link": "https://m.media-amazon.com/images/I/41gikeSuhAL._SX300_SY300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Acer-inches-Ready-Android-AR32AR2841HDFL/dp/B0B1YVCJ2Y/ref=sr_1_26?qid=1672909125&s=electronics&sr=1-26", - "discounted_price": 11499.0, - "quantity": 1 - }, - { - "product_id": "B08DDRGWTJ", - "product_name": "MI Usb Type-C Cable Smartphone (Black)", - "img_link": "https://m.media-amazon.com/images/I/31XO-wfGGGL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/MI-MTCY001IN-USB-Type-C-Cable/dp/B08DDRGWTJ/ref=sr_1_9?qid=1672909124&s=electronics&sr=1-9", - "discounted_price": 229.0, - "quantity": 1 - }, - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 2 - } - ], - "total_price": 12126.0, - "timestamp": "2025-12-04T20:01:55.412519+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "4058a31b-e4ea-4ade-99b9-ef3bf1902b6d", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "customer_name": "Admin", - "customer_email": "admin@example.com", - "items": [ - { - "product_id": "B07KSMBL2H", - "product_name": "AmazonBasics Flexible Premium HDMI Cable (Black, 4K@60Hz, 18Gbps), 3-Foot", - "img_link": "https://m.media-amazon.com/images/I/51u78zL8y8L._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/AmazonBasics-Flexible-HDMI-Cable-3-Foot/dp/B07KSMBL2H/ref=sr_1_14?qid=1672909124&s=electronics&sr=1-14", - "discounted_price": 219.0, - "quantity": 1 - }, - { - "product_id": "B0789LZTCJ", - "product_name": "boAt Rugged v3 Extra Tough Unbreakable Braided Micro USB Cable 1.5 Meter (Black)", - "img_link": "https://m.media-amazon.com/images/I/41HLa-Z5PrL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Rugged-Extra-Tough-Unbreakable-Braided/dp/B0789LZTCJ/ref=sr_1_13?qid=1672909124&s=electronics&sr=1-13", - "discounted_price": 299.0, - "quantity": 1 - }, - { - "product_id": "B0B6F7LX4C", - "product_name": "MI 80 cm (32 inches) 5A Series HD Ready Smart Android LED TV L32M7-5AIN (Black)", - "img_link": "https://m.media-amazon.com/images/I/518sTcK7UGL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/MI-inches-Ready-Android-L32M7-5AIN/dp/B0B6F7LX4C/ref=sr_1_18?qid=1672909124&s=electronics&sr=1-18", - "discounted_price": 13999.0, - "quantity": 1 - } - ], - "total_price": 14517.0, - "timestamp": "2025-12-04T20:05:42.849096+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "988239a5-a75a-4c80-b03c-7f6f9ba1e1fe", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "customer_name": "Admin", - "customer_email": "admin@example.com", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 1 - }, - { - "product_id": "B08CF3B7N1", - "product_name": "Portronics Konnect L 1.2M Fast Charging 3A 8 Pin USB Cable with Charge & Sync Function for iPhone, iPad (Grey)", - "img_link": "https://m.media-amazon.com/images/I/41XfpyH4-JL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Portronics-Konnect-POR-1080-Charging-Function/dp/B08CF3B7N1/ref=sr_1_5?qid=1672909124&s=electronics&sr=1-5", - "discounted_price": 154.0, - "quantity": 1 - }, - { - "product_id": "B08HDJ86NZ", - "product_name": "boAt Deuce USB 300 2 in 1 Type-C & Micro USB Stress Resistant, Tangle-Free, Sturdy Cable with 3A Fast Charging & 480mbps Data Transmission, 10000+ Bends Lifespan and Extended 1.5m Length(Martian Red)", - "img_link": "https://m.media-amazon.com/images/I/41V5FtEWPkL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Deuce-300-Resistant-Tangle-Free-Transmission/dp/B08HDJ86NZ/ref=sr_1_4?qid=1672909124&s=electronics&sr=1-4", - "discounted_price": 329.0, - "quantity": 1 - } - ], - "total_price": 682.0, - "timestamp": "2025-12-04T20:12:24.735251+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "0d55f67a-4157-47c9-a37c-740ce20210a0", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "customer_name": "Admin", - "customer_email": "admin@example.com", - "items": [ - { - "product_id": "B08CF3B7N1", - "product_name": "Portronics Konnect L 1.2M Fast Charging 3A 8 Pin USB Cable with Charge & Sync Function for iPhone, iPad (Grey)", - "img_link": "https://m.media-amazon.com/images/I/41XfpyH4-JL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Portronics-Konnect-POR-1080-Charging-Function/dp/B08CF3B7N1/ref=sr_1_5?qid=1672909124&s=electronics&sr=1-5", - "discounted_price": 154.0, - "quantity": 1 - }, - { - "product_id": "B08HDJ86NZ", - "product_name": "boAt Deuce USB 300 2 in 1 Type-C & Micro USB Stress Resistant, Tangle-Free, Sturdy Cable with 3A Fast Charging & 480mbps Data Transmission, 10000+ Bends Lifespan and Extended 1.5m Length(Martian Red)", - "img_link": "https://m.media-amazon.com/images/I/41V5FtEWPkL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Deuce-300-Resistant-Tangle-Free-Transmission/dp/B08HDJ86NZ/ref=sr_1_4?qid=1672909124&s=electronics&sr=1-4", - "discounted_price": 329.0, - "quantity": 1 - } - ], - "total_price": 483.0, - "timestamp": "2025-12-04T20:16:25.094384+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "c46e0b79-7826-456c-bdce-6dd3c6925455", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "customer_name": "Admin", - "customer_email": "admin@example.com", - "items": [ - { - "product_id": "B0B6F7LX4C", - "product_name": "MI 80 cm (32 inches) 5A Series HD Ready Smart Android LED TV L32M7-5AIN (Black)", - "img_link": "https://m.media-amazon.com/images/I/518sTcK7UGL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/MI-inches-Ready-Android-L32M7-5AIN/dp/B0B6F7LX4C/ref=sr_1_18?qid=1672909124&s=electronics&sr=1-18", - "discounted_price": 13999.0, - "quantity": 1 - } - ], - "total_price": 13999.0, - "timestamp": "2025-12-04T20:46:01.179295+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "83a06f27-f0d2-4c5d-a46e-fa008c427bc6", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "customer_name": "Admin", - "customer_email": "admin@example.com", - "items": [ - { - "product_id": "B08CF3B7N1", - "product_name": "Portronics Konnect L 1.2M Fast Charging 3A 8 Pin USB Cable with Charge & Sync Function for iPhone, iPad (Grey)", - "img_link": "https://m.media-amazon.com/images/I/41XfpyH4-JL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Portronics-Konnect-POR-1080-Charging-Function/dp/B08CF3B7N1/ref=sr_1_5?qid=1672909124&s=electronics&sr=1-5", - "discounted_price": 154.0, - "quantity": 2 - }, - { - "product_id": "B08Y1TFSP6", - "product_name": "pTron Solero TB301 3A Type-C Data and Fast Charging Cable, Made in India, 480Mbps Data Sync, Strong and Durable 1.5-Meter Nylon Braided USB Cable for Type-C Devices for Charging Adapter (Black)", - "img_link": "https://m.media-amazon.com/images/I/31wOPjcSxlL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Solero-TB301-Charging-480Mbps-1-5-Meter/dp/B08Y1TFSP6/ref=sr_1_6?qid=1672909124&s=electronics&sr=1-6", - "discounted_price": 149.0, - "quantity": 1 - } - ], - "total_price": 457.0, - "timestamp": "2025-12-04T20:52:48.977169+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - }, - { - "transaction_id": "958272c8-ecdb-4024-a463-d0cf96db6bf4", - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", - "customer_name": "Admin", - "customer_email": "admin@example.com", - "items": [ - { - "product_id": "B09JPC82QC", - "product_name": "Mi 108 cm (43 inches) Full HD Android LED TV 4C | L43M6-INC (Black)", - "img_link": "https://m.media-amazon.com/images/I/41nsy8kxWUL._SX300_SY300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/inches-Full-Android-L43M6-INC-Black/dp/B09JPC82QC/ref=sr_1_45?qid=1672909125&s=electronics&sr=1-45", - "discounted_price": 19999.0, - "quantity": 1 - } - ], - "total_price": 19999.0, - "timestamp": "2025-12-04T21:00:34.351339+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - } - ], - "1cb86309-e8b2-45e3-8da7-1c2f54c65ae5": [ - { - "transaction_id": "beb1b95f-b910-41b2-9c41-1cc14ee16ae4", - "user_id": "1cb86309-e8b2-45e3-8da7-1c2f54c65ae5", - "customer_name": "promote me", - "customer_email": "promoteme@gmail.com", - "items": [ - { - "product_id": "B08HDJ86NZ", - "product_name": "boAt Deuce USB 300 2 in 1 Type-C & Micro USB Stress Resistant, Tangle-Free, Sturdy Cable with 3A Fast Charging & 480mbps Data Transmission, 10000+ Bends Lifespan and Extended 1.5m Length(Martian Red)", - "img_link": "https://m.media-amazon.com/images/I/41V5FtEWPkL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Deuce-300-Resistant-Tangle-Free-Transmission/dp/B08HDJ86NZ/ref=sr_1_4?qid=1672909124&s=electronics&sr=1-4", - "discounted_price": 329.0, - "quantity": 1 - } - ], - "total_price": 329.0, - "timestamp": "2025-12-04T09:43:00.145261+00:00", - "estimated_delivery": "2025-12-09", - "status": "completed" - } - ], - "0bffca91-1c49-47a5-87b7-b0248da35d16": [ - { - "transaction_id": "a0ed719b-2c7e-4b33-923f-34678914c794", - "user_id": "0bffca91-1c49-47a5-87b7-b0248da35d16", - "customer_name": "new user", - "customer_email": "newuser@gmail.com", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 1 - }, - { - "product_id": "B00MFPCY5C", - "product_name": "GIZGA essentials Universal Silicone Keyboard Protector Skin for 15.6-inches Laptop (5 x 6 x 3 inches)", - "img_link": "https://m.media-amazon.com/images/I/418Sf+2V1BL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Universal-Silicone-Keyboard-Protector-15-6-inch/dp/B00MFPCY5C/ref=sr_1_65?qid=1672902997&s=computers&sr=1-65", - "discounted_price": 39.0, - "quantity": 1 - }, - { - "product_id": "B008IFXQFU", - "product_name": "TP-Link USB WiFi Adapter for PC(TL-WN725N), N150 Wireless Network Adapter for Desktop - Nano Size WiFi Dongle Compatible with Windows 11/10/7/8/8.1/XP/ Mac OS 10.9-10.15 Linux Kernel 2.6.18-4.4.3", - "img_link": "https://m.media-amazon.com/images/I/31dDGr5uhaL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/TP-Link-TL-WN725N-150Mbps-Wireless-Adapter/dp/B008IFXQFU/ref=sr_1_10?qid=1672909124&s=electronics&sr=1-10", - "discounted_price": 499.0, - "quantity": 1 - } - ], - "total_price": 737.0, - "timestamp": "2025-12-04T23:09:54.824595+00:00", - "estimated_delivery": "2025-12-09", - "status": "refunded" - } - ], - "a7977848-4f94-4cb5-beea-6aa0604d3dda": [ - { - "transaction_id": "57517be3-1662-4780-9e2f-bf6c22ceb909", - "user_id": "a7977848-4f94-4cb5-beea-6aa0604d3dda", - "customer_name": "newest user", - "customer_email": "newestuser@gmail.com", - "items": [ - { - "product_id": "B098NS6PVG", - "product_name": "Ambrane Unbreakable 60W / 3A Fast Charging 1.5m Braided Type C Cable for Smartphones, Tablets, Laptops & other Type C devices, PD Technology, 480Mbps Data Sync, Quick Charge 3.0 (RCT15A, Black)", - "img_link": "https://m.media-amazon.com/images/I/41lJ8x1yeIL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/Ambrane-Unbreakable-Charging-Braided-Cable/dp/B098NS6PVG/ref=sr_1_2?qid=1672909124&s=electronics&sr=1-2", - "discounted_price": 199.0, - "quantity": 1 - }, - { - "product_id": "B008IFXQFU", - "product_name": "TP-Link USB WiFi Adapter for PC(TL-WN725N), N150 Wireless Network Adapter for Desktop - Nano Size WiFi Dongle Compatible with Windows 11/10/7/8/8.1/XP/ Mac OS 10.9-10.15 Linux Kernel 2.6.18-4.4.3", - "img_link": "https://m.media-amazon.com/images/I/31dDGr5uhaL._SY300_SX300_QL70_FMwebp_.jpg", - "product_link": "https://www.amazon.in/TP-Link-TL-WN725N-150Mbps-Wireless-Adapter/dp/B008IFXQFU/ref=sr_1_10?qid=1672909124&s=electronics&sr=1-10", - "discounted_price": 499.0, - "quantity": 3 - } - ], - "total_price": 1696.0, - "timestamp": "2025-12-04T23:22:50.898675+00:00", - "estimated_delivery": "2025-12-09", - "status": "refunded" - } ] } \ No newline at end of file diff --git a/backend/data/users.json b/backend/data/users.json index 56537c1..e9748e8 100644 --- a/backend/data/users.json +++ b/backend/data/users.json @@ -1,66 +1,10 @@ [ { - "user_id": "ae993132-12a6-40c6-a91a-3fe889d95edd", + "user_id": "a6da50a2-0e53-4776-b676-ef5e34f99963", "name": "Admin", "email": "admin@example.com", - "password_hash": "$2b$12$qqc7JMx01v45LICVN927q.VJplJyzmlZXZmQclZaag0uiuw2BxkeW", - "role": "admin", - "user_token": "lk6E4rp4RPu9MSq4wviWgEbbtgLK" - }, - { - "user_id": "428391c9-ec68-4a25-9d66-0580cec3ce6a", - "name": "testing", - "email": "testing@ubc.ca", - "password_hash": "$2b$12$pNaCctPqFzTnbn4XbhqlyuF520KRlpIMQyhE5ZTaViiGDCzqVsHFW", - "role": "customer", - "user_token": "p26qpkNUF4NAq6TlVAmIf65bQuVP" - }, - { - "user_id": "a9ad0b57-a1bc-4919-b724-d1a54505e439", - "name": "testubc", - "email": "kaksk@gmail.com", - "password_hash": "$2b$12$U/RCnvijhaHtapuhY4GaIuXy.eWyCtFGU.8.pnQl6QhGoP78c6DAK", - "role": "customer", - "user_token": "Cwb2TLiTujfZMAyhDUuo2teVnB02" - }, - { - "user_id": "79be980f-d83d-4c63-b3b6-77c13193e1a5", - "name": "Fraser Muller", - "email": "frasermuller2005@gmail.com", - "password_hash": "$2b$12$0WBVrzELlsKw6Vez3bEViO1pdYXNeeNGzYHu0ZiR8oLKW/EEpdPT.", - "role": "admin", - "user_token": "7xf3lzPO8xV2D6UUfNquoWifPK1N" - }, - { - "user_id": "1cb86309-e8b2-45e3-8da7-1c2f54c65ae5", - "name": "promote me", - "email": "promoteme@gmail.com", - "password_hash": "$2b$12$AeRCEl0GyH3aWZ0E8zDnZebtkk04jQIcr/hu/vqYp9E7IrGpYqlvO", - "role": "customer", - "user_token": "VoooH4Eb0DBF9BOJwQvfW2dM0heB" - }, - { - "user_id": "ed4a708f-0291-4005-a2a6-96f15cfbfe5d", - "name": "test user", - "email": "testuser@gmail.com", - "password_hash": "$2b$12$.9814GuuEkLjCj/hDtEPSuQLKWhFX4MGHyxsb5vFcsotFmK0lsH3.", - "role": "customer", - "user_token": "mP922vmmReeJHxuq7GMtKhM0nxbO" - }, - { - "user_id": "0bffca91-1c49-47a5-87b7-b0248da35d16", - "name": "new user", - "email": "newuser@gmail.com", - "password_hash": "$2b$12$FELV.wIPDPHWQnIVBXTTXu.Y531GcV9vB2Pt2wlH5x0TD0bF0sfo.", - "role": "customer", - "user_token": "EGe7sRYqgTcPxU8CdOYwh4ELp6TQ" - }, - { - "user_id": "a7977848-4f94-4cb5-beea-6aa0604d3dda", - "name": "newest user", - "email": "newestuser@gmail.com", - "password_hash": "$2b$12$h.R6xGCUgUmSsffyyOlib.HfXZMWFMqFEecJyGfOxgrripDWHK5Xe", - "role": "customer", - "user_token": "XjTiuSrT8xayr1n3iZNTUvbBLIBr" + "password_hash": "$2b$12$VPd./kTWRwoRPUZv6UP/0.gsh/sEnoe9VkivoWUgVrAri0kfpHjKq", + "user_token": "wFOjQscQcXPiaDo0pwH7B2s6Nsj2", + "role": "admin" } ] \ No newline at end of file diff --git a/frontend/app/admin/export/page.tsx b/frontend/app/admin/export/page.tsx index fccd2f3..637e989 100644 --- a/frontend/app/admin/export/page.tsx +++ b/frontend/app/admin/export/page.tsx @@ -28,8 +28,9 @@ export default function AdminExportPage() { const fetchAvailableFiles = async () => { setLoadingData(true); try { - const files = await exportAPI.getAvailableFiles(); - setAvailableFiles(files); + const response = await exportAPI.getAvailableFiles(); + // Backend returns { available_files: [...] } + setAvailableFiles(response.available_files || response); } catch (error) { console.error('Failed to fetch available files:', error); } finally { diff --git a/frontend/lib/api.ts b/frontend/lib/api.ts index 891f503..1af5225 100644 --- a/frontend/lib/api.ts +++ b/frontend/lib/api.ts @@ -202,7 +202,7 @@ export const penaltyAPI = { // Admin - Export export const exportAPI = { - getAvailableFiles: async (): Promise => { + getAvailableFiles: async (): Promise<{ available_files: string[] }> => { const response = await api.get('/export/available'); return response.data; },