Spaces:
Sleeping
Sleeping
Update templates/rewards.html
Browse files- templates/rewards.html +17 -7
templates/rewards.html
CHANGED
@@ -3,16 +3,26 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>
|
7 |
<link rel="stylesheet" href="/static/styles.css">
|
8 |
</head>
|
9 |
<body>
|
10 |
-
|
11 |
-
|
12 |
-
<
|
13 |
-
<
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
</div>
|
16 |
-
|
17 |
</body>
|
18 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Reward Points</title>
|
7 |
<link rel="stylesheet" href="/static/styles.css">
|
8 |
</head>
|
9 |
<body>
|
10 |
+
<div class="form-container">
|
11 |
+
<h1>Reward Points</h1>
|
12 |
+
<p>Available Points: <strong>{{ points }}</strong></p>
|
13 |
+
<form action="/apply_rewards" method="POST">
|
14 |
+
<input type="hidden" name="customer_id" value="{{ customer_id }}">
|
15 |
+
<label for="bill_amount">Enter Bill Amount</label>
|
16 |
+
<input type="number" id="bill_amount" name="bill_amount" placeholder="Enter Bill Amount" required>
|
17 |
+
{% if points >= 500 %}
|
18 |
+
<label>
|
19 |
+
<input type="checkbox" name="apply_rewards"> Apply Reward Points
|
20 |
+
</label>
|
21 |
+
{% else %}
|
22 |
+
<p>Discount not applicable for customers with below 500 points.</p>
|
23 |
+
{% endif %}
|
24 |
+
<button type="submit" class="btn">Calculate Bill</button>
|
25 |
+
</form>
|
26 |
</div>
|
|
|
27 |
</body>
|
28 |
</html>
|