File size: 2,642 Bytes
dfb3c8a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Order History</title>
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f8f9fa;
        }
        .container {
            max-width: 800px;
            margin: 40px auto;
            background-color: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        .order-item {
            border: 1px solid #ddd;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            background-color: #fffaf0;
        }
        .order-title {
            font-size: 1.2rem;
            font-weight: bold;
            color: #c04e01;
        }
        .order-details {
            font-size: 0.9rem;
            color: #6c757d;
        }
        .total-bill {
            font-weight: bold;
            color: #2b9348;
        }
        .back-btn {
            display: block;
            width: 100%;
            margin-top: 20px;
            padding: 10px;
            background-color: #007bff;
            color: white;
            text-align: center;
            border-radius: 5px;
            text-decoration: none;
            font-weight: bold;
        }
        .back-btn:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>

    <div class="container">
        <h3 class="text-center">Your Order History</h3>

        {% if orders %}
            {% for order in orders %}
            <div class="order-item">
                <div class="order-title">Order #{{ order.Id }}</div>
                <p class="order-details"><strong>Status:</strong> {{ order.Order_Status__c }}</p>
                <p class="order-details"><strong>Total Amount:</strong> ${{ order.Total_Amount__c }}</p>
                <p class="order-details"><strong>Discount:</strong> ${{ order.Discount__c }}</p>
                <p class="total-bill"><strong>Total Bill:</strong> ${{ order.Total_Bill__c }}</p>
                <p class="order-details"><strong>Order Details:</strong> <br> {{ order.Order_Details__c.replace("\n", "<br>") | safe }}</p>
            </div>
            {% endfor %}
        {% else %}
            <p class="text-center">No orders found.</p>
        {% endif %}

        <a href="/menu" class="back-btn">Back to Menu</a>
    </div>

</body>
</html>