diff options
-rw-r--r-- | public/js/reservations.js | 13 | ||||
-rw-r--r-- | resources/views/pages/reservations.blade.php | 1 |
2 files changed, 6 insertions, 8 deletions
diff --git a/public/js/reservations.js b/public/js/reservations.js index 781b835..bc9c6de 100644 --- a/public/js/reservations.js +++ b/public/js/reservations.js @@ -86,8 +86,7 @@ function btnAction(action, btn) { try { // Handle various actions if (response.action == "update") { - //document.getElementById("notice").innerText = "Record #" + actionData.id + " updated."; - console.log('Record #' + actionData.id + ' updated.'); + jQuery('#notice').html("Record #" + actionData.id + " updated."); } else if (response.action == "restore") { trData[1].firstElementChild.checked = response.approved == 1; trData[2].innerText = response.operatorCall; @@ -100,13 +99,11 @@ function btnAction(action, btn) { trData[9].innerText = response.operatorName; trData[10].innerText = response.operatorEmail; trData[11].innerText = response.operatorPhone; - //document.getElementById("notice").innerText = "Record's #" + actionData.id + " data restored."; - //console.log('Record #' + actionData.id + ' data restored.'); + jQuery('#notice').html("Record's #" + actionData.id + " data restored."); } else if (response.action == "delete") { - //document.getElementById("notice").innerText = "Record #" + actionData.id + " deleted."; - //console.log('Record #' + actionData.id + ' deleted.'); + jQuery('#notice').html("Record #" + actionData.id + " deleted."); } else { - //console.log("No action?"); + console.log("No action?"); //console.log(data); } } catch { @@ -115,7 +112,7 @@ function btnAction(action, btn) { } } else { - //console.log('AJAX error'); + console.log('AJAX error'); alert("Bad input data!"); } }); diff --git a/resources/views/pages/reservations.blade.php b/resources/views/pages/reservations.blade.php index 06c0335..addc9a9 100644 --- a/resources/views/pages/reservations.blade.php +++ b/resources/views/pages/reservations.blade.php @@ -19,6 +19,7 @@ @endforeach @endif </select> +<div id="notice" class="float-right font-weight-bold"></div> <div class="table-responsive mt-2"> <table id="ajax-table" class="table table-striped table-bordered" style="white-space:nowrap;"><!-- table-hover --> |