|  | <html lang="en"> | 
					
						
						|  | <head> | 
					
						
						|  | <meta charset="UTF-8"> | 
					
						
						|  | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | 
					
						
						|  | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"> | 
					
						
						|  | <title>Order History</title> | 
					
						
						|  | <style> | 
					
						
						|  |  | 
					
						
						|  | * { | 
					
						
						|  | margin: 0; | 
					
						
						|  | padding: 0; | 
					
						
						|  | box-sizing: border-box; | 
					
						
						|  | } | 
					
						
						|  | body { | 
					
						
						|  | font-family: Arial, sans-serif; | 
					
						
						|  | background-color: #fdf4e3; | 
					
						
						|  | margin: 0; | 
					
						
						|  | padding: 0; | 
					
						
						|  | } | 
					
						
						|  |  | 
					
						
						|  | .background { | 
					
						
						|  | padding: 8vw 0; | 
					
						
						|  | position: relative; | 
					
						
						|  | } | 
					
						
						|  |  | 
					
						
						|  | .back-button { | 
					
						
						|  | position: absolute; | 
					
						
						|  | top: 15px; | 
					
						
						|  | left: 15px; | 
					
						
						|  | display: inline-block; | 
					
						
						|  | background-color: green; | 
					
						
						|  | color: white; | 
					
						
						|  | padding: 10px 20px; | 
					
						
						|  | text-decoration: none; | 
					
						
						|  | font-weight: bold; | 
					
						
						|  | border-radius: 4px; | 
					
						
						|  | z-index: 10; | 
					
						
						|  | } | 
					
						
						|  | .back-button:hover { | 
					
						
						|  | background-color: darkgreen; | 
					
						
						|  | } | 
					
						
						|  |  | 
					
						
						|  | .container { | 
					
						
						|  | width: 85%; | 
					
						
						|  | max-width: 450px; | 
					
						
						|  | margin: 30px auto 0; | 
					
						
						|  | padding: 15px; | 
					
						
						|  | background-color: white; | 
					
						
						|  | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | 
					
						
						|  | border-radius: 8px; | 
					
						
						|  | } | 
					
						
						|  | .order-item { | 
					
						
						|  | padding: 12px; | 
					
						
						|  | border: 1px solid #6c757d; | 
					
						
						|  | margin-bottom: 12px; | 
					
						
						|  | border-radius: 5px; | 
					
						
						|  | } | 
					
						
						|  | .order-details { | 
					
						
						|  | font-size: 14px; | 
					
						
						|  | font-weight: bold; | 
					
						
						|  | color: black; | 
					
						
						|  | } | 
					
						
						|  | .order-details p { | 
					
						
						|  | margin: 4px 0; | 
					
						
						|  | } | 
					
						
						|  | .order-date-time { | 
					
						
						|  | font-size: 11px; | 
					
						
						|  | color: black; | 
					
						
						|  | } | 
					
						
						|  | .order-price { | 
					
						
						|  | font-size: 13px; | 
					
						
						|  | font-weight: bold; | 
					
						
						|  | color: black; | 
					
						
						|  | margin: 5px 0; | 
					
						
						|  | } | 
					
						
						|  | .order-status { | 
					
						
						|  | font-size: 11px; | 
					
						
						|  | font-weight: bold; | 
					
						
						|  | margin-top: 6px; | 
					
						
						|  | } | 
					
						
						|  | .order-status.pending { | 
					
						
						|  | color: green; | 
					
						
						|  | } | 
					
						
						|  | .order-status.completed { | 
					
						
						|  | color: #28a745; | 
					
						
						|  | } | 
					
						
						|  | .order-buttons { | 
					
						
						|  | margin-top: 6px; | 
					
						
						|  | } | 
					
						
						|  | .reorder-btn, .rate-order-btn { | 
					
						
						|  | background-color: #ff7f00; | 
					
						
						|  | color: white; | 
					
						
						|  | border: none; | 
					
						
						|  | padding: 6px 12px; | 
					
						
						|  | margin-right: 8px; | 
					
						
						|  | cursor: pointer; | 
					
						
						|  | border-radius: 4px; | 
					
						
						|  | } | 
					
						
						|  | .reorder-btn:hover, .rate-order-btn:hover { | 
					
						
						|  | background-color: #f55b00; | 
					
						
						|  | } | 
					
						
						|  | .total-price { | 
					
						
						|  | font-size: 14px; | 
					
						
						|  | font-weight: bold; | 
					
						
						|  | color: #333; | 
					
						
						|  | margin-top: 15px; | 
					
						
						|  | } | 
					
						
						|  | .order-heading { | 
					
						
						|  | font-size: 16px; | 
					
						
						|  | font-weight: bold; | 
					
						
						|  | color: #ff7f00; | 
					
						
						|  | margin-bottom: 15px; | 
					
						
						|  | text-align: center; | 
					
						
						|  | } | 
					
						
						|  | .show-more-btn { | 
					
						
						|  | background-color: #ff7f00; | 
					
						
						|  | color: white; | 
					
						
						|  | padding: 10px 20px; | 
					
						
						|  | border: none; | 
					
						
						|  | cursor: pointer; | 
					
						
						|  | border-radius: 4px; | 
					
						
						|  | margin-top: 20px; | 
					
						
						|  | font-weight: bold; | 
					
						
						|  | } | 
					
						
						|  | .show-more-btn:hover { | 
					
						
						|  | background-color: #f55b00; | 
					
						
						|  | } | 
					
						
						|  |  | 
					
						
						|  | @media (max-width: 480px) { | 
					
						
						|  | .container { | 
					
						
						|  | width: 90%; | 
					
						
						|  | margin: 30px auto 0; | 
					
						
						|  | padding: 10px; | 
					
						
						|  | } | 
					
						
						|  | .order-details { | 
					
						
						|  | font-size: 12px; | 
					
						
						|  | } | 
					
						
						|  | .order-price { | 
					
						
						|  | font-size: 12px; | 
					
						
						|  | } | 
					
						
						|  | .order-status { | 
					
						
						|  | font-size: 10px; | 
					
						
						|  | } | 
					
						
						|  | .order-heading { | 
					
						
						|  | font-size: 14px; | 
					
						
						|  | } | 
					
						
						|  | .show-more-btn { | 
					
						
						|  | padding: 6px 12px; | 
					
						
						|  | } | 
					
						
						|  | .back-button { | 
					
						
						|  | top: 10px; | 
					
						
						|  | left: 10px; | 
					
						
						|  | padding: 8px 16px; | 
					
						
						|  | } | 
					
						
						|  | } | 
					
						
						|  | </style> | 
					
						
						|  | </head> | 
					
						
						|  | <body> | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | <div class="background"> | 
					
						
						|  | <a href="{{ url_for('menu') }}" class="back-button"><i class="fa fa-arrow-left"></i></a> | 
					
						
						|  |  | 
					
						
						|  | <div class="container"> | 
					
						
						|  | <div class="order-heading">Order History</div> | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | {% for order in orders[:3] %} | 
					
						
						|  | <div class="order-item"> | 
					
						
						|  | <div class="order-details"> | 
					
						
						|  | <p>{{ order.formatted_items }}</p> | 
					
						
						|  | </div> | 
					
						
						|  |  | 
					
						
						|  | <div class="order-date-time"> | 
					
						
						|  | <p>{{ order.formatted_date }}</p> | 
					
						
						|  | </div> | 
					
						
						|  |  | 
					
						
						|  | <div class="order-price"> | 
					
						
						|  | <p>Total: ₹{{ order.Total_Bill__c }}</p> | 
					
						
						|  | </div> | 
					
						
						|  |  | 
					
						
						|  | <div class="order-status {% if order.order_status == 'Pending' %}pending{% else %}completed{% endif %}"> | 
					
						
						|  | <p>Status: {{ order.order_status }}</p> | 
					
						
						|  | </div> | 
					
						
						|  | </div> | 
					
						
						|  | {% endfor %} | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | <div class="more-orders" id="more-orders"> | 
					
						
						|  | {% for order in orders[3:] %} | 
					
						
						|  | <div class="order-item"> | 
					
						
						|  | <div class="order-details"> | 
					
						
						|  | <p>{{ order.formatted_items }}</p> | 
					
						
						|  | </div> | 
					
						
						|  |  | 
					
						
						|  | <div class="order-date-time"> | 
					
						
						|  | <p>Order Placed: {{ order.formatted_date }}</p> | 
					
						
						|  | </div> | 
					
						
						|  |  | 
					
						
						|  | <div class="order-price"> | 
					
						
						|  | <p>Total: ₹{{ order.Total_Bill__c }}</p> | 
					
						
						|  | </div> | 
					
						
						|  |  | 
					
						
						|  | <div class="order-status {% if order.order_status == 'Pending' %}pending{% else %}completed{% endif %}"> | 
					
						
						|  | <p>Status: {{ order.order_status }}</p> | 
					
						
						|  | </div> | 
					
						
						|  | </div> | 
					
						
						|  | {% endfor %} | 
					
						
						|  | </div> | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | {% if orders|length > 3 %} | 
					
						
						|  | <button class="show-more-btn" onclick="toggleOrders()">Show More</button> | 
					
						
						|  | {% endif %} | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | {% if not orders %} | 
					
						
						|  | <div class="no-orders"> | 
					
						
						|  | <p>No orders found.</p> | 
					
						
						|  | </div> | 
					
						
						|  | {% endif %} | 
					
						
						|  | </div> | 
					
						
						|  | </div> | 
					
						
						|  |  | 
					
						
						|  | <script> | 
					
						
						|  |  | 
					
						
						|  | function toggleOrders() { | 
					
						
						|  | const moreOrders = document.getElementById("more-orders"); | 
					
						
						|  | const button = document.querySelector(".show-more-btn"); | 
					
						
						|  | if (moreOrders.style.display === "none") { | 
					
						
						|  | moreOrders.style.display = "block"; | 
					
						
						|  | button.innerHTML = "Show Less"; | 
					
						
						|  | } else { | 
					
						
						|  | moreOrders.style.display = "none"; | 
					
						
						|  | button.innerHTML = "Show More"; | 
					
						
						|  | } | 
					
						
						|  | } | 
					
						
						|  | </script> | 
					
						
						|  |  | 
					
						
						|  | </body> | 
					
						
						|  | </html> |