-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatement.html
More file actions
216 lines (181 loc) · 8.96 KB
/
statement.html
File metadata and controls
216 lines (181 loc) · 8.96 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LUMIEARN - Withdrawal Statement</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"/>
<style>
:root{
--bg:#f5f7fa;
--card:#ffffff;
--sidebar:#ffffff;
--text:#111;
--accent:#00cfc8;
}
body.dark{
--bg:#0a0a0f;
--card:#111118;
--sidebar:#111118;
--text:#fff;
}
*{margin:0;padding:0;box-sizing:border-box;font-family:Inter,sans-serif;}
body{background:var(--bg);color:var(--text);min-height:100vh;display:flex;flex-direction:column;}
/* SIDEBAR */
.sidebar {width:250px;background: var(--sidebar);position: fixed;left:-250px;top:0;height:100%;padding:20px;transition:.3s;z-index:1000;overflow-y:auto;}
.sidebar.active{left:0;}
.sidebar h2{text-align:center;margin-bottom:25px;color:var(--accent);}
.menu-item {display:flex;align-items:center;justify-content:space-between;padding:12px;cursor:pointer;border-radius:0 28px 28px 0;}
.menu-item:hover {background: rgba(0,0,0,.05);}
.menu-left {display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--text);}
.submenu{display:none;flex-direction:column;padding-left:28px;}
.submenu a{text-decoration:none;color:var(--accent);padding:10px 0;font-size:14px;}
.menu-item a.active,.menu-item.open>.menu-left{background: rgba(0,207,200,0.15); color: var(--text); width:100%; margin-left:-12px; margin-right:-12px; padding:12px 20px; min-height:40px; display:flex;align-items:center;gap:10px; border-left:10px solid var(--accent); border-radius:0 20px 20px 0;}
/* HEADER */
.header{display:flex;align-items:center;justify-content:space-between;background:var(--card);padding:12px 16px;border-radius:14px;margin-bottom:25px;box-shadow:0 6px 18px rgba(0,0,0,.08);border-left:4px solid var(--accent);}
.menu-toggle{width:38px;height:38px;border-radius:8px;background:var(--accent);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;}
.menu-toggle span{width:18px;height:2px;background:#000;position:absolute;transition:.3s;}
body.dark .menu-toggle span{background:#fff;}
.menu-toggle span:nth-child(1){top:12px;}
.menu-toggle span:nth-child(2){top:18px;}
.menu-toggle span:nth-child(3){top:24px;}
.menu-toggle.active span:nth-child(1){top:18px;transform:rotate(45deg);}
.menu-toggle.active span:nth-child(2){opacity:0;}
.menu-toggle.active span:nth-child(3){top:18px;transform:rotate(-45deg);}
.mode-btn{background:var(--card);border:none;padding:8px 12px;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
/* BRAND */
.brand {display:flex;align-items:center;font-family:Arial,sans-serif;height:40px;padding-left:46px;}
.brand-name{font-size:25px;font-weight:bold;color:#1e1e1e;line-height:1;}
/* MAIN CONTENT */
.main{padding:20px;margin-left:0;transition:.3s;flex:1;display:flex;flex-direction:column;}
.content-wrapper{width:100%;max-width:1200px;flex:1;display:flex;flex-direction:column;}
/* CARD */
.card {background:#fff;border-radius:18px;box-shadow:0 6px 18px rgba(0,0,0,.08);padding:25px;margin-bottom:30px;display:flex;flex-direction:column;}
.card-header {background: linear-gradient(135deg, #00cfc8, #0077ff); color:#fff; padding:15px 20px; font-size:18px; font-weight:bold; border-radius:12px 12px 0 0;}
.card-body {padding:20px;display:flex;flex-direction:column;flex:1;}
/* SEARCH */
.search-box {display:flex;justify-content:flex-end;margin-bottom:15px;}
.search-box input {width:220px;padding:6px 10px;border:1px solid #cfcfe6;border-radius:4px;font-size:13px;}
/* TABLE */
.table-wrapper {max-height:400px;overflow-x:auto;border:1px solid #cfcfe6;border-radius:8px;}
table {width:100%;border-collapse:collapse;}
thead th {position:sticky;top:0;background:#eaeaff;z-index:2;padding:10px;font-size:14px;}
th, td {border:1px solid #cfcfe6;padding:10px;font-size:14px;text-align:center;white-space:nowrap;}
tbody tr:nth-child(even) {background:#fafafa;}
.status {padding:4px 10px;border-radius:12px;font-size:12px;color:white;display:inline-block;}
.status-approved {background: #2ecc71; font-weight:bold;}
.status-pending {background: #f39c12; font-weight:bold;}
/* PAGINATION */
.pagination {margin-top:15px;text-align:center;display:flex;justify-content:center;gap:10px;align-items:center;font-size:14px;}
.pagination button {padding:6px 12px;border:none;background:var(--accent);color:#fff;border-radius:6px;cursor:pointer;}
.pagination button:disabled{opacity:0.5;cursor:not-allowed;}
/* FOOTER */
footer{background:#f1f1f1;text-align:center;padding:15px;font-size:14px;margin-top:auto;}
</style>
</head>
<body>
<!-- SIDEBAR -->
<div class="sidebar" id="sidebar">
<strong>MENU</strong>
<div class="menu-item">
<a href="dashboard.html" class="menu-left"><i class="fa-solid fa-house"></i><span>Dashboard</span></a>
</div>
</div>
<!-- MAIN CONTENT -->
<div class="main">
<div class="content-wrapper">
<!-- HEADER -->
<div class="header">
<div class="menu-toggle" id="menuToggle"><span></span><span></span><span></span></div>
<div class="brand"><span class="brand-name">LUMIEARN</span></div>
<div style="display:flex;align-items:center;gap:8px;">
<img id="countryFlag" src="" style="width:28px;height:20px;border-radius:4px;">
<button class="mode-btn" id="modeBtn"><i class="fa-solid fa-moon"></i></button>
<img id="dashboardAvatar" src="https://i.pravatar.cc/150?u=user" style="width:38px;height:38px;border-radius:50%;border:2px solid var(--accent);">
</div>
</div>
<!-- WITHDRAWAL CARD -->
<div class="card">
<div class="card-header">WITHDRAWAL STATEMENT</div>
<div class="card-body">
<div class="search-box">
<input type="text" id="searchInput" placeholder="Search by status, date or time...">
</div>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Requested</th>
<th>Fee</th>
<th>Final Received</th>
<th>Status</th>
<th>Date</th>
<th>Time</th>
</tr>
</thead>
<tbody id="statementTable"></tbody>
</table>
</div>
<p style="margin-top:15px;"><strong>Total Withdrawn:</strong> <span id="totalWithdrawn">0</span></p>
</div>
</div>
</div>
</div>
<!-- FOOTER -->
<footer>
Copyright © 2026 <strong>LUMIEARN</strong>. Designed with ❤️ by <strong>BestChoice Management</strong>. All rights reserved.
</footer>
<script>
document.addEventListener("DOMContentLoaded",()=>{
const username = localStorage.getItem("LUMIEARN_LOGGED_IN");
if(!username){ alert("Not logged in"); location.href="login.html"; }
const currencyCode = (JSON.parse(localStorage.getItem("LUMIEARN_USER_"+username.toLowerCase()))||{}).currency || 'USD';
let withdrawals = JSON.parse(localStorage.getItem(`pending_${username}`)) || [];
const statementTable = document.getElementById('statementTable');
const totalWithdrawedElem = document.getElementById('totalWithdrawn');
let filteredWithdrawals = [...withdrawals];
function renderTable() {
statementTable.innerHTML = '';
let total = 0;
filteredWithdrawals.forEach(w=>{
if(w.status==='approved') total += w.final;
const date = new Date(w.timestamp);
const dateStr = date.toLocaleDateString();
const timeStr = date.toLocaleTimeString();
const tr = document.createElement('tr');
tr.innerHTML = `
<td>${currencyCode} ${w.amount.toLocaleString()}</td>
<td>${currencyCode} ${w.fee.toLocaleString()}</td>
<td>${currencyCode} ${w.final.toLocaleString()}</td>
<td><span class="status status-${w.status}">${w.status}</span></td>
<td>${dateStr}</td>
<td>${timeStr}</td>
`;
statementTable.appendChild(tr);
});
totalWithdrawedElem.textContent = `${currencyCode} ${total.toLocaleString()}`;
}
renderTable();
document.getElementById('searchInput').addEventListener('input', (e) => {
const query = e.target.value.toLowerCase();
filteredWithdrawals = withdrawals.filter(w => {
const date = new Date(w.timestamp);
const dateStr = date.toLocaleDateString().toLowerCase();
const timeStr = date.toLocaleTimeString().toLowerCase();
return w.status.toLowerCase().includes(query) || dateStr.includes(query) || timeStr.includes(query);
});
renderTable();
});
// Sidebar toggle
const menuToggle = document.getElementById("menuToggle");
const sidebar = document.getElementById("sidebar");
menuToggle.onclick = ()=>{sidebar.classList.toggle("active");menuToggle.classList.toggle("active");};
document.addEventListener("click", e => {if(!sidebar.contains(e.target) && !menuToggle.contains(e.target)){sidebar.classList.remove("active");menuToggle.classList.remove("active");}});
// Dark mode
const modeBtn = document.getElementById("modeBtn");
modeBtn.onclick = ()=>{document.body.classList.toggle("dark");};
});
</script>
</body>
</html>