forked from iamsushank/mutual-cart-3380
-
Notifications
You must be signed in to change notification settings - Fork 0
/
team.js
71 lines (55 loc) · 1.89 KB
/
team.js
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
let member_data = JSON.parse(localStorage.getItem("userdata"));
member_data.forEach(element => {
let body = document.querySelector("tbody");
let row = document.createElement("tr");
row.style.fontSize="17px";
let checkbox = document.createElement("td");
let cb = document.createElement("input");
cb.style.type = "checkbox";
cb.setAttribute("class","cb2");
let name = document.createElement("td");
name.innerText = element.name;
let activity = document.createElement("td");
let act = document.createElement("a");
activity.innerText = "View Activity";
activity.style.cursor="pointer";
activity.style.color = "#0368ab";
let email = document.createElement("td");
email.innerText = element.email;
let labor = document.createElement("td");
labor.innerText = element.labor;
let bill = document.createElement("td");
bill.innerText = element.bill;
let role = document.createElement("td");
role.innerText = "Admin";
let status = document.createElement("td");
status.innerText = "pending/completed";
let action = document.createElement("td");
action.innerText = "Delete";
activity.append(act);
row.append(checkbox, name, activity, email, labor, bill, role, status, action);
body.append(row);
});
let userinfoas = JSON.parse(localStorage.getItem("userDetails"));
// setTimeout(() => {
let mainaccordin = document.getElementsByClassName("conBoxes");
for (i = 0; i < mainaccordin.length; i++) {
mainaccordin[i].addEventListener("click", function () {
this.classList.toggle("active");
// this.style.color ="blue"|| "black"
});
}
// }, 2000);
if (userinfoas === null) {
window.location.href = "../signup.html";
} else {
let nameprofile = document.getElementById("name-profile");
nameprofile.innerText = userinfoas["fullname"];
}
let profile = () => {
window.location.href = "../profile.html";
};
let profileSignout = () => {
localStorage.removeItem("userDetails");
window.location.href = "../signup.html";
};