Browse Source

Counter login and Unique Id added

master
kanimozhi 2 years ago
parent
commit
b204e1e691
  1. 17
      src/main/java/com/gcc/communityHall/controller/CareTakerAPIController.java
  2. 224
      src/main/java/com/gcc/communityHall/controller/CounterController.java
  3. 8
      src/main/java/com/gcc/communityHall/controller/UserAPIController.java
  4. 18
      src/main/java/com/gcc/communityHall/controller/UserController.java
  5. 2
      src/main/java/com/gcc/communityHall/entity/BookingCalendar.java
  6. 10
      src/main/java/com/gcc/communityHall/entity/BookingDetails.java
  7. 18
      src/main/java/com/gcc/communityHall/others/UserSession.java
  8. 23
      src/main/java/com/gcc/communityHall/paymentService/controller/PaymentController.java
  9. 2
      src/main/java/com/gcc/communityHall/paymentService/repository/TransactionResponseRepository.java
  10. 7
      src/main/java/com/gcc/communityHall/paymentService/scheduler/PaymentStatusScheduler.java
  11. 2
      src/main/java/com/gcc/communityHall/repository/BookingDetailsRepository.java
  12. 3
      src/main/java/com/gcc/communityHall/repository/LoginRepository.java
  13. 7
      src/main/java/com/gcc/communityHall/service/Impl/BookingServiceImpl.java
  14. 200
      src/main/java/com/gcc/communityHall/service/Impl/CounterServiceImpl.java
  15. 2
      src/main/resources/templates/admin/adminpage.html
  16. 2
      src/main/resources/templates/admin/booking-list.html
  17. 2
      src/main/resources/templates/admin/caretakerpage.html
  18. 2
      src/main/resources/templates/admin/developer.html
  19. 4
      src/main/resources/templates/admin/gccblocking.html
  20. 2
      src/main/resources/templates/admin/halldetailslist.html
  21. 4
      src/main/resources/templates/admin/ongoingevents.html
  22. 20
      src/main/resources/templates/admin/refund-failedlist.html
  23. 2
      src/main/resources/templates/admin/rejected-list.html
  24. 6
      src/main/resources/templates/admin/reports.html
  25. 20
      src/main/resources/templates/admin/settlement-approved.html
  26. 2
      src/main/resources/templates/admin/settlement-completed.html
  27. 2
      src/main/resources/templates/admin/settlement-initiate.html
  28. 20
      src/main/resources/templates/admin/settlement-list.html
  29. 8
      src/main/resources/templates/admin/settlement-reject.html
  30. 2
      src/main/resources/templates/admin/settlementlist.html
  31. 8
      src/main/resources/templates/admin/viewUploadNoc.html
  32. 2
      src/main/resources/templates/caretaker/caretakerpage.html
  33. 2
      src/main/resources/templates/caretaker/past-booking.html
  34. 2
      src/main/resources/templates/caretaker/present-booking.html
  35. 2
      src/main/resources/templates/caretaker/settlementlist.html
  36. 2
      src/main/resources/templates/counter/calculate-hall-amount.html
  37. 779
      src/main/resources/templates/counter/counter-booking.html
  38. 6
      src/main/resources/templates/counter/refund-initialisation.html
  39. 24
      src/main/resources/templates/counter/viewhistory.html
  40. 8
      src/main/resources/templates/departments/counsellor/dashboard.html
  41. 2
      src/main/resources/templates/departments/counsellor/user-pending.html
  42. 2
      src/main/resources/templates/departments/gccstaff/user-approved.html
  43. 6
      src/main/resources/templates/departments/gccstaff/user-pending.html
  44. 2
      src/main/resources/templates/departments/gccstaff/user-reject.html
  45. 6
      src/main/resources/templates/departments/pensioner/user-pending.html
  46. 2
      src/main/resources/templates/departments/pensioner/user-reject.html
  47. 16
      src/main/resources/templates/fragments/PaymentScript.html
  48. 4
      src/main/resources/templates/fragments/head.html
  49. 124
      src/main/resources/templates/fragments/header-counter.html
  50. 2266
      src/main/resources/templates/fragments/logRegiOtpScript.html
  51. 2
      src/main/resources/templates/fragments/loginhead.html
  52. 858
      src/main/resources/templates/fragments/loginreg.html
  53. 2
      src/main/resources/templates/fragments/loginscript.html
  54. 8
      src/main/resources/templates/fragments/menuCounter.html
  55. 5
      src/main/resources/templates/fragments/nav-user.html
  56. 198
      src/main/resources/templates/fragments/nav-usermenu.html
  57. 10
      src/main/resources/templates/fragments/script.html
  58. 2
      src/main/resources/templates/headquarters/booking-list.html
  59. 4
      src/main/resources/templates/headquarters/bookingwaiting.html
  60. 6
      src/main/resources/templates/headquarters/dashboard.html
  61. 4
      src/main/resources/templates/headquarters/gccblocking.html
  62. 2
      src/main/resources/templates/headquarters/headquarterspage.html
  63. 20
      src/main/resources/templates/headquarters/refund-failedlist.html
  64. 2
      src/main/resources/templates/headquarters/rejected-list.html
  65. 6
      src/main/resources/templates/headquarters/reports.html
  66. 20
      src/main/resources/templates/headquarters/settlement-approved.html
  67. 2
      src/main/resources/templates/headquarters/settlement-completed.html
  68. 2
      src/main/resources/templates/headquarters/settlement-initiate.html
  69. 20
      src/main/resources/templates/headquarters/settlement-list.html
  70. 8
      src/main/resources/templates/headquarters/settlement-reject.html
  71. 2
      src/main/resources/templates/headquarters/settlementlist.html
  72. 2
      src/main/resources/templates/headquarters/user-approved.html
  73. 2
      src/main/resources/templates/headquarters/user-reject.html
  74. 8
      src/main/resources/templates/headquarters/viewUploadNoc.html
  75. 4
      src/main/resources/templates/officer/officer-dashboard.html
  76. 20
      src/main/resources/templates/officer/refund-failedlist.html
  77. 2
      src/main/resources/templates/officer/settlement-completed.html
  78. 20
      src/main/resources/templates/officer/settlement-list.html
  79. 8
      src/main/resources/templates/officer/settlement-reject.html
  80. 17
      src/main/resources/templates/officiallogin.html
  81. 2
      src/main/resources/templates/user/PaymentResponse.html
  82. 4
      src/main/resources/templates/user/acknowledgement.html
  83. 2
      src/main/resources/templates/user/calculatehallamount.html
  84. 6
      src/main/resources/templates/user/communityHallList.html
  85. 30
      src/main/resources/templates/user/dashboard.html
  86. 4
      src/main/resources/templates/user/extraebdamageamountack.html
  87. 3335
      src/main/resources/templates/user/hallbookingform.html
  88. 8
      src/main/resources/templates/user/viewhallform.html
  89. 20
      src/main/resources/templates/user/viewhistory.html

17
src/main/java/com/gcc/communityHall/controller/CareTakerAPIController.java

@ -4,8 +4,11 @@ import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import com.gcc.communityHall.others.UserSession;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
@ -55,6 +58,9 @@ import lombok.AllArgsConstructor;
@Validated @Validated
public class CareTakerAPIController { public class CareTakerAPIController {
@Autowired
private UserSession userSession;
@Autowired @Autowired
private BookingService bookingService; private BookingService bookingService;
@ -199,6 +205,7 @@ public class CareTakerAPIController {
@RequestParam String pin, HttpSession session) { @RequestParam String pin, HttpSession session) {
try { try {
// System.out.println("careTaker API Controller\nCounter Id: "+userSession.getCounter()+"\nCounter Name: "+userSession.getCounterName());
// Fetch login details from the repository // Fetch login details from the repository
Login login = loginrepo.findByMobileNoAndPin(Long.parseLong(mobileNo), pin); Login login = loginrepo.findByMobileNoAndPin(Long.parseLong(mobileNo), pin);
if (login != null) { if (login != null) {
@ -230,7 +237,15 @@ public class CareTakerAPIController {
logs.setLoginId(login.getId()); logs.setLoginId(login.getId());
logs.setIpaddress(inetAddress.getHostAddress()); logs.setIpaddress(inetAddress.getHostAddress());
logs.setSystemName(hostname); logs.setSystemName(hostname);
applicationLogsRepository.save(logs);
applicationLogsRepository.save(logs);
userSession.setCounter(login.getEmployeeId());
userSession.setCounterName(login.getName());
Map<String, Object> response = new HashMap<>();
response.put("userType", login.getUserType());
response.put("counterName", login.getName()); // Send Counter Name
response.put("token", token);
// Write the token to a file // Write the token to a file
try (FileWriter fileWriter = new FileWriter("jwtToken.txt")) { try (FileWriter fileWriter = new FileWriter("jwtToken.txt")) {

224
src/main/java/com/gcc/communityHall/controller/CounterController.java

@ -1,10 +1,19 @@
package com.gcc.communityHall.controller; package com.gcc.communityHall.controller;
import java.io.FileWriter;
import java.io.IOException;
import java.net.InetAddress;
import java.time.LocalDate;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.gcc.communityHall.component.JwtUtil;
import com.gcc.communityHall.dto.ErrorResponseDto;
import com.gcc.communityHall.entity.*;
import com.gcc.communityHall.repository.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
@ -16,15 +25,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.gcc.communityHall.entity.BookingDetails;
import com.gcc.communityHall.entity.BookingDetails.BookingStatus; import com.gcc.communityHall.entity.BookingDetails.BookingStatus;
import com.gcc.communityHall.entity.CounterDetails;
import com.gcc.communityHall.entity.CounterRefundList;
import com.gcc.communityHall.entity.Users;
import com.gcc.communityHall.others.UserSession; import com.gcc.communityHall.others.UserSession;
import com.gcc.communityHall.repository.BookingDetailsRepository;
import com.gcc.communityHall.repository.CounterDetailsRepository;
import com.gcc.communityHall.repository.CounterRefundListRepository;
import com.gcc.communityHall.service.BookingService; import com.gcc.communityHall.service.BookingService;
import com.gcc.communityHall.service.CounterService; import com.gcc.communityHall.service.CounterService;
import com.gcc.communityHall.service.UserService; import com.gcc.communityHall.service.UserService;
@ -32,47 +34,57 @@ import com.gcc.communityHall.service.UserService;
import jakarta.servlet.http.HttpSession; import jakarta.servlet.http.HttpSession;
@Controller @Controller
@RequestMapping("/counter")
@RequestMapping("/communityhall/counter")
public class CounterController { public class CounterController {
@Autowired
private UserSession userSession;
@Autowired
private CounterDetailsRepository counterRepo;
@Autowired
private CounterService counterservice;
@Autowired
private BookingService bookser;
@Autowired
private UserService userService;
@Autowired
private BookingDetailsRepository bookingDetailsRepository;
@Autowired
private CounterRefundListRepository counterRefundRepository;
@GetMapping(value = {"","/","/counterbooking"})
public String viewcounter(Model model,HttpSession session) {
@Autowired
private UserSession userSession;
@Autowired
private CounterDetailsRepository counterRepo;
@Autowired
private CounterService counterservice;
@Autowired
private BookingService bookser;
@Autowired
private UserService userService;
@Autowired
private BookingDetailsRepository bookingDetailsRepository;
@Autowired
private CounterRefundListRepository counterRefundRepository;
@Autowired
private LoginRepository loginRepository;
@Autowired
private JwtUtil jwtUtil;
@Autowired
private ApplicationLogsRepository applicationLogsRepository;
@GetMapping(value = {"", "/", "/counterbooking"})
public String viewcounter(Model model, HttpSession session) {
System.out.println("viewcounter"); System.out.println("viewcounter");
String countername=(String) session.getAttribute("usertype");
model.addAttribute("countername", countername);
String countername = (String) session.getAttribute("usertype");
System.out.println("serverDate....."+ LocalDate.now().toString());
model.addAttribute("serverDate", LocalDate.now().toString()); //for server date
model.addAttribute("countername", countername);
return "counter/counter-booking"; return "counter/counter-booking";
} }
@GetMapping("/counterdetailslist") @GetMapping("/counterdetailslist")
public String viewcounterlist(Model model,HttpSession session) {
List<CounterDetails> counterlist= counterRepo.findAll();
String countername=(String) session.getAttribute("usertype");
model.addAttribute("countername", countername);
model.addAttribute("counterlist", counterlist);
return "counter/counter-list";
public String viewcounterlist(Model model, HttpSession session) {
List<CounterDetails> counterlist = counterRepo.findAll();
String countername = (String) session.getAttribute("usertype");
model.addAttribute("countername", countername);
model.addAttribute("counterlist", counterlist);
return "counter/counter-list";
} }
@PostMapping("/saveDDdetails") @PostMapping("/saveDDdetails")
public String saveDD( public String saveDD(
@RequestParam String bankName, @RequestParam String bankName,
@ -83,7 +95,7 @@ public class CounterController {
@RequestParam int bookingId) { @RequestParam int bookingId) {
// Call the service method and pass the bookingId along with other parameters // Call the service method and pass the bookingId along with other parameters
String confirmBooking = bookser.confirmBooking(bookingId); String confirmBooking = bookser.confirmBooking(bookingId);
BookingDetails booking=new BookingDetails();
BookingDetails booking = new BookingDetails();
booking.setBookingStatus(BookingStatus.APPROVED); booking.setBookingStatus(BookingStatus.APPROVED);
if (confirmBooking.equals("Booking confirmed successfully")) { if (confirmBooking.equals("Booking confirmed successfully")) {
// Perform additional actions if needed // Perform additional actions if needed
@ -92,35 +104,125 @@ public class CounterController {
counterservice.saveCounterDetails(bankName, bankAccNo, ddNumber, amountReceived, counterddphoto, bookingId); counterservice.saveCounterDetails(bankName, bankAccNo, ddNumber, amountReceived, counterddphoto, bookingId);
return "redirect:/counter/counterdetailslist"; return "redirect:/counter/counterdetailslist";
} }
@GetMapping("/bookinglist") @GetMapping("/bookinglist")
public String viewbookingpage(Model model,HttpSession session)
{
List<Map<String, Object>> bookinglists= bookser.getOfflineBookings();
model.addAttribute("bookinglist",bookinglists);
String countername=(String) session.getAttribute("usertype");
model.addAttribute("countername", countername);
return "counter/viewhistory";
public String viewbookingpage(Model model, HttpSession session) {
List<Map<String, Object>> bookinglists = bookser.getOfflineBookings();
model.addAttribute("bookinglist", bookinglists);
String countername = (String) session.getAttribute("usertype");
model.addAttribute("countername", countername);
return "counter/viewhistory";
} }
@GetMapping("/refundinitialisation") @GetMapping("/refundinitialisation")
public String viewrefund(Model model,HttpSession session) {
public String viewrefund(Model model, HttpSession session) {
List<CounterRefundList> counterRefundLists = counterRefundRepository.findAll(); List<CounterRefundList> counterRefundLists = counterRefundRepository.findAll();
model.addAttribute("counterRefundLists", counterRefundLists); model.addAttribute("counterRefundLists", counterRefundLists);
String countername=(String) session.getAttribute("usertype");
model.addAttribute("countername", countername);
String countername = (String) session.getAttribute("usertype");
model.addAttribute("countername", countername);
return "counter/refund-initialisation"; return "counter/refund-initialisation";
} }
@GetMapping("/calculateamount") @GetMapping("/calculateamount")
public String viewCalculate(Model model){
public String viewCalculate(Model model) {
return "counter/calculate-hall-amount"; return "counter/calculate-hall-amount";
} }
@GetMapping("/logout") @GetMapping("/logout")
public String viewLogout(Model model,HttpSession session) {
session.invalidate();
return "redirect:/communityhall/login";
public String viewLogout(Model model, HttpSession session) {
session.invalidate();
userSession.setUserId(null);
userSession.setMobileno(null);
userSession.setUserType(null);
userSession.setDispayName(null);
userSession.setCounter(null);
userSession.setCounterName(null);
// return "redirect:/communityhall/login";
return "redirect:/communityhall/user/dashboard";
}
// newly added for counter login
@GetMapping("/verifyLogin")
public ResponseEntity<?> verifyLogin(
@RequestParam("username") String username,
@RequestParam("password") String password,
Model model, HttpSession session) {
System.out.println("username: "+username+"\n"+"password: "+password);
try {
Login login = loginRepository.findByUsernameAndPass(username, password);
System.out.println("counter controller\nCounter Id: "+userSession.getCounter()+"\nCounter Name: "+userSession.getCounterName());
if (login != null) {
// System.out.println("Login successful for mobile number: " + mobileNo);
// Generate JWT token if login is successful
String token = jwtUtil.generateToken(
login.getUserType(),
login.getHallId(),
login.getMobileNumber(),
login.getEmployeeId(),
login.getZone()
);
//System.out.println("Generated JWT Token: " + token);
// Store JWT token and user information in session
session.setAttribute("jwtToken", token);
session.setAttribute("id", login.getId());
session.setAttribute("hall_id", login.getHallId());
session.setAttribute("mobileno", login.getMobileNumber());
session.setAttribute("usertype", login.getUserType());
session.setAttribute("employeeId", login.getEmployeeId());
session.setAttribute("zone", login.getZone());
session.setAttribute("counterName", login.getName());
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
InetAddress inetAddress = InetAddress.getLocalHost();
String hostname = InetAddress.getLocalHost().getHostName();
System.out.println("Hostname: " + hostname);
ApplicationLogs logs = new ApplicationLogs();
logs.setComments("login as " + login.getName());
logs.setLoginId(login.getId());
logs.setIpaddress(inetAddress.getHostAddress());
logs.setSystemName(hostname);
applicationLogsRepository.save(logs);
userSession.setCounter(login.getEmployeeId());
userSession.setCounterName(login.getName());
Map<String, Object> response = new HashMap<>();
response.put("userType", login.getUserType());
response.put("counterName", login.getName()); // Send Counter Name
response.put("token", token);
// Write the token to a file
try (FileWriter fileWriter = new FileWriter("jwtToken.txt")) {
fileWriter.write(token);
} catch (IOException e) {
e.printStackTrace();
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Failed to store token in file");
}
// Return successful response with user type
return ResponseEntity.ok(response);
} else {
// Handle case where login details are incorrect
return ResponseEntity.status(HttpStatus.EXPECTATION_FAILED).body("Invalid Username or Password");
}
} catch (NumberFormatException e) {
// Handle case where mobile number format is incorrect
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Mobile number must be 10 digits");
} catch (Exception e) {
// Handle any other unexpected exceptions
e.printStackTrace();
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ErrorResponseDto());
}
} }
} }

8
src/main/java/com/gcc/communityHall/controller/UserAPIController.java

@ -238,8 +238,8 @@ public class UserAPIController {
//System.out.println(purpose); //System.out.println(purpose);
//System.out.print("\n MobileNo---:"+mobileNo); //System.out.print("\n MobileNo---:"+mobileNo);
Random rand = new Random(); Random rand = new Random();
// int otp = rand.nextInt(90000) + 10000;
int otp = 11111;
int otp = rand.nextInt(90000) + 10000;
// int otp = 11111;
System.out.print("\n otp---:"+otp); System.out.print("\n otp---:"+otp);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd-MMM-yyyy%20HH:mm"); DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd-MMM-yyyy%20HH:mm");
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
@ -250,7 +250,7 @@ public class UserAPIController {
System.out.println(urlString); System.out.println(urlString);
System.out.println("\n urlString---: "+urlString); System.out.println("\n urlString---: "+urlString);
String bodyMessage = ""+otp; String bodyMessage = ""+otp;
/*try {
try {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
String Response = restTemplate.getForObject(urlString, String.class); String Response = restTemplate.getForObject(urlString, String.class);
bodyMessage=Response; bodyMessage=Response;
@ -267,7 +267,7 @@ public class UserAPIController {
} catch (Exception e) { } catch (Exception e) {
// System.out.print("ERROR in Sending---: "+e); // System.out.print("ERROR in Sending---: "+e);
bodyMessage = "Error"; bodyMessage = "Error";
}*/
}
HttpSession session = request.getSession(); HttpSession session = request.getSession();
session.setAttribute("otp", otp); session.setAttribute("otp", otp);

18
src/main/java/com/gcc/communityHall/controller/UserController.java

@ -72,20 +72,22 @@ public class UserController {
} }
} }
List<Notification> newnotification = notificationRepository.findActivenotifications(); List<Notification> newnotification = notificationRepository.findActivenotifications();
// Create a string to concatenate all notifications descriptions // Create a string to concatenate all notifications descriptions
StringBuilder notificationText = new StringBuilder(); StringBuilder notificationText = new StringBuilder();
for (Notification notification : newnotification) { for (Notification notification : newnotification) {
notificationText.append(notification.getNotification_description()); notificationText.append(notification.getNotification_description());
} }
// System.out.println("user controller \nCounter Id: "+userSession.getCounter()+"\nCounter Name: "+userSession.getCounterName());
// Pass the concatenated string to the model // Pass the concatenated string to the model
model.addAttribute("newnotification", notificationText.toString()); model.addAttribute("newnotification", notificationText.toString());
model.addAttribute("userName", userSession.getDispayName()); model.addAttribute("userName", userSession.getDispayName());
model.addAttribute("halls", halls); model.addAttribute("halls", halls);
model.addAttribute("hallnames", hallnames); model.addAttribute("hallnames", hallnames);
model.addAttribute("serverDate", LocalDate.now().toString()); //for server date model.addAttribute("serverDate", LocalDate.now().toString()); //for server date
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/dashboard"; return "user/dashboard";
} }
@ -204,6 +206,8 @@ public class UserController {
model.addAttribute("startingSlot", starting.equals("1") ? "Morning" : "Evening"); model.addAttribute("startingSlot", starting.equals("1") ? "Morning" : "Evening");
model.addAttribute("endingSlot", ending.equals("1") ? "Morning" : "Evening"); model.addAttribute("endingSlot", ending.equals("1") ? "Morning" : "Evening");
model.addAttribute("halls", (hallId != null && !hallId.isEmpty()) ? removeHallById : hallsByZone); model.addAttribute("halls", (hallId != null && !hallId.isEmpty()) ? removeHallById : hallsByZone);
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/dashboard"; return "user/dashboard";
} }
@ -238,9 +242,11 @@ public class UserController {
@GetMapping("/hallbookingform") @GetMapping("/hallbookingform")
public String viewform(Model model) { public String viewform(Model model) {
String username = userSession.getDispayName(); String username = userSession.getDispayName();
System.out.println("serverDate....."+LocalDate.now().toString());
// System.out.println("server Date22....."+LocalDate.now().toString());
model.addAttribute("serverDate", LocalDate.now().toString()); //for server date model.addAttribute("serverDate", LocalDate.now().toString()); //for server date
model.addAttribute("userName", username); model.addAttribute("userName", username);
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/hallbookingform"; return "user/hallbookingform";
} }
@ -270,6 +276,8 @@ public class UserController {
//List<String> test = new ArrayList<>(); //List<String> test = new ArrayList<>();
model.addAttribute("userName", userSession.getDispayName()); model.addAttribute("userName", userSession.getDispayName());
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
List<Map<String, Object>> bookingPast = bookingService.getAllBookingEventsByUserId(userId); List<Map<String, Object>> bookingPast = bookingService.getAllBookingEventsByUserId(userId);
@ -282,12 +290,16 @@ public class UserController {
@GetMapping("/CommunityHallList") @GetMapping("/CommunityHallList")
public String viewhalllist(Model model) { public String viewhalllist(Model model) {
model.addAttribute("userName", userSession.getDispayName()); model.addAttribute("userName", userSession.getDispayName());
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/communityHallList"; return "user/communityHallList";
} }
@GetMapping("/hallAmountCalculation") @GetMapping("/hallAmountCalculation")
public String viewCalculate(Model model) { public String viewCalculate(Model model) {
model.addAttribute("userName", userSession.getDispayName()); model.addAttribute("userName", userSession.getDispayName());
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/calculatehallamount"; return "user/calculatehallamount";
} }

2
src/main/java/com/gcc/communityHall/entity/BookingCalendar.java

@ -24,7 +24,7 @@ public class BookingCalendar {
private int hallId; private int hallId;
@Column(name = "unique_id", unique = true)
@Column(name = "unique_id", nullable = false, unique = true)
private String uniqueId; private String uniqueId;
public Integer getId() { public Integer getId() {

10
src/main/java/com/gcc/communityHall/entity/BookingDetails.java

@ -95,6 +95,8 @@ public class BookingDetails {
@OneToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY,mappedBy = "bookingDetails") @OneToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY,mappedBy = "bookingDetails")
private RefundTransaction refundTransaction; private RefundTransaction refundTransaction;
private String counterId;
public int getBookingId() { public int getBookingId() {
return bookingId; return bookingId;
@ -343,5 +345,13 @@ public class BookingDetails {
public void setExtrapayments(ExtraPayments extrapayments) { public void setExtrapayments(ExtraPayments extrapayments) {
this.extrapayments = extrapayments; this.extrapayments = extrapayments;
} }
public String getCounterId() {
return counterId;
}
public void setCounterId(String counterId) {
this.counterId = counterId;
}
} }

18
src/main/java/com/gcc/communityHall/others/UserSession.java

@ -13,6 +13,10 @@ public class UserSession {
private String dispayName; private String dispayName;
private Long mobileno; private Long mobileno;
// added for counter login
private String counter;
private String counterName;
public Integer getUserId() { public Integer getUserId() {
return userId; return userId;
} }
@ -45,6 +49,20 @@ public class UserSession {
this.mobileno = mobileno; this.mobileno = mobileno;
} }
public String getCounter() {
return counter;
}
public void setCounter(String counter) {
this.counter = counter;
}
public String getCounterName() {
return counterName;
}
public void setCounterName(String counterName) {
this.counterName = counterName;
}
} }

23
src/main/java/com/gcc/communityHall/paymentService/controller/PaymentController.java

@ -15,7 +15,7 @@ import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.gcc.communityHall.entity.*; import com.gcc.communityHall.entity.*;
import com.gcc.communityHall.others.AppConfig; import com.gcc.communityHall.others.AppConfig;
import com.gcc.communityHall.repository.ErpPostDataRepository;
//import com.gcc.communityHall.repository.ErpPostDataRepository;
import com.gcc.communityHall.service.PaymentsService; import com.gcc.communityHall.service.PaymentsService;
import org.apache.tomcat.util.json.JSONParser; import org.apache.tomcat.util.json.JSONParser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -70,8 +70,8 @@ public class PaymentController {
@Autowired @Autowired
private AppConfig appConfig; private AppConfig appConfig;
@Autowired
private ErpPostDataRepository erpPostDataRepository;
// @Autowired
// private ErpPostDataRepository erpPostDataRepository;
@Autowired @Autowired
private PaymentsService paymentsService; private PaymentsService paymentsService;
@ -147,7 +147,6 @@ public class PaymentController {
model.addAttribute("bookingsDetails", bookingsDetails); model.addAttribute("bookingsDetails", bookingsDetails);
// bookser.updateBookingStatusById(bookingsDetails.getBookingId(), BookingStatus.PENDING, "Amount mismatch - Booking Not Confirmed");
return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingsDetails.getBookingId(); return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingsDetails.getBookingId();
} }
@ -185,7 +184,7 @@ public class PaymentController {
return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingsDetails.getBookingId(); return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingsDetails.getBookingId();
} }
public void postDataToERP(Payments payment, TransactionResponse res) {
/*public void postDataToERP(Payments payment, TransactionResponse res) {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
erpPostData erpData = new erpPostData(); erpPostData erpData = new erpPostData();
@ -194,7 +193,7 @@ public class PaymentController {
String assesNo = LocalDate.now().getYear() + "/COMM/" + res.getBookingId(); String assesNo = LocalDate.now().getYear() + "/COMM/" + res.getBookingId();
Map<String, Object> data = new TreeMap<>(); Map<String, Object> data = new TreeMap<>();
/*static mandatory input to be sent */
*//*static mandatory input to be sent *//*
data.put("serviceId", "getOtherCollection"); data.put("serviceId", "getOtherCollection");
data.put("COLLECTION_TYPE", "Community Hall"); data.put("COLLECTION_TYPE", "Community Hall");
data.put("TOTALTRANSACTIONCODE", "450310000"); data.put("TOTALTRANSACTIONCODE", "450310000");
@ -219,7 +218,7 @@ public class PaymentController {
payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," + payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," +
payment.getBookingDetails().getUsers().getPinCode()); payment.getBookingDetails().getUsers().getPinCode());
data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo()); data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo());
/* end */
*//* end *//*
System.out.println(data); System.out.println(data);
System.out.println(appConfig.getCommErpUrl()); System.out.println(appConfig.getCommErpUrl());
// ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class); // ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class);
@ -278,7 +277,7 @@ public class PaymentController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
}
}*/
@PostMapping(value = "/additionaldamage-response") @PostMapping(value = "/additionaldamage-response")
public String additionaldamagePaymentresponse(Model model, @RequestParam(required = false) String msg) throws NoSuchAlgorithmException { public String additionaldamagePaymentresponse(Model model, @RequestParam(required = false) String msg) throws NoSuchAlgorithmException {
@ -351,7 +350,7 @@ public class PaymentController {
return "redirect:/communityhall/user/collectionpendingacknowledgement?bookingId=" + bookingsDetails.getBookingId(); return "redirect:/communityhall/user/collectionpendingacknowledgement?bookingId=" + bookingsDetails.getBookingId();
} }
public void postEPDataToERP(ExtraPayments payment, TransactionResponse res) {
/*public void postEPDataToERP(ExtraPayments payment, TransactionResponse res) {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
erpPostData erpData = new erpPostData(); erpPostData erpData = new erpPostData();
@ -360,7 +359,7 @@ public class PaymentController {
String assesNo = LocalDate.now().getYear() + "/COMM/ED/" + res.getBookingId(); String assesNo = LocalDate.now().getYear() + "/COMM/ED/" + res.getBookingId();
Map<String, Object> data = new TreeMap<>(); Map<String, Object> data = new TreeMap<>();
/*static mandatory input to be sent */
*//*static mandatory input to be sent *//*
data.put("serviceId", "getOtherCollection"); data.put("serviceId", "getOtherCollection");
data.put("COLLECTION_TYPE", "Community Hall"); data.put("COLLECTION_TYPE", "Community Hall");
data.put("TOTALTRANSACTIONCODE", "450310000"); data.put("TOTALTRANSACTIONCODE", "450310000");
@ -385,7 +384,7 @@ public class PaymentController {
payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," + payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," +
payment.getBookingDetails().getUsers().getPinCode()); payment.getBookingDetails().getUsers().getPinCode());
data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo()); data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo());
/* end */
*//* end *//*
System.out.println(data); System.out.println(data);
System.out.println(appConfig.getCommErpUrl()); System.out.println(appConfig.getCommErpUrl());
// ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class); // ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class);
@ -444,7 +443,7 @@ public class PaymentController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
}
}*/
@PostMapping(value = "/updatetransaction") @PostMapping(value = "/updatetransaction")
public String updatetransaction(Model model, @RequestParam(required = false) String txansactionId, @RequestParam(required = false) String msg) throws NoSuchAlgorithmException { public String updatetransaction(Model model, @RequestParam(required = false) String txansactionId, @RequestParam(required = false) String msg) throws NoSuchAlgorithmException {

2
src/main/java/com/gcc/communityHall/paymentService/repository/TransactionResponseRepository.java

@ -59,7 +59,7 @@ public interface TransactionResponseRepository extends JpaRepository<Transaction
"tr.tpsl_txn_id, tr.txansaction_id, tr.user_id, bd.booking_date " + "tr.tpsl_txn_id, tr.txansaction_id, tr.user_id, bd.booking_date " +
"FROM transaction_response tr " + "FROM transaction_response tr " +
"INNER JOIN booking_details bd ON tr.booking_id = bd.booking_id " + "INNER JOIN booking_details bd ON tr.booking_id = bd.booking_id " +
"WHERE tr.status_code = ? AND bd.booking_date < CURDATE()", nativeQuery = true)
"WHERE tr.status_code = ? AND bd.booking_date < DATE_SUB(CURDATE(), INTERVAL 2 DAY", nativeQuery = true)
List<Map<String, Object>> getTransactionResponseByStatus(String status); List<Map<String, Object>> getTransactionResponseByStatus(String status);

7
src/main/java/com/gcc/communityHall/paymentService/scheduler/PaymentStatusScheduler.java

@ -1,6 +1,8 @@
package com.gcc.communityHall.paymentService.scheduler;/*
/*
package com.gcc.communityHall.paymentService.scheduler;
// Import necessary packages // Import necessary packages
package com.gcc.communityHall.paymentService.Scheduler;
//package com.gcc.communityHall.paymentService.Scheduler;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.gcc.communityHall.entity.BookingDetails; import com.gcc.communityHall.entity.BookingDetails;
@ -332,4 +334,5 @@ public class PaymentStatusScheduler {
} }
*/ */

2
src/main/java/com/gcc/communityHall/repository/BookingDetailsRepository.java

@ -336,7 +336,7 @@ public interface BookingDetailsRepository extends JpaRepository<BookingDetails,
+ "LEFT JOIN counter_details cd ON cd.counter_id = bd.counterdetails_counter_id\r\n" + "LEFT JOIN counter_details cd ON cd.counter_id = bd.counterdetails_counter_id\r\n"
+ "LEFT JOIN payments pd ON bd.booking_id = pd.booking_details_booking_id \r\n" + "LEFT JOIN payments pd ON bd.booking_id = pd.booking_details_booking_id \r\n"
+ "WHERE bd.users_user_id = :userId and booking_status IN ('GCC_BLOCKED', 'APPROVED','CANCELED','REJECTED','COMPLETED','WAITING_FOR_NOC','WAITING_FOR_NOC_APPROVAL') \r\n" + "WHERE bd.users_user_id = :userId and booking_status IN ('GCC_BLOCKED', 'APPROVED','CANCELED','REJECTED','COMPLETED','WAITING_FOR_NOC','WAITING_FOR_NOC_APPROVAL') \r\n"
+ "ORDER BY bd.start_date DESC;\r\n"
+ "ORDER BY bd.booking_id DESC;\r\n"
+ "", nativeQuery = true) + "", nativeQuery = true)
List<Map<String, Object>> getAllBookingEventsByUserId(Integer userId); List<Map<String, Object>> getAllBookingEventsByUserId(Integer userId);

3
src/main/java/com/gcc/communityHall/repository/LoginRepository.java

@ -15,4 +15,7 @@ public interface LoginRepository extends JpaRepository<Login, Long> {
@Query(value = "SELECT a FROM Login a WHERE a.mobileNumber = ?1") @Query(value = "SELECT a FROM Login a WHERE a.mobileNumber = ?1")
Login checkUserbyMobile(long mobileNo); Login checkUserbyMobile(long mobileNo);
@Query(value = "SELECT * FROM login where name=:username and password=:pass LIMIT 1",nativeQuery = true)
Login findByUsernameAndPass(String username, String pass);
} }

7
src/main/java/com/gcc/communityHall/service/Impl/BookingServiceImpl.java

@ -569,6 +569,7 @@ public class BookingServiceImpl implements BookingService {
BookingDetails bookingDetails = null; BookingDetails bookingDetails = null;
Integer userId = userSession.getUserId(); Integer userId = userSession.getUserId();
String counterId = userSession.getCounter();
ReasonMaster reasonMaster = reasonMasterService.getReasonById(Integer.parseInt(formData.get("reasonId").toString())); ReasonMaster reasonMaster = reasonMasterService.getReasonById(Integer.parseInt(formData.get("reasonId").toString()));
HallDetails hallDetails = hallDetailService.getHallById(Integer.parseInt(formData.get("hallId").toString())); HallDetails hallDetails = hallDetailService.getHallById(Integer.parseInt(formData.get("hallId").toString()));
@ -589,7 +590,9 @@ public class BookingServiceImpl implements BookingService {
if (user != null) { if (user != null) {
bookingDetails.setUsers(user); bookingDetails.setUsers(user);
if(counterId!=null){
bookingDetails.setCounterId(counterId);
}
if (hallDetails != null) { if (hallDetails != null) {
bookingDetails.setHallDetails(hallDetails); bookingDetails.setHallDetails(hallDetails);
@ -1643,11 +1646,13 @@ public class BookingServiceImpl implements BookingService {
} else { } else {
String uniqueId = date.format(DateTimeFormatter.ofPattern("yyyyMMdd")) + hallId;
bookingCalendar = new BookingCalendar(); bookingCalendar = new BookingCalendar();
bookingCalendar.setBdate(date); bookingCalendar.setBdate(date);
bookingCalendar.setHallId(hallId); bookingCalendar.setHallId(hallId);
bookingCalendar.setIs_booked(0); bookingCalendar.setIs_booked(0);
bookingCalendar.setIs_active(true); bookingCalendar.setIs_active(true);
bookingCalendar.setUnique_id(uniqueId);
} }
// Mark the appropriate slot as booked based on starting and ending slots // Mark the appropriate slot as booked based on starting and ending slots

200
src/main/java/com/gcc/communityHall/service/Impl/CounterServiceImpl.java

@ -43,9 +43,8 @@ import com.gcc.communityHall.service.ReasonMasterService;
import com.gcc.communityHall.service.UserService; import com.gcc.communityHall.service.UserService;
@Service @Service
public class CounterServiceImpl implements CounterService
{
@Autowired
public class CounterServiceImpl implements CounterService {
@Autowired
private BookingDetailsRepository bookingDetailsRepository; private BookingDetailsRepository bookingDetailsRepository;
@Autowired @Autowired
@ -56,15 +55,13 @@ public class CounterServiceImpl implements CounterService
@Autowired @Autowired
private HallDetailService hallDetailService; private HallDetailService hallDetailService;
@Autowired @Autowired
private CounterRefundListRepository counterRefundListRepository; private CounterRefundListRepository counterRefundListRepository;
@Autowired @Autowired
private DiscountRangeService discountRangeService; private DiscountRangeService discountRangeService;
@Autowired @Autowired
private UserService userService; private UserService userService;
@ -75,28 +72,29 @@ public class CounterServiceImpl implements CounterService
@Value("${file.fullpath}") @Value("${file.fullpath}")
private String serverPath; private String serverPath;
@Autowired
private CounterDetailsRepository counterRepo;
private final String ddDirectory;
private final String ddPhotoUrl;
private final String refundDirectory;
private final String refundPhotoUrl;
@Autowired
CounterServiceImpl(CounterDetailsRepository counterRepo,
@Value("${file.dd.upload.directory}") String ddDirectory,
@Value("${file.dd.fullpath}") String ddPhotoUrl,
@Value("${file.counterrefund.upload.directory}") String refundDirectory,
@Value("${file.counterrefund.fullpath}") String refundPhotoUrl){
this.counterRepo=counterRepo;
this.ddDirectory=ddDirectory;
this.ddPhotoUrl=ddPhotoUrl;
this.refundDirectory=refundDirectory;
this.refundPhotoUrl=refundPhotoUrl;
}
@Override
@Autowired
private CounterDetailsRepository counterRepo;
private final String ddDirectory;
private final String ddPhotoUrl;
private final String refundDirectory;
private final String refundPhotoUrl;
@Autowired
CounterServiceImpl(CounterDetailsRepository counterRepo,
@Value("${file.dd.upload.directory}") String ddDirectory,
@Value("${file.dd.fullpath}") String ddPhotoUrl,
@Value("${file.counterrefund.upload.directory}") String refundDirectory,
@Value("${file.counterrefund.fullpath}") String refundPhotoUrl) {
this.counterRepo = counterRepo;
this.ddDirectory = ddDirectory;
this.ddPhotoUrl = ddPhotoUrl;
this.refundDirectory = refundDirectory;
this.refundPhotoUrl = refundPhotoUrl;
}
@Override
public CounterDetails saveCounterDetails(String bankName, int bankAccNo, int ddNumber, double amountReceived, MultipartFile counterddphoto, int bookingId) { public CounterDetails saveCounterDetails(String bankName, int bankAccNo, int ddNumber, double amountReceived, MultipartFile counterddphoto, int bookingId) {
BookingDetails bookingDetails = bookingDetailsRepository.findById(bookingId) BookingDetails bookingDetails = bookingDetailsRepository.findById(bookingId)
.orElseThrow(() -> new RuntimeException("Booking not found")); .orElseThrow(() -> new RuntimeException("Booking not found"));
@ -125,27 +123,26 @@ public class CounterServiceImpl implements CounterService
return counterRepo.save(counterDetails); return counterRepo.save(counterDetails);
} }
@Override
public CounterDetails getDdImageById(int counterId) {
Optional<CounterDetails> counterdetails = counterRepo.findById(counterId);
return counterdetails.orElse(null);
}
@Override
public CounterDetails getDdImageById(int counterId) {
Optional<CounterDetails> counterdetails = counterRepo.findById(counterId);
return counterdetails.orElse(null);
}
@Override
@Override
public Map<String, Object> saveCounterBooking(Map<String, Object> formData) { public Map<String, Object> saveCounterBooking(Map<String, Object> formData) {
Map<String, Object> response = new HashMap<>(); Map<String, Object> response = new HashMap<>();
BookingDetails bookingDetails = new BookingDetails(); BookingDetails bookingDetails = new BookingDetails();
ReasonMaster reasonMaster = reasonMasterService.getReasonById(Integer.parseInt(formData.get("reasonId").toString())); ReasonMaster reasonMaster = reasonMasterService.getReasonById(Integer.parseInt(formData.get("reasonId").toString()));
HallDetails hallDetails = hallDetailService.getHallById(Integer.parseInt(formData.get("hallId").toString())); HallDetails hallDetails = hallDetailService.getHallById(Integer.parseInt(formData.get("hallId").toString()));
Users user=userService.getUserById(userSession.getUserId());
String bookingId =formData.get("bookingId").toString();
if(bookingId!=null && bookingId.equals("0")){
bookingDetails= new BookingDetails();
}else {
Users user = userService.getUserById(userSession.getUserId());
String bookingId = formData.get("bookingId").toString();
if (bookingId != null && bookingId.equals("0")) {
bookingDetails = new BookingDetails();
} else {
BookingDetails book = getBookingsById(Integer.parseInt(formData.get("bookingId").toString())); BookingDetails book = getBookingsById(Integer.parseInt(formData.get("bookingId").toString()));
if (book != null) { if (book != null) {
bookingDetails = book; bookingDetails = book;
@ -159,23 +156,25 @@ public class CounterServiceImpl implements CounterService
if (hallDetails != null) { if (hallDetails != null) {
bookingDetails.setHallDetails(hallDetails); bookingDetails.setHallDetails(hallDetails);
bookingDetails.setDepositAmount(hallDetails.getDepositAmount());
// bookingDetails.setDepositAmount(hallDetails.getDepositAmount());
String startDate = formData.get("startDate").toString(); String startDate = formData.get("startDate").toString();
String endDate = formData.get("endDate").toString(); String endDate = formData.get("endDate").toString();
int days = Integer.parseInt(formData.get("days").toString());
String relation = formData.get("relation").toString();
double days = Double.parseDouble(formData.get("days").toString());
int daysrange = Integer.parseInt(formData.get("daysrange").toString());
Optional<DiscountRange> discountOpt = discountRangeService.getDiscountByUserType(user.getUsertype()); Optional<DiscountRange> discountOpt = discountRangeService.getDiscountByUserType(user.getUsertype());
DiscountRange discountrange=discountOpt.get();
DiscountRange discountrange = discountOpt.get();
float discount = discountrange.getDiscountRange(); float discount = discountrange.getDiscountRange();
int startingSlot = Integer.parseInt(formData.get("startingSlot").toString()); int startingSlot = Integer.parseInt(formData.get("startingSlot").toString());
int endingSlot = Integer.parseInt(formData.get("endingSlot").toString()); int endingSlot = Integer.parseInt(formData.get("endingSlot").toString());
double hallAmount =calcHallAmount(hallDetails,days,startingSlot,endingSlot);
double hallAmount = calcHallAmount(hallDetails, daysrange, startingSlot, endingSlot);
double discountAmount = 0; double discountAmount = 0;
String usertype=user.getUsertype().toString();
if(usertype.equals("COUNCILLOR") || usertype.equals("PENSIONER") || usertype.equals("GCC_EMPLOYEE") || usertype.equals("PUBLIC")) {
discountAmount = (hallAmount*discount)/100;
String usertype = user.getUsertype().toString();
if (usertype.equals("COUNCILLOR") || usertype.equals("PENSIONER") || usertype.equals("GCC_EMPLOYEE") || usertype.equals("PUBLIC")) {
discountAmount = (hallAmount * discount) / 100;
} }
hallAmount = hallAmount-discountAmount;
double gstAmount = (hallAmount*hallDetails.getGst())/100;
hallAmount = hallAmount - discountAmount;
double gstAmount = (hallAmount * hallDetails.getGst()) / 100;
//double discountAmount=hallAmount*(1-(discount/100)); //double discountAmount=hallAmount*(1-(discount/100));
double totalAmount = hallAmount + gstAmount + bookingDetails.getDepositAmount(); double totalAmount = hallAmount + gstAmount + bookingDetails.getDepositAmount();
@ -187,7 +186,7 @@ public class CounterServiceImpl implements CounterService
// Print the result // Print the result
// System.out.println("Total Amount: " + formattedTotalAmount); // System.out.println("Total Amount: " + formattedTotalAmount);
bookingDetails.setHallAmount(hallAmount); bookingDetails.setHallAmount(hallAmount);
bookingDetails.setGst(gstAmount); bookingDetails.setGst(gstAmount);
@ -201,7 +200,7 @@ public class CounterServiceImpl implements CounterService
bookingDetails.setReason(reasonMaster.getReason()); bookingDetails.setReason(reasonMaster.getReason());
bookingDetails.setRefundStatus(BookingDetails.RefundStatus.WAITING); bookingDetails.setRefundStatus(BookingDetails.RefundStatus.WAITING);
bookingDetails.setBookingtype(BookingDetails.BookingType.OFFLINE); bookingDetails.setBookingtype(BookingDetails.BookingType.OFFLINE);
bookingDetails = bookingDetailsRepository.save(bookingDetails); bookingDetails = bookingDetailsRepository.save(bookingDetails);
@ -210,12 +209,12 @@ public class CounterServiceImpl implements CounterService
response.put("noOfDays", bookingDetails.getNoOfDays()); response.put("noOfDays", bookingDetails.getNoOfDays());
response.put("startDate", bookingDetails.getStartDate()); response.put("startDate", bookingDetails.getStartDate());
response.put("endDate", bookingDetails.getEndDate()); response.put("endDate", bookingDetails.getEndDate());
response.put("startingSlot",bookingDetails.getStartingSlot());
response.put("endingSlot",bookingDetails.getEndingSlot());
response.put("startingSlot", bookingDetails.getStartingSlot());
response.put("endingSlot", bookingDetails.getEndingSlot());
response.put("hallAmount", bookingDetails.getHallAmount()); response.put("hallAmount", bookingDetails.getHallAmount());
response.put("gst", bookingDetails.getGst()); response.put("gst", bookingDetails.getGst());
response.put("depositAmount", bookingDetails.getDepositAmount()); response.put("depositAmount", bookingDetails.getDepositAmount());
response.put("discount",discountrange.getDiscountRange());
response.put("discount", discountrange.getDiscountRange());
//response.put("totalAmount",formattedTotalAmount); //response.put("totalAmount",formattedTotalAmount);
response.put("username", bookingDetails.getUsers().getName()); response.put("username", bookingDetails.getUsers().getName());
response.put("userId", bookingDetails.getUsers().getUserId()); response.put("userId", bookingDetails.getUsers().getUserId());
@ -257,67 +256,68 @@ public class CounterServiceImpl implements CounterService
return response; return response;
} }
private double calcHallAmount(HallDetails hallDetails,int days,int startingSlot,int endingSlot){
private double calcHallAmount(HallDetails hallDetails, int days, int startingSlot, int endingSlot) {
double hallAmount = 0; double hallAmount = 0;
if(days==1 && startingSlot==1 && endingSlot==2){ //full day
hallAmount =hallDetails.getFullDayRent();
} else if (days==1 && (startingSlot==1 && endingSlot==1)|| (startingSlot==2 && endingSlot==2) ) { // half day
hallAmount =hallDetails.getHalfDayRent();
} else if (days>1) {
if(startingSlot==2 && endingSlot==1){
hallAmount =hallDetails.getHalfDayRent()*2;
days=days-2;
} else if (startingSlot==2 || endingSlot==1) {
hallAmount =hallDetails.getHalfDayRent();
days=days-1;
if (days == 1 && startingSlot == 1 && endingSlot == 2) { //full day
hallAmount = hallDetails.getFullDayRent();
} else if (days == 1 && (startingSlot == 1 && endingSlot == 1) || (startingSlot == 2 && endingSlot == 2)) { // half day
hallAmount = hallDetails.getHalfDayRent();
} else if (days > 1) {
if (startingSlot == 2 && endingSlot == 1) {
hallAmount = hallDetails.getHalfDayRent() * 2;
days = days - 2;
} else if (startingSlot == 2 || endingSlot == 1) {
hallAmount = hallDetails.getHalfDayRent();
days = days - 1;
} }
for(int i=0;i<days;i++){
hallAmount=hallAmount+hallDetails.getFullDayRent();
for (int i = 0; i < days; i++) {
hallAmount = hallAmount + hallDetails.getFullDayRent();
} }
} }
return hallAmount; return hallAmount;
} }
@Override
public BookingDetails getBookingsById(int BookingId) {
Optional<BookingDetails> OPBookingDetails =bookingDetailsRepository.findById(BookingId);
if(OPBookingDetails.isPresent()) {
return OPBookingDetails.get();
}
return null;
@Override
public BookingDetails getBookingsById(int BookingId) {
Optional<BookingDetails> OPBookingDetails = bookingDetailsRepository.findById(BookingId);
if (OPBookingDetails.isPresent()) {
return OPBookingDetails.get();
} }
return null;
}
public CounterRefundList saveCancellation(int counterId, MultipartFile letterdocs, String reason) throws IOException {
public CounterRefundList saveCancellation(int counterId, MultipartFile letterdocs, String reason) throws IOException {
CounterRefundList counterRefundList = new CounterRefundList();
counterRefundList.setInitialisationStatus(CounterRefundList.InitialisationStatus.INITIATED);
counterRefundList.setReasonforCancelling(reason);
CounterRefundList counterRefundList = new CounterRefundList();
counterRefundList.setInitialisationStatus(CounterRefundList.InitialisationStatus.INITIATED);
counterRefundList.setReasonforCancelling(reason);
if (letterdocs != null && !letterdocs.isEmpty()) {
if (letterdocs != null && !letterdocs.isEmpty()) {
try {
String fileName = counterId + "_" + letterdocs.getOriginalFilename();
String filePath = refundDirectory + "/" + fileName;
String imageUrl = refundPhotoUrl + "/" + fileName;
try {
String fileName = counterId + "_" + letterdocs.getOriginalFilename();
String filePath = refundDirectory + "/" + fileName;
String imageUrl = refundPhotoUrl + "/" + fileName;
try (FileOutputStream fos = new FileOutputStream(filePath)) {
fos.write(letterdocs.getBytes());
counterRefundList.setLetterdocument(imageUrl);
}
counterRefundList.setLetterdocument(refundPhotoUrl + "cr/" + fileName);
} catch (Exception e) {
throw new RuntimeException("Failed to store file", e);
}
try (FileOutputStream fos = new FileOutputStream(filePath)) {
fos.write(letterdocs.getBytes());
counterRefundList.setLetterdocument(imageUrl);
} }
counterRefundList.setLetterdocument(refundPhotoUrl + "cr/" + fileName);
} catch (Exception e) {
throw new RuntimeException("Failed to store file", e);
}
}
CounterDetails counterDetails = new CounterDetails();
counterDetails.setCounterId(counterId);
counterRefundList.setCounterDetails(counterDetails);
CounterDetails counterDetails = new CounterDetails();
counterDetails.setCounterId(counterId);
counterRefundList.setCounterDetails(counterDetails);
return counterRefundListRepository.save(counterRefundList);
return counterRefundListRepository.save(counterRefundList);
}
}
} }

2
src/main/resources/templates/admin/adminpage.html

@ -471,7 +471,7 @@
displayError(fileInput, errorMessage); displayError(fileInput, errorMessage);
} }
else { else {
console.log('File size is within limit:', file.size, 'bytes');
// console.log('File size is within limit:', file.size, 'bytes');
clearError(fileInput); clearError(fileInput);
} }
} }

2
src/main/resources/templates/admin/booking-list.html

@ -454,7 +454,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

2
src/main/resources/templates/admin/caretakerpage.html

@ -467,7 +467,7 @@
displayError(fileInput, errorMessage); displayError(fileInput, errorMessage);
} }
else { else {
console.log('File size is within limit:', file.size, 'bytes');
// console.log('File size is within limit:', file.size, 'bytes');
clearError(fileInput); clearError(fileInput);
} }
} }

2
src/main/resources/templates/admin/developer.html

@ -379,7 +379,7 @@ function myRequest() {
fetch('/communityhall/user/api/gethallnames') fetch('/communityhall/user/api/gethallnames')
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
console.log('Hall Names Data:', data); // Debug log
// console.log('Hall Names Data:', data); // Debug log
const hallNameDropdown = document.getElementById('hallNameDropdown'); const hallNameDropdown = document.getElementById('hallNameDropdown');
const selectedHall = hallNameDropdown.value; // Retain current selection const selectedHall = hallNameDropdown.value; // Retain current selection

4
src/main/resources/templates/admin/gccblocking.html

@ -842,7 +842,7 @@
.filter(value => !isNaN(value)) .filter(value => !isNaN(value))
.join(','); .join(',');
console.log("hallIds: "+hallIds);
// console.log("hallIds: "+hallIds);
// Create FormData for AJAX // Create FormData for AJAX
var formData = new FormData(); var formData = new FormData();
@ -1051,7 +1051,7 @@
endDate: endDate endDate: endDate
}, },
success: function (response) { success: function (response) {
console.log("Unblock response:", response);
// console.log("Unblock response:", response);
$("#viewdetails").modal('hide'); $("#viewdetails").modal('hide');
window.location.reload(); window.location.reload();
}, },

2
src/main/resources/templates/admin/halldetailslist.html

@ -721,7 +721,7 @@
fileInput.value = ''; // Clear the file input fileInput.value = ''; // Clear the file input
displayError(fileInput, errorMessage); displayError(fileInput, errorMessage);
} else { } else {
console.log('File size is within limit:', file.size, 'bytes');
// console.log('File size is within limit:', file.size, 'bytes');
} }
} }
} }

4
src/main/resources/templates/admin/ongoingevents.html

@ -986,9 +986,9 @@
$(document).ready(function () { $(document).ready(function () {
$("#submitEbDetails").click(function () { $("#submitEbDetails").click(function () {
var bookid = parseInt($("#bookingId").val()); var bookid = parseInt($("#bookingId").val());
console.log("bookid = "+ bookid)
// console.log("bookid = "+ bookid)
var startingReading = $("#startingReading").val(); var startingReading = $("#startingReading").val();
console.log("startingReading = "+ startingReading)
// console.log("startingReading = "+ startingReading)
var startingReadingimage = $("#startingReadingimage")[0].files[0]; // Get the file var startingReadingimage = $("#startingReadingimage")[0].files[0]; // Get the file
var formData = new FormData(); var formData = new FormData();

20
src/main/resources/templates/admin/refund-failedlist.html

@ -916,8 +916,8 @@ $(document).ready(function () {
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#pendingSettlementForm').modal({ $('#pendingSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -1098,7 +1098,7 @@ $(document).ready(function () {
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2)); $("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2));
@ -1379,7 +1379,7 @@ $(document).ready(function () {
}).then((result) => { }).then((result) => {
/* Read more about isConfirmed, isDenied below */ /* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) { if (result.isConfirmed) {
console.log("Submitting rejection...");
// console.log("Submitting rejection...");
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -1390,7 +1390,7 @@ $(document).ready(function () {
'settlementId': id 'settlementId': id
}, },
success: function (data, textStatus, xhr) { success: function (data, textStatus, xhr) {
console.log("Rejection successful");
// console.log("Rejection successful");
if (xhr.status === 200) { // Check if the response status is OK if (xhr.status === 200) { // Check if the response status is OK
Swal.fire( Swal.fire(
'Done', 'Done',
@ -1466,7 +1466,7 @@ $(document).ready(function () {
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1481,7 +1481,7 @@ $(document).ready(function () {
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1528,7 +1528,7 @@ $(document).ready(function () {
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {
@ -1538,7 +1538,7 @@ $(document).ready(function () {
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
@ -1560,7 +1560,7 @@ $(document).ready(function () {
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

2
src/main/resources/templates/admin/rejected-list.html

@ -422,7 +422,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

6
src/main/resources/templates/admin/reports.html

@ -1594,7 +1594,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });
@ -1680,7 +1680,7 @@
url: '/communityhall/admin/api/bookingdetailsByuserId', url: '/communityhall/admin/api/bookingdetailsByuserId',
data: {'userId': userId}, data: {'userId': userId},
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
$("#bookingTableBody").empty(); // Ensure bookingTableBody is the correct ID of the table body $("#bookingTableBody").empty(); // Ensure bookingTableBody is the correct ID of the table body
$.each(response, function (index, booking) { $.each(response, function (index, booking) {
// Create table row with the data from response // Create table row with the data from response
@ -1717,7 +1717,7 @@
url: '/communityhall/admin/api/bookingdetailsByzone', url: '/communityhall/admin/api/bookingdetailsByzone',
data: {'zone': zone}, data: {'zone': zone},
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
// Clear existing table data and destroy DataTable instance if it exists // Clear existing table data and destroy DataTable instance if it exists
var table = $('#bookinglistdataTablebyzone').DataTable(); var table = $('#bookinglistdataTablebyzone').DataTable();

20
src/main/resources/templates/admin/settlement-approved.html

@ -858,7 +858,7 @@
'settlementsid': settlementId 'settlementsid': settlementId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showSettlementInfo(x) showSettlementInfo(x)
showDamageDetails(x); showDamageDetails(x);
} }
@ -867,8 +867,8 @@
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#initiateSettlementForm').modal({ $('#initiateSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -1049,7 +1049,7 @@ if (data.damageList.length === 0) {
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2)); $("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2));
@ -1170,7 +1170,7 @@ if (data.damageList.length === 0) {
function initiate() { function initiate() {
let id = document.getElementById("settlementid").value; let id = document.getElementById("settlementid").value;
let refundAmount = document.getElementById("refundAmount").value; let refundAmount = document.getElementById("refundAmount").value;
console.log(refundAmount);
// console.log(refundAmount);
Swal.fire({ Swal.fire({
title: 'Do you want to Initiate this Settlement?', title: 'Do you want to Initiate this Settlement?',
@ -1181,7 +1181,7 @@ if (data.damageList.length === 0) {
}).then((result) => { }).then((result) => {
if (result.isConfirmed) { if (result.isConfirmed) {
let status = (refundAmount > 0) ? 'INITIATED' : 'COMPLETED'; let status = (refundAmount > 0) ? 'INITIATED' : 'COMPLETED';
console.log(status);
// console.log(status);
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: '/communityhall/admin/api/updateInitiatedSettlementStatus/' + id, url: '/communityhall/admin/api/updateInitiatedSettlementStatus/' + id,
@ -1238,7 +1238,7 @@ if (data.damageList.length === 0) {
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showApprovedcancelledbookingDetails(x); showApprovedcancelledbookingDetails(x);
} }
}); });
@ -1286,7 +1286,7 @@ if (data.damageList.length === 0) {
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {
@ -1296,7 +1296,7 @@ if (data.damageList.length === 0) {
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
@ -1318,7 +1318,7 @@ if (data.damageList.length === 0) {
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

2
src/main/resources/templates/admin/settlement-completed.html

@ -1155,7 +1155,7 @@ if (data.damageList.length === 0) {
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
document.getElementById("startingSlot").innerHTML = getTimeSlot(list.startingSlot); document.getElementById("startingSlot").innerHTML = getTimeSlot(list.startingSlot);

2
src/main/resources/templates/admin/settlement-initiate.html

@ -1270,7 +1270,7 @@
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {

20
src/main/resources/templates/admin/settlement-list.html

@ -835,8 +835,8 @@
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#pendingSettlementForm').modal({ $('#pendingSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -1017,7 +1017,7 @@
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
var pendingstatus=data.settlement.collectionStatus var pendingstatus=data.settlement.collectionStatus
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#collectionstatuscolumn").show(); $("#collectionstatuscolumn").show();
@ -1123,7 +1123,7 @@
}).then((result) => { }).then((result) => {
/* Read more about isConfirmed, isDenied below */ /* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) { if (result.isConfirmed) {
console.log("Submitting rejection...");
// console.log("Submitting rejection...");
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -1134,7 +1134,7 @@
'settlementId': id 'settlementId': id
}, },
success: function (data, textStatus, xhr) { success: function (data, textStatus, xhr) {
console.log("Rejection successful");
// console.log("Rejection successful");
if (xhr.status === 200) { // Check if the response status is OK if (xhr.status === 200) { // Check if the response status is OK
Swal.fire( Swal.fire(
'Done', 'Done',
@ -1210,7 +1210,7 @@
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1225,7 +1225,7 @@
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1272,7 +1272,7 @@
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {
@ -1282,7 +1282,7 @@
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
@ -1304,7 +1304,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

8
src/main/resources/templates/admin/settlement-reject.html

@ -448,7 +448,7 @@ $(document).ready(function () {
'settlementsid': settlementId 'settlementsid': settlementId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showSettlementInfo(x) showSettlementInfo(x)
showDamageDetails(x); showDamageDetails(x);
} }
@ -457,8 +457,8 @@ $(document).ready(function () {
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#rejectSettlementForm').modal({ $('#rejectSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -636,7 +636,7 @@ if (data.damageList.length === 0) {
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2)); $("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2));

2
src/main/resources/templates/admin/settlementlist.html

@ -717,7 +717,7 @@
// Set the QR code image source // Set the QR code image source
$('#qrview').modal('show'); $('#qrview').modal('show');
$('#qrCodeImage').attr('src', 'data:image/png;base64,' + data); $('#qrCodeImage').attr('src', 'data:image/png;base64,' + data);
console.log(data);
// console.log(data);
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error('Error fetching QR code:', textStatus, errorThrown); console.error('Error fetching QR code:', textStatus, errorThrown);

8
src/main/resources/templates/admin/viewUploadNoc.html

@ -411,7 +411,7 @@
// Get the booking ID from the hidden input field // Get the booking ID from the hidden input field
let id = $('#bookingid').val(); let id = $('#bookingid').val();
console.log("Booking ID:", id);
// console.log("Booking ID:", id);
// Get the selected file // Get the selected file
let fileInput = $('#nocFile')[0].files[0]; let fileInput = $('#nocFile')[0].files[0];
@ -432,7 +432,7 @@
formData.append('nocFile', fileInput); formData.append('nocFile', fileInput);
formData.append('bookingid', id); // Ensure key matches backend parameter formData.append('bookingid', id); // Ensure key matches backend parameter
console.log("FormData entries:");
// console.log("FormData entries:");
for (let [key, value] of formData.entries()) { for (let [key, value] of formData.entries()) {
console.log(`${key}: ${value}`); console.log(`${key}: ${value}`);
} }
@ -445,7 +445,7 @@
contentType: false, // Set to false for multipart/form-data contentType: false, // Set to false for multipart/form-data
processData: false, // Prevent jQuery from processing the data processData: false, // Prevent jQuery from processing the data
success: function (response) { success: function (response) {
console.log("Upload success response:", response);
// console.log("Upload success response:", response);
Swal.fire({ Swal.fire({
icon: 'success', icon: 'success',
title: 'Success', title: 'Success',
@ -472,7 +472,7 @@
$('#uploadNocModal').on('show.bs.modal', function (event) { $('#uploadNocModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget); // Button that triggered the modal var button = $(event.relatedTarget); // Button that triggered the modal
var bookingId = button.data('booking-id'); // Extract bookingId from the button var bookingId = button.data('booking-id'); // Extract bookingId from the button
console.log("Setting bookingId in modal:", bookingId);
// console.log("Setting bookingId in modal:", bookingId);
$('#bookingid').val(bookingId); // Set the bookingId in the hidden input field $('#bookingid').val(bookingId); // Set the bookingId in the hidden input field
}); });

2
src/main/resources/templates/caretaker/caretakerpage.html

@ -471,7 +471,7 @@
displayError(fileInput, errorMessage); displayError(fileInput, errorMessage);
} }
else { else {
console.log('File size is within limit:', file.size, 'bytes');
// console.log('File size is within limit:', file.size, 'bytes');
clearError(fileInput); clearError(fileInput);
} }
} }

2
src/main/resources/templates/caretaker/past-booking.html

@ -557,7 +557,7 @@
displayError(fileInput, errorMessage); displayError(fileInput, errorMessage);
} }
else { else {
console.log('File size is within limit:', file.size, 'bytes');
// console.log('File size is within limit:', file.size, 'bytes');
clearError(fileInput); clearError(fileInput);
} }
} }

2
src/main/resources/templates/caretaker/present-booking.html

@ -431,7 +431,7 @@
displayError(fileInput, errorMessage); displayError(fileInput, errorMessage);
} }
else { else {
console.log('File size is within limit:', file.size, 'bytes');
// console.log('File size is within limit:', file.size, 'bytes');
clearError(fileInput); clearError(fileInput);
} }
} }

2
src/main/resources/templates/caretaker/settlementlist.html

@ -718,7 +718,7 @@
// Set the QR code image source // Set the QR code image source
$('#qrview').modal('show'); $('#qrview').modal('show');
$('#qrCodeImage').attr('src', 'data:image/png;base64,' + data); $('#qrCodeImage').attr('src', 'data:image/png;base64,' + data);
console.log(data);
// console.log(data);
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error('Error fetching QR code:', textStatus, errorThrown); console.error('Error fetching QR code:', textStatus, errorThrown);

2
src/main/resources/templates/counter/calculate-hall-amount.html

@ -135,7 +135,7 @@
// Get hallId from URL parameters and fetch hall details // Get hallId from URL parameters and fetch hall details
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
const hallId = urlParams.get('hallId'); const hallId = urlParams.get('hallId');
console.log("Hall ID:", hallId);
// console.log("Hall ID:", hallId);
$(document).ready(function () { $(document).ready(function () {
if (hallId != null) { if (hallId != null) {
getHallDetails(hallId, function (response) { getHallDetails(hallId, function (response) {

779
src/main/resources/templates/counter/counter-booking.html
File diff suppressed because it is too large
View File

6
src/main/resources/templates/counter/refund-initialisation.html

@ -244,14 +244,14 @@
}); });
function UserDetails(counterDetails) { function UserDetails(counterDetails) {
console.log("Initial Counter Details:", counterDetails);
// console.log("Initial Counter Details:", counterDetails);
var counterId = counterDetails.counterId; var counterId = counterDetails.counterId;
$.ajax({ $.ajax({
url: '/communityhall/user/api/counterdetails', url: '/communityhall/user/api/counterdetails',
type: 'GET', type: 'GET',
data: {counterId: counterId}, data: {counterId: counterId},
success: function (response) { success: function (response) {
console.log("Fetched User Details:", response);
// console.log("Fetched User Details:", response);
// Assuming the response is an array and we need the first element // Assuming the response is an array and we need the first element
if (response.length > 0) { if (response.length > 0) {
@ -286,7 +286,7 @@
type: 'GET', type: 'GET',
data: {counterId: counterId}, data: {counterId: counterId},
success: function (response) { success: function (response) {
console.log("Fetched Booking Details:", response);
// console.log("Fetched Booking Details:", response);
if (response.length > 0) { if (response.length > 0) {
var bookingDetails = response[0]; var bookingDetails = response[0];

24
src/main/resources/templates/counter/viewhistory.html

@ -603,7 +603,7 @@
//function to get the slot value //function to get the slot value
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {
@ -613,7 +613,7 @@
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
@ -624,7 +624,7 @@
method: 'GET', method: 'GET',
data: {bookingId: bookingId}, data: {bookingId: bookingId},
success: function (response) { success: function (response) {
console.log("response=", response);
// console.log("response=", response);
document.getElementById("name").innerHTML = response.users.name; document.getElementById("name").innerHTML = response.users.name;
document.getElementById("mobileno").innerHTML = response.users.mobileNo; document.getElementById("mobileno").innerHTML = response.users.mobileNo;
document.getElementById("email").innerHTML = response.users.email; document.getElementById("email").innerHTML = response.users.email;
@ -693,8 +693,8 @@
var bookingId = booking; var bookingId = booking;
var mobileNum = mobileNo; var mobileNum = mobileNo;
console.log("mobileNumber", mobileNum);
console.log("bookingId", bookingId);
// console.log("mobileNumber", mobileNum);
// console.log("bookingId", bookingId);
// Check if the booking type is OFFLINE // Check if the booking type is OFFLINE
if (bookingType === "ONLINE") { if (bookingType === "ONLINE") {
@ -794,7 +794,7 @@
return false; return false;
} }
function verifyOtp() { function verifyOtp() {
console.log("cancel booking hhjjjh" + cancelBookingLogin);
// console.log("cancel booking hhjjjh" + cancelBookingLogin);
var otpInputs = $('.otp-input'); var otpInputs = $('.otp-input');
var otpValue = ''; var otpValue = '';
otpInputs.each(function () { otpInputs.each(function () {
@ -819,7 +819,7 @@
dataType: 'text', dataType: 'text',
success: function (bodyMessage) { success: function (bodyMessage) {
if (bodyMessage.trim() == "Success") { if (bodyMessage.trim() == "Success") {
console.log("OTP is Verified!!!");
// console.log("OTP is Verified!!!");
$('#otpForm').modal('hide'); // Hide OTP form modal $('#otpForm').modal('hide'); // Hide OTP form modal
$.ajax({ $.ajax({
@ -831,7 +831,7 @@
comments: 'user cancelled' comments: 'user cancelled'
}, },
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
if (response.trim() === "success") { if (response.trim() === "success") {
Swal.fire( Swal.fire(
'Cancelled!', 'Cancelled!',
@ -867,7 +867,7 @@
} }
}, },
error: function () { error: function () {
console.log("Error verifying OTP");
// console.log("Error verifying OTP");
} }
}); });
return false; return false;
@ -895,7 +895,7 @@
var formData = new FormData(this); var formData = new FormData(this);
var counterId = $('#counterId').val(); var counterId = $('#counterId').val();
console.log("counterId: " + counterId);
// console.log("counterId: " + counterId);
$.ajax({ $.ajax({
url: '/communityhall/user/api/saveCancellation', url: '/communityhall/user/api/saveCancellation',
type: 'POST', type: 'POST',
@ -938,7 +938,7 @@
$('#totalamount').val(response.amountReceived); // Adjust according to your response structure $('#totalamount').val(response.amountReceived); // Adjust according to your response structure
}, },
error: function (error) { error: function (error) {
console.log("Error fetching booking details: ", error);
// console.log("Error fetching booking details: ", error);
} }
}); });
} }
@ -950,7 +950,7 @@
alert("Booking ID is missing!"); alert("Booking ID is missing!");
return false; return false;
} }
console.log("Submitting form with bookingId=", bookingId);
// console.log("Submitting form with bookingId=", bookingId);
return true; return true;
} }

8
src/main/resources/templates/departments/counsellor/dashboard.html

@ -214,7 +214,7 @@
keyboard: false keyboard: false
}); });
$('#rejectForm').modal('show'); $('#rejectForm').modal('show');
console.log(list)
// console.log(list)
document.getElementById("uniqid").value = list.uniqueid; document.getElementById("uniqid").value = list.uniqueid;
document.getElementById("petna").value = list.petname; document.getElementById("petna").value = list.petname;
document.getElementById("speci").value = list.species; document.getElementById("speci").value = list.species;
@ -253,7 +253,7 @@
data: {'id': id, 'reason': reason}, data: {'id': id, 'reason': reason},
success: function (bodyMessage) { success: function (bodyMessage) {
if (bodyMessage == "success") { if (bodyMessage == "success") {
console.log("done");
// console.log("done");
Swal.fire( Swal.fire(
'Done', 'Done',
'Successfully Rejected to the ID:' + id, 'Successfully Rejected to the ID:' + id,
@ -277,7 +277,7 @@
} }
function viewOwner(mobilenum) { function viewOwner(mobilenum) {
console.log(mobilenum);
// console.log(mobilenum);
// let list; // let list;
let own; let own;
$.ajax({ $.ajax({
@ -342,7 +342,7 @@
function getbydate() { function getbydate() {
var x = document.getElementById("fromdate").value; var x = document.getElementById("fromdate").value;
var y = document.getElementById("todate").value; var y = document.getElementById("todate").value;
console.log(x, y);
// console.log(x, y);
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: '/api/getbydate', url: '/api/getbydate',

2
src/main/resources/templates/departments/counsellor/user-pending.html

@ -240,7 +240,7 @@
'usersid': userId 'usersid': userId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showUserInfo(x) showUserInfo(x)
} }
}); });

2
src/main/resources/templates/departments/gccstaff/user-approved.html

@ -239,7 +239,7 @@
'usersid': userId 'usersid': userId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showUserInfo(x) showUserInfo(x)
} }
}); });

6
src/main/resources/templates/departments/gccstaff/user-pending.html

@ -250,7 +250,7 @@
'usersid': userId 'usersid': userId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showUserInfo(x) showUserInfo(x)
} }
}); });
@ -348,7 +348,7 @@
}).then((result) => { }).then((result) => {
/* Read more about isConfirmed, isDenied below */ /* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) { if (result.isConfirmed) {
console.log("Submitting rejection...");
// console.log("Submitting rejection...");
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -359,7 +359,7 @@
'userId': id 'userId': id
}, },
success: function (data, textStatus, xhr) { success: function (data, textStatus, xhr) {
console.log("Rejection successful");
// console.log("Rejection successful");
if (xhr.status === 200) { // Check if the response status is OK if (xhr.status === 200) { // Check if the response status is OK
Swal.fire( Swal.fire(
'Done', 'Done',

2
src/main/resources/templates/departments/gccstaff/user-reject.html

@ -246,7 +246,7 @@
'usersid': userId 'usersid': userId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showUserInfo(x) showUserInfo(x)
} }
}); });

6
src/main/resources/templates/departments/pensioner/user-pending.html

@ -250,7 +250,7 @@
'usersid': userId 'usersid': userId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showUserInfo(x) showUserInfo(x)
} }
}); });
@ -348,7 +348,7 @@
}).then((result) => { }).then((result) => {
/* Read more about isConfirmed, isDenied below */ /* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) { if (result.isConfirmed) {
console.log("Submitting rejection...");
// console.log("Submitting rejection...");
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -359,7 +359,7 @@
'userId': id 'userId': id
}, },
success: function (data, textStatus, xhr) { success: function (data, textStatus, xhr) {
console.log("Rejection successful");
// console.log("Rejection successful");
if (xhr.status === 200) { // Check if the response status is OK if (xhr.status === 200) { // Check if the response status is OK
Swal.fire( Swal.fire(
'Done', 'Done',

2
src/main/resources/templates/departments/pensioner/user-reject.html

@ -246,7 +246,7 @@
'usersid': userId 'usersid': userId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showUserInfo(x) showUserInfo(x)
} }
}); });

16
src/main/resources/templates/fragments/PaymentScript.html

@ -119,7 +119,7 @@
url: '/communityhall/payment/api/payment-request', url: '/communityhall/payment/api/payment-request',
data: {'userId': userIdd, 'bookingId': bookingIdd}, data: {'userId': userIdd, 'bookingId': bookingIdd},
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
if (response.error) { if (response.error) {
alert("please Contact Admin..") alert("please Contact Admin..")
} else { } else {
@ -165,7 +165,7 @@
url: '/communityhall/payment/api/additionaldamage-payment-request', url: '/communityhall/payment/api/additionaldamage-payment-request',
data: {'userId': userIdd, 'bookingId': bookingIdd}, data: {'userId': userIdd, 'bookingId': bookingIdd},
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
if (response.error) { if (response.error) {
alert("please Contact Admin..") alert("please Contact Admin..")
} else { } else {
@ -218,12 +218,12 @@
$(document).off("click", "#extrapaymentbtnSubmit").on("click", "#extrapaymentbtnSubmit", function (e) { $(document).off("click", "#extrapaymentbtnSubmit").on("click", "#extrapaymentbtnSubmit", function (e) {
e.preventDefault(); e.preventDefault();
console.log(txansactionId);
console.log(consumerMobileNo);
console.log(token);
console.log(merchantId);
console.log(consumerId);
console.log(amount);
// console.log(txansactionId);
// console.log(consumerMobileNo);
// console.log(token);
// console.log(merchantId);
// console.log(consumerId);
// console.log(amount);
var reqJson = { var reqJson = {

4
src/main/resources/templates/fragments/head.html

@ -37,13 +37,13 @@
<!--<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />--> <!--<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css" />--> <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\swiper-bundle.min.css">
<link rel="stylesheet" type="text/css" href="css\swiper-bundle.min.css">
<!--<link rel="stylesheet" href="https://unpkg.com/viewerjs/dist/viewer.min.css">--> <!--<link rel="stylesheet" href="https://unpkg.com/viewerjs/dist/viewer.min.css">-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.css">--> <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.css">-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\viewer.min.css">
<link rel="stylesheet" type="text/css" href="css\viewer.min.css">

124
src/main/resources/templates/fragments/header-counter.html

@ -1,73 +1,73 @@
<header id="page-header" xmlns:th="http://www.w3.org/1999/xhtml"> <header id="page-header" xmlns:th="http://www.w3.org/1999/xhtml">
<!-- Header Content -->
<div class="content-header">
<!-- Left Section -->
<div class="space-x-1">
<!-- Toggle Sidebar -->
<!-- Layout API, functionality initialized in Template._uiApiLayout()-->
<button type="button" class="btn btn-alt-secondary" data-toggle="layout" data-action="sidebar_toggle">
<i class="fa fa-fw fa-bars"></i>
</button>
<!-- END Toggle Sidebar -->
</div>
<!-- END Left Section -->
<div class="row pt-1" style="margin:0px;">
<!--<div class="col-2 text-center p-1">
<!-- Header Content -->
<div class="content-header">
<!-- Left Section -->
<div class="space-x-1">
<!-- Toggle Sidebar -->
<!-- Layout API, functionality initialized in Template._uiApiLayout()-->
<button type="button" class="btn btn-alt-secondary" data-toggle="layout" data-action="sidebar_toggle">
<i class="fa fa-fw fa-bars"></i>
</button>
<!-- END Toggle Sidebar -->
</div>
<!-- END Left Section -->
<div class="row pt-1" style="margin:0px;">
<!--<div class="col-2 text-center p-1">
<img src="assets/media/images/tamilnadu-logo.png" style="padding-top:2px;" width="30px" alt="Tamilnadu Logo"> <img src="assets/media/images/tamilnadu-logo.png" style="padding-top:2px;" width="30px" alt="Tamilnadu Logo">
</div>--> </div>-->
<div class="col-2 text-center p-1">
<img src='media/images/logo-sm.png' width="37" alt="Logo Sm">
</div>
<div class="col-8 text-center p-0" style="font-size:15px;">
பெருநகர சென்னை மாநகராட்சி
</div>
<!--<div class="col-2 text-center p-1">
<div class="col-2 text-center p-1">
<img src='media/images/logo-sm.png' width="37" alt="Logo Sm">
</div>
<div class="col-8 text-center p-0" style="font-size:15px;">
பெருநகர சென்னை மாநகராட்சி
</div>
<!--<div class="col-2 text-center p-1">
<img src='assets/media/images/logo-sm.png' width="32" alt="Logo Sm"> <img src='assets/media/images/logo-sm.png' width="32" alt="Logo Sm">
</div>--> </div>-->
</div>
<!-- Right Section -->
<div class="space-x-1">
<!-- User Dropdown -->
<button type="button" class="btn btn-alt-secondary" id="page-header-user-dropdown" data-bs-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="far fa-fw fa-user me-1"></i>
<span class="d-none d-sm-inline ms-1" th:text="${countername}"></span>
</div>
<!-- Right Section -->
<div class="space-x-1">
<!-- User Dropdown -->
<button type="button" class="btn btn-alt-secondary" id="page-header-user-dropdown" data-bs-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="far fa-fw fa-user me-1"></i>
<span class="d-none d-sm-inline ms-1" th:text="${countername}"></span>
</button>
</button>
<!-- END User Dropdown -->
<!-- END User Dropdown -->
<!-- Header Search -->
<div id="page-header-search" class="overlay-header bg-header-dark">
<div class="bg-white-10">
<div class="content-header">
<form class="w-100" action="be_pages_generic_search.html" method="POST">
<div class="input-group">
<!-- Layout API, functionality initialized in Template._uiApiLayout() -->
<button type="button" class="btn btn-alt-primary" data-toggle="layout"
data-action="header_search_off">
<i class="fa fa-fw fa-times-circle"></i>
</button>
<input type="text" class="form-control border-0" placeholder="Search or hit ESC.."
id="page-header-search-input" name="page-header-search-input">
</div>
</form>
</div>
</div>
</div>
<!-- END Header Search -->
<!-- Header Search -->
<div id="page-header-search" class="overlay-header bg-header-dark">
<div class="bg-white-10">
<div class="content-header">
<form class="w-100" action="be_pages_generic_search.html" method="POST">
<div class="input-group">
<!-- Layout API, functionality initialized in Template._uiApiLayout() -->
<button type="button" class="btn btn-alt-primary" data-toggle="layout"
data-action="header_search_off">
<i class="fa fa-fw fa-times-circle"></i>
</button>
<input type="text" class="form-control border-0" placeholder="Search or hit ESC.."
id="page-header-search-input" name="page-header-search-input">
</div>
</form>
</div>
</div>
</div>
<!-- END Header Search -->
<!-- Header Loader -->
<!-- Please check out the Loaders page under Components category to see examples of showing/hiding it -->
<div id="page-header-loader" class="overlay-header bg-header-dark">
<div class="bg-white-10">
<div class="content-header">
<div class="w-100 text-center">
<i class="fa fa-fw fa-sun fa-spin text-white"></i>
</div>
</div>
</div>
</div>
<!-- END Header Loader -->
<!-- Header Loader -->
<!-- Please check out the Loaders page under Components category to see examples of showing/hiding it -->
<div id="page-header-loader" class="overlay-header bg-header-dark">
<div class="bg-white-10">
<div class="content-header">
<div class="w-100 text-center">
<i class="fa fa-fw fa-sun fa-spin text-white"></i>
</div>
</div>
</div>
</div>
<!-- END Header Loader -->
</header> </header>

2266
src/main/resources/templates/fragments/logRegiOtpScript.html
File diff suppressed because it is too large
View File

2
src/main/resources/templates/fragments/loginhead.html

@ -38,7 +38,7 @@
<!-- Latest Swiper CSS --> <!-- Latest Swiper CSS -->
<!--<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />--> <!--<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css" />--> <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\swiper-bundle.min.css">
<link rel="stylesheet" type="text/css" href="css\swiper-bundle.min.css">
<!-- You can include a specific file from css/themes/ folder to alter the default color theme of the template. eg: --> <!-- You can include a specific file from css/themes/ folder to alter the default color theme of the template. eg: -->
<!-- <link rel="stylesheet" id="css-theme" href="assets/css/themes/xwork.min.css"> --> <!-- <link rel="stylesheet" id="css-theme" href="assets/css/themes/xwork.min.css"> -->

858
src/main/resources/templates/fragments/loginreg.html

@ -1,408 +1,494 @@
<style> <style>
.required-field {
color: red;
}
.required-field {
color: red;
}
.error {
border: 1px solid red;
}
.error {
border: 1px solid red;
}
.error-message {
color: red;
font-size: 12px;
padding-top: 5px;
}
.error-message {
color: red;
font-size: 12px;
padding-top: 5px;
}
.form-control[readonly] {
background-color: white;
}
.form-control[readonly] {
background-color: white;
}
.swal2-container {
z-index: 9999999999999 !important;
/* Adjust this value if needed */
}
.form-check-label {
padding-left:0px
}
.swal2-container {
z-index: 9999999999999 !important;
/* Adjust this value if needed */
}
.form-check-label {
padding-left: 0px
}
</style> </style>
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModalLabel" <div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="loginModalLabel">Login or Register</h5>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hid den="true" style="color:black">&times;</span>
</button>
</div>
<div class="modal-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="loginTabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="login-tab" data-toggle="tab" href="#login" role="tab"
aria-controls="login" aria-selected="true">Login</a>
</li>
<li class="nav-item">
<a class="nav-link" id="register-tab" data-toggle="tab" href="#register" role="tab"
aria-controls="register" aria-selected="false">Register</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content mt-3" id="loginTabContent">
<div class="tab-pane fade show active" id="login" role="tabpanel" aria-labelledby="login-tab">
<!-- Login Form -->
<form>
<div class="form-group">
<label for="mobileNumber" style="margin-right:29%">Mobile Number<span
class="required-field">*</span></label>
<input type="tel" class="form-control custom-input" id="mobileNumber"
name="mobileNumber" minlength="10" maxlength="10" pattern="[0-9]{10}"
placeholder="Enter your mobile number" style="width: 49%;margin-left: 28%;" required
onkeypress="return event.charCode >= 48 && event.charCode <= 57">
</div>
aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="loginModalLabel">Login or Register</h5>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hid den="true" style="color:black">&times;</span>
</button>
</div>
<div class="modal-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="loginTabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="login-tab" data-toggle="tab" href="#login" role="tab"
aria-controls="login" aria-selected="true">Login</a>
</li>
<li class="nav-item">
<a class="nav-link" id="register-tab" data-toggle="tab" href="#register" role="tab"
aria-controls="register" aria-selected="false">Register</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content mt-3" id="loginTabContent">
<div class="tab-pane fade show active" id="login" role="tabpanel" aria-labelledby="login-tab">
<!-- Login Form -->
<form>
<div class="form-group">
<label for="mobileNumber" style="margin-right:29%">Mobile Number<span
class="required-field">*</span></label>
<input type="tel" class="form-control custom-input" id="mobileNumber"
name="mobileNumber" minlength="10" maxlength="10" pattern="[0-9]{10}"
placeholder="Enter your mobile number" style="width: 49%;margin-left: 28%;"
required
onkeypress="return event.charCode >= 48 && event.charCode <= 57">
</div>
<div class="form-group text-center">
<button type="button" class="btn btn-info" id="sendOTPButton">Send OTP</button>
<button type="button" class="btn btn-danger" id="signUpButton"
onclick="redirectToSignUp()">Sign Up
</button>
</div>
</form>
</div>
<div class="tab-pane fade" id="register" role="tabpanel" aria-labelledby="register-tab">
<!-- Register Form -->
<form action="/communityhall/user/newregistrationform" id="newform" method="post"
name="newform"
onsubmit="return validateUserType();" enctype="multipart/form-data">
<!-- Row 1 with Name, Father Name, and Mobile No -->
<div class="row">
<div class="col-sm-4" style="margin-left:0%">
<div class="form-group">
<label for="userType">User Type:<span
class="required-field">*</span></label>
<select class="form-control" id="userType" name="usertype"
placeholder="User Type" required>
<option value="">Select</option>
<option value="PUBLIC">General Public</option>
<option value="PENSIONER">GCC Pensioner</option>
<option value="COUNCILLOR">Councillor</option>
<option value="GCC_EMPLOYEE">GCC Employee</option>
</select>
</div>
</div>
<input type="hidden" class="form-control" id="governmentId" name="governmentId">
<input type="hidden" class="form-control" id="department" name="department">
<div class="hidden" id="employeeFields">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="form-group text-center">
<button type="button" class="btn btn-info" id="sendOTPButton">Send OTP</button>
<button type="button" class="btn btn-danger" id="signUpButton"
onclick="redirectToSignUp()">Sign Up</button>
</div>
</form>
</div>
<div class="tab-pane fade" id="register" role="tabpanel" aria-labelledby="register-tab">
<!-- Register Form -->
<form action="/communityhall/user/newregistrationform" id="newform" method="post" name="newform"
onsubmit="return validateUserType();" enctype="multipart/form-data">
<!-- Row 1 with Name, Father Name, and Mobile No -->
<div class="row">
<div class="col-sm-4" style="margin-left:0%">
<div class="form-group">
<label for="employeeId">Employee ID<span
class="required">*</span>:</label>
<input type="text" class="form-control" id="employeeId"
name="employeeId" placeholder="Employee ID">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="userType">User Type:<span class="required-field">*</span></label>
<select class="form-control" id="userType" name="usertype"
placeholder="User Type" required>
<option value="">Select</option>
<option value="PUBLIC">General Public</option>
<option value="PENSIONER">GCC Pensioner</option>
<option value="COUNCILLOR">Councillor</option>
<option value="GCC_EMPLOYEE">GCC Employee</option>
</select>
</div>
</div>
<input type="hidden" class="form-control" id="governmentId" name="governmentId">
<input type="hidden" class="form-control" id="department" name="department">
<div class="hidden" id="employeeFields">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label for="employeedepartment">Employee Department<span
class="required">*</span>:</label>
<input type="text" class="form-control" id="employeedepartment"
name="employeedepartment"
placeholder="Employee Department "
style="background-color: white;" readonly>
</div>
</div>
<label for="employeeId">Employee ID<span
class="required">*</span>:</label>
<input type="text" class="form-control" id="employeeId"
name="employeeId" placeholder="Employee ID">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
</div>
</div>
<div class="hidden" id="pensionerFields">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="pensionerId">Pensioner ID<span
class="required">*</span>:</label>
<input type="text" class="form-control" id="pensionerId"
name="pensionerId" placeholder="Pensioner ID">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="department">Department:</label>
<input type="text" class="form-control" id="pendionerdepartment"
name="pendionerdepartment" placeholder="Department"
style="background-color: white;" readonly>
</div>
</div>
</div>
<div id="validationResult"></div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label for="name">Name:<span class="required-field">*</span></label>
<input type="text" class="form-control" id="name" name="name"
placeholder="First Name" required>
</div>
<small id="emailHelp" class="form-text text-muted"></small>
</div>
<label for="employeedepartment">Employee Department<span
class="required">*</span>:</label>
<input type="text" class="form-control" id="employeedepartment"
name="employeedepartment" placeholder="Employee Department "
style="background-color: white;" readonly>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="mobileno">Mobile Number:<span
class="required-field">*</span></label>
<input type="text" class="form-control" id="mobileno" name="mobileNo"
placeholder="Mobile No" minlength="10" maxlength="10"
pattern="[0-9]{10}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57"
required>
</div>
</div>
</div>
</div>
<div class="hidden" id="pensionerFields">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="pensionerId">Pensioner ID<span
class="required">*</span>:</label>
<input type="text" class="form-control" id="pensionerId"
name="pensionerId" placeholder="Pensioner ID">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="department">Department:</label>
<input type="text" class="form-control" id="pendionerdepartment"
name="pendionerdepartment" placeholder="Department"
style="background-color: white;" readonly>
</div>
</div>
</div>
<div id="validationResult"></div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label for="name">Name:<span class="required-field">*</span></label>
<input type="text" class="form-control" id="name" name="name"
placeholder="First Name" required>
</div>
<small id="emailHelp" class="form-text text-muted"></small>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="mobileno">Aadhar Number:<span
class="required-field">*</span></label>
<input type="text" class="form-control" id="aadharnumber"
name="aadharnumber"
placeholder="Aadhar No" minlength="12" maxlength="12"
pattern="[0-9]{12}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57"
required>
</div>
</div>
</div>
<!-- Row 2 with Email, Door No, and Street -->
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label for="mobileno">Mobile Number:<span
class="required-field">*</span></label>
<input type="text" class="form-control" id="mobileno" name="mobileNo"
placeholder="Mobile No" minlength="10" maxlength="10" pattern="[0-9]{10}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57" required>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="mobileno">Aadhar Number:<span
class="required-field">*</span></label>
<input type="text" class="form-control" id="aadharnumber" name="aadharnumber"
placeholder="Aadhar No" minlength="12" maxlength="12" pattern="[0-9]{12}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57" required>
</div>
</div>
</div>
<!-- Row 2 with Email, Door No, and Street -->
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label for="userPhoto">Profile Photo:</label>
<input type="file" class="form-control profile-file-upload"
id="userPhoto" name="userPhoto" accept="image/jpeg, image/png, image/gif">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="email">E-Mail ID:</label>
<input type="email" class="form-control" id="email" name="email"
placeholder="E-Mail ID" maxlength="255">
</div>
<small id="emailHelps" class="form-text text-muted"></small>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="doorNo">Door No:<span class="required-field">*</span></label>
<input type="text" class="form-control" id="doorNo" name="doorNo"
placeholder="Door No" required>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label for="street">Street:<span class="required-field">*</span></label>
<input type="text" class="form-control" id="street" name="street"
placeholder="Street" required>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="area">Area:<span class="required-field">*</span></label>
<input type="area" class="form-control" id="area" name="area" placeholder="Area"
required>
</div>
<small id="emailHelped" class="form-text text-muted"></small>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="location">Location:<span class="required-field">*</span></label>
<input type="text" class="form-control" id="location" name="location"
placeholder="Location" required>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="pincode">Pincode:<span class="required-field">*</span></label>
<input type="text" class="form-control" id="pincode" name="pinCode"
placeholder="Pincode" minlength="6" maxlength="6" pattern="[0-9]{6}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57" required>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="userPhoto">Profile Photo:</label>
<input type="file" class="form-control profile-file-upload"
id="userPhoto" name="userPhoto"
accept="image/jpeg, image/png, image/gif">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="email">E-Mail ID:</label>
<input type="email" class="form-control" id="email" name="email"
placeholder="E-Mail ID" maxlength="255">
</div>
<small id="emailHelps" class="form-text text-muted"></small>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="doorNo">Door No:<span
class="required-field">*</span></label>
<input type="text" class="form-control" id="doorNo" name="doorNo"
placeholder="Door No" required>
</div>
</div>
</div>
<div class="row">
<div class="form-row">
<div class="col text-center">
<button type="submit" class="btn btn-primary"
style="background-color: #2c726c !important">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="street">Street:<span class="required-field">*</span></label>
<input type="text" class="form-control" id="street" name="street"
placeholder="Street" required>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="area">Area:<span class="required-field">*</span></label>
<input type="area" class="form-control" id="area" name="area"
placeholder="Area"
required>
</div>
<small id="emailHelped" class="form-text text-muted"></small>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="location">Location:<span
class="required-field">*</span></label>
<input type="text" class="form-control" id="location" name="location"
placeholder="Location" required>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="pincode">Pincode:<span
class="required-field">*</span></label>
<input type="text" class="form-control" id="pincode" name="pinCode"
placeholder="Pincode" minlength="6" maxlength="6"
pattern="[0-9]{6}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57"
required>
</div>
</div>
</div>
<div class="form-row">
<div class="col text-center">
<button type="submit" class="btn btn-primary"
style="background-color: #2c726c !important">Submit
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div> </div>
<div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="#" th:action="@{/otpForm}" th:object="${otpForm}" method="post"
onsubmit="return verifyOtp(); ">
<div class="modal-header">
<h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP Login</h6>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"
style="color:black;border: white;background-color: white;">
<span aria-hidden="true">&times;</span></button>
</div><!--end modal-header-->
<div class="modal-body">
<div class="row">
<div class="mb-3 text-center">
<img src="media/images/mobileotp.png" width="50%" alt="Mobileotp">
</div>
<div class="mb-0 text-center">
<h4>OTP Verification</h4>
<p class="text-mute">Enter the OTP sent to <b class="text-info" id="mobilenotxt"></b>
</p>
<p class="text-danger" id="otperror"></p>
</div>
<div class="mb-3 text-center">
<div class="otp-input-box">
<input type="text" maxlength="1" class="otp-input" id="otp1" required />
<input type="text" maxlength="1" class="otp-input" id="otp2" required />
<input type="text" maxlength="1" class="otp-input" id="otp3" required />
<input type="text" maxlength="1" class="otp-input" id="otp4" required />
<input type="text" maxlength="1" class="otp-input" id="otp5" required />
</div>
</div>
<div class="mb-3 text-center">
<div id="resend-containers">
<p class="mb-0">Didn't receive OTP?</p>
<p class="mb-0 text-info" id="resendlink"></p>
</div>
</div>
</div><!--end row-->
</div><!--end modal-body-->
<div class="modal-footer">
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary btn-sm" id="but">Verify OTP</button>
</div><!--end modal-footer-->
</form>
</div><!--end modal-content-->
</div><!--end modal-dialog-->
<div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="#" th:action="@{/otpForm}" th:object="${otpForm}" method="post"
onsubmit="return verifyOtp(); ">
<div class="modal-header">
<h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP Login</h6>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"
style="color:black;border: white;background-color: white;">
<span aria-hidden="true">&times;</span></button>
</div><!--end modal-header-->
<div class="modal-body">
<div class="row">
<div class="mb-3 text-center">
<img src="media/images/mobileotp.png" width="50%" alt="Mobileotp">
</div>
<div class="mb-0 text-center">
<h4>OTP Verification</h4>
<p class="text-mute">Enter the OTP sent to <b class="text-info"
id="mobilenotxt"></b>
</p>
<p class="text-danger" id="otperror"></p>
</div>
<div class="mb-3 text-center">
<div class="otp-input-box">
<input type="text" maxlength="1" class="otp-input" id="otp1" required/>
<input type="text" maxlength="1" class="otp-input" id="otp2" required/>
<input type="text" maxlength="1" class="otp-input" id="otp3" required/>
<input type="text" maxlength="1" class="otp-input" id="otp4" required/>
<input type="text" maxlength="1" class="otp-input" id="otp5" required/>
</div>
</div>
<div class="mb-3 text-center">
<div id="resend-containers">
<p class="mb-0">Didn't receive OTP?</p>
<p class="mb-0 text-info" id="resendlink"></p>
</div>
</div>
</div><!--end row-->
</div><!--end modal-body-->
<div class="modal-footer">
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close
</button>
<button type="submit" class="btn btn-primary btn-sm" id="but">Verify OTP</button>
</div><!--end modal-footer-->
</form>
</div><!--end modal-content-->
</div><!--end modal-dialog-->
</div> </div>
<!--profile popup--> <!--profile popup-->
<!-- Modal --> <!-- Modal -->
<div class="modal fade" id="profileModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header" style="background-color: rgb(21,69,93);">
<h5 class="modal-title" id="exampleModalLabel" style="color: white;">Profile</h5>
<button type="button" class="close" style="color: white;" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4">
<div style="border-radius: 50%; overflow: hidden; width: 110px; height: 110px; margin: 0 auto;box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);">
<img id="p_image" name="p_image" style="width: 100%; height: 100%;" alt="-">
</div>
<input type="file" id="fileInput" style="display:none;">
</div>
<div class="col-sm-4"></div>
<div class="modal fade" id="profileModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header" style="background-color: rgb(21,69,93);">
<h5 class="modal-title" id="exampleModalLabel" style="color: white;">Profile</h5>
<button type="button" class="close" style="color: white;" data-bs-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div> </div>
<div class="row">
<input type="hidden" class="form-control" id="p_userId">
<div class="col-sm-6">
<label for="p_name">Name:</label>
<input type="text" class="form-control" id="p_name" readonly>
</div>
<div class="col-sm-6">
<label for="p_email">E-Mail ID:</label>
<input type="mail" class="form-control" id="p_email" readonly maxlength="255" oninput="validateEmail()">
</div>
<div class="col-sm-6">
<label for="p_mobnum">Mobile No:</label>
<input type="text" class="form-control" id="p_mobnum" readonly>
</div>
<div class="col-sm-6">
<label for="p_doornum">Door no:</label>
<input type="text" class="form-control" id="p_doornum" readonly>
</div>
<div class="col-sm-6">
<label for="p_area">Area:</label>
<input type="text" class="form-control" id="p_area" readonly>
</div>
<div class="col-sm-6">
<label for="p_location">Location:</label>
<input type="text" class="form-control" id="p_location" readonly>
</div>
<div class="col-sm-6">
<label for="p_pincode">Pincode:</label>
<input type="text" class="form-control" id="p_pincode" readonly minlength="6" maxlength="6" pattern="[0-9]{6}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57">
</div>
<div class="col-sm-6">
<label for="p_userstatus">User Status:</label>
<input type="text" class="form-control" id="p_userstatus" readonly>
</div>
<div class="col-sm-6" id="rejectionReasonContainer" style="display:none;">
<label for="p_rejectionreason">Rejection Reason:</label>
<input type="text" class="form-control" id="p_rejectionreason" readonly>
</div>
<div class="col-sm-6" readonly>
<label for="p_usertype">User Type:</label>
<select id="p_usertype" class="form-control">
<option value="PUBLIC">General Public</option>
<!--<option value="FAMILYPENSIONER">Family Pensioner</option>-->
<option value="PENSIONER">GCC Pensioner</option>
<option value="COUNCILLOR">Councillor</option>
<option value="GCC_EMPLOYEE">Gcc Employee</option>
</select>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4">
<div style="border-radius: 50%; overflow: hidden; width: 110px; height: 110px; margin: 0 auto;box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);">
<img id="p_image" name="p_image" style="width: 100%; height: 100%;" alt="-">
</div>
<input type="file" id="fileInput" style="display:none;">
</div>
<div class="col-sm-4"></div>
</div>
<div class="row">
<input type="hidden" class="form-control" id="p_userId">
<div class="col-sm-6">
<label for="p_name">Name:</label>
<input type="text" class="form-control" id="p_name" readonly>
</div>
<div class="col-sm-6">
<label for="p_email">E-Mail ID:</label>
<input type="mail" class="form-control" id="p_email" readonly maxlength="255"
oninput="validateEmail()">
</div>
<div class="col-sm-6">
<label for="p_mobnum">Mobile No:</label>
<input type="text" class="form-control" id="p_mobnum" readonly>
</div>
<div class="col-sm-6">
<label for="p_doornum">Door no:</label>
<input type="text" class="form-control" id="p_doornum" readonly>
</div>
<div class="col-sm-6">
<label for="p_area">Area:</label>
<input type="text" class="form-control" id="p_area" readonly>
</div>
<div class="col-sm-6">
<label for="p_location">Location:</label>
<input type="text" class="form-control" id="p_location" readonly>
</div>
<div class="col-sm-6">
<label for="p_pincode">Pincode:</label>
<input type="text" class="form-control" id="p_pincode" readonly minlength="6"
maxlength="6" pattern="[0-9]{6}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57">
</div>
<div class="col-sm-6">
<label for="p_userstatus">User Status:</label>
<input type="text" class="form-control" id="p_userstatus" readonly>
</div>
<div class="col-sm-6" id="rejectionReasonContainer" style="display:none;">
<label for="p_rejectionreason">Rejection Reason:</label>
<input type="text" class="form-control" id="p_rejectionreason" readonly>
</div>
<div class="col-sm-6" readonly>
<label for="p_usertype">User Type:</label>
<select id="p_usertype" class="form-control">
<option value="PUBLIC">General Public</option>
<!--<option value="FAMILYPENSIONER">Family Pensioner</option>-->
<option value="PENSIONER">GCC Pensioner</option>
<option value="COUNCILLOR">Councillor</option>
<option value="GCC_EMPLOYEE">Gcc Employee</option>
</select>
</div>
</div>
</div> </div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="updateButton" style="display:none;" onclick="updateUserDetails();">Update</button>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="updateButton" style="display:none;"
onclick="updateUserDetails();">Update
</button>
</div>
</div>
</div>
</div>
<div class="modal fade backdrop" id="resetpinForm" data-backdrop="static" tabindex="-1" role="dialog"
aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="#" onsubmit="return checkofficialMobileNo();">
<div class="block block-rounded block-themed block-transparent mb-0">
<div class="block-header bg-primary-dark">
<h3 class="block-title" id="mtitl">Reset PIN Mobile NO<span
class="d-none d-sm-inline ms-1" th:text="${mobileno}"></span></h3>
<div class="block-options">
<button type="button" class="btn-block-option" data-bs-dismiss="modal"
aria-label="Close">
<i class="fa fa-fw fa-times"></i>
</button>
</div>
</div>
<div class="block-content">
<div class="mb-4">
<label class="form-label">Mobile Number<span class="text-danger">*</span></label>
<input type="text" th:value="${mobileno}" class="form-control text-center"
name="resetpinmobilenumber" id="resetpinmobilenumber"/>
</div>
<div class="mb-4">
<label class="form-label">Old Password<span class="text-danger">*</span></label>
<input type="text" maxlength="4" class="form-control text-center" name="oldpin"
id="oldpin" placeholder="Numbers Only"/>
</div>
<div class="mb-4">
<label class="form-label">New 4 Digit PIN <span class="text-danger">*</span></label>
<input type="password" maxlength="4" class="form-control text-center" name="newpin"
id="newpin" placeholder="Numbers Only" required/>
</div>
</div>
<div class="block-content block-content-full text-end bg-body" id="mbutton">
<button type="button" class="btn btn-sm btn-alt-secondary" data-bs-dismiss="modal">
Close
</button>
<button type="submit" class="btn btn-sm btn-primary">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div> </div>
<div class="modal fade backdrop" id="resetpinForm" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="#" onsubmit="return checkofficialMobileNo();">
<div class="block block-rounded block-themed block-transparent mb-0">
<div class="block-header bg-primary-dark">
<h3 class="block-title" id="mtitl">Reset PIN Mobile NO<span class="d-none d-sm-inline ms-1" th:text="${mobileno}"></span></h3>
<div class="block-options">
<button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
<i class="fa fa-fw fa-times"></i>
</button>
</div>
</div>
<div class="block-content">
<div class="mb-4">
<label class="form-label">Mobile Number<span class="text-danger">*</span></label>
<input type="text" th:value="${mobileno}" class="form-control text-center" name="resetpinmobilenumber" id="resetpinmobilenumber" />
</div>
<div class="mb-4">
<label class="form-label">Old Password<span class="text-danger">*</span></label>
<input type="text" maxlength="4" class="form-control text-center" name="oldpin" id="oldpin" placeholder="Numbers Only"/>
</div>
<div class="mb-4">
<label class="form-label">New 4 Digit PIN <span class="text-danger">*</span></label>
<input type="password" maxlength="4" class="form-control text-center" name="newpin" id="newpin" placeholder="Numbers Only" required />
</div>
</div>
<div class="block-content block-content-full text-end bg-body" id="mbutton">
<button type="button" class="btn btn-sm btn-alt-secondary" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-sm btn-primary">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!--Conuter Login Modal-->
<div class="modal fade" id="cloginModal" tabindex="-1" role="dialog" aria-labelledby="cloginModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="cloginModalLabel">Counter Login</h5>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hid den="true" style="color:black">&times;</span>
</button>
</div>
<div class="modal-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="cloginTabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="clogin-tab" data-toggle="tab" href="#login" role="tab"
aria-controls="login" aria-selected="true">Login</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content mt-3" id="cloginTabContent">
<div class="tab-pane fade show active" id="clogin" role="tabpanel" aria-labelledby="login-tab">
<!-- Login Form -->
<form class="form-inline">
<div class="form-group col-12 d-flex justify-content-center mt-2" >
<label for="cusername">UserName<span
class="required-field">*</span></label>
<input type="text" class="form-control" id="cusername" placeholder="Enter username"
style="width: 35% " required>
</div>
<div class="form-group col-12 d-flex justify-content-center mt-2" >
<label>Password<span
class="required-field">*</span></label>
<input type="password" class="form-control" id="cpassword" placeholder="Enter Password"
minlength="4" maxlength="4" style="width: 35%" required>
</div>
<div class="form-group col-12 d-flex justify-content-center mt-2">
<button type="button" class="btn btn-info" id="counterSubmit" onclick="verifyCounterLogin()">Submit</button>
</div>
<p class="text-uppercase fw-bold fs-sm text-muted col-12 " id="error"
th:utext="${errortxt}"></p>
</form>
</div>
</div>
</div>
</div>
</div>
</div>

2
src/main/resources/templates/fragments/loginscript.html

@ -21,7 +21,7 @@
<!--<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>--> <!--<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>--> <!--<script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\swiper-bundle.min.css">
<link rel="stylesheet" type="text/css" href="css\swiper-bundle.min.css">
<!-- Your Custom Script --> <!-- Your Custom Script -->
<script src="js/dashmix.app.min.js"></script> <script src="js/dashmix.app.min.js"></script>

8
src/main/resources/templates/fragments/menuCounter.html

@ -3,14 +3,14 @@
<ul class="nav-main"> <ul class="nav-main">
<li class="nav-main-item"> <li class="nav-main-item">
<a class="nav-main-link" href="/counter/counterbooking">
<a class="nav-main-link" href="/communityhall/counter/counterbooking">
<i class="nav-main-link-icon fa fa-location-arrow"></i> <i class="nav-main-link-icon fa fa-location-arrow"></i>
<span class="nav-main-link-name">Counter Booking</span> <span class="nav-main-link-name">Counter Booking</span>
</a> </a>
</li> </li>
<li class="nav-main-item"> <li class="nav-main-item">
<a class="nav-main-link" href="/counter/bookinglist">
<a class="nav-main-link" href="/communityhall/counter/bookinglist">
<i class="nav-main-link-icon fa fa-location-arrow"></i> <i class="nav-main-link-icon fa fa-location-arrow"></i>
<span class="nav-main-link-name">Booking List</span> <span class="nav-main-link-name">Booking List</span>
</a> </a>
@ -29,14 +29,14 @@
</a> </a>
</li>--> </li>-->
<li class="nav-main-item"> <li class="nav-main-item">
<a class="nav-main-link" href="/counter/calculateamount">
<a class="nav-main-link" href="/communityhall/counter/calculateamount">
<i class="nav-main-link-icon fa fa-location-arrow"></i> <i class="nav-main-link-icon fa fa-location-arrow"></i>
<span class="nav-main-link-name">Calculate Hall Amount</span> <span class="nav-main-link-name">Calculate Hall Amount</span>
</a> </a>
</li> </li>
<li class="nav-main-item"> <li class="nav-main-item">
<a class="nav-main-link" href="/counter/logout">
<a class="nav-main-link" href="/communityhall/counter/logout">
<i class="nav-main-link-icon fa fa-location-arrow"></i> <i class="nav-main-link-icon fa fa-location-arrow"></i>
<span class="nav-main-link-name">Sign Out</span> <span class="nav-main-link-name">Sign Out</span>
</a> </a>

5
src/main/resources/templates/fragments/nav-user.html

@ -1,8 +1,9 @@
<!-- Header Start --> <!-- Header Start -->
<nav class="navbar header-navbar pcoded-header">
<nav class="navbar header-navbar pcoded-header"
th:style="${counterName != null} ? 'background-color:#FFA500;' : ''">
<div class="navbar-wrapper"> <div class="navbar-wrapper">
<div class="navbar-logo" style="background-color: rgb(21,69,93);">
<div class="navbar-logo" th:style="${counterName != null} ? 'background-color:#FFA500;' : 'background-color: rgb(21,69,93);'">
<a class="mobile-menu" id="mobile-collapse" href="" onclick="return false"> <a class="mobile-menu" id="mobile-collapse" href="" onclick="return false">
<i class="fas fa-bars" style="margin-right: 335px;"></i> <i class="fas fa-bars" style="margin-right: 335px;"></i>
</a> </a>

198
src/main/resources/templates/fragments/nav-usermenu.html

@ -1,82 +1,126 @@
<nav class="pcoded-navbar"> <nav class="pcoded-navbar">
<div class="pcoded-inner-navbar">
<ul class="pcoded-item pcoded-left-item">
<li class="pcoded-hasmenu">
<a href="/communityhall/dashboard">
<span class="pcoded-micon"><i class="feather icon-home"></i></span>
<span class="pcoded-mtext">Home</span>
<span class="pcoded-mcaret"></span>
</a>
<div class="pcoded-inner-navbar">
<ul class="pcoded-item pcoded-left-item">
<li class="pcoded-hasmenu">
<a href="/communityhall/dashboard">
<span class="pcoded-micon"><i class="feather icon-home"></i></span>
<span class="pcoded-mtext">Home</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
<li class="pcoded-hasmenu" id="hallBookingLogin_nav" onclick="return checkLoginedIn('hallbookingform')">
<a href="/communityhall/user/hallbookingform">
<span class="pcoded-micon"><i class="feather icon-clipboard"></i></span>
<span class="pcoded-mtext">Hall Booking</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
<li class="pcoded-hasmenu" id="bookingDetailsLogin_nav" onclick=" return checkLoginedIn('viewhistory')">
<a href="/communityhall/user/viewhistory">
<span class="pcoded-micon"><i class="feather icon-credit-card"></i></span>
<span class="pcoded-mtext">Booking Details</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
<li class="pcoded-hasmenu">
<a href="/communityhall/CommunityHallList">
<span class="pcoded-micon"><i class="feather icon-map-pin"></i></span>
<span class="pcoded-mtext">Community Hall List</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
<li class="pcoded-hasmenu">
<a href="/communityhall/hallAmountCalculation">
<span class="pcoded-micon"><i class="feather icon-file-text"></i></span>
<span class="pcoded-mtext">Calculate Rent Amount</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
</ul>
</li>
<li class="pcoded-hasmenu" id="hallBookingLogin_nav" onclick="return checkLoginedIn('hallbookingform')">
<a href="/communityhall/user/hallbookingform">
<span class="pcoded-micon"><i class="feather icon-clipboard"></i></span>
<span class="pcoded-mtext">Hall Booking</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
<li class="pcoded-hasmenu" id="bookingDetailsLogin_nav" onclick=" return checkLoginedIn('viewhistory')">
<a href="/communityhall/user/viewhistory">
<span class="pcoded-micon"><i class="feather icon-credit-card"></i></span>
<span class="pcoded-mtext">Booking Details</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
<li class="pcoded-hasmenu">
<a href="/communityhall/CommunityHallList">
<span class="pcoded-micon"><i class="feather icon-map-pin"></i></span>
<span class="pcoded-mtext">Community Hall List</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
<li class="pcoded-hasmenu">
<a href="/communityhall/hallAmountCalculation">
<span class="pcoded-micon"><i class="feather icon-file-text"></i></span>
<span class="pcoded-mtext">Calculate Rent Amount</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
<!--<li th:if="${counterName != null}" class="pcoded-hasmenu">
<a href="/communityhall/counterReport">
<span class="pcoded-micon"><i class="feather icon-file-text"></i></span>
<span class="pcoded-mtext">Counter Report</span>
<span class="pcoded-mcaret"></span>
</a>
</li>-->
</ul>
<ul class="pcoded-item pcoded-right-item" id="pds1" style="display: none;">
<li class="pcoded-hasmenu">
<button class="btn" style="background-color: rgb(21,69,93);margin-top: 6px;" type="button"
id="profilePopup" onclick="showprofilepopup()">
<span class="pcoded-micon"><i class="fa fa-user" style="color: white;"
aria-hidden="true"></i></span>
<span class="pcoded-mtext" th:text="${userName}" id="userNameLogin"
style="cursor: pointer;color: white;" data-toggle="tooltip" data-placement="bottom"
title="View/Edit Profile"></span>
</button>
</li>
<li class="pcoded-hasmenu">
<a href="/communityhall/user/logout">
<span class="pcoded-micon"><i class="fa fa-sign-in" aria-hidden="true"></i></span>
<span class="pcoded-mtext">Logout</span>
<span class="pcoded-mcaret"></span>
</a>
</li>
</ul>
<ul class="pcoded-item pcoded-right-item" id="pds">
<li>
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="loginDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
style="background-color: white;color: black;border-color: white;">
<span class="pcoded-micon"><i class="fa fa-sign-in" aria-hidden="true"></i></span>
<span class="pcoded-mtext">Login</span>
<span class="pcoded-mcaret"></span>
</button>
<div class="dropdown-menu" aria-labelledby="loginDropdown">
<a class="dropdown-item" id="loginpopup" name="loginpopup" style="cursor: pointer;"><i
class="fa fa-user"></i> User Login</a>
<a class="dropdown-item" href="/communityhall/login" style="cursor: pointer;" target="_blank"><i
class="fa fa-lock"></i> Official Login</a>
</div>
</div>
</li>
</ul>
</div>
<ul class="pcoded-item pcoded-right-item" th:if="${counterName != null}">
<li class="pcoded-hasmenu">
<div class="dropdown">
<button th:if="${counterName != null}" class="btn btn-primary dropdown-toggle"
type="button" id="counterloginDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
style="background-color: rgb(21,69,93); color: orange; font-weight: bold; border-color: white; margin-top: 6px;">
<span class="pcoded-micon">
<i class="fa fa-user" style="color: white;" aria-hidden="true"></i>
</span>
<span th:text="${counterName}" id="counterNameLogin"
style="cursor: not-allowed;" data-toggle="tooltip"
data-placement="bottom">
</span>
</button>
<div class="dropdown-menu" aria-labelledby="counterLoginDropdown">
<a href="/communityhall/counter/logout" class="dropdown-item" id="counterlogout"
name="counterlogout" style="cursor: pointer;"><i
class="fa fa-sign-out"></i> Counter Logout</a>
</div>
</div>
</li>
</ul>
<ul class="pcoded-item pcoded-right-item" id="pds1" style="display: none;">
<li class="pcoded-hasmenu">
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle"
type="button" id="profilePopup1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
style="background-color: rgb(21,69,93); font-weight: bold; border-color: white; margin-top: 6px;">
<span class="pcoded-micon">
<i class="fa fa-user" style="color: white;" aria-hidden="true"></i>
</span>
<span class="pcoded-mtext" th:text="${userName}" id="userNameLogin"
style="cursor: not-allowed;" data-toggle="tooltip"
data-placement="bottom" title="View/Edit Profile">
</span>
</button>
<div class="dropdown-menu" aria-labelledby="profilePopup1">
<a class="dropdown-item" id="profilePopup"
name="profilePopup" style="cursor: pointer;" onclick="showprofilepopup()">
<i class="fa fa-user-circle"></i> View Profile
</a>
<a href="/communityhall/user/logout" class="dropdown-item" id="userloginpopup"
name="userloginpopup" style="cursor: pointer;">
<i class="fa fa-sign-out"></i> User Logout
</a>
</div>
</div>
</li>
</ul>
<ul class="pcoded-item pcoded-right-item" id="pds">
<li>
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="loginDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
style="background-color: white;color: black;border-color: white;">
<span class="pcoded-micon"><i class="fa fa-sign-in" aria-hidden="true"></i></span>
<span class="pcoded-mtext">Login</span>
<span class="pcoded-mcaret"></span>
</button>
<div class="dropdown-menu" aria-labelledby="loginDropdown">
<a class="dropdown-item" id="loginpopup" name="loginpopup" style="cursor: pointer;"><i
class="fa fa-user"></i> User Login</a>
<a th:if="${counterName == null}" class="dropdown-item" href="/communityhall/login" style="cursor: pointer;" target="_blank"><i
class="fa fa-lock"></i> Official Login</a>
<a th:if="${counterName == null}" class="dropdown-item" id="counterloginpopup" name="counterloginpopup" style="cursor: pointer;" target="_blank"><i
class="fa fa-lock"></i> Counter Login</a>
</div>
</div>
</li>
</ul>
</div>
</nav> </nav>

10
src/main/resources/templates/fragments/script.html

@ -5,7 +5,7 @@
<!--<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>--> <!--<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>--> <!--<script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\swiper-bundle.min.css">
<link rel="stylesheet" type="text/css" href="css\swiper-bundle.min.css">
<script src="js/lib/jquery.min.js"></script> <script src="js/lib/jquery.min.js"></script>
<script src="js/plugins/datatables/jquery.dataTables.min.js"></script> <script src="js/plugins/datatables/jquery.dataTables.min.js"></script>
@ -23,10 +23,10 @@
<!-- Place these in the <head> section of your HTML, or before the closing </body> tag --> <!-- Place these in the <head> section of your HTML, or before the closing </body> tag -->
<!--<script src="https://unpkg.com/viewerjs/dist/viewer.min.js"></script> <!--<script src="https://unpkg.com/viewerjs/dist/viewer.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/viewerjs/dist/viewer.min.css">--> <link rel="stylesheet" href="https://unpkg.com/viewerjs/dist/viewer.min.css">-->
<!--<script src="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.js"></script>-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.css">-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\viewer.min.css">
<script type="text/javascript" src="..\files\assets\js\viewer.min.js"></script>
<!--<script src="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.css">-->
<link rel="stylesheet" type="text/css" href="css\viewer.min.css">
<script type="text/javascript" src="js\viewer.min.js"></script>

2
src/main/resources/templates/headquarters/booking-list.html

@ -453,7 +453,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

4
src/main/resources/templates/headquarters/bookingwaiting.html

@ -435,7 +435,7 @@
showReasonDocuments(list); showReasonDocuments(list);
} }
function showReasonDocuments(list) { function showReasonDocuments(list) {
console.log("Reason;;;"+list.reason);
// console.log("Reason;;;"+list.reason);
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: '/communityhall/api/officer/getReasonByName', url: '/communityhall/api/officer/getReasonByName',
@ -443,7 +443,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log("getReasonByName:.."+x);
// console.log("getReasonByName:.."+x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

6
src/main/resources/templates/headquarters/dashboard.html

@ -457,10 +457,10 @@ box-shadow: rgba(0, 0, 0, 0.5) 0px 3px 8px !important;
dataType:'json', dataType:'json',
success: function(response) { success: function(response) {
console.log('overallreports:',response);
// console.log('overallreports:',response);
const data = response; const data = response;
console.log('Parsed Data:', data);
// console.log('Parsed Data:', data);
// Check and create charts if data is available, otherwise display an image // Check and create charts if data is available, otherwise display an image
@ -1342,7 +1342,7 @@ function isDarkColor(color) {
success: function(response) { success: function(response) {
displayHallDetails(response); displayHallDetails(response);
console.log(response);
// console.log(response);
}, },
error: function(error) { error: function(error) {
console.error("Error fetching hall details:", error); console.error("Error fetching hall details:", error);

4
src/main/resources/templates/headquarters/gccblocking.html

@ -844,7 +844,7 @@
.filter(value => !isNaN(value)) .filter(value => !isNaN(value))
.join(','); .join(',');
console.log("hallIds: " + hallIds);
// console.log("hallIds: " + hallIds);
// Create FormData for AJAX // Create FormData for AJAX
var formData = new FormData(); var formData = new FormData();
@ -1053,7 +1053,7 @@
endDate: endDate endDate: endDate
}, },
success: function (response) { success: function (response) {
console.log("Unblock response:", response);
// console.log("Unblock response:", response);
$("#viewdetails").modal('hide'); $("#viewdetails").modal('hide');
window.location.reload(); window.location.reload();
$("#viewdetails").modal('hide'); $("#viewdetails").modal('hide');

2
src/main/resources/templates/headquarters/headquarterspage.html

@ -471,7 +471,7 @@
displayError(fileInput, errorMessage); displayError(fileInput, errorMessage);
} }
else { else {
console.log('File size is within limit:', file.size, 'bytes');
// console.log('File size is within limit:', file.size, 'bytes');
clearError(fileInput); clearError(fileInput);
} }
} }

20
src/main/resources/templates/headquarters/refund-failedlist.html

@ -916,8 +916,8 @@ $(document).ready(function () {
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#pendingSettlementForm').modal({ $('#pendingSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -1098,7 +1098,7 @@ $(document).ready(function () {
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2)); $("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2));
@ -1379,7 +1379,7 @@ $(document).ready(function () {
}).then((result) => { }).then((result) => {
/* Read more about isConfirmed, isDenied below */ /* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) { if (result.isConfirmed) {
console.log("Submitting rejection...");
// console.log("Submitting rejection...");
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -1390,7 +1390,7 @@ $(document).ready(function () {
'settlementId': id 'settlementId': id
}, },
success: function (data, textStatus, xhr) { success: function (data, textStatus, xhr) {
console.log("Rejection successful");
// console.log("Rejection successful");
if (xhr.status === 200) { // Check if the response status is OK if (xhr.status === 200) { // Check if the response status is OK
Swal.fire( Swal.fire(
'Done', 'Done',
@ -1466,7 +1466,7 @@ $(document).ready(function () {
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1481,7 +1481,7 @@ $(document).ready(function () {
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1528,7 +1528,7 @@ $(document).ready(function () {
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {
@ -1538,7 +1538,7 @@ $(document).ready(function () {
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
@ -1560,7 +1560,7 @@ $(document).ready(function () {
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

2
src/main/resources/templates/headquarters/rejected-list.html

@ -422,7 +422,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

6
src/main/resources/templates/headquarters/reports.html

@ -1591,7 +1591,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });
@ -1677,7 +1677,7 @@
url: '/communityhall/admin/api/bookingdetailsByuserId', url: '/communityhall/admin/api/bookingdetailsByuserId',
data: {'userId': userId}, data: {'userId': userId},
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
$("#bookingTableBody").empty(); // Ensure bookingTableBody is the correct ID of the table body $("#bookingTableBody").empty(); // Ensure bookingTableBody is the correct ID of the table body
$.each(response, function (index, booking) { $.each(response, function (index, booking) {
// Create table row with the data from response // Create table row with the data from response
@ -1714,7 +1714,7 @@
url: '/communityhall/admin/api/bookingdetailsByzone', url: '/communityhall/admin/api/bookingdetailsByzone',
data: {'zone': zone}, data: {'zone': zone},
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
// Clear existing table data and destroy DataTable instance if it exists // Clear existing table data and destroy DataTable instance if it exists
var table = $('#bookinglistdataTablebyzone').DataTable(); var table = $('#bookinglistdataTablebyzone').DataTable();

20
src/main/resources/templates/headquarters/settlement-approved.html

@ -858,7 +858,7 @@
'settlementsid': settlementId 'settlementsid': settlementId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showSettlementInfo(x) showSettlementInfo(x)
showDamageDetails(x); showDamageDetails(x);
} }
@ -867,8 +867,8 @@
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#initiateSettlementForm').modal({ $('#initiateSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -1049,7 +1049,7 @@ if (data.damageList.length === 0) {
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2)); $("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2));
@ -1170,7 +1170,7 @@ if (data.damageList.length === 0) {
function initiate() { function initiate() {
let id = document.getElementById("settlementid").value; let id = document.getElementById("settlementid").value;
let refundAmount = document.getElementById("refundAmount").value; let refundAmount = document.getElementById("refundAmount").value;
console.log(refundAmount);
// console.log(refundAmount);
Swal.fire({ Swal.fire({
title: 'Do you want to Initiate this Settlement?', title: 'Do you want to Initiate this Settlement?',
@ -1181,7 +1181,7 @@ if (data.damageList.length === 0) {
}).then((result) => { }).then((result) => {
if (result.isConfirmed) { if (result.isConfirmed) {
let status = (refundAmount > 0) ? 'INITIATED' : 'COMPLETED'; let status = (refundAmount > 0) ? 'INITIATED' : 'COMPLETED';
console.log(status);
// console.log(status);
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: '/communityhall/admin/api/updateInitiatedSettlementStatus/' + id, url: '/communityhall/admin/api/updateInitiatedSettlementStatus/' + id,
@ -1238,7 +1238,7 @@ if (data.damageList.length === 0) {
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showApprovedcancelledbookingDetails(x); showApprovedcancelledbookingDetails(x);
} }
}); });
@ -1286,7 +1286,7 @@ if (data.damageList.length === 0) {
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {
@ -1296,7 +1296,7 @@ if (data.damageList.length === 0) {
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
@ -1318,7 +1318,7 @@ if (data.damageList.length === 0) {
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

2
src/main/resources/templates/headquarters/settlement-completed.html

@ -1155,7 +1155,7 @@ if (data.damageList.length === 0) {
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
document.getElementById("startingSlot").innerHTML = getTimeSlot(list.startingSlot); document.getElementById("startingSlot").innerHTML = getTimeSlot(list.startingSlot);

2
src/main/resources/templates/headquarters/settlement-initiate.html

@ -1270,7 +1270,7 @@
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {

20
src/main/resources/templates/headquarters/settlement-list.html

@ -835,8 +835,8 @@
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#pendingSettlementForm').modal({ $('#pendingSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -1017,7 +1017,7 @@
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
var pendingstatus=data.settlement.collectionStatus var pendingstatus=data.settlement.collectionStatus
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#collectionstatuscolumn").show(); $("#collectionstatuscolumn").show();
@ -1123,7 +1123,7 @@
}).then((result) => { }).then((result) => {
/* Read more about isConfirmed, isDenied below */ /* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) { if (result.isConfirmed) {
console.log("Submitting rejection...");
// console.log("Submitting rejection...");
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -1134,7 +1134,7 @@
'settlementId': id 'settlementId': id
}, },
success: function (data, textStatus, xhr) { success: function (data, textStatus, xhr) {
console.log("Rejection successful");
// console.log("Rejection successful");
if (xhr.status === 200) { // Check if the response status is OK if (xhr.status === 200) { // Check if the response status is OK
Swal.fire( Swal.fire(
'Done', 'Done',
@ -1210,7 +1210,7 @@
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1225,7 +1225,7 @@
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1272,7 +1272,7 @@
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {
@ -1282,7 +1282,7 @@
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
@ -1304,7 +1304,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

8
src/main/resources/templates/headquarters/settlement-reject.html

@ -448,7 +448,7 @@ $(document).ready(function () {
'settlementsid': settlementId 'settlementsid': settlementId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showSettlementInfo(x) showSettlementInfo(x)
showDamageDetails(x); showDamageDetails(x);
} }
@ -457,8 +457,8 @@ $(document).ready(function () {
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#rejectSettlementForm').modal({ $('#rejectSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -636,7 +636,7 @@ if (data.damageList.length === 0) {
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2)); $("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2));

2
src/main/resources/templates/headquarters/settlementlist.html

@ -717,7 +717,7 @@
// Set the QR code image source // Set the QR code image source
$('#qrview').modal('show'); $('#qrview').modal('show');
$('#qrCodeImage').attr('src', 'data:image/png;base64,' + data); $('#qrCodeImage').attr('src', 'data:image/png;base64,' + data);
console.log(data);
// console.log(data);
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error('Error fetching QR code:', textStatus, errorThrown); console.error('Error fetching QR code:', textStatus, errorThrown);

2
src/main/resources/templates/headquarters/user-approved.html

@ -254,7 +254,7 @@
'usersid': userId 'usersid': userId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showUserInfo(x) showUserInfo(x)
} }
}); });

2
src/main/resources/templates/headquarters/user-reject.html

@ -251,7 +251,7 @@
'usersid': userId 'usersid': userId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showUserInfo(x) showUserInfo(x)
} }
}); });

8
src/main/resources/templates/headquarters/viewUploadNoc.html

@ -411,7 +411,7 @@
// Get the booking ID from the hidden input field // Get the booking ID from the hidden input field
let id = $('#bookingid').val(); let id = $('#bookingid').val();
console.log("Booking ID:", id);
// console.log("Booking ID:", id);
// Get the selected file // Get the selected file
let fileInput = $('#nocFile')[0].files[0]; let fileInput = $('#nocFile')[0].files[0];
@ -432,7 +432,7 @@
formData.append('nocFile', fileInput); formData.append('nocFile', fileInput);
formData.append('bookingid', id); // Ensure key matches backend parameter formData.append('bookingid', id); // Ensure key matches backend parameter
console.log("FormData entries:");
// console.log("FormData entries:");
for (let [key, value] of formData.entries()) { for (let [key, value] of formData.entries()) {
console.log(`${key}: ${value}`); console.log(`${key}: ${value}`);
} }
@ -445,7 +445,7 @@
contentType: false, // Set to false for multipart/form-data contentType: false, // Set to false for multipart/form-data
processData: false, // Prevent jQuery from processing the data processData: false, // Prevent jQuery from processing the data
success: function (response) { success: function (response) {
console.log("Upload success response:", response);
// console.log("Upload success response:", response);
Swal.fire({ Swal.fire({
icon: 'success', icon: 'success',
title: 'Success', title: 'Success',
@ -472,7 +472,7 @@
$('#uploadNocModal').on('show.bs.modal', function (event) { $('#uploadNocModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget); // Button that triggered the modal var button = $(event.relatedTarget); // Button that triggered the modal
var bookingId = button.data('booking-id'); // Extract bookingId from the button var bookingId = button.data('booking-id'); // Extract bookingId from the button
console.log("Setting bookingId in modal:", bookingId);
// console.log("Setting bookingId in modal:", bookingId);
$('#bookingid').val(bookingId); // Set the bookingId in the hidden input field $('#bookingid').val(bookingId); // Set the bookingId in the hidden input field
}); });

4
src/main/resources/templates/officer/officer-dashboard.html

@ -750,7 +750,7 @@ function getColorByCategory(category, key) {
var zone = document.getElementById("zoneValue").value; var zone = document.getElementById("zoneValue").value;
var division = document.getElementById("division1").value; var division = document.getElementById("division1").value;
console.log("Chart Data for", chartId, chartData);
// console.log("Chart Data for", chartId, chartData);
const chartElement = document.getElementById(chartId); const chartElement = document.getElementById(chartId);
const minHeight = 150; // Minimum height in pixels const minHeight = 150; // Minimum height in pixels
@ -833,7 +833,7 @@ function getColorByCategory(category, key) {
var zone = document.getElementById("zoneValue").value; var zone = document.getElementById("zoneValue").value;
var division = document.getElementById("division1").value; var division = document.getElementById("division1").value;
console.log("Chart Data for", chartId, chartData);
// console.log("Chart Data for", chartId, chartData);
const chartElement = document.getElementById(chartId); const chartElement = document.getElementById(chartId);
const minHeight = 150; // Minimum height in pixels const minHeight = 150; // Minimum height in pixels

20
src/main/resources/templates/officer/refund-failedlist.html

@ -905,8 +905,8 @@ $(document).ready(function () {
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#pendingSettlementForm').modal({ $('#pendingSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -1087,7 +1087,7 @@ $(document).ready(function () {
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2)); $("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2));
@ -1368,7 +1368,7 @@ $(document).ready(function () {
}).then((result) => { }).then((result) => {
/* Read more about isConfirmed, isDenied below */ /* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) { if (result.isConfirmed) {
console.log("Submitting rejection...");
// console.log("Submitting rejection...");
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -1379,7 +1379,7 @@ $(document).ready(function () {
'settlementId': id 'settlementId': id
}, },
success: function (data, textStatus, xhr) { success: function (data, textStatus, xhr) {
console.log("Rejection successful");
// console.log("Rejection successful");
if (xhr.status === 200) { // Check if the response status is OK if (xhr.status === 200) { // Check if the response status is OK
Swal.fire( Swal.fire(
'Done', 'Done',
@ -1455,7 +1455,7 @@ $(document).ready(function () {
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1470,7 +1470,7 @@ $(document).ready(function () {
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1517,7 +1517,7 @@ $(document).ready(function () {
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {
@ -1527,7 +1527,7 @@ $(document).ready(function () {
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
@ -1549,7 +1549,7 @@ $(document).ready(function () {
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

2
src/main/resources/templates/officer/settlement-completed.html

@ -1152,7 +1152,7 @@ if (data.damageList.length === 0) {
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
document.getElementById("startingSlot").innerHTML = getTimeSlot(list.startingSlot); document.getElementById("startingSlot").innerHTML = getTimeSlot(list.startingSlot);

20
src/main/resources/templates/officer/settlement-list.html

@ -825,8 +825,8 @@
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#pendingSettlementForm').modal({ $('#pendingSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -1007,7 +1007,7 @@
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
var pendingstatus=data.settlement.collectionStatus var pendingstatus=data.settlement.collectionStatus
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#collectionstatuscolumn").show(); $("#collectionstatuscolumn").show();
@ -1113,7 +1113,7 @@
}).then((result) => { }).then((result) => {
/* Read more about isConfirmed, isDenied below */ /* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) { if (result.isConfirmed) {
console.log("Submitting rejection...");
// console.log("Submitting rejection...");
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -1124,7 +1124,7 @@
'settlementId': id 'settlementId': id
}, },
success: function (data, textStatus, xhr) { success: function (data, textStatus, xhr) {
console.log("Rejection successful");
// console.log("Rejection successful");
if (xhr.status === 200) { // Check if the response status is OK if (xhr.status === 200) { // Check if the response status is OK
Swal.fire( Swal.fire(
'Done', 'Done',
@ -1200,7 +1200,7 @@
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1215,7 +1215,7 @@
'bookingsId': bookingId 'bookingsId': bookingId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showcancelledbookingDetails(x); showcancelledbookingDetails(x);
} }
}); });
@ -1262,7 +1262,7 @@
document.getElementById("bookid").innerHTML = list.bookingId; document.getElementById("bookid").innerHTML = list.bookingId;
function getTimeSlot(slotValue) { function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot; var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') { if (trimmedSlotValue === '1') {
@ -1272,7 +1272,7 @@
} else { } else {
timeSlot = 'Unknown'; timeSlot = 'Unknown';
} }
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot; return timeSlot;
} }
@ -1294,7 +1294,7 @@
'reasonName': list.reason 'reasonName': list.reason
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list); showReasonWithDocument(x, list);
} }
}); });

8
src/main/resources/templates/officer/settlement-reject.html

@ -448,7 +448,7 @@ $(document).ready(function () {
'settlementsid': settlementId 'settlementsid': settlementId
}, },
success: function (x) { success: function (x) {
console.log(x);
// console.log(x);
showSettlementInfo(x) showSettlementInfo(x)
showDamageDetails(x); showDamageDetails(x);
} }
@ -457,8 +457,8 @@ $(document).ready(function () {
} }
function showSettlementInfo(list) { function showSettlementInfo(list) {
console.log(list); // Log the damageList array
console.log(list.damageList[0]);
// console.log(list); // Log the damageList array
// console.log(list.damageList[0]);
$('#rejectSettlementForm').modal({ $('#rejectSettlementForm').modal({
backdrop: 'static', backdrop: 'static',
@ -636,7 +636,7 @@ if (data.damageList.length === 0) {
var refundStatus = data.refundStatus; var refundStatus = data.refundStatus;
if (settleAmount < 0) { if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00); $("#td_settel_amt").html(0.00);
$("#pendingcolumn").show(); $("#pendingcolumn").show();
$("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2)); $("#td_pending_amt").html('₹ ' + Math.abs(settleAmount).toFixed(2));

17
src/main/resources/templates/officiallogin.html

@ -372,7 +372,7 @@
success: function (bodyMessage) { success: function (bodyMessage) {
//alert(bodyMessage); //alert(bodyMessage);
if (bodyMessage.trim() == "Success") { if (bodyMessage.trim() == "Success") {
console.log("OTP is Verified!!!");
// console.log("OTP is Verified!!!");
document.getElementById("loginBtn").style.display = "block"; document.getElementById("loginBtn").style.display = "block";
document.getElementById("verifyBtn").style.display = "none"; document.getElementById("verifyBtn").style.display = "none";
document.getElementById("otpInput").style.display = "none"; document.getElementById("otpInput").style.display = "none";
@ -401,7 +401,7 @@
} }
}, },
error: function () { error: function () {
console.log("Error");// Handle error here
// console.log("Error");// Handle error here
return false; return false;
} }
}); });
@ -468,7 +468,8 @@
window.location.href = "/communityhall/departments/gccstaffdashboard"; window.location.href = "/communityhall/departments/gccstaffdashboard";
break; break;
case "counter": case "counter":
window.location.href = "/communityhall/counter/counterbooking";
// window.location.href = "/communityhall/counter/counterbooking";
window.location.href = "/communityhall/user/dashboard";
break; break;
case "headquarters": case "headquarters":
window.location.href = "/communityhall/headquarters/dashboard"; window.location.href = "/communityhall/headquarters/dashboard";
@ -569,14 +570,14 @@
//alert("Sending OTP please Verify :- "+mobileNo); //alert("Sending OTP please Verify :- "+mobileNo);
$("#mobilenotxt").html(mobileNo); $("#mobilenotxt").html(mobileNo);
console.log(mobileNo + "Send OTP2");
// console.log(mobileNo + "Send OTP2");
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: '/communityhall/user/api/sendOTP', url: '/communityhall/user/api/sendOTP',
data: {'mobileNo': mobileNo, 'purpose': 'Forget Pin'}, data: {'mobileNo': mobileNo, 'purpose': 'Forget Pin'},
dataType: 'json', dataType: 'json',
success: function (bodyMessage) { success: function (bodyMessage) {
console.log("bodyMessage....." + bodyMessage);
// console.log("bodyMessage....." + bodyMessage);
if (bodyMessage != "Error") { if (bodyMessage != "Error") {
$('#otpForm').modal({ $('#otpForm').modal({
backdrop: 'static', backdrop: 'static',
@ -634,7 +635,7 @@
dataType: 'text', dataType: 'text',
success: function (bodyMessage) { success: function (bodyMessage) {
if (bodyMessage.trim() == "Success") { if (bodyMessage.trim() == "Success") {
console.log("OTP is Verified!!!");
// console.log("OTP is Verified!!!");
callSave(); callSave();
} else { } else {
$("#otperror").html("OTP is Incorrect!!!"); $("#otperror").html("OTP is Incorrect!!!");
@ -642,7 +643,7 @@
} }
}, },
error: function () { error: function () {
console.log("Error");// Handle error here
// console.log("Error");// Handle error here
} }
}); });
@ -675,7 +676,7 @@
} }
}, },
error: function () { error: function () {
console.log("Error");// Handle error here
// console.log("Error");// Handle error here
} }
}); });
} }

2
src/main/resources/templates/user/PaymentResponse.html

@ -6,7 +6,7 @@
<title>GCC Community</title> <title>GCC Community</title>
<script> <script>
let res =/*[[${msg}]]*/""; let res =/*[[${msg}]]*/"";
console.log(res);
// console.log(res);
</script> </script>
</head> </head>

4
src/main/resources/templates/user/acknowledgement.html

@ -26,7 +26,7 @@
data: {bookingId: bookingId}, data: {bookingId: bookingId},
success: function (bodyMessage) { success: function (bodyMessage) {
exportLicToPDF(bodyMessage, bookingId); exportLicToPDF(bodyMessage, bookingId);
console.log(bodyMessage);
// console.log(bodyMessage);
}, },
error: function (xhr, status, error) { error: function (xhr, status, error) {
console.error("Failed to fetch booking details:", error); console.error("Failed to fetch booking details:", error);
@ -97,7 +97,7 @@
if (dateElement) { if (dateElement) {
const now = new Date(); const now = new Date();
const formattedDate = formatDateTime(now); const formattedDate = formatDateTime(now);
console.log('Formatted Date:', formattedDate); // Debug log
// console.log('Formatted Date:', formattedDate); // Debug log
dateElement.textContent = formattedDate; dateElement.textContent = formattedDate;
} else { } else {
console.error('Date element not found'); console.error('Date element not found');

2
src/main/resources/templates/user/calculatehallamount.html

@ -526,7 +526,7 @@
reasonforBooking: reasonForBooking reasonforBooking: reasonForBooking
}, },
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
// Update HTML elements with the response data // Update HTML elements with the response data
if ((response.reasonforBooking === 'SGE') || (response.reasonforBooking === 'CGE')) { if ((response.reasonforBooking === 'SGE') || (response.reasonforBooking === 'CGE')) {

6
src/main/resources/templates/user/communityHallList.html

@ -4,8 +4,8 @@
<head th:replace="~{fragments/head :: head}"></head> <head th:replace="~{fragments/head :: head}"></head>
<!--<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">--> <!--<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\leaflet.css">
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css"/>-->
<link rel="stylesheet" type="text/css" href="css\leaflet.css">
<style> <style>
/* Hide button and div2 on small screens */ /* Hide button and div2 on small screens */
@ -227,7 +227,7 @@
<!-- Login Modal--> <!-- Login Modal-->
<!--<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>--> <!--<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/npm/leaflet/dist/leaflet.js"></script>--> <!--<script src="https://cdn.jsdelivr.net/npm/leaflet/dist/leaflet.js"></script>-->
<script type="text/javascript" src="..\files\assets\js\leaflet.js"></script>
<script type="text/javascript" src="js\leaflet.js"></script>
<div th:replace="~{fragments/loginreg :: div}"></div> <div th:replace="~{fragments/loginreg :: div}"></div>
<script th:replace="~{fragments/script :: script}"></script> <script th:replace="~{fragments/script :: script}"></script>
<script th:replace="~{fragments/logRegiOtpScript :: script}"></script> <script th:replace="~{fragments/logRegiOtpScript :: script}"></script>

30
src/main/resources/templates/user/dashboard.html

@ -12,18 +12,20 @@
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.dataTables.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.dataTables.min.css">
<!-- Stylesheets --> <!-- Stylesheets -->
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.5.3/MarkerCluster.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\MarkerCluster.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.5.3/MarkerCluster.Default.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\MarkerCluster.Default.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\leaflet.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.5.3/MarkerCluster.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.5.3/MarkerCluster.Default.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.css" />-->
<!-- JavaScript -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.5.3/leaflet.markercluster.js"></script>-->
<!-- Stylesheets -->
<link rel="stylesheet" type="text/css" href="css\MarkerCluster.css">
<link rel="stylesheet" type="text/css" href="css\MarkerCluster.Default.css">
<link rel="stylesheet" type="text/css" href="css\leaflet.css">
<!-- JavaScript --> <!-- JavaScript -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"></script>-->
<script type="text/javascript" src="..\files\assets\js\leaflet.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.5.3/leaflet.markercluster.js"></script>-->
<script type="text/javascript" src="..\files\assets\js\leaflet.markercluster.js"></script>
<script type="text/javascript" src="js\leaflet.js"></script>
<script type="text/javascript" src="js\leaflet.markercluster.js"></script>
<style> <style>
/* Hide button and div2 on small screens */ /* Hide button and div2 on small screens */
@ -714,7 +716,7 @@
$(document).ready(function () { $(document).ready(function () {
const serverDate =new Date($("#serverDate").val() + "T00:00:00") const serverDate =new Date($("#serverDate").val() + "T00:00:00")
console.log("serverDate:", serverDate);
// console.log("serverDate:", serverDate);
// Get today's date // Get today's date
var today = serverDate; var today = serverDate;
@ -722,7 +724,7 @@
var sixMonthsFromNow = new Date(serverDate); var sixMonthsFromNow = new Date(serverDate);
sixMonthsFromNow.setMonth(serverDate.getMonth() + 6); sixMonthsFromNow.setMonth(serverDate.getMonth() + 6);
console.log("sixMonthsFromNow:", sixMonthsFromNow);
// console.log("sixMonthsFromNow:", sixMonthsFromNow);
const day = serverDate.getDate(); const day = serverDate.getDate();
// If the new month has fewer days, adjust the date // If the new month has fewer days, adjust the date
@ -734,8 +736,8 @@
const minDateStr = formatDateForValue(serverDate); // YYYY-MM-DD format const minDateStr = formatDateForValue(serverDate); // YYYY-MM-DD format
const maxDateStr = formatDateForValue(sixMonthsFromNow); const maxDateStr = formatDateForValue(sixMonthsFromNow);
console.log("minDateStr:", minDateStr);
console.log("maxDateStr:", maxDateStr);
// console.log("minDateStr:", minDateStr);
// console.log("maxDateStr:", maxDateStr);
$("#fromdate, #todate, #selectedStartDate, #selectedEndDate").attr("min", minDateStr); $("#fromdate, #todate, #selectedStartDate, #selectedEndDate").attr("min", minDateStr);
$("#fromdate, #todate, #selectedStartDate, #selectedEndDate").attr("max", maxDateStr); $("#fromdate, #todate, #selectedStartDate, #selectedEndDate").attr("max", maxDateStr);

4
src/main/resources/templates/user/extraebdamageamountack.html

@ -26,7 +26,7 @@
data: {bookingId: bookingId}, data: {bookingId: bookingId},
success: function (bodyMessage) { success: function (bodyMessage) {
exportLicToPDF(bodyMessage, bookingId); exportLicToPDF(bodyMessage, bookingId);
console.log(bodyMessage);
// console.log(bodyMessage);
}, },
error: function (xhr, status, error) { error: function (xhr, status, error) {
console.error("Failed to fetch booking details:", error); console.error("Failed to fetch booking details:", error);
@ -97,7 +97,7 @@
if (dateElement) { if (dateElement) {
const now = new Date(); const now = new Date();
const formattedDate = formatDateTime(now); const formattedDate = formatDateTime(now);
console.log('Formatted Date:', formattedDate); // Debug log
// console.log('Formatted Date:', formattedDate); // Debug log
dateElement.textContent = formattedDate; dateElement.textContent = formattedDate;
} else { } else {
console.error('Date element not found'); console.error('Date element not found');

3335
src/main/resources/templates/user/hallbookingform.html
File diff suppressed because it is too large
View File

8
src/main/resources/templates/user/viewhallform.html

@ -1311,7 +1311,7 @@
type: 'GET', type: 'GET',
url: '/communityhall/user/api/gethalldetails/' + hallId, url: '/communityhall/user/api/gethalldetails/' + hallId,
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
// Display the container // Display the container
$('#hallDetailsContainer').show(); $('#hallDetailsContainer').show();
@ -1432,7 +1432,7 @@
hall_id: hall_id hall_id: hall_id
}, },
success: function (response) { success: function (response) {
console.log(response);
// console.log(response);
window.bookingResponse = {}; window.bookingResponse = {};
if (response && Array.isArray(response)) { if (response && Array.isArray(response)) {
$("#startDateInput").datepicker("destroy"); $("#startDateInput").datepicker("destroy");
@ -1521,11 +1521,11 @@
$("#datepicker-container").datepicker("destroy"); $("#datepicker-container").datepicker("destroy");
const serverDate =new Date($("#serverDate").val() + "T00:00:00") const serverDate =new Date($("#serverDate").val() + "T00:00:00")
console.log("serverDate:", serverDate);
// console.log("serverDate:", serverDate);
const maxDate = new Date(serverDate); const maxDate = new Date(serverDate);
maxDate.setMonth(maxDate.getMonth() + 6); maxDate.setMonth(maxDate.getMonth() + 6);
console.log("Max Date: "+maxDate);
// console.log("Max Date: "+maxDate);
// Initialize the datepicker // Initialize the datepicker
$("#startDateInput,#datepicker-container").datepicker({ $("#startDateInput,#datepicker-container").datepicker({

20
src/main/resources/templates/user/viewhistory.html

@ -583,8 +583,9 @@
<thead class="thead-light"> <thead class="thead-light">
<tr> <tr>
<th class="text-center no-sort" width="10%">S.No</th> <th class="text-center no-sort" width="10%">S.No</th>
<th>Hall Name</th>
<th>Booking Id</th>
<th>Booking date</th> <th>Booking date</th>
<th>Hall Name</th>
<th>Starting Date</th> <th>Starting Date</th>
<th>Ending Date</th> <th>Ending Date</th>
<th>Starting Period</th> <th>Starting Period</th>
@ -601,8 +602,9 @@
<tr th:each="booking, i : ${userBookingspast}" <tr th:each="booking, i : ${userBookingspast}"
class="${userBookingspast}"> class="${userBookingspast}">
<td th:text="${i.count}"></td> <td th:text="${i.count}"></td>
<td th:text="${booking.hall_name}"></td>
<td th:text="${booking.booking_id}"></td>
<td th:text="${booking.booking_date}"></td> <td th:text="${booking.booking_date}"></td>
<td th:text="${booking.hall_name}"></td>
<td th:text="${booking.start_date}"></td> <td th:text="${booking.start_date}"></td>
<td th:text="${booking.end_date}"></td> <td th:text="${booking.end_date}"></td>
<td <td
@ -690,9 +692,7 @@
</a> </a>
</a> </a>
</p> </p>
<p th:case="''">
<p th:case="'noaction'">
<a class="view-button"> <a class="view-button">
<span>--No Action--</span> <span>--No Action--</span>
</a> </a>
@ -1521,7 +1521,7 @@
method: 'GET', method: 'GET',
data: {bookingId: bookingId}, // Send booking ID to the server data: {bookingId: bookingId}, // Send booking ID to the server
success: function (data) { success: function (data) {
console.log("Received tracking data:", data);
// console.log("Received tracking data:", data);
// Clear the list initially before appending steps // Clear the list initially before appending steps
$('#trackingList').empty(); $('#trackingList').empty();
@ -2095,11 +2095,11 @@
function initializeDatepickerWithColors(hallId, reason) { // Confirm hallId is passed here function initializeDatepickerWithColors(hallId, reason) { // Confirm hallId is passed here
$("#datepicker-container").datepicker("destroy"); $("#datepicker-container").datepicker("destroy");
const serverDate =new Date($("#serverDate").val() + "T00:00:00") const serverDate =new Date($("#serverDate").val() + "T00:00:00")
console.log(" view history Date:", serverDate);
// console.log(" view history Date:", serverDate);
const maxDate = new Date(serverDate); const maxDate = new Date(serverDate);
maxDate.setMonth(maxDate.getMonth() + 6); maxDate.setMonth(maxDate.getMonth() + 6);
console.log("View History: "+maxDate);
// console.log("View History: "+maxDate);
$("#startDateInput,#datepicker-container").datepicker({ $("#startDateInput,#datepicker-container").datepicker({
dateFormat: "yy-mm-dd", dateFormat: "yy-mm-dd",
@ -2569,8 +2569,8 @@
url: '/communityhall/user/api/getTransactionDetails', url: '/communityhall/user/api/getTransactionDetails',
data: { 'userId': userId }, data: { 'userId': userId },
success: function (data) { success: function (data) {
console.log("Full response:", data);
console.log("Refund Details:", data.refundDetails);
// console.log("Full response:", data);
// console.log("Refund Details:", data.refundDetails);
const transactions = data.transactions || []; const transactions = data.transactions || [];

Loading…
Cancel
Save