Browse Source

Counter login and Unique Id added

master
kanimozhi 2 years ago
parent
commit
b204e1e691
  1. 15
      src/main/java/com/gcc/communityHall/controller/CareTakerAPIController.java
  2. 124
      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. 16
      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. 751
      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/logRegiOtpScript.html
  50. 2
      src/main/resources/templates/fragments/loginhead.html
  51. 152
      src/main/resources/templates/fragments/loginreg.html
  52. 2
      src/main/resources/templates/fragments/loginscript.html
  53. 8
      src/main/resources/templates/fragments/menuCounter.html
  54. 5
      src/main/resources/templates/fragments/nav-user.html
  55. 70
      src/main/resources/templates/fragments/nav-usermenu.html
  56. 10
      src/main/resources/templates/fragments/script.html
  57. 2
      src/main/resources/templates/headquarters/booking-list.html
  58. 4
      src/main/resources/templates/headquarters/bookingwaiting.html
  59. 6
      src/main/resources/templates/headquarters/dashboard.html
  60. 4
      src/main/resources/templates/headquarters/gccblocking.html
  61. 2
      src/main/resources/templates/headquarters/headquarterspage.html
  62. 20
      src/main/resources/templates/headquarters/refund-failedlist.html
  63. 2
      src/main/resources/templates/headquarters/rejected-list.html
  64. 6
      src/main/resources/templates/headquarters/reports.html
  65. 20
      src/main/resources/templates/headquarters/settlement-approved.html
  66. 2
      src/main/resources/templates/headquarters/settlement-completed.html
  67. 2
      src/main/resources/templates/headquarters/settlement-initiate.html
  68. 20
      src/main/resources/templates/headquarters/settlement-list.html
  69. 8
      src/main/resources/templates/headquarters/settlement-reject.html
  70. 2
      src/main/resources/templates/headquarters/settlementlist.html
  71. 2
      src/main/resources/templates/headquarters/user-approved.html
  72. 2
      src/main/resources/templates/headquarters/user-reject.html
  73. 8
      src/main/resources/templates/headquarters/viewUploadNoc.html
  74. 4
      src/main/resources/templates/officer/officer-dashboard.html
  75. 20
      src/main/resources/templates/officer/refund-failedlist.html
  76. 2
      src/main/resources/templates/officer/settlement-completed.html
  77. 20
      src/main/resources/templates/officer/settlement-list.html
  78. 8
      src/main/resources/templates/officer/settlement-reject.html
  79. 17
      src/main/resources/templates/officiallogin.html
  80. 2
      src/main/resources/templates/user/PaymentResponse.html
  81. 4
      src/main/resources/templates/user/acknowledgement.html
  82. 2
      src/main/resources/templates/user/calculatehallamount.html
  83. 4
      src/main/resources/templates/user/communityHallList.html
  84. 30
      src/main/resources/templates/user/dashboard.html
  85. 4
      src/main/resources/templates/user/extraebdamageamountack.html
  86. 41
      src/main/resources/templates/user/hallbookingform.html
  87. 8
      src/main/resources/templates/user/viewhallform.html
  88. 20
      src/main/resources/templates/user/viewhistory.html

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

@ -4,8 +4,11 @@ import java.io.FileWriter;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gcc.communityHall.others.UserSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@ -55,6 +58,9 @@ import lombok.AllArgsConstructor;
@Validated
public class CareTakerAPIController {
@Autowired
private UserSession userSession;
@Autowired
private BookingService bookingService;
@ -199,6 +205,7 @@ public class CareTakerAPIController {
@RequestParam String pin, HttpSession session) {
try {
// System.out.println("careTaker API Controller\nCounter Id: "+userSession.getCounter()+"\nCounter Name: "+userSession.getCounterName());
// Fetch login details from the repository
Login login = loginrepo.findByMobileNoAndPin(Long.parseLong(mobileNo), pin);
if (login != null) {
@ -232,6 +239,14 @@ public class CareTakerAPIController {
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);

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

@ -1,10 +1,19 @@
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.List;
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.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
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.multipart.MultipartFile;
import com.gcc.communityHall.entity.BookingDetails;
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.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.CounterService;
import com.gcc.communityHall.service.UserService;
@ -32,7 +34,7 @@ import com.gcc.communityHall.service.UserService;
import jakarta.servlet.http.HttpSession;
@Controller
@RequestMapping("/counter")
@RequestMapping("/communityhall/counter")
public class CounterController {
@Autowired
@ -55,11 +57,21 @@ public class CounterController {
@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");
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";
}
@ -94,8 +106,7 @@ public class CounterController {
}
@GetMapping("/bookinglist")
public String viewbookingpage(Model model,HttpSession session)
{
public String viewbookingpage(Model model, HttpSession session) {
List<Map<String, Object>> bookinglists = bookser.getOfflineBookings();
model.addAttribute("bookinglist", bookinglists);
@ -104,6 +115,7 @@ public class CounterController {
return "counter/viewhistory";
}
@GetMapping("/refundinitialisation")
public String viewrefund(Model model, HttpSession session) {
List<CounterRefundList> counterRefundLists = counterRefundRepository.findAll();
@ -112,6 +124,7 @@ public class CounterController {
model.addAttribute("countername", countername);
return "counter/refund-initialisation";
}
@GetMapping("/calculateamount")
public String viewCalculate(Model model) {
return "counter/calculate-hall-amount";
@ -120,7 +133,96 @@ public class CounterController {
@GetMapping("/logout")
public String viewLogout(Model model, HttpSession session) {
session.invalidate();
return "redirect:/communityhall/login";
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.print("\n MobileNo---:"+mobileNo);
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);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd-MMM-yyyy%20HH:mm");
LocalDateTime now = LocalDateTime.now();
@ -250,7 +250,7 @@ public class UserAPIController {
System.out.println(urlString);
System.out.println("\n urlString---: "+urlString);
String bodyMessage = ""+otp;
/*try {
try {
RestTemplate restTemplate = new RestTemplate();
String Response = restTemplate.getForObject(urlString, String.class);
bodyMessage=Response;
@ -267,7 +267,7 @@ public class UserAPIController {
} catch (Exception e) {
// System.out.print("ERROR in Sending---: "+e);
bodyMessage = "Error";
}*/
}
HttpSession session = request.getSession();
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();
// Create a string to concatenate all notifications descriptions
StringBuilder notificationText = new StringBuilder();
for (Notification notification : newnotification) {
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
model.addAttribute("newnotification", notificationText.toString());
model.addAttribute("userName", userSession.getDispayName());
model.addAttribute("halls", halls);
model.addAttribute("hallnames", hallnames);
model.addAttribute("serverDate", LocalDate.now().toString()); //for server date
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/dashboard";
}
@ -204,6 +206,8 @@ public class UserController {
model.addAttribute("startingSlot", starting.equals("1") ? "Morning" : "Evening");
model.addAttribute("endingSlot", ending.equals("1") ? "Morning" : "Evening");
model.addAttribute("halls", (hallId != null && !hallId.isEmpty()) ? removeHallById : hallsByZone);
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/dashboard";
}
@ -238,9 +242,11 @@ public class UserController {
@GetMapping("/hallbookingform")
public String viewform(Model model) {
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("userName", username);
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/hallbookingform";
}
@ -270,6 +276,8 @@ public class UserController {
//List<String> test = new ArrayList<>();
model.addAttribute("userName", userSession.getDispayName());
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
List<Map<String, Object>> bookingPast = bookingService.getAllBookingEventsByUserId(userId);
@ -282,12 +290,16 @@ public class UserController {
@GetMapping("/CommunityHallList")
public String viewhalllist(Model model) {
model.addAttribute("userName", userSession.getDispayName());
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/communityHallList";
}
@GetMapping("/hallAmountCalculation")
public String viewCalculate(Model model) {
model.addAttribute("userName", userSession.getDispayName());
model.addAttribute("counter", userSession.getCounter());
model.addAttribute("counterName", userSession.getCounterName());
return "user/calculatehallamount";
}

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

@ -24,7 +24,7 @@ public class BookingCalendar {
private int hallId;
@Column(name = "unique_id", unique = true)
@Column(name = "unique_id", nullable = false, unique = true)
private String uniqueId;
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")
private RefundTransaction refundTransaction;
private String counterId;
public int getBookingId() {
return bookingId;
@ -344,4 +346,12 @@ public class BookingDetails {
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 Long mobileno;
// added for counter login
private String counter;
private String counterName;
public Integer getUserId() {
return userId;
}
@ -45,6 +49,20 @@ public class UserSession {
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.gcc.communityHall.entity.*;
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 org.apache.tomcat.util.json.JSONParser;
import org.springframework.beans.factory.annotation.Autowired;
@ -70,8 +70,8 @@ public class PaymentController {
@Autowired
private AppConfig appConfig;
@Autowired
private ErpPostDataRepository erpPostDataRepository;
// @Autowired
// private ErpPostDataRepository erpPostDataRepository;
@Autowired
private PaymentsService paymentsService;
@ -147,7 +147,6 @@ public class PaymentController {
model.addAttribute("bookingsDetails", bookingsDetails);
// bookser.updateBookingStatusById(bookingsDetails.getBookingId(), BookingStatus.PENDING, "Amount mismatch - Booking Not Confirmed");
return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingsDetails.getBookingId();
}
@ -185,7 +184,7 @@ public class PaymentController {
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();
erpPostData erpData = new erpPostData();
@ -194,7 +193,7 @@ public class PaymentController {
String assesNo = LocalDate.now().getYear() + "/COMM/" + res.getBookingId();
Map<String, Object> data = new TreeMap<>();
/*static mandatory input to be sent */
*//*static mandatory input to be sent *//*
data.put("serviceId", "getOtherCollection");
data.put("COLLECTION_TYPE", "Community Hall");
data.put("TOTALTRANSACTIONCODE", "450310000");
@ -219,7 +218,7 @@ public class PaymentController {
payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," +
payment.getBookingDetails().getUsers().getPinCode());
data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo());
/* end */
*//* end *//*
System.out.println(data);
System.out.println(appConfig.getCommErpUrl());
// ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class);
@ -278,7 +277,7 @@ public class PaymentController {
} catch (Exception e) {
e.printStackTrace();
}
}
}*/
@PostMapping(value = "/additionaldamage-response")
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();
}
public void postEPDataToERP(ExtraPayments payment, TransactionResponse res) {
/*public void postEPDataToERP(ExtraPayments payment, TransactionResponse res) {
RestTemplate restTemplate = new RestTemplate();
erpPostData erpData = new erpPostData();
@ -360,7 +359,7 @@ public class PaymentController {
String assesNo = LocalDate.now().getYear() + "/COMM/ED/" + res.getBookingId();
Map<String, Object> data = new TreeMap<>();
/*static mandatory input to be sent */
*//*static mandatory input to be sent *//*
data.put("serviceId", "getOtherCollection");
data.put("COLLECTION_TYPE", "Community Hall");
data.put("TOTALTRANSACTIONCODE", "450310000");
@ -385,7 +384,7 @@ public class PaymentController {
payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," +
payment.getBookingDetails().getUsers().getPinCode());
data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo());
/* end */
*//* end *//*
System.out.println(data);
System.out.println(appConfig.getCommErpUrl());
// ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class);
@ -444,7 +443,7 @@ public class PaymentController {
} catch (Exception e) {
e.printStackTrace();
}
}
}*/
@PostMapping(value = "/updatetransaction")
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 " +
"FROM transaction_response tr " +
"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);

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
package com.gcc.communityHall.paymentService.Scheduler;
//package com.gcc.communityHall.paymentService.Scheduler;
import com.fasterxml.jackson.databind.ObjectMapper;
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 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"
+ "ORDER BY bd.start_date DESC;\r\n"
+ "ORDER BY bd.booking_id DESC;\r\n"
+ "", nativeQuery = true)
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")
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;
Integer userId = userSession.getUserId();
String counterId = userSession.getCounter();
ReasonMaster reasonMaster = reasonMasterService.getReasonById(Integer.parseInt(formData.get("reasonId").toString()));
HallDetails hallDetails = hallDetailService.getHallById(Integer.parseInt(formData.get("hallId").toString()));
@ -589,7 +590,9 @@ public class BookingServiceImpl implements BookingService {
if (user != null) {
bookingDetails.setUsers(user);
if(counterId!=null){
bookingDetails.setCounterId(counterId);
}
if (hallDetails != null) {
bookingDetails.setHallDetails(hallDetails);
@ -1643,11 +1646,13 @@ public class BookingServiceImpl implements BookingService {
} else {
String uniqueId = date.format(DateTimeFormatter.ofPattern("yyyyMMdd")) + hallId;
bookingCalendar = new BookingCalendar();
bookingCalendar.setBdate(date);
bookingCalendar.setHallId(hallId);
bookingCalendar.setIs_booked(0);
bookingCalendar.setIs_active(true);
bookingCalendar.setUnique_id(uniqueId);
}
// Mark the appropriate slot as booked based on starting and ending slots

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

@ -43,8 +43,7 @@ import com.gcc.communityHall.service.ReasonMasterService;
import com.gcc.communityHall.service.UserService;
@Service
public class CounterServiceImpl implements CounterService
{
public class CounterServiceImpl implements CounterService {
@Autowired
private BookingDetailsRepository bookingDetailsRepository;
@ -64,8 +63,6 @@ public class CounterServiceImpl implements CounterService
private DiscountRangeService discountRangeService;
@Autowired
private UserService userService;
@Autowired
@ -83,6 +80,7 @@ public class CounterServiceImpl implements CounterService
private final String ddPhotoUrl;
private final String refundDirectory;
private final String refundPhotoUrl;
@Autowired
CounterServiceImpl(CounterDetailsRepository counterRepo,
@Value("${file.dd.upload.directory}") String ddDirectory,
@ -133,7 +131,6 @@ public class CounterServiceImpl implements CounterService
}
@Override
public Map<String, Object> saveCounterBooking(Map<String, Object> formData) {
Map<String, Object> response = new HashMap<>();
@ -159,16 +156,18 @@ public class CounterServiceImpl implements CounterService
if (hallDetails != null) {
bookingDetails.setHallDetails(hallDetails);
bookingDetails.setDepositAmount(hallDetails.getDepositAmount());
// bookingDetails.setDepositAmount(hallDetails.getDepositAmount());
String startDate = formData.get("startDate").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());
DiscountRange discountrange = discountOpt.get();
float discount = discountrange.getDiscountRange();
int startingSlot = Integer.parseInt(formData.get("startingSlot").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;
String usertype = user.getUsertype().toString();
if (usertype.equals("COUNCILLOR") || usertype.equals("PENSIONER") || usertype.equals("GCC_EMPLOYEE") || usertype.equals("PUBLIC")) {
@ -279,6 +278,7 @@ public class CounterServiceImpl implements CounterService
return hallAmount;
}
@Override
public BookingDetails getBookingsById(int BookingId) {
Optional<BookingDetails> OPBookingDetails = bookingDetailsRepository.findById(BookingId);

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

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

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

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

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

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

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

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

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

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

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

@ -721,7 +721,7 @@
fileInput.value = ''; // Clear the file input
displayError(fileInput, errorMessage);
} 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 () {
$("#submitEbDetails").click(function () {
var bookid = parseInt($("#bookingId").val());
console.log("bookid = "+ bookid)
// console.log("bookid = "+ bookid)
var startingReading = $("#startingReading").val();
console.log("startingReading = "+ startingReading)
// console.log("startingReading = "+ startingReading)
var startingReadingimage = $("#startingReadingimage")[0].files[0]; // Get the file
var formData = new FormData();

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

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

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

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

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

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

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

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

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

@ -1155,7 +1155,7 @@ if (data.damageList.length === 0) {
} else {
timeSlot = 'Unknown';
}
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot;
}
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;
function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') {

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

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

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

@ -448,7 +448,7 @@ $(document).ready(function () {
'settlementsid': settlementId
},
success: function (x) {
console.log(x);
// console.log(x);
showSettlementInfo(x)
showDamageDetails(x);
}
@ -457,8 +457,8 @@ $(document).ready(function () {
}
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({
backdrop: 'static',
@ -636,7 +636,7 @@ if (data.damageList.length === 0) {
var refundStatus = data.refundStatus;
if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00);
$("#pendingcolumn").show();
$("#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
$('#qrview').modal('show');
$('#qrCodeImage').attr('src', 'data:image/png;base64,' + data);
console.log(data);
// console.log(data);
},
error: function(jqXHR, 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
let id = $('#bookingid').val();
console.log("Booking ID:", id);
// console.log("Booking ID:", id);
// Get the selected file
let fileInput = $('#nocFile')[0].files[0];
@ -432,7 +432,7 @@
formData.append('nocFile', fileInput);
formData.append('bookingid', id); // Ensure key matches backend parameter
console.log("FormData entries:");
// console.log("FormData entries:");
for (let [key, value] of formData.entries()) {
console.log(`${key}: ${value}`);
}
@ -445,7 +445,7 @@
contentType: false, // Set to false for multipart/form-data
processData: false, // Prevent jQuery from processing the data
success: function (response) {
console.log("Upload success response:", response);
// console.log("Upload success response:", response);
Swal.fire({
icon: 'success',
title: 'Success',
@ -472,7 +472,7 @@
$('#uploadNocModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget); // Button that triggered the modal
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
});

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

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

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

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

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

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

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

@ -718,7 +718,7 @@
// Set the QR code image source
$('#qrview').modal('show');
$('#qrCodeImage').attr('src', 'data:image/png;base64,' + data);
console.log(data);
// console.log(data);
},
error: function(jqXHR, 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
const urlParams = new URLSearchParams(window.location.search);
const hallId = urlParams.get('hallId');
console.log("Hall ID:", hallId);
// console.log("Hall ID:", hallId);
$(document).ready(function () {
if (hallId != null) {
getHallDetails(hallId, function (response) {

751
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) {
console.log("Initial Counter Details:", counterDetails);
// console.log("Initial Counter Details:", counterDetails);
var counterId = counterDetails.counterId;
$.ajax({
url: '/communityhall/user/api/counterdetails',
type: 'GET',
data: {counterId: counterId},
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
if (response.length > 0) {
@ -286,7 +286,7 @@
type: 'GET',
data: {counterId: counterId},
success: function (response) {
console.log("Fetched Booking Details:", response);
// console.log("Fetched Booking Details:", response);
if (response.length > 0) {
var bookingDetails = response[0];

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -119,7 +119,7 @@
url: '/communityhall/payment/api/payment-request',
data: {'userId': userIdd, 'bookingId': bookingIdd},
success: function (response) {
console.log(response);
// console.log(response);
if (response.error) {
alert("please Contact Admin..")
} else {
@ -165,7 +165,7 @@
url: '/communityhall/payment/api/additionaldamage-payment-request',
data: {'userId': userIdd, 'bookingId': bookingIdd},
success: function (response) {
console.log(response);
// console.log(response);
if (response.error) {
alert("please Contact Admin..")
} else {
@ -218,12 +218,12 @@
$(document).off("click", "#extrapaymentbtnSubmit").on("click", "#extrapaymentbtnSubmit", function (e) {
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 = {

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://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://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/logRegiOtpScript.html

@ -17,6 +17,7 @@
document.getElementById("pds1").style.display = 'none';
document.getElementById("pds").style.display = 'block';
}
function checkLoginedIn(url, hallId) { // Should print the actual hall ID value
if (isLogin == false) {
showloginpopup();
@ -25,7 +26,7 @@
CheckBookingLimitation(function (success) {
if (success) {
if (hallId != undefined && hallId != '' && hallId != 0) {
console.log('Navigating to hallbookingform with hallId:', hallId);
// console.log('Navigating to hallbookingform with hallId:', hallId);
window.location.href = '/communityhall/hallbookingform?hallId=' + hallId;
} else {
window.location.href = '/communityhall/user/' + url;
@ -40,6 +41,7 @@
}
return false;
}
// Function to show login popup and reset mobile number field
function showloginpopup() {
$('#loginModal').modal('show'); // Show the login modal
@ -92,7 +94,11 @@
});
var verifyLogin = "";
window.dataLayer = window.dataLayer || [];
function gtag() {dataLayer.push(arguments);}
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-23581568-13');
@ -108,8 +114,7 @@
$("#employeeFields").show();
} else if (selectedUserType === "PENSIONER") {
$("#pensionerFields").show();
}
else if (selectedUserType === "COUNCILLOR") {
} else if (selectedUserType === "COUNCILLOR") {
$("#counsellorFields").show();
}
@ -187,6 +192,7 @@
}
}, 1000);
}
startCountdown(); // Start Resend OTP count
} else {
// Show error message if OTP sending failed
@ -265,6 +271,7 @@
'error'
);
}
function verifyOtp() {
// Show Swal loading dialog while processing OTP
Swal.fire({
@ -358,11 +365,13 @@
type: "GET",
url: '/communityhall/user/api/getUsername',
success: function (response) {
// alert("user type: "+response.userType);
document.getElementById("pds").style.display = "none";
$("#userNameLogin").html(response.displayName);
document.getElementById("pds1").style.display = 'block';
document.getElementById("pds").style.display = 'none';
$('#loginModal').modal('hide');
console.log("user type: "+response.userType);
isLogin = true;
},
error: function (errortxt) {
@ -420,7 +429,6 @@
});*/
function newPinCall() {
$('#otpForm').modal({
@ -430,6 +438,7 @@
$('#otpForm').modal('hide');
return false;
}
$('#otpForm').on('shown.bs.modal', function () {
$('.otp-input').val('');
$('#otperror').text('');
@ -519,8 +528,7 @@
});
return false;
}
else if (usertype == "PENSIONER") {
} else if (usertype == "PENSIONER") {
var pensionerId = $("#pensionerId").val();
if (!pensionerId) {
Swal.fire(
@ -581,8 +589,7 @@
});
return false;
}
else if (usertype === "COUNCILLOR") {
} else if (usertype === "COUNCILLOR") {
var mobileno = $("#mobileno").val();
$.ajax({
type: "GET",
@ -620,6 +627,7 @@
}
}
function validateNumber() {
var mobileNo = $("#mobileno").val();
@ -644,7 +652,8 @@
return false;
} else {
verifyLogin = "new";;
verifyLogin = "new";
;
sendOTP(mobileNo);
return false;
@ -657,6 +666,7 @@
return false;
}
function checkMobileNo() {
var mobileNo = $("#mobileNumber");
@ -796,6 +806,7 @@
}
});
}
function showprofilepopup() {
showProfileDetails();
}
@ -834,8 +845,7 @@
$('#p_usertype option[value="COUNCILLOR"]').prop('disabled', true);
$('#p_usertype option[value="GCC_EMPLOYEE"]').prop('disabled', true);
$('#updateButton').show();
}
else {
} else {
$('#rejectionReasonContainer').hide();
$('#usertypeContainer').hide();
$('#p_email').prop('readonly', false);
@ -921,6 +931,7 @@
}
});
}
document.getElementById('p_image').addEventListener('click', function () {
// Trigger the file input click event
document.getElementById('fileInput').click();
@ -972,6 +983,7 @@
fetchEmployeeDetails(employeeId);
}
});
function fetchEmployeeDetails(employeeId) {
fetch('/communityhall/user/api/EmployeeDetails?employeeId=' + employeeId)
.then(response => response.json())
@ -989,6 +1001,7 @@
})
.catch(error => console.error('Error fetching Employee details:', error));
}
//Script for triggering send otp button while pressing enter key from system
document.addEventListener('keydown', function (event) {
if (event.key === 'Enter') {
@ -1112,6 +1125,93 @@
errorContainer.textContent = errorMessage;
}
/*Newly added for counter login*/
// Add an event listener to handle login popup
document.getElementById("counterloginpopup").addEventListener("click", function () {
showcounterloginpopup(); // Call the showLoginPopup() function when login popup icon is clicked
});
// Function to show counter login popup
function showcounterloginpopup() {
$('#cloginModal').modal('show');
// Reset input field on login modal shown
$('#cloginModal').on('shown.bs.modal', function () {
$('#cusername').val('');
$('#cpassword').val('');
});
// Unbind the modal shown event after it has been triggered once
$('#cloginModal').one('hide.bs.modal', function () {
$('#cloginModal').off('shown.bs.modal'); // Unbind the shown.bs.modal event
});
}
function verifyCounterLogin() {
var username = $("#cusername");
var password = $("#cpassword");
console.log("username: ", username[0], "\npassword:", password[0]);
// Validate Username
if ($.trim(username.val()) === "") {
username[0].setCustomValidity("Please Enter user name.");
username[0].reportValidity();
return false;
} else {
username[0].setCustomValidity("");
}
// Validate Password
if ($.trim(password.val()) === "") {
password[0].setCustomValidity("Please enter password");
password[0].reportValidity();
return false;
} else {
password[0].setCustomValidity("");
}
// Send AJAX Request
$.ajax({
type: "GET",
url: "/communityhall/counter/verifyLogin",
data: {
username: username.val(), // Send actual values
password: password.val()
},
success: function (response) {
console.log("Response: ", response);
if (!response || response.userType.toLowerCase() === "error") {
$("#error").html("<p class='text-danger'>Invalid Username or Password!</p>");
username.val(""); // Clear input
password.val("");
return;
} else {
sessionStorage.setItem("jwtToken", response.token);
sessionStorage.setItem("userName", response.counterName);
$("#error").text("").removeClass("text-danger");
$('#cloginModal').modal('hide');
console.log("Successfully logged in as counter!!!"+ response.counterName);
// redirectToDashboard(response);
window.location.href = "/communityhall/user/dashboard";
}
},
error: function (jqXHR) {
if (jqXHR.status === 400 || jqXHR.status === 417) {
$("#error").html("<p class='text-danger'>" + jqXHR.responseText + "</p>");
} else {
console.error("AJAX Error: ", jqXHR);
}
}
});
return false;
}
</script>

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

@ -38,7 +38,7 @@
<!-- Latest Swiper 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" 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: -->
<!-- <link rel="stylesheet" id="css-theme" href="assets/css/themes/xwork.min.css"> -->

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

@ -21,6 +21,7 @@
z-index: 9999999999999 !important;
/* Adjust this value if needed */
}
.form-check-label {
padding-left: 0px
}
@ -57,27 +58,31 @@
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
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>
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"
<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>
<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>
@ -107,7 +112,8 @@
<label for="employeedepartment">Employee Department<span
class="required">*</span>:</label>
<input type="text" class="form-control" id="employeedepartment"
name="employeedepartment" placeholder="Employee Department "
name="employeedepartment"
placeholder="Employee Department "
style="background-color: white;" readonly>
</div>
</div>
@ -151,8 +157,10 @@
<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>
placeholder="Mobile No" minlength="10" maxlength="10"
pattern="[0-9]{10}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57"
required>
</div>
</div>
@ -160,9 +168,12 @@
<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>
<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>
@ -173,7 +184,8 @@
<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">
id="userPhoto" name="userPhoto"
accept="image/jpeg, image/png, image/gif">
</div>
</div>
@ -187,7 +199,8 @@
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="doorNo">Door No:<span class="required-field">*</span></label>
<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>
@ -205,24 +218,29 @@
<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"
<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>
<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>
<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>
placeholder="Pincode" minlength="6" maxlength="6"
pattern="[0-9]{6}"
onkeypress="return event.charCode >= 48 && event.charCode <= 57"
required>
</div>
</div>
@ -231,7 +249,8 @@
<div class="form-row">
<div class="col text-center">
<button type="submit" class="btn btn-primary"
style="background-color: #2c726c !important">Submit</button>
style="background-color: #2c726c !important">Submit
</button>
</div>
</div>
</form>
@ -241,7 +260,8 @@
</div>
</div>
</div>
<div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel" aria-hidden="true">
<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"
@ -259,7 +279,8 @@
</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 class="text-mute">Enter the OTP sent to <b class="text-info"
id="mobilenotxt"></b>
</p>
<p class="text-danger" id="otperror"></p>
</div>
@ -281,7 +302,8 @@
</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="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>
@ -290,12 +312,14 @@
</div>
<!--profile popup-->
<!-- Modal -->
<div class="modal fade" id="profileModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<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">
<button type="button" class="close" style="color: white;" data-bs-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
@ -319,7 +343,8 @@
</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()">
<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>
@ -339,7 +364,8 @@
</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}"
<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">
@ -364,21 +390,26 @@
</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>
<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 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>
<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">
<button type="button" class="btn-block-option" data-bs-dismiss="modal"
aria-label="Close">
<i class="fa fa-fw fa-times"></i>
</button>
</div>
@ -386,19 +417,24 @@
<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" />
<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"/>
<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 />
<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="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>
@ -406,3 +442,53 @@
</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://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 -->
<script src="js/dashmix.app.min.js"></script>

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

@ -3,14 +3,14 @@
<ul class="nav-main">
<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>
<span class="nav-main-link-name">Counter Booking</span>
</a>
</li>
<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>
<span class="nav-main-link-name">Booking List</span>
</a>
@ -29,14 +29,14 @@
</a>
</li>-->
<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>
<span class="nav-main-link-name">Calculate Hall Amount</span>
</a>
</li>
<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>
<span class="nav-main-link-name">Sign Out</span>
</a>

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

@ -1,8 +1,9 @@
<!-- 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-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">
<i class="fas fa-bars" style="margin-right: 335px;"></i>
</a>

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

@ -37,25 +37,67 @@
<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;">
<ul class="pcoded-item pcoded-right-item" th:if="${counterName != null}">
<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>
<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">
<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>
<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>
@ -72,8 +114,10 @@
<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
<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>

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://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/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 -->
<!--<script src="https://unpkg.com/viewerjs/dist/viewer.min.js"></script>
<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
},
success: function (x) {
console.log(x);
// console.log(x);
showReasonWithDocument(x, list);
}
});

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

@ -435,7 +435,7 @@
showReasonDocuments(list);
}
function showReasonDocuments(list) {
console.log("Reason;;;"+list.reason);
// console.log("Reason;;;"+list.reason);
$.ajax({
type: "GET",
url: '/communityhall/api/officer/getReasonByName',
@ -443,7 +443,7 @@
'reasonName': list.reason
},
success: function (x) {
console.log("getReasonByName:.."+x);
// console.log("getReasonByName:.."+x);
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',
success: function(response) {
console.log('overallreports:',response);
// console.log('overallreports:',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
@ -1342,7 +1342,7 @@ function isDarkColor(color) {
success: function(response) {
displayHallDetails(response);
console.log(response);
// console.log(response);
},
error: function(error) {
console.error("Error fetching hall details:", error);

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1155,7 +1155,7 @@ if (data.damageList.length === 0) {
} else {
timeSlot = 'Unknown';
}
console.log("Time Slot:", timeSlot);
// console.log("Time Slot:", timeSlot);
return timeSlot;
}
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;
function getTimeSlot(slotValue) {
console.log("Slot Value in getTimeSlot function:", slotValue);
// console.log("Slot Value in getTimeSlot function:", slotValue);
var timeSlot;
var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
if (trimmedSlotValue === '1') {

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

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

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

@ -448,7 +448,7 @@ $(document).ready(function () {
'settlementsid': settlementId
},
success: function (x) {
console.log(x);
// console.log(x);
showSettlementInfo(x)
showDamageDetails(x);
}
@ -457,8 +457,8 @@ $(document).ready(function () {
}
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({
backdrop: 'static',
@ -636,7 +636,7 @@ if (data.damageList.length === 0) {
var refundStatus = data.refundStatus;
if (settleAmount < 0) {
console.log(settleAmount);
// console.log(settleAmount);
$("#td_settel_amt").html(0.00);
$("#pendingcolumn").show();
$("#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
$('#qrview').modal('show');
$('#qrCodeImage').attr('src', 'data:image/png;base64,' + data);
console.log(data);
// console.log(data);
},
error: function(jqXHR, 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
},
success: function (x) {
console.log(x);
// console.log(x);
showUserInfo(x)
}
});

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -5,7 +5,7 @@
<!--<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" type="text/css" href="css\leaflet.css">
<style>
/* Hide button and div2 on small screens */
@ -227,7 +227,7 @@
<!-- Login Modal-->
<!--<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 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>
<script th:replace="~{fragments/script :: 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">
<!-- 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 -->
<!--<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>
/* Hide button and div2 on small screens */
@ -714,7 +716,7 @@
$(document).ready(function () {
const serverDate =new Date($("#serverDate").val() + "T00:00:00")
console.log("serverDate:", serverDate);
// console.log("serverDate:", serverDate);
// Get today's date
var today = serverDate;
@ -722,7 +724,7 @@
var sixMonthsFromNow = new Date(serverDate);
sixMonthsFromNow.setMonth(serverDate.getMonth() + 6);
console.log("sixMonthsFromNow:", sixMonthsFromNow);
// console.log("sixMonthsFromNow:", sixMonthsFromNow);
const day = serverDate.getDate();
// If the new month has fewer days, adjust the date
@ -734,8 +736,8 @@
const minDateStr = formatDateForValue(serverDate); // YYYY-MM-DD format
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("max", maxDateStr);

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

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

41
src/main/resources/templates/user/hallbookingform.html

@ -1474,7 +1474,6 @@
</div>
</div>
</div>
</div>
</form>
<div class="step step-4">
<h4 style="margin-left:166px">Step 4</h4>
@ -1488,7 +1487,7 @@
<span id="timer"
style="display: inline; float:right;margin-right:10px;">
<span class="sand-clock"></span> <!-- Hourglass icon -->
<span id="timerText">Payment Closes in 01:00</span>
<span id="timerText">Payment Closes in 15:00</span>
<!-- Timer text -->
</span>
</h6>
@ -1685,6 +1684,9 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal HTML for Bootstrap 5 -->
<div class="modal fade" id="termsModal" tabindex="-1" aria-labelledby="termsModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
@ -1733,8 +1735,8 @@
}
});
var countdown; // Global variable to hold the interval
// var totalTime = 15 * 60; // 15 minutes in seconds
var totalTime = 1 * 60; // for testing
var totalTime = 15 * 60; // 15 minutes in seconds
// var totalTime = 1 * 60; // for testing
var timerElement = document.getElementById("timerText");
var confirmPaymentBtn = document.getElementById("confirmPaymentBtn");
var checkInCheckbox = document.getElementById("checkin");
@ -1896,7 +1898,7 @@
type: 'GET',
url: '/communityhall/user/api/gethalldetails/' + selectedHallId,
success: function (response) {
console.log(response);
// console.log(response);
const isSGE = response.sge; // Fetch SGE status from the response
const isCGE = response.cge; // Fetch CGE status from the response
@ -1960,7 +1962,7 @@
processData: false,
contentType: false,
success: function (response) {
console.log("response:--" + response.status);
// console.log("response:--" + response.status);
if (response.status === 'slotOccupied') {
Swal.fire({
@ -2471,7 +2473,7 @@
fileInput.value = ''; // Clear the file input
displayError(fileInput, errorMessage);
} else {
console.log('File size is within limit:', file.size, 'bytes');
// console.log('File size is within limit:', file.size, 'bytes');
clearError(fileInput);
}
}
@ -2600,7 +2602,7 @@
type: 'GET',
url: '/communityhall/user/api/gethalldetails/' + hallId,
success: function (response) {
console.log(response);
// console.log(response);
// Display the container
$('#hallDetailsContainer').show();
@ -3033,13 +3035,11 @@
function initializeDatepickerWithColors(hallId) {
// Destroy existing datepicker to avoid duplicate initialization
$("#datepicker-container").datepicker("destroy");
const serverDate = new Date($("#serverDate").val() + "T00:00:00")
console.log("serverDate:", serverDate);
const maxDate = new Date(serverDate);
maxDate.setMonth(maxDate.getMonth() + 6);
console.log(" hall booking form Max Date: "+maxDate);
// console.log(" hall booking form Max Date: "+maxDate);
// Initialize the datepicker
$("#startDateInput,#datepicker-container").datepicker({
@ -3101,20 +3101,20 @@
const selectedDate = $(this).val();
const bookingStatus = window.bookingResponse[selectedDate] || {};
// const currentDate = new Date();
const currentHours = serverDate.getHours();
const currentDateString = serverDate.toISOString().split("T")[0];
const currentHours = new Date().getHours();
const currentDateString = $("#serverDate").val();
$("#startPeriodDropdown option").prop("disabled", false); //newly added after server date changes
$("#startPeriodDropdown").val(0).prop("disabled", false);
$("#endPeriodDropdown").val(0).prop("disabled", false);
$("#numDaysCount").val('');
validateForm();
if (selectedDate === currentDateString && currentHours >= 6) {
$("#startPeriodDropdown").val(2).prop("disabled", true);
} else if (bookingStatus[0]) {
$("#startPeriodDropdown").val(2).prop("disabled", true);
if ((selectedDate === currentDateString && currentHours >= 6 )|| bookingStatus[0]) {
$("#startPeriodDropdown option[value='1']").prop("disabled", true);
}else if (bookingStatus[1]) {
$("#startPeriodDropdown").val(1).prop("disabled", true);
$("#startPeriodDropdown option[value='2']").prop("disabled", true);
}
updateEndDate(selectedDate);
});
@ -3332,9 +3332,4 @@
}
</script>
</body>
</div>
</div>
</div>
</div>
</html>

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

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

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

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

Loading…
Cancel
Save