diff --git a/src/main/resources/templates/user/viewhistory.html b/src/main/resources/templates/user/viewhistory.html
index 078dbb47..3223d607 100644
--- a/src/main/resources/templates/user/viewhistory.html
+++ b/src/main/resources/templates/user/viewhistory.html
@@ -769,11 +769,19 @@
+
+
- View
+ th:onclick="showBookingDetails([[${booking.booking_id}]])">View-->
+
+ View
+
+
+
+
+
@@ -1832,9 +1853,14 @@
function downloadAcknowledgment(event) {
event.preventDefault();
var bookingId = document.getElementById("booking_id").innerHTML;
+ var refId = document.getElementById("modalRefId").value;
// Redirect to the acknowledgment URL in the same tab
- window.location.href = '/communityhall/user/acknowledgement?bookingId=' + encodeURIComponent(bookingId);
+ window.location.href = '/communityhall/user/acknowledgement?bookingId=' + encodeURIComponent(bookingId);
+ // var refId = document.getElementById("ref_" + bookingId).value;
+ console.log("Ref ID: " + refId);
+
+ window.location.href = '/communityhall/user/acknowledgement?ref_id=' + encodeURIComponent(refId);
}
function getTimeSlot(slotValue) {
@@ -1850,7 +1876,8 @@
return timeSlot;
}
- function showBookingDetails(bookingId) {
+ // function showBookingDetails(bookingId) {
+ function showBookingDetails(bookingId, refId) {
$.ajax({
url: '/communityhall/user/api/viewAllBookingDetails',
method: 'GET',
@@ -2011,6 +2038,8 @@
document.getElementById("refundamountDetails").style.display = "none";
}
// Show the modal
+ document.getElementById("modalBookingId").value = bookingId;
+ document.getElementById("modalRefId").value = refId;
$('#showBookingDetails').modal('show');
},
error: function () {
|