@ -420,6 +420,7 @@
overflow-y: auto;
/* Enable vertical scrolling if needed */
}
body {
font-family: Arial, sans-serif;
}
@ -682,6 +683,16 @@
th:onclick="cancelBooking([[${booking.booking_id}]], [[${booking.mobile_no}]], [[${booking.booking_type}]])">Cancel
Booking< / span >
< / a >
<!-- <a class="reschedule - button"
th:if="${booking.booking_status == 'WAITING_FOR_NOC' and booking.schedule_count < 1 } " >
< !– th:if="${booking.booking_status == 'WAITING_FOR_NOC'}">– >
< span class = "badge bg-danger"
style="cursor: pointer;"
th:onclick="openRescheduleModal([[${booking.booking_id}]], [[${booking.start_date}]], [[${booking.end_date}]],[[${booking.no_of_days}]],
[[${booking.hall_details_hall_id}]],[[${booking.starting_slot}]],[[${booking.ending_slot}]],[[${booking.reason}]])">Reschedule
Booking< / span >
< / a > -->
< / p >
< p th:case = "'waitingfornocapproval'" >
@ -731,6 +742,15 @@
[[${booking.hall_details_hall_id}]],[[${booking.starting_slot}]],[[${booking.ending_slot}]],[[${booking.reason}]])">Reschedule
Booking< / span >
< / a >
< a class = "reschedule-button"
th:if="${booking.booking_status == 'WAITING_FOR_NOC'}">
< span class = "badge bg-danger"
style="cursor: pointer;"
th:onclick="openRescheduleModal([[${booking.booking_id}]], [[${booking.start_date}]], [[${booking.end_date}]],[[${booking.no_of_days}]],
[[${booking.hall_details_hall_id}]],[[${booking.starting_slot}]],[[${booking.ending_slot}]],[[${booking.reason}]])">Reschedule
Booking< / span >
< / a >
< / p >
< / td >
@ -784,25 +804,29 @@
< tr >
< th colspan = "10"
style="background-color: lightgrey;">
User Details< / th >
User Details
< / th >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
User Name:< / th >
User Name:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_userName">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
Mobile Number:< / th >
Mobile Number:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_mobileNumber">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
User Type:< / th >
User Type:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_usertype">< / td >
@ -811,7 +835,8 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
User Address:< / th >
User Address:
< / th >
< td colspan = "5" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;text-wrap: pretty;"
id="td_useraddress">< / td >
@ -823,13 +848,15 @@
< tr >
< th colspan = "10"
style="background-color: lightgrey;">
Hall Details< / th >
Hall Details
< / th >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
Hall Name:< / th >
Hall Name:
< / th >
< td colspan = "10" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;text-wrap:pretty;"
id="td_hallName">< / td >
@ -837,7 +864,8 @@
< / tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
Hall Address:< / th >
Hall Address:
< / th >
< td colspan = "10" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;text-wrap: pretty;"
id="td_halladdress">< / td >
@ -846,13 +874,15 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
Caretaker Name:< / th >
Caretaker Name:
< / th >
< td colspan = "2" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_caretakername">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
Caretaker Mobile Number:< / th >
Caretaker Mobile Number:
< / th >
< td colspan = "2" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_caretakermobileNumber">< / td >
@ -864,18 +894,21 @@
Booking
Details (Booking Id:-< span
id="booking_id"
style="color:blue">< / span > )< / th >
style="color:blue">< / span > )
< / th >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Booking Date:< / th >
Booking Date:
< / th >
< td colspan = "2" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_bookingDate">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Deposit Amount (in Rs):< / th >
Deposit Amount (in Rs):
< / th >
< td colspan = "2"
class="fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem;"
@ -884,13 +917,15 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Start Date:< / th >
Start Date:
< / th >
< td colspan = "2" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_startDate">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Hall Amount (in Rs):< / th >
Hall Amount (in Rs):
< / th >
< td colspan = "2"
class="fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem;"
@ -899,13 +934,15 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
END Date:< / th >
END Date:
< / th >
< td colspan = "2" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_endDate">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
GST @18% (in Rs):< / th >
GST @18% (in Rs):
< / th >
< td colspan = "2"
class="fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem;"
@ -914,13 +951,15 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Starting Slot:< / th >
Starting Slot:
< / th >
< td colspan = "2" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_startingSlot">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Total Amount (in Rs):< / th >
Total Amount (in Rs):
< / th >
< td colspan = "2"
class="fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem;"
@ -929,7 +968,8 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Ending Slot:< / th >
Ending Slot:
< / th >
< td colspan = "2" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_endingSlot">< / td >
@ -951,7 +991,8 @@
< tr >
< th style = "display:none;padding: 0.45rem 0.45rem;border:none"
id="rejectionreasondiv">Rejection
Reason:< / th >
Reason:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;text-wrap: pretty;"
id="reasonforrejection">< / td >
@ -971,12 +1012,14 @@
< tr >
< th colspan = "10"
style="background-color: lightgrey;">
Booking Payment Details< / th >
Booking Payment Details
< / th >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
Transaction ID:< / th >
Transaction ID:
< / th >
< td colspan = "10" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_transactionId">< / td >
@ -984,7 +1027,8 @@
< / tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
Amount Received (in Rs):< / th >
Amount Received (in Rs):
< / th >
< td colspan = "10" class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_payamountReceived">< / td >
@ -993,7 +1037,8 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;">
Transaction Status:< / th >
Transaction Status:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_paymentStatus">< / td >
@ -1009,18 +1054,21 @@
< tr >
< th colspan = "4"
style="background-color: lightgrey;">EB
Details< / th >
Details
< / th >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Consumer Number:< / th >
Consumer Number:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_EBNumber">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
EB Amount Per Unit (in Rs):< / th >
EB Amount Per Unit (in Rs):
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_ebamountperunit">< / td >
@ -1028,13 +1076,15 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Start Reading:< / th >
Start Reading:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_startingReading">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Unit Consumed:< / th >
Unit Consumed:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_usedunit">< / td >
@ -1042,13 +1092,15 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
END Reading:< / th >
END Reading:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_endingReading">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
EB Amount (in Rs):< / th >
EB Amount (in Rs):
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_electricityamount">< / td >
@ -1069,20 +1121,24 @@
< tr >
< th colspan = "2"
style="background-color: lightgrey;">
Amount to be Refunded (in Rs) < / th >
Amount to be Refunded (in Rs)
< / th >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Deposit Amount:< / th >
Deposit Amount:
< / th >
< td class = "fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem;"
id="td_depositeamountforrefund">0< / td >
id="td_depositeamountforrefund">0
< / td >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
EB Amount:< / th >
EB Amount:
< / th >
< td class = "fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem;"
id="td_ebAmount">< / td >
@ -1090,7 +1146,8 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Damage Amount:< / th >
Damage Amount:
< / th >
< td class = "fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem;"
id="td_damage">< / td >
@ -1098,26 +1155,33 @@
< tr id = "pendingcolumn" >
< th id = "th_settel_label"
style="padding: 0.45rem 0.45rem; background-color: #f2f2f2;font-weight: normal">
Collection Pending Amount:< / th >
Collection Pending Amount:
< / th >
< td class = "fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem; color: green;"
id="td_pending_amt">0< / td >
id="td_pending_amt">0
< / td >
< / tr >
< tr id = "collectionstatuscolumn" >
< th id = "label"
style="padding: 0.45rem 0.45rem;font-weight: normal">Collection Pending Status
:< / th >
style="padding: 0.45rem 0.45rem;font-weight: normal">
Collection Pending Status
:
< / th >
< td class = "fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem; color: green;" id="td_collection_status">
style="padding: 0.45rem 0.45rem; color: green;"
id="td_collection_status">
< / td >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem; background-color: #f2f2f2;font-weight: normal">
Actual refundable Amount:< / th >
Actual refundable Amount:
< / th >
< td class = "fw-semibold amount-cell"
style="padding: 0.45rem 0.45rem; color: green;"
id="td_settel_amt">0< / td >
id="td_settel_amt">0
< / td >
< / tr >
< / table >
< / div >
@ -1130,18 +1194,21 @@
< tr >
< th colspan = "4"
style="background-color: lightgrey;">
Refund Details< / th >
Refund Details
< / th >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Booking Status:< / th >
Booking Status:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_bookingStatus">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Refund Status:< / th >
Refund Status:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_refundStatus">< / td >
@ -1149,7 +1216,8 @@
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;text-wrap: pretty;">
Refund amount:< / th >
Refund amount:
< / th >
< td class = "fw-semibold" colspan = "5"
style="padding: 0.45rem 0.45rem;"
id="td_refundamount">< / td >
@ -1172,6 +1240,46 @@
< h1 id = "blockedrefundText"
style="font-size: 17px;margin-left: 20px;color: darkgreen;">
< / h1 >
< / div >
<!-- Newly added for Reschedule Details -->
< div class = "row col-md-12 col-lg-12 col-sm-12"
id="rescheduleDetails"
style="display:none;margin-left: 0px;margin-top: -49px">
< div class = "card-body" >
< table >
< tr >
< th colspan = "4"
style="background-color: lightgrey;">
Reschedule Details
< / th >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Event Start Date:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_res_start_date">< / td >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal">
Event End Date:
< / th >
< td class = "fw-semibold"
style="padding: 0.45rem 0.45rem;"
id="td_res_end_date">< / td >
< / tr >
< tr >
< th
style="padding: 0.45rem 0.45rem;font-weight: normal;text-wrap: pretty;">
Rescheduled Date:< / th >
< td class = "fw-semibold" colspan = "5"
style="padding: 0.45rem 0.45rem;"
id="td_res_date">< / td >
< / tr >
< / tbody >
< / table >
< / div >
< / div >
< / div >
@ -1181,11 +1289,13 @@
< button class = "btn btn-success"
onclick="downloadAcknowledgment(event)"
style="background: #FB6340;">View
Aknowledgement< / button >
Acknowledgement
< / button >
< button type = "button"
style="background-color: rgb(21,69,93);color: white;"
class="btn btn-sm btn-alt-secondary"
data-bs-dismiss="modal">Close< / button >
data-bs-dismiss="modal">Close
< / button >
< / div >
< / form >
< / div >
@ -1213,7 +1323,8 @@
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary"
data-bs-dismiss="modal">Close< / button >
data-bs-dismiss="modal">Close
< / button >
< / div >
< / div >
< / div >
@ -1372,7 +1483,8 @@
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary"
data-bs-dismiss="modal">Close< / button >
data-bs-dismiss="modal">Close
< / button >
< button type = "button" class = "btn btn-primary" id = "submitNocButton" > Submit< / button >
< / div >
< / div >
@ -1430,7 +1542,8 @@
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary"
data-bs-dismiss="modal">Close< / button >
data-bs-dismiss="modal">Close
< / button >
< / div >
< / div >
< / div >
@ -1531,7 +1644,6 @@
});
// Function to track booking
function trackBooking(bookingId) {
$.ajax({
@ -1704,6 +1816,7 @@
document.getElementById("td_endDate").innerHTML = response.endDate;
document.getElementById("booking_id").innerHTML = response.bookingId;
function getTimeSlot(slotValue) {
var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
@ -1785,8 +1898,7 @@
document.getElementById("td_refundStatus").innerHTML = response.refundStatus;
} else if (response.bookingStatus === 'REJECTED' & & ['WAITING', 'APPROVED', 'INITIATED'].includes(response.refundStatus) & & response.amountReceived == 0) {
document.getElementById("refundamountDetails").style.display = "none";
}
else if (response.bookingStatus === 'REJECTED' & & ['WAITING', 'APPROVED', 'INITIATED'].includes(response.refundStatus)) {
} else if (response.bookingStatus === 'REJECTED' & & ['WAITING', 'APPROVED', 'INITIATED'].includes(response.refundStatus)) {
document.getElementById("td_refundamount").innerHTML = `Your booking has been Rejected by GCC. Full amount of ₹ ${parseFloat(response.amountReceived).toFixed(2)} will be refunded shortly`;
document.getElementById("refundamountDetails").style.display = "block";
document.getElementById("td_bookingStatus").innerHTML = response.bookingStatus;
@ -1811,6 +1923,11 @@
document.getElementById("refundamountDetails").style.display = "block";
document.getElementById("td_bookingStatus").innerHTML = response.bookingStatus;
document.getElementById("td_refundStatus").innerHTML = response.refundStatus;
} else if(response.scheduleCount === 1){
document.getElementById("rescheduleDetails").style.display = "block";
document.getElementById("td_res_start_date").innerHTML = response.startDate;
document.getElementById("td_res_end_date").innerHTML = response.endDate;
document.getElementById("td_res_date").innerHTML = response.updatedDate;
} else {
document.getElementById("refundamountDetails").style.display = "none";
}
@ -1828,10 +1945,19 @@
damageFieldContainer.empty();
// Create a div for table responsiveness
var tableResponsiveDiv = $('< div > ').addClass('table-responsive').css({'margin-top': '-19px', 'margin-left': '19px'});;
var tableResponsiveDiv = $('< div > ').addClass('table-responsive').css({
'margin-top': '-19px',
'margin-left': '19px'
});
;
// Create table with similar classes and styles to the modal table
var table = $('< table > ').addClass('table table-bordered table-striped').css({'width': '97%', 'border-color': 'black', 'border-top-color': 'white', 'width': ' 730px'});
var table = $('< table > ').addClass('table table-bordered table-striped').css({
'width': '97%',
'border-color': 'black',
'border-top-color': 'white',
'width': ' 730px'
});
var thead = $('< thead > ').addClass('thead-light');
var tbody = $('< tbody > ');
@ -1899,15 +2025,16 @@
}
function showDamageImage(damageImageUrl) {
document.getElementById('filePreview').src = damageImageUrl;
$('#fileModal').modal('show');
}
function showchallonimage(challanImgLink) {
document.getElementById('filePreview').src = challanImgLink;
$('#fileModal').modal('show');
}
function showReasonDocuments(list) {
$.ajax({
type: "GET",
@ -1930,7 +2057,10 @@
reasonFieldsContainer.empty();
// Create a responsive table container
var tableResponsiveDiv = $('< div > ').addClass('table-responsive').css({'width': '729px', 'border': '1px solid black'});
var tableResponsiveDiv = $('< div > ').addClass('table-responsive').css({
'width': '729px',
'border': '1px solid black'
});
// Create the table with Bootstrap classes and custom styles
var table = $('< table > ').addClass('table table-bordered table-striped table-vcenter js-dataTable-responsive').css({
@ -1988,6 +2118,7 @@
function showDocumentImage(fileURL) {
openFileModal(fileURL);
}
// Event delegation for dynamically added elements
$(document).on('click', '.view-document', function () {
const fileURL = $(this).data('url');
@ -2042,6 +2173,7 @@
});
}
}
function openRescheduleModal(bookingId, startDate, endDate, noOfDays, hallId, startingSlot, endingSlot, reason) {
// Function to map slot values to their text representation
function getSlotText(slot) {
@ -2455,6 +2587,7 @@
document.getElementById('endDateInput').value = "";
}
}
function datepickerFormat(dateString) {
var dateObject = new Date(dateString);
var year = dateObject.getFullYear();
@ -2462,6 +2595,7 @@
var day = dateObject.getDate().toString().padStart(2, "0");
return `${year}-${month}-${day}`;
}
function printTables() {
// Get the printable content
var printableContent = document.getElementById('printableContent').innerHTML;
@ -2475,6 +2609,7 @@
printWindow.print();
printWindow.close();
}
function Reschedule() {
// Retrieve values from modal inputs
var bookingId = document.getElementById("bookingId").value;
@ -2581,6 +2716,7 @@
$(document).on('change', '.nocfile', function () {
validateFile(this);
});
function transactionHistory(userId) {
$.ajax({
type: "GET",