hyip / public /admin /profile-updates.ejs
NoLev's picture
Create profile-updates.ejs
ac0e6f3 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Profile Updates - HYIP Platform</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/css/styles.css">
</head>
<body>
<div class="container mt-5">
<h2>Pending Profile Updates</h2>
<a href="/admin/dashboard" class="btn btn-primary mb-3">Back to Dashboard</a>
<% if (updates.length) { %>
<table class="table table-striped">
<thead>
<tr>
<th>User</th>
<th>Username</th>
<th>Email</th>
<th>Full Name</th>
<th>Date of Birth</th>
<th>Address</th>
<th>Country</th>
<th>Zip Code</th>
<th>Phone Number</th>
<th>Submitted</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<% updates.forEach(update => { %>
<tr>
<td><%= update.current_username %></td>
<td><%= update.username %></td>
<td><%= update.email %></td>
<td><%= update.full_name %></td>
<td><%= update.dob %></td>
<td><%= update.address %></td>
<td><%= update.country %></td>
<td><%= update.zip_code %></td>
<td><%= update.phone_number %></td>
<td><%= update.created_at %></td>
<td>
<form action="/admin/profile-updates/<%= update.id %>/update" method="POST" class="d-inline">
<input type="hidden" name="status" value="approved">
<button type="submit" class="btn btn-success btn-sm">Approve</button>
</form>
<form action="/admin/profile-updates/<%= update.id %>/update" method="POST" class="d-inline">
<input type="hidden" name="status" value="rejected">
<button type="submit" class="btn btn-danger btn-sm">Reject</button>
</form>
</td>
</tr>
<% }); %>
</tbody>
</table>
<% } else { %>
<p>No pending profile updates.</p>
<% } %>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="/js/scripts.js"></script>
</body>
</html>