Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +359 -19
- prompts.txt +0 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: bikeshop
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: yellow
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,359 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Order Verification - Another Bike Shop</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
@keyframes pulse {
|
| 11 |
+
0%, 100% { opacity: 1; }
|
| 12 |
+
50% { opacity: 0.7; }
|
| 13 |
+
}
|
| 14 |
+
.pulse-animation {
|
| 15 |
+
animation: pulse 1.5s infinite;
|
| 16 |
+
}
|
| 17 |
+
.qr-scanner {
|
| 18 |
+
width: 100%;
|
| 19 |
+
max-width: 500px;
|
| 20 |
+
margin: 0 auto;
|
| 21 |
+
border-radius: 12px;
|
| 22 |
+
overflow: hidden;
|
| 23 |
+
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
|
| 24 |
+
}
|
| 25 |
+
.order-card {
|
| 26 |
+
transition: all 0.3s ease;
|
| 27 |
+
border-left: 4px solid transparent;
|
| 28 |
+
}
|
| 29 |
+
.order-card:hover {
|
| 30 |
+
transform: translateY(-2px);
|
| 31 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
| 32 |
+
}
|
| 33 |
+
.verified {
|
| 34 |
+
border-left-color: #10B981;
|
| 35 |
+
}
|
| 36 |
+
.pending {
|
| 37 |
+
border-left-color: #F59E0B;
|
| 38 |
+
}
|
| 39 |
+
.security-badge {
|
| 40 |
+
height: 45px;
|
| 41 |
+
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
|
| 42 |
+
}
|
| 43 |
+
</style>
|
| 44 |
+
</head>
|
| 45 |
+
<body class="bg-gray-50">
|
| 46 |
+
<!-- Customer Order Verification Page -->
|
| 47 |
+
<div id="customerView" class="max-w-4xl mx-auto p-6">
|
| 48 |
+
<div class="text-center mb-8">
|
| 49 |
+
<img src="https://via.placeholder.com/200x60?text=Another+Bike+Shop" alt="Another Bike Shop Logo" class="mx-auto mb-4">
|
| 50 |
+
<h1 class="text-3xl font-bold text-gray-800 mb-2">Order #042425-174046-759</h1>
|
| 51 |
+
<div class="inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800">
|
| 52 |
+
<span class="pulse-animation mr-2">●</span>
|
| 53 |
+
<span class="font-medium">Ready for Pickup</span>
|
| 54 |
+
</div>
|
| 55 |
+
</div>
|
| 56 |
+
|
| 57 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
| 58 |
+
<!-- Order Summary -->
|
| 59 |
+
<div class="bg-white rounded-xl shadow-sm p-6">
|
| 60 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Order Summary</h2>
|
| 61 |
+
<div class="space-y-4">
|
| 62 |
+
<div class="flex justify-between border-b pb-3">
|
| 63 |
+
<div>
|
| 64 |
+
<p class="font-medium">Santa Cruz Bullit 4 CC MX</p>
|
| 65 |
+
<p class="text-sm text-gray-500">Matte Teal Sparkle, M</p>
|
| 66 |
+
</div>
|
| 67 |
+
<p class="font-medium">$11,899.00</p>
|
| 68 |
+
</div>
|
| 69 |
+
<div class="flex justify-between border-b pb-3">
|
| 70 |
+
<div>
|
| 71 |
+
<p class="font-medium">Transition Repeater PT Carbon</p>
|
| 72 |
+
<p class="text-sm text-gray-500">Graphite Grey, L</p>
|
| 73 |
+
</div>
|
| 74 |
+
<p class="font-medium">$6,999.99</p>
|
| 75 |
+
</div>
|
| 76 |
+
<div class="flex justify-between border-b pb-3">
|
| 77 |
+
<div>
|
| 78 |
+
<p class="font-medium">Transition RELAY CARBON</p>
|
| 79 |
+
<p class="text-sm text-gray-500">TR BLUE, L, Demo</p>
|
| 80 |
+
</div>
|
| 81 |
+
<p class="font-medium">$5,499.99</p>
|
| 82 |
+
</div>
|
| 83 |
+
</div>
|
| 84 |
+
<div class="mt-6 pt-4 border-t">
|
| 85 |
+
<div class="flex justify-between mb-2">
|
| 86 |
+
<p class="text-gray-600">Subtotal</p>
|
| 87 |
+
<p class="font-medium">$24,398.98</p>
|
| 88 |
+
</div>
|
| 89 |
+
<div class="flex justify-between mb-2">
|
| 90 |
+
<p class="text-gray-600">Tax</p>
|
| 91 |
+
<p class="font-medium">$2,378.90</p>
|
| 92 |
+
</div>
|
| 93 |
+
<div class="flex justify-between text-lg font-bold mt-3">
|
| 94 |
+
<p>Total</p>
|
| 95 |
+
<p>$26,777.88</p>
|
| 96 |
+
</div>
|
| 97 |
+
</div>
|
| 98 |
+
</div>
|
| 99 |
+
|
| 100 |
+
<!-- Verification Section -->
|
| 101 |
+
<div class="space-y-6">
|
| 102 |
+
<div class="bg-white rounded-xl shadow-sm p-6">
|
| 103 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Pickup Verification</h2>
|
| 104 |
+
<div class="text-center mb-4">
|
| 105 |
+
<div class="inline-block p-4 bg-white border border-gray-200 rounded-lg">
|
| 106 |
+
<img src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=order_042425-174046-759_token_7A8B9C0D1E2F3G4H"
|
| 107 |
+
alt="Order Verification QR Code" class="w-40 h-40 mx-auto">
|
| 108 |
+
</div>
|
| 109 |
+
<p class="text-sm text-gray-500 mt-2">Scan this code at pickup</p>
|
| 110 |
+
</div>
|
| 111 |
+
<div class="mt-4 p-4 bg-gray-50 rounded-lg">
|
| 112 |
+
<p class="text-sm font-medium text-gray-700 mb-2">Manual Verification Code</p>
|
| 113 |
+
<div class="flex items-center justify-between bg-white px-3 py-2 rounded border border-gray-200">
|
| 114 |
+
<code class="text-sm font-mono text-gray-800">7A8B9C0D1E2F3G4H</code>
|
| 115 |
+
<button onclick="copyToClipboard('7A8B9C0D1E2F3G4H')" class="text-blue-600 hover:text-blue-800">
|
| 116 |
+
<i class="far fa-copy"></i>
|
| 117 |
+
</button>
|
| 118 |
+
</div>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
|
| 122 |
+
<div class="bg-white rounded-xl shadow-sm p-6">
|
| 123 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Pickup Information</h2>
|
| 124 |
+
<div class="space-y-3">
|
| 125 |
+
<div class="flex items-start">
|
| 126 |
+
<i class="fas fa-map-marker-alt text-gray-400 mt-1 mr-3"></i>
|
| 127 |
+
<div>
|
| 128 |
+
<p class="font-medium">Another Bike Shop</p>
|
| 129 |
+
<p class="text-gray-600">123 Bike Lane, Santa Cruz, CA 95060</p>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
<div class="flex items-start">
|
| 133 |
+
<i class="fas fa-clock text-gray-400 mt-1 mr-3"></i>
|
| 134 |
+
<div>
|
| 135 |
+
<p class="font-medium">Pickup Hours</p>
|
| 136 |
+
<p class="text-gray-600">M-F 10 AM – 6 PM PST | Sa-Su 10 AM – 5 PM PST</p>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
<div class="flex items-start">
|
| 140 |
+
<i class="fas fa-id-card text-gray-400 mt-1 mr-3"></i>
|
| 141 |
+
<div>
|
| 142 |
+
<p class="font-medium">Required for Pickup</p>
|
| 143 |
+
<p class="text-gray-600">Valid photo ID matching order name</p>
|
| 144 |
+
</div>
|
| 145 |
+
</div>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
|
| 151 |
+
<!-- Payment Verification -->
|
| 152 |
+
<div class="mt-8 bg-white rounded-xl shadow-sm p-6">
|
| 153 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Payment Verification</h2>
|
| 154 |
+
<div class="flex flex-wrap items-center justify-between">
|
| 155 |
+
<div class="flex items-center mb-4 md:mb-0">
|
| 156 |
+
<div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mr-4">
|
| 157 |
+
<i class="fab fa-cc-paypal text-blue-600 text-xl"></i>
|
| 158 |
+
</div>
|
| 159 |
+
<div>
|
| 160 |
+
<p class="font-medium">PayPal</p>
|
| 161 |
+
<p class="text-sm text-gray-500">Verified via MCP Pay</p>
|
| 162 |
+
</div>
|
| 163 |
+
</div>
|
| 164 |
+
<div class="bg-green-100 text-green-800 px-4 py-2 rounded-lg">
|
| 165 |
+
<p class="font-medium">Payment Confirmed</p>
|
| 166 |
+
</div>
|
| 167 |
+
</div>
|
| 168 |
+
<div class="mt-6 pt-4 border-t">
|
| 169 |
+
<p class="text-sm text-gray-600 mb-3">Transaction Security</p>
|
| 170 |
+
<div class="flex flex-wrap items-center gap-4">
|
| 171 |
+
<img src="https://www.pcisecuritystandards.org/assests/images/pci-logo.svg" alt="PCI DSS Compliant" class="security-badge h-8">
|
| 172 |
+
<img src="https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_111x69.jpg" alt="PayPal Verified" class="security-badge h-8">
|
| 173 |
+
<img src="https://www.bbb.org/Images/BBB%20Accreditation/BBBAccreditation_Badge_2019.png" alt="BBB Accredited" class="security-badge h-8">
|
| 174 |
+
</div>
|
| 175 |
+
<p class="text-xs text-gray-500 mt-4">
|
| 176 |
+
<i class="fas fa-lock"></i> Secured transaction processed via MCP Pay / PayPal Secure Channel
|
| 177 |
+
<br>Verification Timestamp: 2025-04-30T16:31:22-07:00
|
| 178 |
+
</p>
|
| 179 |
+
</div>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
<div class="mt-8 text-center text-gray-500 text-sm">
|
| 183 |
+
<p>Questions? Contact us at (831) 427-2232 or info@anotherbikeshop.com</p>
|
| 184 |
+
<p class="mt-1">Thank you for your business!</p>
|
| 185 |
+
</div>
|
| 186 |
+
</div>
|
| 187 |
+
|
| 188 |
+
<!-- Staff Scanner Interface (Hidden by default) -->
|
| 189 |
+
<div id="staffView" class="hidden max-w-2xl mx-auto p-6">
|
| 190 |
+
<div class="text-center mb-8">
|
| 191 |
+
<img src="https://via.placeholder.com/200x60?text=Another+Bike+Shop" alt="Another Bike Shop Logo" class="mx-auto mb-4">
|
| 192 |
+
<h1 class="text-2xl font-bold text-gray-800 mb-2">Order Verification Scanner</h1>
|
| 193 |
+
<p class="text-gray-600">Scan customer QR codes for instant order verification</p>
|
| 194 |
+
</div>
|
| 195 |
+
|
| 196 |
+
<div class="qr-scanner bg-white p-4 mb-6">
|
| 197 |
+
<div id="qr-reader" class="w-full h-64 bg-black"></div>
|
| 198 |
+
</div>
|
| 199 |
+
|
| 200 |
+
<div id="scan-result" class="hidden">
|
| 201 |
+
<div class="order-card verified bg-white rounded-xl shadow-sm p-6 mb-6">
|
| 202 |
+
<div class="flex justify-between items-start mb-4">
|
| 203 |
+
<div>
|
| 204 |
+
<h2 class="text-xl font-semibold text-gray-800">Order #<span id="result-order-id">042425-174046-759</span></h2>
|
| 205 |
+
<p class="text-green-600 font-medium">Verified & Ready for Pickup</p>
|
| 206 |
+
</div>
|
| 207 |
+
<span class="px-3 py-1 bg-green-100 text-green-800 rounded-full text-sm">PAID</span>
|
| 208 |
+
</div>
|
| 209 |
+
|
| 210 |
+
<div class="mb-4">
|
| 211 |
+
<p class="font-medium text-gray-700">Customer</p>
|
| 212 |
+
<p id="result-customer">Andrew Bolton</p>
|
| 213 |
+
</div>
|
| 214 |
+
|
| 215 |
+
<div class="mb-4">
|
| 216 |
+
<p class="font-medium text-gray-700">Items</p>
|
| 217 |
+
<ul id="result-items" class="list-disc pl-5 mt-1 space-y-1">
|
| 218 |
+
<li>Santa Cruz Bullit 4 CC MX (Matte Teal Sparkle, M)</li>
|
| 219 |
+
<li>Transition Repeater PT Carbon (Graphite Grey, L)</li>
|
| 220 |
+
<li>Transition RELAY CARBON (TR BLUE, L, Demo)</li>
|
| 221 |
+
</ul>
|
| 222 |
+
</div>
|
| 223 |
+
|
| 224 |
+
<div class="flex justify-between items-center pt-4 border-t">
|
| 225 |
+
<div>
|
| 226 |
+
<p class="text-sm text-gray-600">Total</p>
|
| 227 |
+
<p id="result-total" class="text-lg font-bold">$26,777.88</p>
|
| 228 |
+
</div>
|
| 229 |
+
<button id="confirm-pickup" class="px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
|
| 230 |
+
Confirm Pickup
|
| 231 |
+
</button>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
</div>
|
| 235 |
+
|
| 236 |
+
<div class="bg-white rounded-xl shadow-sm p-6">
|
| 237 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Manual Verification</h2>
|
| 238 |
+
<div class="flex flex-col space-y-3">
|
| 239 |
+
<div>
|
| 240 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Order Number</label>
|
| 241 |
+
<input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="Enter order number">
|
| 242 |
+
</div>
|
| 243 |
+
<div>
|
| 244 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Verification Code</label>
|
| 245 |
+
<input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="Enter verification code">
|
| 246 |
+
</div>
|
| 247 |
+
<button class="mt-2 px-4 py-2 bg-gray-800 text-white rounded-md hover:bg-gray-700 transition">
|
| 248 |
+
Verify Manually
|
| 249 |
+
</button>
|
| 250 |
+
</div>
|
| 251 |
+
</div>
|
| 252 |
+
</div>
|
| 253 |
+
|
| 254 |
+
<!-- Toggle between customer and staff views (for demo purposes) -->
|
| 255 |
+
<div class="fixed bottom-4 right-4">
|
| 256 |
+
<button onclick="toggleView()" class="p-3 bg-blue-600 text-white rounded-full shadow-lg hover:bg-blue-700 transition">
|
| 257 |
+
<i class="fas fa-sync-alt"></i>
|
| 258 |
+
</button>
|
| 259 |
+
</div>
|
| 260 |
+
|
| 261 |
+
<script src="https://unpkg.com/html5-qrcode@2.3.4/dist/html5-qrcode.min.js"></script>
|
| 262 |
+
<script>
|
| 263 |
+
// Copy to clipboard function
|
| 264 |
+
function copyToClipboard(text) {
|
| 265 |
+
navigator.clipboard.writeText(text).then(() => {
|
| 266 |
+
alert('Copied to clipboard!');
|
| 267 |
+
});
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
// Toggle between customer and staff views (demo only)
|
| 271 |
+
function toggleView() {
|
| 272 |
+
const customerView = document.getElementById('customerView');
|
| 273 |
+
const staffView = document.getElementById('staffView');
|
| 274 |
+
|
| 275 |
+
if (customerView.classList.contains('hidden')) {
|
| 276 |
+
customerView.classList.remove('hidden');
|
| 277 |
+
staffView.classList.add('hidden');
|
| 278 |
+
} else {
|
| 279 |
+
customerView.classList.add('hidden');
|
| 280 |
+
staffView.classList.remove('hidden');
|
| 281 |
+
initScanner();
|
| 282 |
+
}
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
// Initialize QR scanner (for staff view)
|
| 286 |
+
function initScanner() {
|
| 287 |
+
const html5QrCode = new Html5Qrcode("qr-reader");
|
| 288 |
+
|
| 289 |
+
// Demo scan result (in a real app, this would come from the API)
|
| 290 |
+
const demoResult = {
|
| 291 |
+
orderId: "042425-174046-759",
|
| 292 |
+
customer: "Andrew Bolton",
|
| 293 |
+
items: [
|
| 294 |
+
"Santa Cruz Bullit 4 CC MX (Matte Teal Sparkle, M)",
|
| 295 |
+
"Transition Repeater PT Carbon (Graphite Grey, L)",
|
| 296 |
+
"Transition RELAY CARBON (TR BLUE, L, Demo)"
|
| 297 |
+
],
|
| 298 |
+
total: "$26,777.88",
|
| 299 |
+
status: "verified"
|
| 300 |
+
};
|
| 301 |
+
|
| 302 |
+
function onScanSuccess(decodedText, decodedResult) {
|
| 303 |
+
// In a real app, you would fetch order details from your API
|
| 304 |
+
// For demo purposes, we'll just show the demo result
|
| 305 |
+
document.getElementById('result-order-id').textContent = demoResult.orderId;
|
| 306 |
+
document.getElementById('result-customer').textContent = demoResult.customer;
|
| 307 |
+
|
| 308 |
+
const itemsList = document.getElementById('result-items');
|
| 309 |
+
itemsList.innerHTML = '';
|
| 310 |
+
demoResult.items.forEach(item => {
|
| 311 |
+
const li = document.createElement('li');
|
| 312 |
+
li.textContent = item;
|
| 313 |
+
itemsList.appendChild(li);
|
| 314 |
+
});
|
| 315 |
+
|
| 316 |
+
document.getElementById('result-total').textContent = demoResult.total;
|
| 317 |
+
document.getElementById('scan-result').classList.remove('hidden');
|
| 318 |
+
|
| 319 |
+
// Stop scanning after successful scan
|
| 320 |
+
html5QrCode.stop().then(() => {
|
| 321 |
+
console.log("QR Code scanning stopped.");
|
| 322 |
+
}).catch(err => {
|
| 323 |
+
console.log("Unable to stop scanning.", err);
|
| 324 |
+
});
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
function onScanFailure(error) {
|
| 328 |
+
console.warn(`QR error = ${error}`);
|
| 329 |
+
}
|
| 330 |
+
|
| 331 |
+
// Start the scanner
|
| 332 |
+
html5QrCode.start(
|
| 333 |
+
{ facingMode: "environment" },
|
| 334 |
+
{ fps: 10, qrbox: { width: 250, height: 250 } },
|
| 335 |
+
onScanSuccess,
|
| 336 |
+
onScanFailure
|
| 337 |
+
);
|
| 338 |
+
|
| 339 |
+
// Handle confirm pickup button
|
| 340 |
+
document.getElementById('confirm-pickup').addEventListener('click', function() {
|
| 341 |
+
alert('Pickup confirmed for order #' + demoResult.orderId);
|
| 342 |
+
document.getElementById('scan-result').classList.add('hidden');
|
| 343 |
+
// Restart the scanner
|
| 344 |
+
html5QrCode.start(
|
| 345 |
+
{ facingMode: "environment" },
|
| 346 |
+
{ fps: 10, qrbox: { width: 250, height: 250 } },
|
| 347 |
+
onScanSuccess,
|
| 348 |
+
onScanFailure
|
| 349 |
+
);
|
| 350 |
+
});
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
// Initialize the scanner if staff view is shown by default
|
| 354 |
+
if (document.getElementById('staffView') && !document.getElementById('staffView').classList.contains('hidden')) {
|
| 355 |
+
initScanner();
|
| 356 |
+
}
|
| 357 |
+
</script>
|
| 358 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=thedruid831/bikeshop" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 359 |
+
</html>
|
prompts.txt
ADDED
|
File without changes
|