diff --git a/ReportingServices.UI/Views/ProductionReport/HoldLotReport.cshtml b/ReportingServices.UI/Views/ProductionReport/HoldLotReport.cshtml
index 4e8f651..3866cdb 100644
--- a/ReportingServices.UI/Views/ProductionReport/HoldLotReport.cshtml
+++ b/ReportingServices.UI/Views/ProductionReport/HoldLotReport.cshtml
@@ -16,15 +16,15 @@
Hold Lots
-
+
- WO |
- RDS |
- Reactor |
- Hold Time |
- Hold User |
- Hold Reason |
+ WO |
+ RDS |
+ Reactor |
+ Hold Time |
+ Hold User |
+ Hold Reason |
diff --git a/ReportingServices.UI/wwwroot/Assets/SLLTools.json b/ReportingServices.UI/wwwroot/Assets/SLLTools.json
index 79d6877..32ade46 100644
--- a/ReportingServices.UI/wwwroot/Assets/SLLTools.json
+++ b/ReportingServices.UI/wwwroot/Assets/SLLTools.json
@@ -1 +1 @@
-[{"Date":"2023-01-09T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-10T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-11T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-12T00:00:00-07:00","ASM":7,"HTR":16},{"Date":"2023-01-13T00:00:00-07:00","ASM":7,"HTR":15},{"Date":"2023-01-14T00:00:00-07:00","ASM":8,"HTR":15},{"Date":"2023-01-15T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-17T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-18T00:00:00-07:00","ASM":9,"HTR":15}]
\ No newline at end of file
+[{"Date":"2023-01-09T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-10T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-11T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-12T00:00:00-07:00","ASM":7,"HTR":16},{"Date":"2023-01-13T00:00:00-07:00","ASM":7,"HTR":15},{"Date":"2023-01-14T00:00:00-07:00","ASM":8,"HTR":15},{"Date":"2023-01-15T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-17T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-18T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-19T00:00:00-07:00","ASM":9,"HTR":15}]
\ No newline at end of file
diff --git a/ReportingServices.UI/wwwroot/js/site.js b/ReportingServices.UI/wwwroot/js/site.js
index 9812d07..812789a 100644
--- a/ReportingServices.UI/wwwroot/js/site.js
+++ b/ReportingServices.UI/wwwroot/js/site.js
@@ -157,4 +157,68 @@ function toggleWeek() {
for (let i = 0; i < rptTableDiv.length; i++) {
rptTableDiv[i].classList.toggle("hidden");
}
-}
\ No newline at end of file
+}
+
+function sortTable(n) {
+ var table, rows, switching, i, x, y, shouldSwitch, dir, switchCount = 0;
+ table = document.getElementById("sortTable");
+ switching = true;
+ dir = "asc";
+
+ while (switching) {
+ switching = false;
+ rows = table.rows;
+
+ for (i = 1; i < rows.length - 1; i++) {
+ shouldSwitch = false;
+ x = rows[i].getElementsByTagName("td")[n];
+ y = rows[i + 1].getElementsByTagName("td")[n];
+
+ if (compareStrings(n == 3, dir, x.innerHTML.toLowerCase(), y.innerHTML.toLowerCase())) {
+ shouldSwitch = true;
+ break;
+ }
+ }
+
+ if (shouldSwitch) {
+ rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);
+ switching = true;
+ switchCount++;
+ } else {
+ if (switchCount == 0 && dir == "asc") {
+ dir = "desc";
+ switching = true;
+ }
+ }
+ }
+
+ icon = document.getElementById("i-" + n);
+
+ icon.classList.toggle("fa-arrow-down")
+ icon.classList.toggle("fa-arrow-up")
+}
+
+function compareStrings(isDate, dir, string1, string2) {
+ if (isDate) {
+ var date1 = new Date(string1);
+ var date2 = new Date(string2);
+
+ console.log(date1);
+ console.log(date2);
+
+ if (dir == "asc" && date1 > date2)
+ return true;
+
+ if (dir == "desc" && date1 < date2)
+ return true;
+ }
+ else {
+ if (dir == "asc" && string1 > string2)
+ return true;
+
+ if (dir == "desc" && string1 < string2)
+ return true;
+ }
+
+ return false;
+}