user settings, users management, project settings, bug fixes

This commit is contained in:
Ivan
2024-01-12 22:05:06 +03:00
parent d0158dad9a
commit 983a579dc8
18 changed files with 2337 additions and 92 deletions

View File

@@ -0,0 +1,36 @@
$(document).ready(function () {
const createTable = () => {
const table = document.getElementById("usersTable");
const tbody = table.querySelector("tbody");
// Очищаем таблицу
tbody.innerHTML = "";
users.forEach((user) => {
const row = document.createElement("tr");
row.setAttribute(
"onclick",
`location.href = '/admin/user/` + user.id + `'`
);
const email = document.createElement("td");
email.textContent = user.email;
row.appendChild(email);
const name = document.createElement("td");
name.textContent = user.name;
row.appendChild(name);
const phone = document.createElement("td");
phone.textContent = user.phone;
row.appendChild(phone);
const projects = document.createElement("td");
projects.textContent = user.projects;
row.appendChild(projects);
tbody.appendChild(row);
});
};
createTable();
});