NoLev commited on
Commit
0fcda57
·
verified ·
1 Parent(s): aa21840

Create withdrawals.ejs

Browse files
Files changed (1) hide show
  1. public/admin/withdrawals.ejs +54 -0
public/admin/withdrawals.ejs ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Manage Withdrawals - HYIP Platform</title>
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
8
+ <link rel="stylesheet" href="/css/styles.css">
9
+ </head>
10
+ <body>
11
+ <div class="container mt-5">
12
+ <h2>Manage Withdrawals</h2>
13
+ <a href="/admin/dashboard" class="btn btn-primary mb-3">Back to Dashboard</a>
14
+ <% if (withdrawals.length) { %>
15
+ <table class="table table-striped">
16
+ <thead>
17
+ <tr>
18
+ <th>ID</th>
19
+ <th>User</th>
20
+ <th>Amount</th>
21
+ <th>Status</th>
22
+ <th>Created At</th>
23
+ <th>Actions</th>
24
+ </tr>
25
+ </thead>
26
+ <tbody>
27
+ <% withdrawals.forEach(withdrawal => { %>
28
+ <tr>
29
+ <td><%= withdrawal.id %></td>
30
+ <td><%= withdrawal.username %></td>
31
+ <td>$<%= withdrawal.amount.toFixed(2) %></td>
32
+ <td><%= withdrawal.status %></td>
33
+ <td><%= withdrawal.created_at %></td>
34
+ <td>
35
+ <form action="/admin/withdrawals/<%= withdrawal.id %>/update" method="POST" class="d-inline">
36
+ <input type="hidden" name="status" value="approved">
37
+ <button type="submit" class="btn btn-success btn-sm">Approve</button>
38
+ </form>
39
+ <form action="/admin/withdrawals/<%= withdrawal.id %>/update" method="POST" class="d-inline">
40
+ <input type="hidden" name="status" value="rejected">
41
+ <button type="submit" class="btn btn-danger btn-sm">Reject</button>
42
+ </form>
43
+ </td>
44
+ </tr>
45
+ <% }); %>
46
+ </tbody>
47
+ </table>
48
+ <% } else { %>
49
+ <p>No withdrawals found.</p>
50
+ <% } %>
51
+ </div>
52
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
53
+ </body>
54
+ </html>