Update templates/reward_status.html
Browse files- templates/reward_status.html +20 -19
templates/reward_status.html
CHANGED
@@ -133,6 +133,7 @@
|
|
133 |
</head>
|
134 |
<body>
|
135 |
|
|
|
136 |
<div class="container">
|
137 |
<div class="order-confirmed">
|
138 |
<h1>Order Confirmed!</h1>
|
@@ -140,25 +141,24 @@
|
|
140 |
</div>
|
141 |
|
142 |
<div class="reward-status">
|
143 |
-
<!-- First section: Item info -->
|
144 |
-
<div class="item-section">
|
145 |
-
<img class="item-image" src="{{ item.image_url }}" alt="{{ item.name }}" onerror="this.src='/static/placeholder.jpg';">
|
146 |
-
<div class="item-info">
|
147 |
-
<h3>{{ item.name }}</h3>
|
148 |
-
<p>Price: ${{ "%.2f"|format(item.price) }}</p>
|
149 |
-
</div>
|
150 |
-
</div>
|
151 |
-
|
152 |
-
<!-- Second section: Ingredients -->
|
153 |
<div class="item-section">
|
154 |
-
|
155 |
-
{
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
</div>
|
163 |
</div>
|
164 |
</div>
|
@@ -181,6 +181,7 @@
|
|
181 |
</div>
|
182 |
|
183 |
<script>
|
|
|
184 |
function showIngredientDetails(name, image, healthBenefits, funFacts) {
|
185 |
const healthBenefitsList = healthBenefits.split(',');
|
186 |
const funFactsList = funFacts.split(',');
|
@@ -212,4 +213,4 @@
|
|
212 |
</script>
|
213 |
|
214 |
</body>
|
215 |
-
</html>
|
|
|
133 |
</head>
|
134 |
<body>
|
135 |
|
136 |
+
|
137 |
<div class="container">
|
138 |
<div class="order-confirmed">
|
139 |
<h1>Order Confirmed!</h1>
|
|
|
141 |
</div>
|
142 |
|
143 |
<div class="reward-status">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
<div class="item-section">
|
145 |
+
{% for item in order_items %}
|
146 |
+
<img class="item-image" src="{{ item.image_url }}" alt="{{ item.name }}" onerror="this.src='/static/placeholder.jpg';">
|
147 |
+
<div class="item-info">
|
148 |
+
<h3>{{ item.name }}</h3>
|
149 |
+
<p>Price: ${{ "%.2f"|format(item.price) }}</p>
|
150 |
+
</div>
|
151 |
+
|
152 |
+
<!-- Ingredients -->
|
153 |
+
<div class="ingredient-card">
|
154 |
+
{% for ingredient in item.ingredients %}
|
155 |
+
<div class="ingredient" onclick="showIngredientDetails('{{ ingredient.name }}', '{{ ingredient.image }}', '{{ ingredient.health_benefits }}', '{{ ingredient.fun_facts }}')">
|
156 |
+
<img src="{{ ingredient.image }}" alt="{{ ingredient.name }}" onerror="this.src='/static/placeholder.jpg';">
|
157 |
+
<p>{{ ingredient.name }}</p>
|
158 |
+
</div>
|
159 |
+
{% endfor %}
|
160 |
+
</div>
|
161 |
+
{% endfor %}
|
162 |
</div>
|
163 |
</div>
|
164 |
</div>
|
|
|
181 |
</div>
|
182 |
|
183 |
<script>
|
184 |
+
// JavaScript for showing ingredient details in modal
|
185 |
function showIngredientDetails(name, image, healthBenefits, funFacts) {
|
186 |
const healthBenefitsList = healthBenefits.split(',');
|
187 |
const funFactsList = funFacts.split(',');
|
|
|
213 |
</script>
|
214 |
|
215 |
</body>
|
216 |
+
</html>
|