Create rewards.html
Browse files
flask-salesforce-app/templates/rewards.html
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<title>Rewards</title>
|
| 5 |
+
<link rel="stylesheet" href="/static/styles.css">
|
| 6 |
+
</head>
|
| 7 |
+
<body>
|
| 8 |
+
<div class="form-container">
|
| 9 |
+
<h1>Reward Points</h1>
|
| 10 |
+
<p>Available Points: <strong>{{ points }}</strong></p>
|
| 11 |
+
<form action="/apply_rewards" method="POST">
|
| 12 |
+
<input type="hidden" name="customer_id" value="{{ customer_id }}">
|
| 13 |
+
<label for="bill_amount">Enter Bill Amount:</label>
|
| 14 |
+
<input type="number" name="bill_amount" id="bill_amount" required>
|
| 15 |
+
{% if points >= 500 %}
|
| 16 |
+
<label>
|
| 17 |
+
<input type="checkbox" name="apply_rewards"> Apply Rewards
|
| 18 |
+
</label>
|
| 19 |
+
{% else %}
|
| 20 |
+
<p>Discount not applicable for customers with less than 500 points.</p>
|
| 21 |
+
{% endif %}
|
| 22 |
+
<button type="submit">Calculate Bill</button>
|
| 23 |
+
</form>
|
| 24 |
+
</div>
|
| 25 |
+
</body>
|
| 26 |
+
</html>
|