user settings, users management, project settings, bug fixes
This commit is contained in:
36
static/scripts/users-table.js
Normal file
36
static/scripts/users-table.js
Normal 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();
|
||||
});
|
||||
Reference in New Issue
Block a user