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 /public/js/reservations.js | |
parent | 718d0e39f282073ab5f654651aec226448cdb842 (diff) | |
download | yota-laravel-306c83a6d6f702ed92ef0a4ffaf7e8afdbaa409f.tar.gz yota-laravel-306c83a6d6f702ed92ef0a4ffaf7e8afdbaa409f.zip |
Reservations action notice...
Diffstat (limited to 'public/js/reservations.js')
-rw-r--r-- | public/js/reservations.js | 13 |
1 files changed, 5 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!"); } }); |