Remove error message display
This commit is contained in:
parent
efa342dc7f
commit
5d12cb64e4
3 changed files with 3 additions and 10 deletions
|
@ -1,8 +1,3 @@
|
|||
function displayErrorMessage(errorMessage) {
|
||||
const errorReport = document.querySelector("#errorReport");
|
||||
errorReport.innerHTML = JSON.parse(errorMessage).error;
|
||||
}
|
||||
|
||||
function postToLoginEndpoint(event) {
|
||||
event.preventDefault();
|
||||
|
||||
|
@ -30,7 +25,6 @@ function postToLoginEndpoint(event) {
|
|||
console.error("LOGIN FAILURE!");
|
||||
console.error("Server status: " + this.status);
|
||||
console.error("Server response:\n" + this.response);
|
||||
displayErrorMessage(this.response);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -224,7 +224,7 @@ function displayListOfReports(parsedData) {
|
|||
for (let i = 0; i < reports.length; i++) {
|
||||
let title = reports[i].title;
|
||||
let dateCreated = new Date(reports[i].date_created).toLocaleDateString("en-US");
|
||||
let submitted = reports[i].submitted;
|
||||
let state = reports[i].submitted;
|
||||
let dateSubmitted;
|
||||
let rid = reports[i].report_pk;
|
||||
|
||||
|
@ -233,7 +233,7 @@ function displayListOfReports(parsedData) {
|
|||
bodyRow.insertCell(1).innerHTML = dateCreated;
|
||||
|
||||
let stateCell = bodyRow.insertCell(2);
|
||||
stateCell.innerHTML = submitted;
|
||||
stateCell.innerHTML = state;
|
||||
stateCell.classList.add("d-none", "d-lg-table-cell"); // Column visible only on large displays
|
||||
|
||||
// Create edit/view button
|
||||
|
@ -242,7 +242,7 @@ function displayListOfReports(parsedData) {
|
|||
actionButton.setAttribute("data-rid", rid);
|
||||
actionButton.classList.add("btn");
|
||||
|
||||
if (submitted === false) {
|
||||
if (state === false) {
|
||||
// Edit button
|
||||
dateSubmitted = "TBD";
|
||||
actionButton.classList.add("btn-primary", "edit-report-button"); // Add event listener class
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="errorReport"><p>
|
||||
<script src="js/login.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue