forked from iamsushank/mutual-cart-3380
-
Notifications
You must be signed in to change notification settings - Fork 0
/
myteams.js
59 lines (41 loc) · 1.36 KB
/
myteams.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
let member_data = JSON.parse(localStorage.getItem("userteam"));
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 number = document.createElement("td");
number.innerText = element.number;
let action = document.createElement("td");
action.innerText = "Delete";
row.append(checkbox, name, number, 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";
};