diff --git a/src/main/resources/static/html/admin-access.html b/src/main/resources/static/html/admin-access.html
index 93aa9b4..5f080cd 100644
--- a/src/main/resources/static/html/admin-access.html
+++ b/src/main/resources/static/html/admin-access.html
@@ -39,6 +39,13 @@
Access users
+
+
+
+
diff --git a/src/main/resources/static/html/admin-data.html b/src/main/resources/static/html/admin-data.html
new file mode 100644
index 0000000..02d715d
--- /dev/null
+++ b/src/main/resources/static/html/admin-data.html
@@ -0,0 +1,85 @@
+
+
+
+
+ Admin
+
+
+
+
+
+Access users
+
+
+
+
+
+
+ last login |
+ name |
+ email |
+ encrypt password |
+ block |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/static/js/admin-access.js b/src/main/resources/static/js/admin-access.js
index 1e97867..ebc388e 100644
--- a/src/main/resources/static/js/admin-access.js
+++ b/src/main/resources/static/js/admin-access.js
@@ -92,13 +92,23 @@ async function displayUsers() {
tableBody.innerHTML = '';
const startIndex = (currentPage - 1) * pageSize;
const endIndex = startIndex + pageSize;
+ const displayOption = document.getElementById('displayOption').value;
+
for (let index = startIndex; index < endIndex && index < users.length; index++) {
const user = users[index];
const row = document.createElement('tr');
row.id = `user-${user.id}`;
+
+ let displayValue = "";
+ if (displayOption === "data") {
+ displayValue = user.dateTime;
+ } else if (displayOption === "email") {
+ displayValue = user.memberEmail;
+ }
+
row.innerHTML = `
- ${user.dateTime} |
+ ${displayValue} |
${user.memberName} |
${user.memberEmail} |
${user.memberEncryptedPassword} |
@@ -106,6 +116,22 @@ async function displayUsers() {
tableBody.appendChild(row);
}
}
+function navigateToPage(option) {
+ if (option === "data") {
+ // Navigate to the data page (replace with the actual URL)
+ window.location.href = "./admin-data.html";
+ } else if (option === "email") {
+ // Navigate to the email page (replace with the actual URL)
+ window.location.href = "./admin-access.html";
+ }
+}
+const displayOptionSelection = document.getElementById('displayOption');
+displayOptionSelection.addEventListener('change', () => {
+ const selectedOption = displayOptionSelection.value;
+ navigateToPage(selectedOption);
+});
+
+
async function updatePagination() {
pagination.innerHTML = '';