Skip to content

Commit a765d45

Browse files
committed
Admin: Show CreateDate for payments
1 parent e168d3e commit a765d45

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

website/admin.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@
3030
processed_payment_details = "";
3131
for (let i = 0; i < xhr.response["payments"].length; i++) {
3232
payment = xhr.response["payments"][i];
33+
payment_created = payment["date_created"].slice(0, 4) + "-" + payment["date_created"].slice(4, 6) + "-" + payment["date_created"].slice(6, 8) + " " + payment["date_created"].slice(8, 10) + ":" + payment["date_created"].slice(10, 12) + ":" + payment["date_created"].slice(12)
3334
if ("processed" in payment) {
34-
processed_payment_details += `<tr><th scope="row"><a href="details.html?author=${ payment["username"] }">${ payment["username"] }</a></th><th scope="row">${ payment["amount"] }</th><th scope="row">${ payment["title"] }</th><th scope="row"><a href="${ payment["processed"]["order"] }">${ payment["details"] }</a></th></tr>`;
35+
processed_payment_details += `<tr><th scope="row"><a href="details.html?author=${ payment["username"] }">${ payment["username"] }</a></th><th scope="row">${ payment["amount"] }</th><th scope="row">${ payment["title"] }</th><th scope="row"><a href="${ payment["processed"]["order"] }">${ payment["details"] }</a></th><th scope="row">${ payment_created }</th></tr>`;
3536
} else {
36-
payment_details += `<tr><th scope="row"><a href="details.html?author=${ payment["username"] }">${ payment["username"] }</a></th><th scope="row">${ payment["amount"] }</th><th scope="row">${ payment["title"] }</th><th scope="row">${ payment["details"] }</th></tr>`;
37+
payment_details += `<tr><th scope="row"><a href="details.html?author=${ payment["username"] }">${ payment["username"] }</a></th><th scope="row">${ payment["amount"] }</th><th scope="row">${ payment["title"] }</th><th scope="row">${ payment["details"] }</th><th scope="row">${ payment_created }</th></tr>`;
3738
}
3839
}
3940
document.getElementById("outstanding_payments_body").innerHTML += payment_details;
@@ -158,6 +159,7 @@ <h3>Finances</h3>
158159
<th scope="col">Amount</th>
159160
<th scope="col">Title</th>
160161
<th scope="col">Details</th>
162+
<th scope="col">Date Created</th>
161163
</tr>
162164
</thead>
163165
<tbody id="outstanding_payments_body">
@@ -182,6 +184,7 @@ <h3>Finances</h3>
182184
<th scope="col">Amount</th>
183185
<th scope="col">Title</th>
184186
<th scope="col">Details</th>
187+
<th scope="col">Date Created</th>
185188
</tr>
186189
</thead>
187190
<tbody id="processed_payments_body">

website/details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en" data-theme="dark">
33
<head>
44
<meta charset="UTF-8">
55
<title>Moto Payments - Contributor Details</title>

0 commit comments

Comments
 (0)