Create previous_orders.html
Browse files- templates/previous_orders.html +131 -0
templates/previous_orders.html
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Previous Orders</title>
|
| 7 |
+
<!-- Bootstrap CSS -->
|
| 8 |
+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 9 |
+
<style>
|
| 10 |
+
body {
|
| 11 |
+
font-family: 'Arial', sans-serif;
|
| 12 |
+
background-color: #fdf4e3; /* Light cream background */
|
| 13 |
+
color: #333333; /* Dark gray text */
|
| 14 |
+
margin: 0;
|
| 15 |
+
padding: 0;
|
| 16 |
+
display: flex;
|
| 17 |
+
flex-direction: column;
|
| 18 |
+
min-height: 100vh;
|
| 19 |
+
}
|
| 20 |
+
.order-container {
|
| 21 |
+
max-width: 768px;
|
| 22 |
+
margin: 40px auto;
|
| 23 |
+
padding: 20px;
|
| 24 |
+
background-color: #ffffff; /* White card background */
|
| 25 |
+
border-radius: 15px;
|
| 26 |
+
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
|
| 27 |
+
border: 1px solid #ffe5b4; /* Light orange border */
|
| 28 |
+
flex-grow: 1;
|
| 29 |
+
}
|
| 30 |
+
.cart-item {
|
| 31 |
+
display: flex;
|
| 32 |
+
align-items: center;
|
| 33 |
+
justify-content: space-between;
|
| 34 |
+
background-color: #fffcf5; /* Slightly lighter beige */
|
| 35 |
+
border-radius: 8px;
|
| 36 |
+
border: 1px solid #ffe5b4; /* Light orange border */
|
| 37 |
+
padding: 10px;
|
| 38 |
+
margin-bottom: 10px;
|
| 39 |
+
}
|
| 40 |
+
.cart-item img {
|
| 41 |
+
width: 70px;
|
| 42 |
+
height: 70px;
|
| 43 |
+
object-fit: cover;
|
| 44 |
+
border-radius: 5px;
|
| 45 |
+
border: 1px solid #ffcc80; /* Light orange border around images */
|
| 46 |
+
}
|
| 47 |
+
.cart-item-details {
|
| 48 |
+
flex: 1;
|
| 49 |
+
margin-left: 15px;
|
| 50 |
+
}
|
| 51 |
+
.cart-item-title {
|
| 52 |
+
font-size: 1.2rem;
|
| 53 |
+
font-weight: bold;
|
| 54 |
+
color: #c04e01; /* Warm orange color for the title */
|
| 55 |
+
}
|
| 56 |
+
.cart-item-addons,
|
| 57 |
+
.cart-item-instructions {
|
| 58 |
+
font-size: 0.9rem;
|
| 59 |
+
color: #6c757d;
|
| 60 |
+
}
|
| 61 |
+
.order-summary {
|
| 62 |
+
text-align: right;
|
| 63 |
+
margin-top: 15px;
|
| 64 |
+
}
|
| 65 |
+
.back-to-menu {
|
| 66 |
+
display: block;
|
| 67 |
+
margin: 30px auto 10px auto;
|
| 68 |
+
padding: 10px 20px;
|
| 69 |
+
background-color: #ff5722; /* Bright orange button */
|
| 70 |
+
color: #ffffff;
|
| 71 |
+
border: none;
|
| 72 |
+
border-radius: 25px;
|
| 73 |
+
font-size: 1rem;
|
| 74 |
+
font-weight: bold;
|
| 75 |
+
text-align: center;
|
| 76 |
+
text-decoration: none;
|
| 77 |
+
width: 100%;
|
| 78 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 79 |
+
transition: background-color 0.3s ease;
|
| 80 |
+
}
|
| 81 |
+
.back-to-menu:hover {
|
| 82 |
+
background-color: #e64a19;
|
| 83 |
+
text-decoration: none;
|
| 84 |
+
}
|
| 85 |
+
</style>
|
| 86 |
+
</head>
|
| 87 |
+
<body>
|
| 88 |
+
<div class="container">
|
| 89 |
+
<div class="order-container">
|
| 90 |
+
<h4 class="mb-4 text-center">Your Previous Orders</h4>
|
| 91 |
+
|
| 92 |
+
{% if previous_orders %}
|
| 93 |
+
{% for order in previous_orders %}
|
| 94 |
+
<h5 class="text-center mb-3">Order #{{ order.Order_Number__c }}</h5>
|
| 95 |
+
|
| 96 |
+
{% for line in order.Order_Details__c.split('\n') %}
|
| 97 |
+
{% set item_parts = line.split('|') %}
|
| 98 |
+
<div class="cart-item">
|
| 99 |
+
<!-- Item Image -->
|
| 100 |
+
<img src="{{ item_parts[4].strip().replace('Image:', '') }}"
|
| 101 |
+
alt="{{ item_parts[0].strip() }}"
|
| 102 |
+
onerror="this.src='/static/placeholder.jpg';">
|
| 103 |
+
|
| 104 |
+
<!-- Item Details -->
|
| 105 |
+
<div class="cart-item-details">
|
| 106 |
+
<div class="cart-item-title">{{ item_parts[0].strip() }}</div> <!-- Item Name -->
|
| 107 |
+
<div class="cart-item-addons">
|
| 108 |
+
<small class="text-muted">Add-ons: {{ item_parts[1].strip().replace('Add-Ons:', '') }}</small>
|
| 109 |
+
</div>
|
| 110 |
+
<div class="cart-item-instructions">
|
| 111 |
+
<small class="text-muted">Instructions: {{ item_parts[2].strip().replace('Instructions:', '') }}</small>
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
|
| 115 |
+
<!-- Price -->
|
| 116 |
+
<div class="cart-item-actions">
|
| 117 |
+
<strong>{{ item_parts[3].strip().replace('Price:', '') }}</strong>
|
| 118 |
+
</div>
|
| 119 |
+
</div>
|
| 120 |
+
{% endfor %}
|
| 121 |
+
{% endfor %}
|
| 122 |
+
{% else %}
|
| 123 |
+
<p class="text-center">No previous orders found.</p>
|
| 124 |
+
{% endif %}
|
| 125 |
+
|
| 126 |
+
<!-- Back to Menu Button -->
|
| 127 |
+
<a href="/menu" class="back-to-menu">Back to Menu</a>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
</body>
|
| 131 |
+
</html>
|