diff options
author | Mateja <mail@matejamaric.com> | 2020-11-16 23:06:24 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2020-11-16 23:06:24 +0100 |
commit | 306c83a6d6f702ed92ef0a4ffaf7e8afdbaa409f (patch) | |
tree | c173fc95a268d2134239dc0670f0e578fec5f989 | |
parent | 718d0e39f282073ab5f654651aec226448cdb842 (diff) | |
download | yota-laravel-306c83a6d6f702ed92ef0a4ffaf7e8afdbaa409f.tar.gz yota-laravel-306c83a6d6f702ed92ef0a4ffaf7e8afdbaa409f.zip |
Reservations action notice...
-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 --> |