From 267e7fe25e79d2b17e1eee53eb2ca5a4b4b34525 Mon Sep 17 00:00:00 2001 From: Praveenkumartvmalai <122305176+Praveenkumartvmalai@users.noreply.github.com> Date: Mon, 15 Sep 2025 11:12:27 +0530 Subject: [PATCH] Scheduler refund amount code disabled and right click disabled and coniditon added in 3rd step of hall booking form --- .../scheduler/PaymentStatusScheduler.java | 24 +- .../service/Impl/BookingServiceImpl.java | 12 +- .../templates/user/hallbookingform.html | 4174 ++++++++-------- .../resources/templates/user/viewhistory.html | 4367 +++++++++-------- 4 files changed, 4554 insertions(+), 4023 deletions(-) diff --git a/src/main/java/com/gcc/communityHall/paymentService/scheduler/PaymentStatusScheduler.java b/src/main/java/com/gcc/communityHall/paymentService/scheduler/PaymentStatusScheduler.java index a60be615..b624c65a 100644 --- a/src/main/java/com/gcc/communityHall/paymentService/scheduler/PaymentStatusScheduler.java +++ b/src/main/java/com/gcc/communityHall/paymentService/scheduler/PaymentStatusScheduler.java @@ -328,21 +328,21 @@ public class PaymentStatusScheduler { } //need to be commented - @Transactional - public void intiateRefund(int bookingId, int userId) throws Exception { - List bc = calendarService.getCalendarByBookingId(bookingId); - if (bc != null && bc.isEmpty()) { - String s = paymentGatewayServiceImpl.refundTheAmount(bookingId, userId); - if (s.equals("Refunded")) { - bookingService.updateRefundStatus(bookingId, BookingDetails.RefundStatus.COMPLETED); - } + // @Transactional + // public void intiateRefund(int bookingId, int userId) throws Exception { + // List bc = calendarService.getCalendarByBookingId(bookingId); + // if (bc != null && bc.isEmpty()) { + // String s = paymentGatewayServiceImpl.refundTheAmount(bookingId, userId); + // if (s.equals("Refunded")) { + // bookingService.updateRefundStatus(bookingId, BookingDetails.RefundStatus.COMPLETED); + // } - } else { - bookingService.updateRefundStatus(bookingId, BookingDetails.RefundStatus.FAILURE); - } + // } else { + // bookingService.updateRefundStatus(bookingId, BookingDetails.RefundStatus.FAILURE); + // } - } + // } } diff --git a/src/main/java/com/gcc/communityHall/service/Impl/BookingServiceImpl.java b/src/main/java/com/gcc/communityHall/service/Impl/BookingServiceImpl.java index c5c785f8..f06bceff 100644 --- a/src/main/java/com/gcc/communityHall/service/Impl/BookingServiceImpl.java +++ b/src/main/java/com/gcc/communityHall/service/Impl/BookingServiceImpl.java @@ -626,6 +626,7 @@ public class BookingServiceImpl implements BookingService { @Override public Map saveBookingDetails(Map formData) { Map hs = new HashMap<>(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); BookingDetails bookingDetails = null; Integer userId = userSession.getUserId(); @@ -659,6 +660,16 @@ public class BookingServiceImpl implements BookingService { bookingDetails.setHallDetails(hallDetails); String startDate = formData.get("startDate").toString(); + + LocalDate startD = LocalDate.parse(startDate, formatter); + LocalDate today = LocalDate.now(); + LocalDate sixMonthsLater = today.plusMonths(6); + + if (startD.isBefore(today)) { + return Collections.singletonMap("status", "pastdate"); + } else if (startD.isAfter(sixMonthsLater)) { + return Collections.singletonMap("status", "futuredate"); + } String endDate = formData.get("endDate").toString(); String relation = formData.get("relation").toString(); double days = Double.parseDouble(formData.get("days").toString()); @@ -852,7 +863,6 @@ public class BookingServiceImpl implements BookingService { int i = 0; String startDateStr = bookingDetails.getStartDate(); String endDateStr = bookingDetails.getEndDate(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); LocalDate start = LocalDate.parse(startDateStr, formatter); LocalDate end = LocalDate.parse(endDateStr, formatter); int hallId = bookingDetails.getHallDetails().getHallId(); diff --git a/src/main/resources/templates/user/hallbookingform.html b/src/main/resources/templates/user/hallbookingform.html index 1e6cbd69..f0cb219b 100644 --- a/src/main/resources/templates/user/hallbookingform.html +++ b/src/main/resources/templates/user/hallbookingform.html @@ -930,6 +930,7 @@ bottom: 0; opacity: 0; } + to { bottom: 30px; opacity: 1; @@ -941,6 +942,7 @@ bottom: 30px; opacity: 1; } + to { bottom: 0; opacity: 0; @@ -957,309 +959,356 @@ color: white; } + + /* css fror toast */ + /* Toast styling */ + #toast { + visibility: hidden; + min-width: 200px; + margin-left: -100px; + background: #333; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 10px; + position: fixed; + z-index: 9999; + left: 50%; + bottom: 30px; + font-size: 14px; + } + + #toast.show { + visibility: visible; + animation: fadein 0.5s, fadeout 0.5s 2s; + } + + @keyframes fadein { + from { + bottom: 10px; + opacity: 0; + } + + to { + bottom: 30px; + opacity: 1; + } + } + + @keyframes fadeout { + from { + bottom: 30px; + opacity: 1; + } + + to { + bottom: 10px; + opacity: 0; + } + } - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- -
-
- -
- - + +
+
- -
-
-
- - - -
-
- - -
-
-
-
+ + + +
+ +
+
+
+ + + +
+
+ + +
+
+
+
+
-
-
-
1
-
2
-
3
-
4
-
-
- -
-
Step:1
-
- -
-
- - - +
+
Step:1
+
+ +
+
+ + + + + +
-
-
- - - -
-

Step 4

-
-
- Logo -
- Payment Details for Confirmation - - - Payment Closes in 15:00 - - -
-
-
- - - - - - - - -
Full Name: - - - Mobile Number: - User Type: - -
-
-
-
+ +
+

Step 4

+
+
+ Logo +
+ Payment Details for Confirmation + + + + Payment Closes in 15:00 + + +
+
+
+ class="table table-bordered center-table table-align"> - - - - - - - - - - - - - - - - - - - - - - - - -
- -
+ + + + +
Hall - Name: - -
No. of - Days: - -
Start - Date: - -
End - Date: -
Starting Slot & - Ending Slot: - -
Uploaded - Documents: - -
- -
-
Full Name: + + + Mobile Number: + User Type: + +
-
- +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Reason for - Booking: - -
Hall - Amount: - Rs -
- Discount: - 0% -
Net - Amount: - Rs -
GST - Amount:Rs
Deposit - Amount:Rs -
Total - Amount: - Rs -
+ + + Hall + Name: + + + + + + No. of + Days: + + + + + + Start + Date: + + + + + + End + Date: + + + + + Starting Slot & + Ending Slot: + + + + + + Uploaded + Documents: + + +
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Reason for + Booking: + +
Hall + Amount: + Rs +
+ Discount: + 0% +
Net + Amount: + Rs +
GST + Amount:Rs
Deposit + Amount:Rs +
Total + Amount: + Rs +
+
-
-
-
- - + Previous + +
-
-
+
-
+
-
-
- - -
-
- - - - - - - + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/user/viewhistory.html b/src/main/resources/templates/user/viewhistory.html index f3e3a76c..078dbb47 100644 --- a/src/main/resources/templates/user/viewhistory.html +++ b/src/main/resources/templates/user/viewhistory.html @@ -504,187 +504,202 @@ cursor: pointer; } + .otp-input-box { + display: flex; + justify-content: center; + gap: 10px; + margin: 20px 0; + } + + .otp-input-box .otp-input { + width: 40px; + height: 40px; + text-align: center; + font-size: 16px; + border: 1px solid #ccc; + border-radius: 5px; + } - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- - -
-
- - - - -
- -
-
-
- - -
-
- - -
- -
-
+
+
+
\ No newline at end of file