Skip to content

Commit

Permalink
feat: show age data on table
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhatech002 committed Dec 30, 2023
1 parent e2ddcf9 commit 1cb4061
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ <h1 class="md::text-xl text-sm font-bold">EZEmployeeManager</h1>
<th class="table-col-title">Name</th>
<th class="table-col-title">Role</th>
<th class="table-col-title">Gender</th>
<th class="table-col-title">Age</th>
<th class="table-col-title">Email</th>
<th class="table-col-title">phone</th>
<th class="table-col-title">Actions</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function createEmpDataTable(arr) {
const nameEl = document.createElement("th");
const roleEl = document.createElement("td");
const genderEl = document.createElement("td");
const ageEl = document.createElement("td");
const emailEl = document.createElement("td");
const phoneEl = document.createElement("td");
const actionEl = document.createElement("td");
Expand All @@ -87,6 +88,9 @@ function createEmpDataTable(arr) {
genderEl.classList.add("table-col-data");
genderEl.textContent = empData.gender;

ageEl.classList.add("table-col-data");
ageEl.textContent = empData.age;

emailEl.classList.add("table-col-data");
emailEl.textContent = empData.email;

Expand All @@ -104,7 +108,16 @@ function createEmpDataTable(arr) {
});
actionEl.append(deleteBtn);

trEl.append(snoEl, nameEl, roleEl, genderEl, emailEl, phoneEl, actionEl);
trEl.append(
snoEl,
nameEl,
roleEl,
genderEl,
ageEl,
emailEl,
phoneEl,
actionEl
);

finalEmpData.push(trEl);
});
Expand Down

0 comments on commit 1cb4061

Please sign in to comment.