Rammohan0504 commited on
Commit
dcc85fd
·
verified ·
1 Parent(s): cd445b4

Update templates/order_history.html

Browse files
Files changed (1) hide show
  1. templates/order_history.html +150 -115
templates/order_history.html CHANGED
@@ -1,82 +1,114 @@
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
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
7
  <title>Order History</title>
8
  <style>
 
 
 
 
 
 
 
9
  body {
10
  font-family: Arial, sans-serif;
11
- background-color: #f8f9fa;
12
  margin: 0;
13
  padding: 0;
14
  }
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  .container {
17
- width: 70%;
18
- margin: 30px auto;
19
- padding: 20px;
20
- background-color: #fdf4e3;
21
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
 
22
  border-radius: 8px;
23
  }
24
 
25
  .order-item {
26
- padding: 10px;
27
- border: 1px solid #6c757d; /*#ffe5b4;*/
28
- margin-bottom: 20px;
29
  border-radius: 5px;
30
  }
31
 
32
  .order-details {
33
- font-size: 16px;
34
  font-weight: bold;
35
- color: gray;
36
  }
37
 
38
  .order-details p {
39
- margin: 5px 0;
40
  }
41
 
42
  .order-date-time {
43
- font-size: 14px;
44
- color: gray;
45
  }
46
 
47
  .order-price {
48
- font-size: 16px;
49
  font-weight: bold;
50
- color: gray;
51
- margin: 10px 0;
52
  }
53
 
54
- .order-status p {
55
- margin: 5px 0;
56
- }
57
-
58
- .order-status .status-label {
59
- color: lightgrey; /* Light grey color for "Status:" label */
60
- font-weight: normal; /* Optional: make the label less bold */
61
- }
62
-
63
  .order-status {
64
- font-size: 14px;
65
  font-weight: bold;
66
- color: #28a745; /* Green for completed, can be customized based on the status */
67
- margin-top: 10px;
 
 
 
 
 
 
 
68
  }
69
 
70
  .order-buttons {
71
- margin-top: 10px;
72
  }
73
 
74
  .reorder-btn, .rate-order-btn {
75
  background-color: #ff7f00;
76
  color: white;
77
  border: none;
78
- padding: 8px 16px;
79
- margin-right: 10px;
80
  cursor: pointer;
81
  border-radius: 4px;
82
  }
@@ -86,41 +118,20 @@
86
  }
87
 
88
  .total-price {
89
- font-size: 18px;
90
  font-weight: bold;
91
  color: #333;
92
- margin-top: 20px;
93
  }
94
 
95
  .order-heading {
96
- font-size: 20px;
97
  font-weight: bold;
98
- color: black;
99
- margin-bottom: 20px;
100
  text-align: center;
101
  }
102
 
103
- .back-button {
104
- display: inline-block;
105
- background-color: green;
106
- color: white;
107
- padding: 10px 20px;
108
- text-decoration: none;
109
- font-weight: bold;
110
- border-radius: 4px;
111
- margin-bottom: 20px;
112
- }
113
-
114
- .back-button:hover {
115
- background-color: darkgreen;
116
- }
117
-
118
- /* Hide additional orders by default */
119
- .more-orders {
120
- display: none;
121
- }
122
-
123
- /* Style for the Show More/Show Less button */
124
  .show-more-btn {
125
  background-color: #ff7f00;
126
  color: white;
@@ -129,93 +140,115 @@
129
  cursor: pointer;
130
  border-radius: 4px;
131
  margin-top: 20px;
132
- font-weight:bold;
133
  }
134
 
135
  .show-more-btn:hover {
136
  background-color: #f55b00;
137
  }
138
 
139
- @media (max-width: 768px) {
140
- .order-details, .order-price, .order-date-time {
141
- font-size: 14px;
 
 
 
 
 
 
 
142
  }
 
 
 
 
 
 
 
 
 
143
  .order-heading {
144
- font-size: 18px;
 
 
 
 
 
 
 
 
 
 
145
  }
146
  }
 
147
  </style>
148
  </head>
149
  <body>
150
 
151
- <a href="{{ url_for('menu') }}" class="back-button"><i class="fa fa-arrow-left"></i></a>
152
-
153
- <div class="container">
154
- <div class="order-heading">Order History</div>
155
-
156
- <!-- Loop through the orders (first 3) -->
157
- {% for order in orders[:3] %}
158
- <div class="order-item">
159
- <!-- Order details: item names and quantities -->
160
- <div class="order-details">
161
- <p>{{ order.formatted_items }}</p>
162
- </div>
163
-
164
- <!-- Order date and time -->
165
- <div class="order-date-time">
166
- <p>{{ order.formatted_date }}</p>
167
- </div>
168
-
169
- <!-- Total price -->
170
- <div class="order-price">
171
- <p>Total: ₹{{ order.Total_Bill__c }}</p>
172
- </div>
173
 
174
- <div class="order-status">
175
- <p>Status: {{ order.order_status }}</p> <!-- Display order status -->
176
- </div>
177
-
178
- </div>
179
- {% endfor %}
180
 
181
- <!-- Loop through the remaining orders (hidden initially) -->
182
- <div class="more-orders" id="more-orders">
183
- {% for order in orders[3:] %}
184
  <div class="order-item">
185
- <!-- Order details: item names and quantities -->
186
  <div class="order-details">
187
  <p>{{ order.formatted_items }}</p>
188
  </div>
189
 
190
- <!-- Order date and time -->
191
  <div class="order-date-time">
192
- <p>Order Placed:{{ order.formatted_date }}</p>
193
  </div>
194
 
195
- <!-- Total price -->
196
  <div class="order-price">
197
  <p>Total: ₹{{ order.Total_Bill__c }}</p>
198
  </div>
199
 
200
- <!-- Order Status -->
201
- <div class="order-status">
202
- <p>Status: {{ order.order_status }}</p> <!-- Display order status -->
203
- </div>
204
  </div>
205
  {% endfor %}
206
- </div>
207
 
208
- <!-- Show More button -->
209
- {% if orders|length > 3 %}
210
- <button class="show-more-btn" onclick="toggleOrders()">Show More</button>
211
- {% endif %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
 
213
- <!-- If no orders exist -->
214
- {% if not orders %}
215
- <div class="no-orders">
216
- <p>No orders found.</p>
 
 
217
  </div>
218
- {% endif %}
219
  </div>
220
 
221
  <script>
@@ -223,7 +256,6 @@
223
  function toggleOrders() {
224
  const moreOrders = document.getElementById("more-orders");
225
  const button = document.querySelector(".show-more-btn");
226
-
227
  if (moreOrders.style.display === "none") {
228
  moreOrders.style.display = "block";
229
  button.innerHTML = "Show Less"; // Change button text
@@ -236,3 +268,6 @@
236
 
237
  </body>
238
  </html>
 
 
 
 
1
+
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
6
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
7
  <title>Order History</title>
8
  <style>
9
+ /* Reset padding and margin for all elements */
10
+ * {
11
+ margin: 0;
12
+ padding: 0;
13
+ box-sizing: border-box;
14
+ }
15
+
16
  body {
17
  font-family: Arial, sans-serif;
18
+ background-color: #fdf4e3; /* Light orange background for the whole page */
19
  margin: 0;
20
  padding: 0;
21
  }
22
 
23
+ /* Light Orange Background for the back-side */
24
+ .background {
25
+ padding: 8vw 0;
26
+ position: relative;
27
+ }
28
+
29
+ /* Green Back Button styling */
30
+ .back-button {
31
+ position: absolute;
32
+ top: 15px;
33
+ left: 15px;
34
+ display: inline-block;
35
+ background-color: green; /* Green color */
36
+ color: white;
37
+ padding: 10px 20px;
38
+ text-decoration: none;
39
+ font-weight: bold;
40
+ border-radius: 4px;
41
+ z-index: 10; /* Ensure it stays above other content */
42
+ }
43
+
44
+ .back-button:hover {
45
+ background-color: darkgreen; /* Darker green color on hover */
46
+ }
47
+
48
+ /* Container */
49
  .container {
50
+ width: 85%; /* Decreased width for smaller template size */
51
+ max-width: 450px; /* Reduced max-width */
52
+ margin: 30px auto 0; /* Added margin-top to push content down */
53
+ padding: 15px;
54
+ background-color: white;
55
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
56
  border-radius: 8px;
57
  }
58
 
59
  .order-item {
60
+ padding: 12px;
61
+ border: 1px solid #6c757d;
62
+ margin-bottom: 12px;
63
  border-radius: 5px;
64
  }
65
 
66
  .order-details {
67
+ font-size: 14px;
68
  font-weight: bold;
69
+ color: black;
70
  }
71
 
72
  .order-details p {
73
+ margin: 4px 0;
74
  }
75
 
76
  .order-date-time {
77
+ font-size: 11px;
78
+ color: black;
79
  }
80
 
81
  .order-price {
82
+ font-size: 13px;
83
  font-weight: bold;
84
+ color: black;
85
+ margin: 5px 0;
86
  }
87
 
 
 
 
 
 
 
 
 
 
88
  .order-status {
89
+ font-size: 11px;
90
  font-weight: bold;
91
+ margin-top: 6px;
92
+ }
93
+
94
+ .order-status.pending {
95
+ color: green;
96
+ }
97
+
98
+ .order-status.completed {
99
+ color: #28a745;
100
  }
101
 
102
  .order-buttons {
103
+ margin-top: 6px;
104
  }
105
 
106
  .reorder-btn, .rate-order-btn {
107
  background-color: #ff7f00;
108
  color: white;
109
  border: none;
110
+ padding: 6px 12px;
111
+ margin-right: 8px;
112
  cursor: pointer;
113
  border-radius: 4px;
114
  }
 
118
  }
119
 
120
  .total-price {
121
+ font-size: 14px;
122
  font-weight: bold;
123
  color: #333;
124
+ margin-top: 15px;
125
  }
126
 
127
  .order-heading {
128
+ font-size: 16px;
129
  font-weight: bold;
130
+ color: #ff7f00;
131
+ margin-bottom: 15px;
132
  text-align: center;
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  .show-more-btn {
136
  background-color: #ff7f00;
137
  color: white;
 
140
  cursor: pointer;
141
  border-radius: 4px;
142
  margin-top: 20px;
143
+ font-weight: bold;
144
  }
145
 
146
  .show-more-btn:hover {
147
  background-color: #f55b00;
148
  }
149
 
150
+ /* Responsive design adjustments */
151
+ @media (max-width: 480px) {
152
+ .container {
153
+ width: 90%;
154
+ margin: 30px auto 0;
155
+ padding: 10px;
156
+ }
157
+
158
+ .order-details {
159
+ font-size: 12px;
160
  }
161
+
162
+ .order-price {
163
+ font-size: 12px;
164
+ }
165
+
166
+ .order-status {
167
+ font-size: 10px;
168
+ }
169
+
170
  .order-heading {
171
+ font-size: 14px;
172
+ }
173
+
174
+ .show-more-btn {
175
+ padding: 6px 12px;
176
+ }
177
+
178
+ .back-button {
179
+ top: 10px;
180
+ left: 10px;
181
+ padding: 8px 16px;
182
  }
183
  }
184
+
185
  </style>
186
  </head>
187
  <body>
188
 
189
+ <!-- Background container with light orange -->
190
+ <div class="background">
191
+ <a href="{{ url_for('menu') }}" class="back-button"><i class="fa fa-arrow-left"></i></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
 
193
+ <div class="container">
194
+ <div class="order-heading">Order History</div>
 
 
 
 
195
 
196
+ <!-- Loop through the orders (first 3) -->
197
+ {% for order in orders[:3] %}
 
198
  <div class="order-item">
 
199
  <div class="order-details">
200
  <p>{{ order.formatted_items }}</p>
201
  </div>
202
 
 
203
  <div class="order-date-time">
204
+ <p>{{ order.formatted_date }}</p>
205
  </div>
206
 
 
207
  <div class="order-price">
208
  <p>Total: ₹{{ order.Total_Bill__c }}</p>
209
  </div>
210
 
211
+ <div class="order-status {% if order.order_status == 'Pending' %}pending{% else %}completed{% endif %}">
212
+ <p>Status: {{ order.order_status }}</p>
213
+ </div>
 
214
  </div>
215
  {% endfor %}
 
216
 
217
+ <!-- Loop through the remaining orders (hidden initially) -->
218
+ <div class="more-orders" id="more-orders">
219
+ {% for order in orders[3:] %}
220
+ <div class="order-item">
221
+ <div class="order-details">
222
+ <p>{{ order.formatted_items }}</p>
223
+ </div>
224
+
225
+ <div class="order-date-time">
226
+ <p>Order Placed: {{ order.formatted_date }}</p>
227
+ </div>
228
+
229
+ <div class="order-price">
230
+ <p>Total: ₹{{ order.Total_Bill__c }}</p>
231
+ </div>
232
+
233
+ <div class="order-status {% if order.order_status == 'Pending' %}pending{% else %}completed{% endif %}">
234
+ <p>Status: {{ order.order_status }}</p>
235
+ </div>
236
+ </div>
237
+ {% endfor %}
238
+ </div>
239
+
240
+ <!-- Show More button -->
241
+ {% if orders|length > 3 %}
242
+ <button class="show-more-btn" onclick="toggleOrders()">Show More</button>
243
+ {% endif %}
244
 
245
+ <!-- If no orders exist -->
246
+ {% if not orders %}
247
+ <div class="no-orders">
248
+ <p>No orders found.</p>
249
+ </div>
250
+ {% endif %}
251
  </div>
 
252
  </div>
253
 
254
  <script>
 
256
  function toggleOrders() {
257
  const moreOrders = document.getElementById("more-orders");
258
  const button = document.querySelector(".show-more-btn");
 
259
  if (moreOrders.style.display === "none") {
260
  moreOrders.style.display = "block";
261
  button.innerHTML = "Show Less"; // Change button text
 
268
 
269
  </body>
270
  </html>
271
+ apps-fileview.texmex_20250227.00_p1
272
+ order history code.txt
273
+ Displaying order history code.txt.