Update templates/order.html
Browse files- templates/order.html +69 -64
templates/order.html
CHANGED
@@ -9,8 +9,8 @@
|
|
9 |
<style>
|
10 |
body {
|
11 |
font-family: 'Arial', sans-serif;
|
12 |
-
background-color:
|
13 |
-
color: #333333;
|
14 |
margin: 0;
|
15 |
padding: 0;
|
16 |
display: flex;
|
@@ -21,7 +21,7 @@
|
|
21 |
max-width: 768px;
|
22 |
margin: 40px auto;
|
23 |
padding: 20px;
|
24 |
-
background-color: #ffffff;
|
25 |
border-radius: 15px;
|
26 |
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
|
27 |
border: 1px solid #ffffff;
|
@@ -30,9 +30,9 @@
|
|
30 |
.cart-item {
|
31 |
display: flex;
|
32 |
justify-content: space-between;
|
33 |
-
background-color: #fffcf5;
|
34 |
border-radius: 8px;
|
35 |
-
border: 1px solid #ffe5b4;
|
36 |
padding: 10px;
|
37 |
margin-bottom: 10px;
|
38 |
}
|
@@ -41,7 +41,7 @@
|
|
41 |
height: 70px;
|
42 |
object-fit: cover;
|
43 |
border-radius: 5px;
|
44 |
-
border: 1px solid #ffcc80;
|
45 |
}
|
46 |
.cart-item-details {
|
47 |
flex: 1;
|
@@ -50,17 +50,17 @@
|
|
50 |
.cart-item-title {
|
51 |
font-size: 1.2rem;
|
52 |
font-weight: bold;
|
53 |
-
color: #000000;
|
54 |
}
|
55 |
.cart-item-addons,
|
56 |
.cart-item-instructions {
|
57 |
font-size: 0.9rem;
|
58 |
-
color: #000000;
|
59 |
}
|
60 |
.cart-item-actions {
|
61 |
font-size: 1.2rem;
|
62 |
font-weight: bold;
|
63 |
-
color: #2b9348;
|
64 |
}
|
65 |
.order-summary {
|
66 |
text-align: right;
|
@@ -69,7 +69,7 @@
|
|
69 |
.total-price {
|
70 |
font-size: 1.5rem;
|
71 |
font-weight: bold;
|
72 |
-
color: #2b9348;
|
73 |
}
|
74 |
.back-to-menu {
|
75 |
display: block;
|
@@ -111,94 +111,99 @@
|
|
111 |
}
|
112 |
.yourorder {
|
113 |
font-family: Serif;
|
114 |
-
color: #ff5722;
|
115 |
-
font-size: 1.5rem;
|
116 |
font-weight: bold;
|
117 |
}
|
118 |
-
/* Remove any gap between Sub-Total and Discount */
|
119 |
.d-flex {
|
120 |
-
margin-bottom: 0px !important;
|
121 |
}
|
122 |
.d-flex:first-child {
|
123 |
-
margin-top: 0px !important;
|
124 |
}
|
125 |
-
/* Remove padding and margins from the individual fields */
|
126 |
.d-flex .cart-item-actions {
|
127 |
-
margin-bottom: 0px !important;
|
128 |
-
}
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
</style>
|
139 |
</head>
|
140 |
<body>
|
141 |
<div class="container">
|
142 |
<div class="order-container">
|
143 |
-
<h4 class="mb-4 text-center yourorder">Your
|
144 |
|
145 |
-
{% if
|
146 |
-
{% for
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
<
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
<div class="cart-item-details">
|
156 |
-
<div class="cart-item-title">{{ item_parts[0].strip() }}</div> <!-- Item Name & Quantity -->
|
157 |
|
158 |
-
|
159 |
-
<div class="cart-item-
|
160 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
</div>
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
165 |
</div>
|
166 |
</div>
|
167 |
-
|
168 |
-
<!-- Price -->
|
169 |
-
<div class="cart-item-actions m">
|
170 |
-
<span style="font-size: 16px; margin-right: 13px">{{ item_parts[3].strip().replace('Price:', '') }}</span>
|
171 |
-
</div>
|
172 |
-
</div>
|
173 |
{% endfor %}
|
174 |
-
|
175 |
-
<!--
|
176 |
<div class="container mt-5 cart-item">
|
177 |
<div class="container">
|
|
|
|
|
|
|
178 |
<div class="d-flex justify-content-between mb-3">
|
179 |
-
<p><strong>Sub-Total:</strong></p>
|
180 |
-
<p class="cart-item-actions" style="font-size: 16px;">${{ "%.2f"|format(
|
181 |
</div>
|
182 |
<div class="d-flex justify-content-between mb-3">
|
183 |
-
<p><strong>Discount:</strong></p>
|
184 |
-
<p class="cart-item-actions" style="font-size: 16px;">${{ "%.2f"|format(
|
185 |
</div>
|
186 |
-
<!-- Add dotted line here -->
|
187 |
<div style="border-bottom: 2px dotted #000; margin-bottom: 10px;"></div>
|
188 |
<div class="d-flex justify-content-between mb-3">
|
189 |
<p><strong>Total Bill:</strong></p>
|
190 |
-
<p class="cart-item-actions" style="font-size: 16px;">${{ "%.2f"|format(
|
191 |
</div>
|
192 |
</div>
|
193 |
</div>
|
194 |
-
|
195 |
{% else %}
|
196 |
-
<p class="text-center">No order details available.</p>
|
197 |
{% endif %}
|
198 |
|
199 |
<!-- Back to Menu Button -->
|
200 |
<a href="{{ url_for('combined_summary.combined_summary') }}" class="back-to-menu">Back</a>
|
201 |
-
|
202 |
</div>
|
203 |
</div>
|
204 |
|
@@ -207,4 +212,4 @@
|
|
207 |
<p>Thank you for dining with us! <span>We look forward to serving you again.</span></p>
|
208 |
</footer>
|
209 |
</body>
|
210 |
-
</html>
|
|
|
9 |
<style>
|
10 |
body {
|
11 |
font-family: 'Arial', sans-serif;
|
12 |
+
background-color: #fdf4e3;
|
13 |
+
color: #333333;
|
14 |
margin: 0;
|
15 |
padding: 0;
|
16 |
display: flex;
|
|
|
21 |
max-width: 768px;
|
22 |
margin: 40px auto;
|
23 |
padding: 20px;
|
24 |
+
background-color: #ffffff;
|
25 |
border-radius: 15px;
|
26 |
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
|
27 |
border: 1px solid #ffffff;
|
|
|
30 |
.cart-item {
|
31 |
display: flex;
|
32 |
justify-content: space-between;
|
33 |
+
background-color: #fffcf5;
|
34 |
border-radius: 8px;
|
35 |
+
border: 1px solid #ffe5b4;
|
36 |
padding: 10px;
|
37 |
margin-bottom: 10px;
|
38 |
}
|
|
|
41 |
height: 70px;
|
42 |
object-fit: cover;
|
43 |
border-radius: 5px;
|
44 |
+
border: 1px solid #ffcc80;
|
45 |
}
|
46 |
.cart-item-details {
|
47 |
flex: 1;
|
|
|
50 |
.cart-item-title {
|
51 |
font-size: 1.2rem;
|
52 |
font-weight: bold;
|
53 |
+
color: #000000;
|
54 |
}
|
55 |
.cart-item-addons,
|
56 |
.cart-item-instructions {
|
57 |
font-size: 0.9rem;
|
58 |
+
color: #000000;
|
59 |
}
|
60 |
.cart-item-actions {
|
61 |
font-size: 1.2rem;
|
62 |
font-weight: bold;
|
63 |
+
color: #2b9348;
|
64 |
}
|
65 |
.order-summary {
|
66 |
text-align: right;
|
|
|
69 |
.total-price {
|
70 |
font-size: 1.5rem;
|
71 |
font-weight: bold;
|
72 |
+
color: #2b9348;
|
73 |
}
|
74 |
.back-to-menu {
|
75 |
display: block;
|
|
|
111 |
}
|
112 |
.yourorder {
|
113 |
font-family: Serif;
|
114 |
+
color: #ff5722;
|
115 |
+
font-size: 1.5rem;
|
116 |
font-weight: bold;
|
117 |
}
|
|
|
118 |
.d-flex {
|
119 |
+
margin-bottom: 0px !important;
|
120 |
}
|
121 |
.d-flex:first-child {
|
122 |
+
margin-top: 0px !important;
|
123 |
}
|
|
|
124 |
.d-flex .cart-item-actions {
|
125 |
+
margin-bottom: 0px !important;
|
126 |
+
}
|
127 |
+
.cart-item-instructions {
|
128 |
+
word-wrap: break-word;
|
129 |
+
white-space: normal;
|
130 |
+
overflow-wrap: break-word;
|
131 |
+
max-width: 100%;
|
132 |
+
line-height: 1.5;
|
133 |
+
padding: 5px 0;
|
134 |
+
word-break: break-word;
|
135 |
+
}
|
136 |
+
.order-header {
|
137 |
+
font-size: 1.3rem;
|
138 |
+
font-weight: bold;
|
139 |
+
color: #ff5722;
|
140 |
+
margin-top: 20px;
|
141 |
+
margin-bottom: 10px;
|
142 |
+
}
|
143 |
</style>
|
144 |
</head>
|
145 |
<body>
|
146 |
<div class="container">
|
147 |
<div class="order-container">
|
148 |
+
<h4 class="mb-4 text-center yourorder">Your Pending Orders</h4>
|
149 |
|
150 |
+
{% if orders %}
|
151 |
+
{% for order in orders %}
|
152 |
+
<div class="order-header">Order ID: {{ order.Id }}</div>
|
153 |
+
{% for line in order.Order_Details__c.split('\n') %}
|
154 |
+
{% set item_parts = line.split('|') %}
|
155 |
+
<div class="cart-item">
|
156 |
+
<!-- Item Image -->
|
157 |
+
<img src="{{ item_parts[4].strip().replace('Image:', '') }}"
|
158 |
+
alt="{{ item_parts[0].strip() }}"
|
159 |
+
onerror="this.src='/static/placeholder.jpg';">
|
|
|
|
|
160 |
|
161 |
+
<!-- Item Details -->
|
162 |
+
<div class="cart-item-details">
|
163 |
+
<div class="cart-item-title">{{ item_parts[0].strip() }}</div>
|
164 |
+
<div class="cart-item-addons">
|
165 |
+
<small class="text-muted">Add-ons: {{ item_parts[1].strip().replace('Add-Ons:', '') }}</small>
|
166 |
+
</div>
|
167 |
+
<div class="cart-item-instructions">
|
168 |
+
<small class="text-muted">Instructions: {{ item_parts[2].strip().replace('Instructions:', '') }}</small>
|
169 |
+
</div>
|
170 |
</div>
|
171 |
+
|
172 |
+
<!-- Price -->
|
173 |
+
<div class="cart-item-actions">
|
174 |
+
<span style="font-size: 16px; margin-right: 13px">{{ item_parts[3].strip().replace('Price:', '') }}</span>
|
175 |
</div>
|
176 |
</div>
|
177 |
+
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
178 |
{% endfor %}
|
179 |
+
|
180 |
+
<!-- Aggregate Totals Section -->
|
181 |
<div class="container mt-5 cart-item">
|
182 |
<div class="container">
|
183 |
+
{% if orders|length > 1 %}
|
184 |
+
<h5 class="mb-3 text-center" style="color: #ff5722; font-weight: bold;">Summary of All Pending Orders</h5>
|
185 |
+
{% endif %}
|
186 |
<div class="d-flex justify-content-between mb-3">
|
187 |
+
<p><strong>Total Sub-Total:</strong></p>
|
188 |
+
<p class="cart-item-actions" style="font-size: 16px;">${{ "%.2f"|format(total_subtotal) }}</p>
|
189 |
</div>
|
190 |
<div class="d-flex justify-content-between mb-3">
|
191 |
+
<p><strong>Total Discount:</strong></p>
|
192 |
+
<p class="cart-item-actions" style="font-size: 16px;">${{ "%.2f"|format(total_discount) }}</p>
|
193 |
</div>
|
|
|
194 |
<div style="border-bottom: 2px dotted #000; margin-bottom: 10px;"></div>
|
195 |
<div class="d-flex justify-content-between mb-3">
|
196 |
<p><strong>Total Bill:</strong></p>
|
197 |
+
<p class="cart-item-actions" style="font-size: 16px;">${{ "%.2f"|format(total_bill) }}</p>
|
198 |
</div>
|
199 |
</div>
|
200 |
</div>
|
|
|
201 |
{% else %}
|
202 |
+
<p class="text-center">No pending order details available.</p>
|
203 |
{% endif %}
|
204 |
|
205 |
<!-- Back to Menu Button -->
|
206 |
<a href="{{ url_for('combined_summary.combined_summary') }}" class="back-to-menu">Back</a>
|
|
|
207 |
</div>
|
208 |
</div>
|
209 |
|
|
|
212 |
<p>Thank you for dining with us! <span>We look forward to serving you again.</span></p>
|
213 |
</footer>
|
214 |
</body>
|
215 |
+
</html>
|