Yaswanth56 commited on
Commit
37c5a45
·
verified ·
1 Parent(s): 85fd734

Update templates/rewards.html

Browse files
Files changed (1) hide show
  1. 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>Rewards</title>
7
  <link rel="stylesheet" href="/static/styles.css">
8
  </head>
9
  <body>
10
-
11
- <div class="rewards-container">
12
- <h1>Your Reward Points</h1>
13
- <p>You have <strong>{{ points }}</strong> reward points.</p>
14
- <a href="/apply_rewards" class="apply-rewards-link">Apply Rewards</a>
 
 
 
 
 
 
 
 
 
 
 
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>