diff --git a/AddHotelpage.html b/AddHotelpage.html index b04cbb8..5499622 100644 --- a/AddHotelpage.html +++ b/AddHotelpage.html @@ -135,7 +135,7 @@
HotelID | diff --git a/controller/HotelDetailsController.js b/controller/HotelDetailsController.js index 84e183e..8b0f94c 100644 --- a/controller/HotelDetailsController.js +++ b/controller/HotelDetailsController.js @@ -5,7 +5,7 @@ //create hotel details object function hotelDetails(){ - + const hotelId = $('#hotel_Id').val(); const hotelName = $('#hotel_Name').val(); const hotelCategory = $('#hotel_Category').val(); @@ -46,6 +46,7 @@ function hotelDetails(){ return hotelDetails; } +//hotel details save event $("#hotel-save-btn").click(function (e) { //get returned hotel Details object @@ -67,4 +68,80 @@ $("#hotel-save-btn").click(function (e) { alert("An error occurred: " + error); } }); +}); + +//get all hotel details +function getAllHotelDetails(){ + $.ajax({ + url: baseURL + "hotel/getAll", + method: "GET", + success: function (response) { + $("#hotel-details-tbl tbody").empty(); + response.forEach(element => { + let rawData = `|||||||||
---|---|---|---|---|---|---|---|---|---|
${element.data.} | +${element.data.} | +${element.data.} | +${element.data.} | +${element.data.} | +${element.data.} | +${element.data.} | +${element.data.} | +${element.data.} | +${element.data.} | +