1 | <!DOCTYPE html>
|
---|
2 | <html xmlns:th="http://www.thymeleaf.org">
|
---|
3 | <head>
|
---|
4 | <title>Transaction History - Golden Bank</title>
|
---|
5 | <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
---|
6 | <style>
|
---|
7 | body {
|
---|
8 | font-family: 'Arial', sans-serif;
|
---|
9 | background: #07aa70;
|
---|
10 | color: #ffffff;
|
---|
11 | margin: 0;
|
---|
12 | padding: 0;
|
---|
13 | height: 100vh;
|
---|
14 | display: flex;
|
---|
15 | justify-content: center;
|
---|
16 | align-items: flex-start;
|
---|
17 | flex-direction: column;
|
---|
18 | padding-top: 80px;
|
---|
19 | }
|
---|
20 |
|
---|
21 | .navbar-custom {
|
---|
22 | background-color: rgba(0, 0, 0, 0.7);
|
---|
23 | position: fixed;
|
---|
24 | top: 0;
|
---|
25 | width: 100%;
|
---|
26 | z-index: 1000;
|
---|
27 | }
|
---|
28 |
|
---|
29 | .navbar-custom a {
|
---|
30 | color: #ffffff !important;
|
---|
31 | }
|
---|
32 |
|
---|
33 | .navbar-custom .navbar-brand {
|
---|
34 | font-weight: bold;
|
---|
35 | }
|
---|
36 |
|
---|
37 | .container {
|
---|
38 | max-width: 1000px;
|
---|
39 | margin-top: 120px;
|
---|
40 | text-align: center;
|
---|
41 | }
|
---|
42 |
|
---|
43 | h2 {
|
---|
44 | margin-bottom: 20px;
|
---|
45 | }
|
---|
46 |
|
---|
47 | .table-custom {
|
---|
48 | background-color: rgba(0, 0, 0, 0.8);
|
---|
49 | padding: 20px;
|
---|
50 | border-radius: 10px;
|
---|
51 | box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
|
---|
52 | max-height: 70vh;
|
---|
53 | overflow-y: auto;
|
---|
54 | }
|
---|
55 |
|
---|
56 | .table-striped tbody tr:nth-of-type(odd) {
|
---|
57 | background-color: rgba(255, 255, 255, 0.1);
|
---|
58 | }
|
---|
59 |
|
---|
60 | .table-striped td, .table-striped th {
|
---|
61 | color: #ffffff;
|
---|
62 | font-weight: bold;
|
---|
63 | padding: 15px;
|
---|
64 | border-bottom: 1px solid #ffd700;
|
---|
65 | }
|
---|
66 |
|
---|
67 | .table-striped th {
|
---|
68 | background-color: rgba(255, 215, 0, 0.2);
|
---|
69 | }
|
---|
70 |
|
---|
71 | .text-success {
|
---|
72 | color: #28a745 !important;
|
---|
73 | }
|
---|
74 |
|
---|
75 | .text-danger {
|
---|
76 | color: #dc3545 !important;
|
---|
77 | }
|
---|
78 |
|
---|
79 | .custom-link {
|
---|
80 | color: #ffd700;
|
---|
81 | text-decoration: none;
|
---|
82 | font-weight: bold;
|
---|
83 | }
|
---|
84 |
|
---|
85 | .custom-link:hover {
|
---|
86 | color: #ffecb3;
|
---|
87 | text-decoration: underline;
|
---|
88 | }
|
---|
89 | </style>
|
---|
90 | </head>
|
---|
91 | <body>
|
---|
92 | <nav class="navbar navbar-expand-lg navbar-custom">
|
---|
93 | <a class="navbar-brand" href="#">Golden Bank</a>
|
---|
94 | <ul class="navbar-nav ml-auto">
|
---|
95 | <li class="nav-item"><a class="nav-link" href="/dashboard">Dashboard</a></li>
|
---|
96 | <li class="nav-item"><a class="nav-link" href="/transactions">Transactions</a></li>
|
---|
97 | <li class="nav-item"><a class="nav-link" href="/logout">Logout</a></li>
|
---|
98 | </ul>
|
---|
99 | </nav>
|
---|
100 |
|
---|
101 | <div class="container">
|
---|
102 | <h2 class="text-center">Transaction History</h2>
|
---|
103 | <div class="table-responsive table-custom">
|
---|
104 | <table class="table table-striped">
|
---|
105 | <thead>
|
---|
106 | <tr>
|
---|
107 | <th>ID</th>
|
---|
108 | <th>Type</th>
|
---|
109 | <th>Amount</th>
|
---|
110 | <th>Date</th>
|
---|
111 | </tr>
|
---|
112 | </thead>
|
---|
113 | <tbody>
|
---|
114 | <tr th:each="transaction : ${transactions}">
|
---|
115 | <td th:text="${transaction.id}"></td>
|
---|
116 | <td th:text="${transaction.type}"></td>
|
---|
117 | <td th:text="${transaction.amount}"
|
---|
118 | th:classappend="${transaction.type.contains('Transfer In') || transaction.type == 'Deposit'} ? 'text-success' : 'text-danger'">
|
---|
119 | <span th:text="${transaction.type.contains('Transfer In') || transaction.type == 'Deposit'} ? '+$' + transaction.amount : '-$' + transaction.amount"></span>
|
---|
120 | </td>
|
---|
121 | <td th:text="${transaction.timestamp}"></td>
|
---|
122 | </tr>
|
---|
123 | </tbody>
|
---|
124 | </table>
|
---|
125 | </div>
|
---|
126 | <br>
|
---|
127 | <br>
|
---|
128 | <p class="text-center"><a href="/dashboard" class="custom-link">Back to Dashboard</a></p>
|
---|
129 | </div>
|
---|
130 |
|
---|
131 | </body>
|
---|
132 | </html>
|
---|