Skip to content

Commit

Permalink
G2P-753 changed my programs to my applications
Browse files Browse the repository at this point in the history
  • Loading branch information
RamakrishnaVellala committed Jul 26, 2023
1 parent 3e92103 commit 6ad07e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@ headercells.forEach(function (th) {
th.addEventListener("click", function () {
const columnIndex = th.cellIndex;
const rows = Array.from(table.rows).slice(1);
const firstColumn = rows.map((row) => row.cells[0]);
// Determine the data type for this column
if (columnIndex === 0) {
return;
}
rows.forEach((row) => row.removeChild(row.cells[0]));

let dataType = "text";
const firstRow = rows[0];
const firstCell = firstRow.cells[columnIndex];
Expand Down Expand Up @@ -63,9 +59,7 @@ headercells.forEach(function (th) {

return comparison;
});
rows.forEach((row, index) => row.insertBefore(firstColumn[index], row.cells[0]));
sortOrder = sortOrder === "asc" ? "desc" : "asc";

table.tBodies[0].append(...rows);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,6 @@ allheadercells.forEach(function (th) {
let sortOrder = "asc";
th.addEventListener("click", function () {
const columnIndex = th.cellIndex;
const firstColumn = allRows.map((row) => row.cells[0]);

// Skip sorting if it's the first column
if (columnIndex === 0) {
return;
}
allRows.forEach((row) => row.removeChild(row.cells[0]));

allRows.sort(function (a, b) {
const aCellValue = a.cells[columnIndex].innerText;
const bCellValue = b.cells[columnIndex].innerText;
Expand All @@ -130,7 +122,7 @@ allheadercells.forEach(function (th) {
}
return comparison;
});
allRows.forEach((row, index) => row.insertBefore(firstColumn[index], row.cells[0]));

sortOrder = sortOrder === "asc" ? "desc" : "asc";
allRows.forEach(function (row) {
alltable.tBodies[0].appendChild(row);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div> -->
<div class="table-container">
<div class="table-head-container">
<p class="table-title">My Programs</p>
<p class="table-title">My Applications</p>
<form class="form-inline my-2 my-lg-0" action="/selfservice/home">
<div class="search-box">
<svg
Expand Down

0 comments on commit 6ad07e8

Please sign in to comment.