Victoria Hall Booking for Events
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3958 lines
122 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="~{fragments/head :: head}">
  4. </head>
  5. <style>
  6. .card {
  7. margin-top: -16px;
  8. margin-right: -116px;
  9. margin-left: -116px;
  10. }
  11. .ui-datepicker-container {
  12. width: 100%
  13. }
  14. .highlight-greens .ui-state-default {
  15. background: green !important;
  16. color: #FFF !important;
  17. }
  18. .highlight-yellow .ui-state-default {
  19. background: yellow !important;
  20. color: #000 !important;
  21. }
  22. .highlight-violet .ui-state-default {
  23. background: #a93da9 !important;
  24. color: #000 !important;
  25. }
  26. .highlight-pink .ui-state-default {
  27. background: red !important;
  28. color: #000 !important;
  29. }
  30. .btn-square-md {
  31. width: 16px !important;
  32. max-width: 100% !important;
  33. max-height: 50% !important;
  34. height: 30px !important;
  35. text-align: center;
  36. padding: 0px;
  37. font-size: 2px;
  38. }
  39. .disabled {
  40. pointer-events: none;
  41. opacity: 1;
  42. /* Example: reduce opacity to indicate disabled state */
  43. }
  44. .ui-datepicker {
  45. width: 100%;
  46. background-color: #333;
  47. /* Dark background color */
  48. }
  49. .ui-datepicker-header {
  50. background-color: #f0f0f0;
  51. /* Light gray background for header */
  52. border: none;
  53. border-radius: 5px 5px 0 0;
  54. }
  55. .ui-datepicker-title {
  56. font-size: 1.2em;
  57. margin: 0;
  58. padding: 10px;
  59. text-align: center;
  60. }
  61. .ui-datepicker-calendar {
  62. margin: 0;
  63. padding: 0;
  64. color: white;
  65. /* Text color for dates */
  66. font-weight: bold;
  67. /* Bold font for dates */
  68. }
  69. .ui-datepicker-calendar th,
  70. .ui-datepicker-calendar td {
  71. text-align: center;
  72. }
  73. .ui-datepicker-week-end {
  74. color: yellow;
  75. font-weight: bold;
  76. }
  77. /* Style for the label */
  78. .date-label {
  79. display: block;
  80. margin-bottom: 6px;
  81. font-weight: bold;
  82. }
  83. .highlight-current-date a {
  84. background-color: green;
  85. /* Current date highlight color */
  86. color: white;
  87. }
  88. .highlight-greens a {
  89. background-color: green;
  90. color: white;
  91. }
  92. .highlight-yellow a {
  93. background-color: yellow;
  94. color: black;
  95. /* Change text color for visibility */
  96. }
  97. .highlight-pink a,
  98. input[type=button]:disabled {
  99. background-color: pink;
  100. /* Pink highlight for disabled or booked dates */
  101. color: white;
  102. }
  103. .highlight-orange a {
  104. background-color: orange;
  105. /* Orange highlight color */
  106. color: white;
  107. }
  108. input[type=button]:disabled {
  109. background: red;
  110. }
  111. .hidden {
  112. display: none;
  113. }
  114. #selecthall.select2-container--default .select2-selection--single {
  115. height: 35px;
  116. border: 1px solid #ddd;
  117. padding-left: 10px;
  118. }
  119. .select2-container--default .select2-selection--single .select2-selection__rendered {
  120. color: #444;
  121. line-height: 28px;
  122. margin-top: -8px;
  123. }
  124. #hallDetailsContainer {
  125. display: flex;
  126. flex-direction: column;
  127. align-items: center;
  128. /* Center items horizontally */
  129. justify-content: center;
  130. /* Center items vertically */
  131. border: 1px solid #ccc;
  132. border-radius: 5px;
  133. padding: 20px;
  134. margin-top: 20px;
  135. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  136. background-color: #fff;
  137. }
  138. /* Style for the image */
  139. #hallImagesCarousel {
  140. margin-bottom: 20px;
  141. }
  142. .row {
  143. display: flex;
  144. flex-wrap: wrap;
  145. margin-right: 0px;
  146. margin-left: 0px;
  147. }
  148. .col-md-6 {
  149. width: 50%;
  150. padding: 0 10px;
  151. /* Optional: Add padding to columns */
  152. }
  153. @media (max-width: 768px) {
  154. .col-md-6 {
  155. width: 100%;
  156. /* Full width on smaller screens */
  157. }
  158. }
  159. #hallDetailsContainer p {
  160. margin: 0;
  161. padding: 5px 0;
  162. }
  163. #hallDetailsContainer p:nth-child(even) {
  164. background-color: #f9f9f9;
  165. }
  166. /* CSS styles for the amount details container */
  167. #amountDetailsContainer {
  168. border: 1px solid #ccc;
  169. border-radius: 5px;
  170. padding: 20px;
  171. margin-top: 20px;
  172. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  173. background-color: #fff;
  174. }
  175. #amountDetailsContainer h4 {
  176. margin-top: 0;
  177. margin-bottom: 10px;
  178. }
  179. #amountDetailsContainer div {
  180. list-style: none;
  181. padding: 0;
  182. }
  183. #amountDetailsContainer p {
  184. margin-bottom: 10px;
  185. }
  186. #amountDetailsContainer p span {
  187. font-weight: bold;
  188. }
  189. #amountDetailsContainer p:nth-child(even) {
  190. background-color: #f9f9f9;
  191. }
  192. /* Style for the image container */
  193. #hallImagesCarousel {
  194. display: flex;
  195. justify-content: center;
  196. /* Center content horizontally */
  197. align-items: center;
  198. /* Center content vertically */
  199. margin-bottom: 20px;
  200. position: relative;
  201. }
  202. /* Style for the images inside the carousel */
  203. .carousel-item img {
  204. max-width: 100%;
  205. /* Ensure image does not exceed container width */
  206. min-height: 9%;
  207. /* Maintain aspect ratio */
  208. display: block;
  209. /* Ensure image is block-level element */
  210. max-width: 100%;
  211. max-height: 100%;
  212. display: block;
  213. margin: 0 auto;
  214. /* Center the image horizontally */
  215. }
  216. .content-container {
  217. padding: 20px;
  218. }
  219. .otp-input {
  220. width: 30px;
  221. height: 30px;
  222. border: 1px solid #ccc;
  223. border-radius: 5px;
  224. text-align: center;
  225. font-size: 16px;
  226. margin-right: 10px;
  227. }
  228. /* Ensures content within these classes is centered */
  229. .modal-header,
  230. .modal-body,
  231. .modal-footer,
  232. #resend-container {
  233. text-align: center;
  234. }
  235. /* Center content with Flexbox if needed */
  236. .center-flex {
  237. display: flex;
  238. justify-content: center;
  239. align-items: center;
  240. flex-direction: column;
  241. /* Stack elements vertically */
  242. }
  243. /* Adjust the margin of the otp-input-box for better alignment */
  244. .otp-input-box {
  245. justify-content: center;
  246. margin: 0 auto;
  247. /* Centers the box horizontally */
  248. align-items: center;
  249. /* Align items in the center for flex containers */
  250. width: 100%;
  251. }
  252. .center-content {
  253. display: flex;
  254. justify-content: center;
  255. align-items: center;
  256. height: 100%;
  257. /* Or set a specific height */
  258. flex-direction: column;
  259. /* Stack children vertically */
  260. }
  261. /* To ensure the form takes up the necessary width */
  262. .form-group {
  263. width: 100%;
  264. /* Adjust based on your layout's needs */
  265. }
  266. /* Custom styles for the jQuery UI Dialog */
  267. .custom-dialog .ui-dialog-content {
  268. background-color: #fff;
  269. color: #333;
  270. padding: 20px;
  271. }
  272. .custom-dialog .ui-dialog-titlebar {
  273. background: #007bff;
  274. color: #ffffff;
  275. }
  276. .custom-dialog .ui-dialog-buttonpane {
  277. background-color: #f1f1f1;
  278. }
  279. .custom-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button {
  280. background-color: #007bff;
  281. color: #ffffff;
  282. border-color: #007bff;
  283. }
  284. .custom-dialog a {
  285. color: #007bff;
  286. text-decoration: none;
  287. }
  288. .custom-dialog a:hover {
  289. text-decoration: underline;
  290. }
  291. table {
  292. width: 100%;
  293. border-collapse: collapse;
  294. }
  295. th,
  296. td {
  297. border: 1px solid black;
  298. padding: 8px;
  299. text-align: center;
  300. }
  301. .date-box {
  302. border: 1px solid #ccc;
  303. padding: 10px;
  304. margin: 5px;
  305. text-align: center;
  306. background-color: #f8f9fa;
  307. border-radius: 5px;
  308. }
  309. .checkbox-label {
  310. display: block;
  311. margin-top: 5px;
  312. }
  313. #calendar {
  314. margin-top: 20px;
  315. padding: 20px;
  316. border: 1px solid #ccc;
  317. border-radius: 5px;
  318. background-color: #f8f9fa;
  319. }
  320. /* Style for date checkboxes */
  321. .date-checkboxes {
  322. margin-top: 10px;
  323. }
  324. /* Style for checkbox labels */
  325. label {
  326. margin-right: 10px;
  327. }
  328. .ui-datepicker-container {
  329. width: 100%
  330. }
  331. .fixedcontainer {
  332. width: 250%;
  333. margin: -332px 0;
  334. }
  335. .ui-widget {
  336. width: 40%
  337. }
  338. .ui-datepicker {
  339. padding: 3px;
  340. margin: 372px 0;
  341. border: 1px solid #ccc;
  342. border-radius: 5px;
  343. background-color: white;
  344. left: 29.1418px;
  345. }
  346. .ui-datepicker-header {
  347. background-color: #f0f0f0;
  348. border: none;
  349. border-radius: 5px 5px 0 0;
  350. }
  351. .ui-datepicker-title {
  352. font-size: 1.2em;
  353. margin: 0;
  354. padding: 10px;
  355. text-align: center;
  356. }
  357. .ui-datepicker-calendar {
  358. margin: 0;
  359. padding: 0;
  360. font-weight: bold;
  361. /* Bold font for dates */
  362. }
  363. .ui-datepicker-calendar th,
  364. .ui-datepicker-calendar td {
  365. padding: 5px;
  366. text-align: center;
  367. }
  368. .ui-datepicker-calendar .ui-state-default {
  369. cursor: pointer;
  370. width: 100%;
  371. height: 100%;
  372. display: flex;
  373. justify-content: center;
  374. align-items: center;
  375. }
  376. .ui-datepicker-week-end {
  377. color: black;
  378. font-weight: bold;
  379. }
  380. .ui-datepicker-calendar th span {
  381. color: black;
  382. font-weight: bold;
  383. }
  384. .booking-form-container {
  385. margin: 20px auto;
  386. padding: 20px;
  387. border: 1px solid #ddd;
  388. border-radius: 8px;
  389. background-color: #f9f9f9;
  390. max-width: 960px;
  391. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  392. }
  393. .booking-form-container label {
  394. font-weight: bold;
  395. }
  396. .booking-form-container .form-control {
  397. margin-bottom: 10px;
  398. }
  399. .booking-form-container .btn-primary {
  400. background-color: #017bff;
  401. }
  402. .white-background {
  403. background-color: white;
  404. /* Set the background color as needed */
  405. border: 1px solid #ccc;
  406. /* Optional: Add border for better visualization */
  407. padding: 20px;
  408. margin-bottom: 20px;
  409. overflow: hidden;
  410. /* Hide overflow content during animation */
  411. position: relative;
  412. }
  413. /* Example styling for animation */
  414. .slide-left {
  415. animation: slideLeft 0.5s ease both;
  416. }
  417. .slide-right {
  418. animation: slideRight 0.5s ease both;
  419. }
  420. @keyframes slideLeft {
  421. 0% {
  422. transform: translateX(0);
  423. }
  424. 100% {
  425. transform: translateX(-100%);
  426. opacity: 0;
  427. }
  428. }
  429. @keyframes slideRight {
  430. 0% {
  431. transform: translateX(-100%);
  432. opacity: 0;
  433. }
  434. 100% {
  435. transform: translateX(0);
  436. opacity: 1;
  437. }
  438. }
  439. /* Apply styles to the booking-section container */
  440. .booking-section {
  441. margin: 20px auto;
  442. padding: 20px;
  443. border: 1px solid #ddd;
  444. border-radius: 8px;
  445. background-color: #f9f9f9;
  446. max-width: 960px;
  447. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  448. }
  449. .booking-section label {
  450. font-weight: bold;
  451. }
  452. .booking-section .form-control {
  453. margin-bottom: 10px;
  454. }
  455. .booking-section .btn-primary {
  456. background-color: #017bff;
  457. }
  458. /* Apply white background to the booking-section */
  459. #reasonforbookingSection {
  460. background-color: #ffffff;
  461. /* White background color */
  462. padding: 20px;
  463. /* Optional: Add padding for spacing */
  464. }
  465. body {
  466. font-family: Arial, sans-serif;
  467. margin: 0;
  468. padding: 0;
  469. }
  470. .progressbar {
  471. display: flex;
  472. margin-bottom: 20px;
  473. }
  474. .progress-step {
  475. width: 100%;
  476. height: 9px;
  477. background-color: #e0e0e0;
  478. /* Light gray background */
  479. border-radius: 10px;
  480. /* Rounded corners */
  481. margin-right: 10px;
  482. }
  483. .progress-step-active {
  484. background-color: #4caf50;
  485. /* Green active step */
  486. color: white;
  487. /* White text color */
  488. font-weight: bold;
  489. /* Bold font for active step */
  490. }
  491. .progress {
  492. width: 100%;
  493. height: 10px;
  494. background-color: #ddd;
  495. position: relative;
  496. }
  497. .progress-step::before {
  498. content: attr(data-title);
  499. display: block;
  500. position: absolute;
  501. top: 20px;
  502. left: 50%;
  503. transform: translateX(-50%);
  504. font-size: 12px;
  505. color: #888;
  506. }
  507. .form {
  508. margin-bottom: 20px;
  509. }
  510. .form-step {
  511. display: none;
  512. margin-bottom: 20px;
  513. }
  514. .form-step-active {
  515. display: block;
  516. }
  517. .btn-prev,
  518. .btn-next {
  519. padding: 10px 20px;
  520. font-size: 14px;
  521. cursor: pointer;
  522. border: none;
  523. background-color: #337ab7;
  524. color: #fff;
  525. }
  526. .btn-prev {
  527. margin-right: 10px;
  528. }
  529. /* Media Query for small screens */
  530. @media (max-width: 768px) {
  531. .progress-step::before {
  532. display: none;
  533. /* Hide step titles on small screens */
  534. }
  535. }
  536. #container {
  537. max-width: 1000px;
  538. }
  539. .step-container {
  540. position: relative;
  541. text-align: center;
  542. transform: translateY(-60%);
  543. }
  544. .step-circle {
  545. width: 30px;
  546. height: 30px;
  547. line-height: 29px;
  548. text-align: center;
  549. border-radius: 50%;
  550. cursor: pointer;
  551. background-color: #016d6f;
  552. color: white;
  553. border: 2px solid #016d6f;
  554. }
  555. .step-circle.active {
  556. background-color: #FFFFFF;
  557. color: #016d6f;
  558. }
  559. .step-line {
  560. position: absolute;
  561. top: 16px;
  562. left: 50px;
  563. width: calc(100% - 100px);
  564. height: 2px;
  565. background-color: #FFFFFF;
  566. /* Set the line color here */
  567. z-index: -1;
  568. }
  569. #multi-step-form {
  570. overflow-x: hidden;
  571. }
  572. body {
  573. font-family: Arial, sans-serif;
  574. margin: 0;
  575. padding: 0;
  576. }
  577. .custom-container {
  578. padding: 20px;
  579. border-radius: 8px;
  580. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  581. background-color: #FFFFFF;
  582. border: 1px solid #CCCCCC;
  583. overflow: auto;
  584. }
  585. .header {
  586. z-index: 1000;
  587. margin-bottom: 20px;
  588. }
  589. .logo-img {
  590. height: 30px;
  591. position: absolute;
  592. left: 10px;
  593. top: 10px;
  594. }
  595. .header h6 {
  596. color: white;
  597. text-align: center;
  598. margin: 0;
  599. line-height: 2.1;
  600. }
  601. .invoice-details h3 {
  602. margin: 5px 0;
  603. }
  604. .invoice-details p {
  605. margin: 5px 0;
  606. /* Adjusted margin for <p> tags */
  607. }
  608. .total-section {
  609. margin-top: 20px;
  610. text-align: right;
  611. }
  612. .step-content p {
  613. display: inline-block;
  614. margin-right: 20px;
  615. margin-bottom: 20px;
  616. }
  617. .error {
  618. border: 1px solid red;
  619. }
  620. .error-message {
  621. color: red;
  622. font-size: 12px;
  623. padding-top: 5px;
  624. }
  625. /* Style for small thumbnail images */
  626. .thumbnail-img {
  627. width: 44px;
  628. /* Adjust the width as needed */
  629. height: 35px;
  630. /* Adjust the height as needed */
  631. cursor: pointer;
  632. /* Show cursor as pointer on hover */
  633. margin-right: 10px;
  634. /* Optional margin between images */
  635. }
  636. .large-image-container {
  637. position: fixed;
  638. top: 10%;
  639. left: 34%;
  640. width: 36%;
  641. height: 72%;
  642. background-color: slategrey;
  643. z-index: 1050;
  644. /* High z-index to ensure it's on top of other content */
  645. padding: 25px;
  646. box-sizing: border-box;
  647. overflow: hidden;
  648. /* Prevents scrollbars from iframe from appearing outside the container */
  649. }
  650. #largeImage {
  651. max-width: 90%;
  652. /* Limit maximum width of large image */
  653. max-height: 90vh;
  654. /* Limit maximum height of large image */
  655. display: block;
  656. /* Ensure it behaves as a block element */
  657. margin: 0 auto;
  658. /* Center horizontally */
  659. }
  660. .btn-square-md {
  661. width: 72px !important;
  662. max-width: 100% !important;
  663. max-height: 50% !important;
  664. height: 18px !important;
  665. text-align: center;
  666. padding: 0px;
  667. font-size: 2px;
  668. }
  669. .close-button {
  670. position: absolute;
  671. top: 5px;
  672. right: 5px;
  673. z-index: 1051;
  674. /* Ensure close button is above the iframe */
  675. }
  676. iframe {
  677. width: 100%;
  678. height: 100%;
  679. /* Take full size of the container minus any paddings if necessary */
  680. border: none;
  681. }
  682. #uploadedDocsList {
  683. list-style-type: none;
  684. /* Removes the bullet points */
  685. padding: 0;
  686. /* Removes padding */
  687. margin: 0;
  688. /* Removes margin */
  689. }
  690. #uploadedDocsList li {
  691. margin-bottom: 10px;
  692. /* Adds space between items */
  693. }
  694. #termsModal .table td,
  695. #termsModal .table th {
  696. padding: 0.5rem;
  697. /* Reducing padding */
  698. font-size: 0.8rem;
  699. /* Smaller font size */
  700. }
  701. .table-wrap td {
  702. white-space: normal;
  703. word-wrap: break-word;
  704. }
  705. .swal2-container {
  706. z-index: 9999999999999 !important;
  707. /* Adjust this value if needed */
  708. }
  709. </style>
  710. <body>
  711. <div id="page-container"
  712. class="sidebar-o sidebar-dark enable-page-overlay side-scroll page-header-fixed page-header-dark">
  713. <aside th:replace="~{fragments/aside-right :: aside}"></aside>
  714. <nav th:replace="~{fragments/nav-counter :: nav}"></nav>
  715. <header th:replace="~{fragments/header-counter :: header}"></header>
  716. <main id="main-container">
  717. <div class="container mt-5" id="container">
  718. <div class="card">
  719. <div class="block block-rounded block-themed block-transparent mb-0">
  720. <div class="block-header bg-primary-dark">
  721. <h3 class="block-title" id="2mtitle">User Information</h3>
  722. </div>
  723. </div>
  724. <div class="card-body">
  725. <form id="userInfoForm">
  726. <div class="col col-lg-3 col-md-3 col-sm-3">
  727. <label for="userType" class="form-label">User Type</label>
  728. <select id="usertypes" class="form-select" onchange="handleUserTypeChange()">
  729. <option value="select">Select</option>
  730. <option value="public">Public</option>
  731. </select>
  732. </div>
  733. <div id="mobileNoContainer" class="col col-lg-3 col-md-3 col-sm-3" style="display: none;">
  734. <label for="mobileNumber" class="form-label">Mobile No</label>
  735. <div class="input-group">
  736. <input type="text" id="mobileNumber" name="mobileNumber" pattern="[0-9]{10}"
  737. minlength="10" maxlength="10" class="form-control">
  738. </div>
  739. <div>
  740. <button type="button" class="btn btn-info" id="sendOTPButton">Send OTP</button>
  741. </div>
  742. </div>
  743. <br>
  744. </form>
  745. </div>
  746. </div>
  747. </div>
  748. <!--OTP Form-->
  749. <div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel"
  750. aria-hidden="true">
  751. <div class="modal-dialog" role="document">
  752. <div class="modal-content">
  753. <form action="#" th:action="@{/otpForm}" th:object="${otpForm}" method="post"
  754. onsubmit="return verifyOtp(); ">
  755. <div class="modal-header">
  756. <h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP Login</h6>
  757. <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"
  758. style="color:black;border: white;background-color: white;">
  759. <span aria-hidden="true">&times;</span></button>
  760. </div><!--end modal-header-->
  761. <div class="modal-body">
  762. <div class="row">
  763. <div class="mb-3 text-center">
  764. <img src="media/images/mobileotp.png" width="50%" alt="Mobileotp">
  765. </div>
  766. <div class="mb-0 text-center">
  767. <h4>OTP Verification</h4>
  768. <p class="text-mute">Enter the OTP sent to <b class="text-info"
  769. id="mobilenotxt"></b>
  770. </p>
  771. <p class="text-danger" id="otperror"></p>
  772. </div>
  773. <div class="mb-3 text-center">
  774. <div class="otp-input-box">
  775. <input type="text" maxlength="1" class="otp-input" id="otp1" required />
  776. <input type="text" maxlength="1" class="otp-input" id="otp2" required />
  777. <input type="text" maxlength="1" class="otp-input" id="otp3" required />
  778. <input type="text" maxlength="1" class="otp-input" id="otp4" required />
  779. <input type="text" maxlength="1" class="otp-input" id="otp5" required />
  780. </div>
  781. </div>
  782. <div class="mb-3 text-center">
  783. <div id="resend-containers">
  784. <p class="mb-0">Didn't receive OTP?</p>
  785. <p class="mb-0 text-info" id="resendlink"></p>
  786. </div>
  787. </div>
  788. </div><!--end row-->
  789. </div><!--end modal-body-->
  790. <div class="modal-footer">
  791. <button type="button" class="btn btn-de-secondary btn-sm"
  792. data-bs-dismiss="modal">Close</button>
  793. <button type="submit" class="btn btn-primary btn-sm" id="but">Verify OTP</button>
  794. </div><!--end modal-footer-->
  795. </form>
  796. </div><!--end modal-content-->
  797. </div><!--end modal-dialog-->
  798. </div>
  799. <!-- Registration Modal -->
  800. <div class="modal fade" id="registrationModal" tabindex="-1" aria-labelledby="registrationModalLabel"
  801. aria-hidden="true">
  802. <div class="modal-dialog modal-lg">
  803. <div class="modal-content">
  804. <div class="modal-header">
  805. <h5 class="modal-title" id="registrationModalLabel">Register</h5>
  806. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  807. </div>
  808. <div class="modal-body">
  809. <div class="tab-pane fade show active" id="register" role="tabpanel"
  810. aria-labelledby="register-tab">
  811. <form id="counterform" method="post" name="counterform"
  812. onsubmit="return validateUserType();" enctype="multipart/form-data">
  813. <div class="row">
  814. <div class="col-sm-4" style="margin-left:0%">
  815. <div class="form-group">
  816. <label for="userType">User Type:<span
  817. class="required-field">*</span></label>
  818. <select class="form-control" id="userType" name="usertype"
  819. placeholder="User Type">
  820. <option value="PUBLIC">General Public</option>
  821. </select>
  822. </div>
  823. </div>
  824. <!--<div class="hidden" id="employeeFields" style="display:none">
  825. <div class="row">
  826. <div class="col-sm-3">
  827. <div class="form-group">
  828. <label for="employeeId">Employee ID<span
  829. class="required">*</span>:</label>
  830. <input type="text" class="form-control" id="employeeId"
  831. name="employeeId" placeholder="Employee ID">
  832. </div>
  833. </div>
  834. <div class="col-sm-3">
  835. <div class="form-group">
  836. <label for="employeename">Employee Name<span
  837. class="required">*</span>:</label>
  838. <input type="text" class="form-control" id="employeename"
  839. name="employeename" placeholder="Employee Name">
  840. </div>
  841. </div>
  842. </div>
  843. </div>
  844. <div class="hidden" id="pensionerFields" style="display:none">
  845. <div class="row">
  846. <div class="col-sm-6">
  847. <label for="pensionerId">Pensioner ID<span
  848. class="required">*</span>:</label>
  849. <input type="text" class="form-control" id="pensionerId"
  850. name="pensionerId" placeholder="Pensioner ID">
  851. </div>
  852. <div class="col-sm-6">
  853. <label for="pensionername">Pensioner Name<span
  854. class="required">*</span>:</label>
  855. <input type="text" class="form-control" id="pensionername"
  856. name="pensionername" placeholder="Pensioner Name" disabled>
  857. </div>
  858. </div>
  859. <div id="validationResult"></div>
  860. </div>
  861. <div class="hidden" id="familypensionerFields" style="display:none">
  862. <div class="row">
  863. <div class="col-sm-6">
  864. <label for="familypensionerId">Pensioner ID<span
  865. class="required">*</span>:</label>
  866. <input type="text" class="form-control" id="familypensionerId"
  867. name="pensionerId" placeholder="Pensioner ID">
  868. </div>
  869. <div class="col-sm-6">
  870. <label for="familypensionername">Pensioner Name<span
  871. class="required">*</span>:</label>
  872. <input type="text" class="form-control" id="familypensionername"
  873. name="familypensionername" placeholder="Pensioner Name"
  874. disabled>
  875. </div>
  876. </div>
  877. <div id="validationResult"></div>
  878. </div>-->
  879. </div>
  880. <!-- Registration Form Fields -->
  881. <div class="row">
  882. <div class="col-sm-4">
  883. <div class="form-group">
  884. <label for="name">Name:<span class="required-field">*</span></label>
  885. <input type="text" class="form-control" id="name" name="name"
  886. placeholder="First Name" required>
  887. </div>
  888. </div>
  889. <div class="col-sm-4">
  890. <div class="form-group">
  891. <label for="mobileno">Mobile Number:<span
  892. class="required-field">*</span></label>
  893. <input type="text" class="form-control" id="mobileno" name="mobileNo"
  894. placeholder="Mobile No" minlength="10" maxlength="10"
  895. pattern="[0-9]{10}"
  896. onkeypress="return event.charCode >= 48 && event.charCode <= 57"
  897. required>
  898. </div>
  899. </div>
  900. <div class="col-sm-4">
  901. <div class="form-group">
  902. <label for="mobileno">Aadhar Number:<span
  903. class="required-field">*</span></label>
  904. <input type="text" class="form-control" id="aadharnumber"
  905. name="aadharnumber"
  906. placeholder="Aadhar No" minlength="12" maxlength="12"
  907. pattern="[0-9]{12}"
  908. onkeypress="return event.charCode >= 48 && event.charCode <= 57"
  909. required>
  910. </div>
  911. </div>
  912. </div>
  913. <div class="row">
  914. <div class="col-sm-4">
  915. <div class="form-group">
  916. <label for="userPhoto">Profile Photo:</label>
  917. <input type="file" class="form-control hall-image file-upload-field"
  918. id="userPhoto" name="userPhoto"
  919. accept="image/jpeg, image/png, image/gif">
  920. </div>
  921. </div>
  922. <div class="col-sm-4">
  923. <div class="form-group">
  924. <label for="email">E-Mail ID:</label>
  925. <input type="email" class="form-control" id="email" name="email"
  926. placeholder="email" maxlength="255">
  927. </div>
  928. </div>
  929. <div class="col-sm-4">
  930. <div class="form-group">
  931. <label for="doorNo">Door No:<span
  932. class="required-field">*</span></label>
  933. <input type="text" class="form-control" id="doorNo" name="doorNo"
  934. placeholder="doorNo" required>
  935. </div>
  936. </div>
  937. </div>
  938. <div class="row">
  939. <div class="col-sm-4">
  940. <div class="form-group">
  941. <label for="street">Street:<span class="required-field">*</span></label>
  942. <input type="text" class="form-control" id="street" name="street"
  943. placeholder="street" required>
  944. </div>
  945. </div>
  946. <div class="col-sm-4">
  947. <div class="form-group">
  948. <label for="area">Area:<span class="required-field">*</span></label>
  949. <input type="area" class="form-control" id="area" name="area"
  950. placeholder="area" required>
  951. </div>
  952. </div>
  953. <div class="col-sm-4">
  954. <div class="form-group">
  955. <label for="location">Location:<span
  956. class="required-field">*</span></label>
  957. <input type="text" class="form-control" id="location" name="location"
  958. placeholder="location" required>
  959. </div>
  960. </div>
  961. <div class="col-sm-4">
  962. <div class="form-group">
  963. <label for="pincode">Pincode:<span
  964. class="required-field">*</span></label>
  965. <input type="text" class="form-control" id="pincode" name="pinCode"
  966. placeholder="pincode" minlength="6" maxlength="6" pattern="[0-9]{6}"
  967. onkeypress="return event.charCode >= 48 && event.charCode <= 57"
  968. required>
  969. </div>
  970. </div>
  971. </div>
  972. <div class="form-row">
  973. <div class="col text-center">
  974. <button type="submit" class="btn btn-primary"
  975. style="background-color: #2c726c !important">Submit</button>
  976. </div>
  977. </div>
  978. </form>
  979. </div>
  980. </div>
  981. </div>
  982. </div>
  983. </div>
  984. <!--Profile modal-->
  985. <div class="card" id="profileCard" tabindex="-1" aria-labelledby="profileCardLabel"
  986. style="display: none; margin-top: 35px; margin-left: 25px; margin-right: 25px;" aria-hidden="true">
  987. <div class="block-header bg-primary-dark">
  988. <h5 class="modal-title" id="profileCardLabel" style="color: white;">User Details</h5>
  989. </div>
  990. <div class="card-body">
  991. <div class="row">
  992. <div class="col-sm-4">
  993. <div
  994. style="border-radius: 50%; overflow: hidden; width: 110px; height: 110px; margin: 0 auto; box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);">
  995. <img id="p_image_card" name="p_image_card" style="width: 100%; height: 100%;" alt="-">
  996. </div>
  997. </div>
  998. <div class="col-sm-8">
  999. <div class="row">
  1000. <div class="col-sm-6">
  1001. <label for="p_name_card">Name:</label>
  1002. <input type="text" class="form-control" id="p_name_card" readonly>
  1003. </div>
  1004. <div class="col-sm-6">
  1005. <label for="p_email_card">Email:</label>
  1006. <input type="text" class="form-control" id="p_email_card" readonly>
  1007. </div>
  1008. <div class="col-sm-6">
  1009. <label for="p_mobnum_card">Mobile No:</label>
  1010. <input type="text" class="form-control" id="p_mobnum_card" readonly>
  1011. </div>
  1012. <div class="col-sm-6">
  1013. <label for="p_doornum_card">Door no:</label>
  1014. <input type="text" class="form-control" id="p_doornum_card" readonly>
  1015. </div>
  1016. <div class="col-sm-6">
  1017. <label for="p_area_card">Area:</label>
  1018. <input type="text" class="form-control" id="p_area_card" readonly>
  1019. </div>
  1020. <div class="col-sm-6">
  1021. <label for="p_location_card">Location:</label>
  1022. <input type="text" class="form-control" id="p_location_card" readonly>
  1023. </div>
  1024. <div class="col-sm-6">
  1025. <label for="p_pincode_card">Pincode:</label>
  1026. <input type="text" class="form-control" id="p_pincode_card" readonly>
  1027. </div>
  1028. <div class="col-sm-6">
  1029. <label for="p_userstatus_card">User Status:</label>
  1030. <input type="text" class="form-control" id="p_userstatus_card" readonly>
  1031. </div>
  1032. </div>
  1033. </div>
  1034. </div>
  1035. <div class="row mt-3">
  1036. <div class="col-sm-6">
  1037. <button type="button" class="btn btn-secondary" id="backButton">Back</button>
  1038. </div>
  1039. <div class="col-sm-6 text-end">
  1040. <button type="button" class="btn btn-primary" id="nextButton">Next</button>
  1041. </div>
  1042. </div>
  1043. </div>
  1044. </div>
  1045. <!--Hallbooking Form-->
  1046. <div class="card" id="nextPageCard" tabindex="-1" aria-labelledby="nextPageCardLabel"
  1047. style="display: none; margin-top: 35px; margin-left: 25px; margin-right: 25px;" aria-hidden="true">
  1048. <div class="block-header bg-primary-dark">
  1049. <h5 class="modal-title" id="nextPageCardLabel" style="color:white">Hall Booking Details</h5>
  1050. </div>
  1051. <div class="card-body">
  1052. <br>
  1053. <div class="progress px-1" style="height: 3px;">
  1054. <div class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0"
  1055. aria-valuemin="0" aria-valuemax="100">
  1056. </div>
  1057. </div>
  1058. <div class="step-container d-flex justify-content-between">
  1059. <div class="step-circle" onclick="displayStep(1)">1</div>
  1060. <div class="step-circle" onclick="displayStep(2)">2</div>
  1061. <div class="step-circle" onclick="displayStep(3)">3</div>
  1062. <div class="step-circle" onclick="displayStep(4)">4</div>
  1063. </div>
  1064. </br>
  1065. <form action="javascript:void(0);" id="booking" method="post" enctype="multipart/form-data"
  1066. onsubmit="return saveCounterBooking()">
  1067. <input type="hidden" id="serverDate" th:value="${serverDate}">
  1068. <div class="step step-1">
  1069. <div class="container custom-container"
  1070. style="padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); background-color: #FFFFFF; border: 1px solid #CCCCCC;overflow-x: hidden;">
  1071. <!-- Updated inline styles -->
  1072. <div class="row justify-content-center">
  1073. <div class="col-sm-6 col-md-6 col-lg-6">
  1074. <label class="form-check-label" for="selecthall">Select Hall:</label>
  1075. <select id="selecthall" class="form-control" name="hallId" required
  1076. onchange="toggleHallDetailsContainer()">
  1077. <option value="">Select a hall</option>
  1078. </select>
  1079. </div>
  1080. </div>
  1081. <br>
  1082. <!-- Main content row -->
  1083. <div id="hallDetailsContainer" style="display: none;">
  1084. <!-- Initially hidden -->
  1085. <div class="row">
  1086. <!-- Hall Images Carousel -->
  1087. <div class="col-md-6 col-lg-6 col-sm-6">
  1088. <h6>Hall Images:</h6>
  1089. <br>
  1090. <div id="hallImagesCarousel" class="carousel slide" data-ride="carousel">
  1091. <div class="carousel-inner">
  1092. <div class="carousel-item active">
  1093. <img id="hallImage" class="d-block w-100" alt="Hall Image">
  1094. </div>
  1095. </div>
  1096. <a class="carousel-control-prev" href="#hallImagesCarousel"
  1097. role="button" data-slide="prev">
  1098. <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  1099. <span class="sr-only">Previous</span>
  1100. </a>
  1101. <a class="carousel-control-next" href="#hallImagesCarousel"
  1102. role="button" data-slide="next">
  1103. <span class="carousel-control-next-icon" aria-hidden="true"></span>
  1104. <span class="sr-only">Next</span>
  1105. </a>
  1106. </div>
  1107. </div>
  1108. <div class="col-md-6 col-lg-6 col-sm-6">
  1109. <div id="datepicker-container" class="fixedcontainer"></div>
  1110. <div class="row">
  1111. <div class="col col-lg-2 col-sm-2 col-md-2">
  1112. <button type="button" class="btn btn-primary btn-square-md"
  1113. style="background-color:#008000;"></button>
  1114. <span style="margin-left: 21px;">Day<br>
  1115. (Available)</span>
  1116. </div>
  1117. <div class="col col-lg-2 col-sm-2 col-md-2">
  1118. <button type="button" class="btn btn-primary btn-square-md"
  1119. style="background-color: #ac2bac;"></button>
  1120. <span style="margin-left: 14px;">Morning <br>
  1121. &nbsp;&nbsp;(Available)</span>
  1122. </div>
  1123. <div class="col col-lg-2 col-sm-2 col-md-2">
  1124. <button type="button" class="btn btn-primary btn-square-md"
  1125. style="background-color:#FFEA00;"></button>
  1126. <span style="margin-left: 14px;">Evening<br>
  1127. &nbsp;&nbsp;(Available)</span>
  1128. </div>
  1129. <div class="col col-lg-2 col-sm-2 col-md-2">
  1130. <button type="button" class="btn btn-primary btn-square-md"
  1131. style="background-color: red;"></button>
  1132. <span style="margin-left: 14px;">Not Available</span>
  1133. </div>
  1134. </div>
  1135. </div>
  1136. <br>
  1137. <!-- Hall Details -->
  1138. <!--<div class="col-md-6 col-lg-6 col-sm-6">
  1139. <div id="hallDetails">
  1140. <br>
  1141. <h6>Hall Details:</h6>
  1142. <p>Zone: <span id="zone"></span></p>
  1143. <p>Division: <span id="division"></span>
  1144. </p>
  1145. <p>Address: <span id="address"></span>
  1146. </p>
  1147. <p>Landmark: <span id="landmark"></span>
  1148. </p>
  1149. <p>Seating Capacity: <span id="seatingCapacity"></span></p>
  1150. <p>Parking Capacity: <span
  1151. id="parkingCapacity"></span></p>
  1152. <input type="hidden" id="statichallId">
  1153. <p>CareTaker Number: <span id="caretakerNumber"></span></p>
  1154. </div>
  1155. </div>-->
  1156. <div class="col-md-6 col-lg-6 col-sm-6">
  1157. <div id="hallDetails">
  1158. <br>
  1159. <h6><b>Hall Details:</b></h6>
  1160. <p>Zone: <span id="zone"></span></p>
  1161. <p>Address: <span id="address"></span></p>
  1162. <p>Landmark: <span id="landmark"></span></p>
  1163. <p>Total Area: <span
  1164. id="hallareainsqft"></span></p>
  1165. <p>Seating Capacity: <span
  1166. id="seatingCapacity"></span></p>
  1167. <p>Parking Capacity: <span
  1168. id="parkingCapacity"></span></p>
  1169. <input type="hidden" id="statichallId">
  1170. </div>
  1171. </div>
  1172. <br>
  1173. <!-- Amount Details -->
  1174. <!--<div class="col-md-6 col-lg-6 col-sm-6">
  1175. <div id="amountDetails">
  1176. <br>
  1177. <h6>Amount Details:</h6>
  1178. <p>Security Deposit: Rs <span id="rentAmount"></span></p>
  1179. <p>Full Day Rent: Rs <span id="fullDayAmount"></span></p>
  1180. <p>Half Day Rent: Rs <span id="halfDayAmount"></span></p>
  1181. <p>GST: <span id="gst"></span>%</p>
  1182. <p>EB for 1 Unit: Rs <span id="ebunit"></span></p>
  1183. <input type="hidden" id="depositAmount" name="depositamount"
  1184. value="100">
  1185. <input type="hidden" id="hallamount" name="hallamount" value="100">
  1186. </div>
  1187. </div>-->
  1188. <div class="col-md-6 col-lg-6 col-sm-6">
  1189. <div id="amountDetails">
  1190. <br>
  1191. <h6><b>Amount Details:</b></h6>
  1192. <p>Security Deposit: Rs <span
  1193. id="rentAmount"></span></p>
  1194. <p>Full Day Rent: Rs <span
  1195. id="fullDayAmount"></span></p>
  1196. <p>Half Day Rent: Rs <span
  1197. id="halfDayAmount"></span></p>
  1198. <p>GST: <span id="gst"></span>%</p>
  1199. <p>EB for 1 Unit:* Rs <span
  1200. id="ebunit"></span></p>
  1201. <p>CareTaker Number: <span
  1202. id="caretakerNumber"></span></p>
  1203. <input type="hidden" id="depositAmount"
  1204. name="depositamount" value="100">
  1205. <input type="hidden" id="hallamount"
  1206. name="hallamount" value="100">
  1207. </div>
  1208. </div>
  1209. </div>
  1210. <div class="row">
  1211. <div class="col-md-12 col-sm-12 col-lg-12">
  1212. <!-- Center align the button -->
  1213. <button type="button" class="btn btn-primary next-step"
  1214. style="background-color: #016d6f; color: white;float: right;">Book
  1215. & Continue</button>
  1216. </div>
  1217. </div>
  1218. </div>
  1219. </div>
  1220. </div>
  1221. <div class="step step-2">
  1222. <div class="container custom-container"
  1223. style=" padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); background-color: #FFFFFF; border: 1px solid #CCCCCC;">
  1224. <!-- Updated inline styles -->
  1225. <div class="mb-3">
  1226. <div class="row">
  1227. <div class="col-md-12 col-lg-12 col-sm-12">
  1228. <table class="table table-bordered">
  1229. <tbody>
  1230. <tr>
  1231. <td><strong>Hall Name:</strong>
  1232. <span id="hallNameDisplayStep2"></span>
  1233. </td>
  1234. <td><strong>Zone: </strong>
  1235. <span id="zoneStep2"></span>
  1236. </td>
  1237. <td><strong>Division: </strong>
  1238. <span id="divisionStep2"></span>
  1239. </td>
  1240. </tr>
  1241. </tbody>
  1242. </table>
  1243. </div>
  1244. <div class="row">
  1245. <div class="col col-lg-3 col-md-3 col-sm-3" style="display: flex; ">
  1246. <button type="button" class="btn btn-primary btn-square-md"
  1247. style="background-color:#008000;"></button>
  1248. <span style="margin-left: 10px;">Day(Available)</span>
  1249. </div>
  1250. <div class="col col-lg-3 col-md-3 col-sm-3" style="display: flex; ">
  1251. <button type="button" class="btn btn-primary btn-square-md"
  1252. style="background-color: #ac2bac;"></button>
  1253. <span style="margin-left: 10px;">Morning(Available)</span>
  1254. </div>
  1255. <div class="col col-lg-3 col-md-3 col-sm-3" style="display: flex; ">
  1256. <button type="button" class="btn btn-primary btn-square-md"
  1257. style="background-color:#FFEA00;"></button>
  1258. <span style="margin-left: 10px;">Evening(Available)</span>
  1259. </div>
  1260. <div class="col col-lg-3 col-md-3 col-sm-3" style="display: flex; ">
  1261. <button type="button" class="btn btn-primary btn-square-md"
  1262. style="background-color: red;"></button>
  1263. <span style="margin-left: 26px;">Not Available <br>
  1264. </span>
  1265. </div>
  1266. <div class="col col-lg-2 col-sm-2 col-md-2">
  1267. <button type="button"
  1268. class="btn btn-primary btn-square-md"
  1269. style="background-color: blue"></button>
  1270. <p style="margin-left:-1px;">Gcc
  1271. Blocked</p>
  1272. </div>
  1273. </div>
  1274. <br>
  1275. <br>
  1276. <!--<div class="col-sm-4 col-lg-4 col-md-4">
  1277. <label for="startDateInput">Start Date:</label>
  1278. &lt;!&ndash; Input field for start date &ndash;&gt;
  1279. <input type="text" id="startDateInput" name="startDate"
  1280. class="date-input form-control" style="background-color:white" readonly
  1281. required>
  1282. </div>
  1283. <div class="col-sm-4 col-lg-4 col-md-4">
  1284. <label for="endDateInput">End Date:</label>
  1285. <select id="endDateInput" name="endDate" class="form-control" disabled>
  1286. <option value="0">Select</option>
  1287. </select>
  1288. </div>
  1289. <div class="col-sm-4 col-lg-4 col-md-4">
  1290. <label for="numDaysCount">Number of
  1291. Days:</label>
  1292. <input class="form-control" id="numDaysCount" name="days" value=""
  1293. style="background-color: white;" readonly>
  1294. </div>
  1295. <div class="col-sm-4 col-lg-4 col-md-4">
  1296. <label for="startPeriodDropdown">Start
  1297. Period:</label>
  1298. <select id="startPeriodDropdown" name="startingSlot" class="form-control"
  1299. required>
  1300. <option value="0">select</option>
  1301. <option value="1">Morning (6:00
  1302. AM)</option>
  1303. <option value="2">Evening (2:00
  1304. PM)</option>
  1305. </select>
  1306. </div>
  1307. <div class="col-sm-4 col-lg-4 col-md-4">
  1308. <label>End
  1309. Period:</label>
  1310. <select id="endPeriodDropdown" name="endingSlot" class="form-control"
  1311. required>
  1312. <option value="0">select</option>
  1313. <option value="1">Morning (2:00
  1314. PM)</option>
  1315. <option value="2">Evening (10:00
  1316. PM)</option>
  1317. </select>
  1318. </div>
  1319. </div>
  1320. <br>
  1321. <div class="row">
  1322. <div class="col-md-12 col-lg-12 col-sm-12 text-center">
  1323. &lt;!&ndash; Center align the button &ndash;&gt;
  1324. <button type="button" class="btn btn-primary prev-step"
  1325. style="background-color: #016d6f; color: white;float: left;">Previous</button>
  1326. <button type="button" class="btn btn-warning reset-step"
  1327. style=" background-color: orangered; color: white; margin: auto;">Reset</button>
  1328. <button type="button" class="btn btn-primary next-step"
  1329. style="background-color: #016d6f; color: white; float: right;">Next</button>
  1330. </div>
  1331. </div>-->
  1332. <div class="col-sm-4 col-lg-6 col-md-4">
  1333. <label>Relationship of the Functionary:*</label>
  1334. <select id="relation" name="relation"
  1335. class="form-control"
  1336. onchange="validateForm()" required>
  1337. <option value="0">Select</option>
  1338. <option value="self">Self</option>
  1339. <option value="son">Son</option>
  1340. <option value="daughter">Daughter</option>
  1341. <option value="granddaughter">GrandDaughter
  1342. </option>
  1343. <option value="grandson">GrandSon</option>
  1344. <option value="sister">Sister</option>
  1345. <option value="brother">Brother</option>
  1346. </select>
  1347. </div>
  1348. <!--edit code-->
  1349. <input type="hidden" id="reasonMaxDates">
  1350. <div class="col-sm-4 col-lg-6 col-md-4">
  1351. <label>Reason for
  1352. Booking:*</label>
  1353. <select type="text" class="form-control"
  1354. id="reasonforbooking" name="reasonId"
  1355. required>
  1356. </select>
  1357. </div>
  1358. <br>
  1359. <br>
  1360. <br>
  1361. <br>
  1362. <!--end of edit code-->
  1363. <div class="col-sm-4 col-lg-6 col-md-4">
  1364. <label for="startDateInput">Start Date:*</label>
  1365. <!-- Input field for start date -->
  1366. <input type="text" id="startDateInput"
  1367. name="startDate"
  1368. class="date-input form-control"
  1369. style="background-color:white" readonly
  1370. required>
  1371. </div>
  1372. <div class="col-sm-4 col-lg-6 col-md-4">
  1373. <label for="endDateInput">End Date:*</label>
  1374. <select id="endDateInput" name="endDate"
  1375. class="form-control" disabled>
  1376. <option value="0">Select</option>
  1377. </select>
  1378. </div>
  1379. <br>
  1380. <br>
  1381. <br>
  1382. <br>
  1383. <input type="hidden" id="numDaysCount" val=""
  1384. name="days">
  1385. <input type="hidden" id="noofdaysbetweenstartend"
  1386. val="" name="daysrange">
  1387. <div class="col-sm-4 col-lg-6 col-md-4">
  1388. <label for="startPeriodDropdown">Start
  1389. Period:*</label>
  1390. <select id="startPeriodDropdown"
  1391. name="startingSlot" class="form-control"
  1392. required>
  1393. <option value="0">Select</option>
  1394. <option value="1">Morning (6:00
  1395. AM)
  1396. </option>
  1397. <option value="2">Afternoon (2:00
  1398. PM)
  1399. </option>
  1400. </select>
  1401. </div>
  1402. <div class="col-sm-4 col-lg-6 col-md-4">
  1403. <label>End
  1404. Period:*</label>
  1405. <select id="endPeriodDropdown" name="endingSlot"
  1406. class="form-control" required>
  1407. <option value="0">Select</option>
  1408. <option value="1">Afternoon (2:00
  1409. PM)
  1410. </option>
  1411. <option value="2">Evening (10:00
  1412. PM)
  1413. </option>
  1414. </select>
  1415. </div>
  1416. <br>
  1417. <br>
  1418. <br>
  1419. <br>
  1420. <div class="col-sm-4 col-lg-6 col-md-4">
  1421. <label for="numDaysCountDisplay">Selected
  1422. Slots:</label>
  1423. <textarea type="text" id="numDaysCountDisplay"
  1424. class="form-control" readonly
  1425. style="background-color:white"></textarea>
  1426. </div>
  1427. <div class="col-sm-4 col-lg-6 col-md-4">
  1428. <h4>Booking Summary:</h4>
  1429. <p id="summary" val=""></p>
  1430. </div>
  1431. </div>
  1432. <br>
  1433. <div class="row">
  1434. <div
  1435. class="col-md-12 col-lg-12 col-sm-12 text-center">
  1436. <!-- Center align the button -->
  1437. <button type="button"
  1438. class="btn btn-primary prev-step"
  1439. style="background-color: #016d6f; color: white;float: left;">
  1440. Previous
  1441. </button>
  1442. <button type="button"
  1443. class="btn btn-warning reset-step"
  1444. style=" background-color: orangered; color: white; margin: auto;">
  1445. Reset
  1446. </button>
  1447. <button type="button"
  1448. class="btn btn-primary next-step"
  1449. style="background-color: #016d6f; color: white; float: right;">
  1450. Next
  1451. </button>
  1452. </div>
  1453. </div>
  1454. </div>
  1455. </div>
  1456. </div>
  1457. <div class="step step-3">
  1458. <!-- Step 3 form fields here -->
  1459. <div class="container custom-container"
  1460. style="padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); background-color: #FFFFFF; border: 1px solid #CCCCCC;">
  1461. <div class="mb-3">
  1462. <div class="block-content block-content-full ">
  1463. <div class="card-body">
  1464. <div class="col-md-12 col-sm-12 col-lg-12">
  1465. <table class="table table-bordered">
  1466. <tbody>
  1467. <tr>
  1468. <td><strong>Hall
  1469. Name:</strong><span
  1470. id="hallNameDisplayStep3"></span>
  1471. </td>
  1472. <td><strong>Zone:
  1473. </strong><span id="zoneStep3"></span>
  1474. </td>
  1475. <td><strong>Division:
  1476. </strong><span id="divisionStep3"></span>
  1477. </td>
  1478. </tr>
  1479. </tbody>
  1480. </table>
  1481. <input type="hidden" id="userId" name="userId">
  1482. <div class="col-sm-4 col-lg-4 col-md-4">
  1483. <label class="form-check-label" for="reasonforbooking">Reason
  1484. for
  1485. Booking</label>
  1486. <select type="text" class="form-control" id="reasonforbooking"
  1487. name="reasonId" required>
  1488. </select>
  1489. </div>
  1490. <br>
  1491. <div id="reasonFieldsContainer">
  1492. </div>
  1493. <input type="hidden" name="bookingId" id="bookingId" value="0">
  1494. </div>
  1495. </div>
  1496. <div class="row">
  1497. <div class="col-md-12 col-lg-12 col-sm-12 text-center">
  1498. <!-- Center align the button -->
  1499. <button type="button" class="btn btn-primary prev-step"
  1500. style="background-color: #016d6f; color: white; float: left;">Previous</button>
  1501. <button type="button" class="btn btn-warning reset-step"
  1502. style="background-color: orangered; color: white; margin: auto;">Reset</button>
  1503. <button type="submit" class="btn btn-primary next-step"
  1504. style="background-color: #016d6f; color: white; float: right;">Next</button>
  1505. <!--<button type="button"
  1506. class="btn btn-secondary cancel-step">Cancel</button>-->
  1507. </div>
  1508. </div>
  1509. </div>
  1510. </div>
  1511. </div>
  1512. </div>
  1513. <div class="step step-4">
  1514. <div class="container custom-container">
  1515. <div class="header" style="background-color: rgb(21,69,93); position: relative;">
  1516. <img src="media/images/logo-sm.png" alt="Logo"
  1517. style="position: absolute; left: 10px; top: 7px; height: 30px;">
  1518. <h6 style="color: white; text-align: center; line-height: 3.1;">
  1519. Payment Confirmation Receipt</h6>
  1520. </div>
  1521. <div class="col-md-12">
  1522. <table class="table table-bordered">
  1523. <tbody>
  1524. <tr>
  1525. <td><strong>Full Name:</strong> <span id="name_td"></span></td>
  1526. <td><strong>MobileNumber:</strong> <span id="mobileno_td"></span></td>
  1527. <td><strong>User Type:</strong> <span id="usertype_td"></span></td>
  1528. </tr>
  1529. </tbody>
  1530. </table>
  1531. </div>
  1532. <div class="row">
  1533. <div class="col-md-6">
  1534. <table class="table table-bordered">
  1535. <tbody>
  1536. <tr>
  1537. <td><strong>Hall Name:</strong></td>
  1538. <td><span id="selecthall_td"></span>
  1539. </td>
  1540. </tr>
  1541. <tr>
  1542. <td><strong>No. of Days:</strong>
  1543. </td>
  1544. <td><span id="numDaysCount_td"></span>
  1545. </td>
  1546. </tr>
  1547. <tr>
  1548. <td><strong>Start Date:</strong>
  1549. </td>
  1550. <td><span id="startDateInput_td"></span>
  1551. </td>
  1552. </tr>
  1553. <tr>
  1554. <td><strong>End Date:</strong></td>
  1555. <td><span id="endDateInput_td"></span>
  1556. </td>
  1557. </tr>
  1558. <tr>
  1559. <td><strong>Startinng Slot & Ending Slot</strong></td>
  1560. <td><span id="startingslot_td"></span>
  1561. </td>
  1562. </tr>
  1563. <tr>
  1564. <td><strong>Uploaded
  1565. Documents:</strong></td>
  1566. <td>
  1567. <!-- List to display uploaded docs with small images and names -->
  1568. <div id="uploadedDocsList" class="uploaded-docs-list">
  1569. <!-- Each item in the list will have a small image and name -->
  1570. </div>
  1571. </td>
  1572. </tr>
  1573. <div id="largeImageContainer" class="large-image-container"
  1574. style="display: none;">
  1575. <button id="closeButton" type="button" class="close-button">
  1576. <i class="fa fa-times"></i>
  1577. </button>
  1578. <img id="largeImage" src="" alt="Large Image">
  1579. </div>
  1580. </tbody>
  1581. </table>
  1582. </div>
  1583. <div class="col-md-6">
  1584. <table class="table table-bordered">
  1585. <tbody>
  1586. <tr>
  1587. <td><strong>ReasonforBooking:</strong>
  1588. </td>
  1589. <td><span id="reasonforbooking_td"></span>
  1590. </td>
  1591. </tr>
  1592. <tr>
  1593. <td><strong>Hall Amount:</strong>
  1594. </td>
  1595. <td><span id="hallAmount_td">Rs</span>
  1596. </td>
  1597. </tr>
  1598. <tr>
  1599. <td><strong>GST:</strong></td>
  1600. <td><span id="gst_td">Rs</span></td>
  1601. </tr>
  1602. <tr>
  1603. <td><strong>Refundable
  1604. Deposit:</strong></td>
  1605. <td><span id="depositAmount_td">Rs</span>
  1606. </td>
  1607. </tr>
  1608. <tr>
  1609. <td><strong>Discount:</strong></td>
  1610. <td><span id="discount_td">0%</span>
  1611. </td>
  1612. </tr>
  1613. <tr>
  1614. <td><strong>Total Amount:</strong>
  1615. </td>
  1616. <td><span id="totalAmount_td">Rs</span>
  1617. </td>
  1618. </tr>
  1619. </tbody>
  1620. </table>
  1621. </div>
  1622. </div>
  1623. <div class="row">
  1624. <div class="col-md-12 text-center">
  1625. <!-- Center align the button -->
  1626. <button type="button" class="btn btn-primary prev-step"
  1627. style="background-color: #016d6f; color: white;float: left;">Previous</button>
  1628. </div>
  1629. </div>
  1630. <div align="center">
  1631. <label data-toggle="tooltip" data-placement="top"
  1632. title="Check community hall list for Terms and Conditions">
  1633. <input type="checkbox" id="checkin" onchange="togglePaymentButton(this)" />
  1634. <a href="#" id="termsLink">I agree to the Terms and Conditions</a>
  1635. </label>
  1636. <button type="button" id="confirmPaymentBtn" class="btn btn-success"
  1637. onclick="paymentForCounter()" disabled>Confirm Payment</button>
  1638. <input type="hidden" id="btnSubmit"></input>
  1639. </div>
  1640. </div>
  1641. </div>
  1642. <!--<div class="row mt-3">
  1643. <div class="col-sm-6">
  1644. <button type="button" class="btn btn-secondary" id="backToProfileButton">Back</button>
  1645. </div>
  1646. </div>-->
  1647. </form>
  1648. </div>
  1649. </div>
  1650. <div class="modal fade" id="termsModal" tabindex="-1" aria-labelledby="termsModalLabel" aria-hidden="true">
  1651. <div class="modal-dialog modal-lg">
  1652. <div class="modal-content">
  1653. <div class="modal-header">
  1654. <h5 class="modal-title" id="termsModalLabel">Terms and Conditions</h5>
  1655. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  1656. </div>
  1657. <div class="modal-body">
  1658. <div class="table-responsive">
  1659. <table class="table table-bordered table-wrap">
  1660. <tbody>
  1661. <tr>
  1662. <td>1</td>
  1663. <td>Community center shall be booked on daily rental basis for religious,
  1664. social,
  1665. and cultural purposes only. Political based functions, against the
  1666. Government
  1667. Policy and illegal programmes shall not be allowed.</td>
  1668. </tr>
  1669. <tr>
  1670. <td>2</td>
  1671. <td><b>Address proof</b> of the applicant should be furnished with filled in
  1672. application in two copies.</td>
  1673. </tr>
  1674. <tr>
  1675. <td>3</td>
  1676. <td>For marriage, <b>bride and bridegroom photos</b> and age proof should be
  1677. furnished in two copies. (21 years should be completed for men and 18
  1678. years
  1679. should be completed for women)</td>
  1680. </tr>
  1681. <tr>
  1682. <td>4</td>
  1683. <td>For Reception bride and bridegroom photos (two copies) should be
  1684. furnished.</td>
  1685. </tr>
  1686. <tr>
  1687. <td>5</td>
  1688. <td>For Birthday/Ear boring/Puberty/Betrothal/Upanayanam and seemantham
  1689. functions
  1690. photo of the individual should be furnished.</td>
  1691. </tr>
  1692. <tr>
  1693. <td>6</td>
  1694. <td>Separate application to be made for the other than family functions with
  1695. <b>No
  1696. Objection Certificate from the Police Department</b> concerned
  1697. jurisdiction
  1698. of the community hall.</td>
  1699. </tr>
  1700. <tr>
  1701. <td>7</td>
  1702. <td>Those who have applied with required documents and necessary payment
  1703. will be
  1704. given first priority (First come, first served basis)</td>
  1705. </tr>
  1706. <tr>
  1707. <td>8</td>
  1708. <td>Order shall not be transferred to any reason. No permission shall be
  1709. given any
  1710. one to perform the function other than allotted person.</td>
  1711. </tr>
  1712. <tr>
  1713. <td>9</td>
  1714. <td>No permission shall be given to perform function other than mentioned in
  1715. the
  1716. allotment order.</td>
  1717. </tr>
  1718. <tr>
  1719. <td>10</td>
  1720. <td>In case of essentiality for Greater Chennai Corporation for the purpose
  1721. of
  1722. meetings, relief measures on natural calamities and election period
  1723. permission
  1724. order will be cancelled with short intimation.</td>
  1725. </tr>
  1726. <tr>
  1727. <td>11</td>
  1728. <td>Emblem and Name of the Greater Chennai Corporation shall not be
  1729. permitted to be
  1730. displayed or to be used in any other manner.</td>
  1731. </tr>
  1732. <tr>
  1733. <td>12</td>
  1734. <td>Function should be performed without stigma of Greater Chennai
  1735. Corporation.</td>
  1736. </tr>
  1737. <tr>
  1738. <td>13</td>
  1739. <td>After finishing the function, all materials other than Corporation
  1740. should be
  1741. removed from the community center.</td>
  1742. </tr>
  1743. <tr>
  1744. <td>14</td>
  1745. <td>Cooking should be done only in the kitchen or place provided for the
  1746. purpose.
  1747. </td>
  1748. </tr>
  1749. <tr>
  1750. <td>15</td>
  1751. <td>The Corporation will not be responsible for any theft or loss of motor
  1752. vehicles,
  1753. properties or any damages which occur to the parties.</td>
  1754. </tr>
  1755. <tr>
  1756. <td>16</td>
  1757. <td>Vessels, furniture and other materials of the Corporation should not be
  1758. taken
  1759. out from the community center, and no nails, posters, stickers and
  1760. notices fixed
  1761. in the walls.</td>
  1762. </tr>
  1763. <tr>
  1764. <td>17</td>
  1765. <td>The electricity consumption charge has to be deducted from the amount
  1766. deposit if
  1767. any additional electrical illuminations of decorations have to be done
  1768. prior
  1769. approval of the Electrical Engineer, Corporation of Chennai has to be
  1770. obtained.
  1771. </td>
  1772. </tr>
  1773. <tr>
  1774. <td>18</td>
  1775. <td>No nuisance like spitting, throwing leaves and other materials on the
  1776. neighborhood premises etc.</td>
  1777. </tr>
  1778. <tr>
  1779. <td>19</td>
  1780. <td>Permission order will be given only to the applicant.</td>
  1781. </tr>
  1782. <tr>
  1783. <td>20</td>
  1784. <td>The Commissioner is empowered to grant permission or reject the
  1785. application
  1786. without assigning any reasons therefor.</td>
  1787. </tr>
  1788. <tr>
  1789. <td>21</td>
  1790. <td>If vessels and other materials, chair, table of the Corporation received
  1791. for the
  1792. function, it has to be returned safely after the function is over. If
  1793. any
  1794. damages or loss of material, programmer is responsible and should pay
  1795. the
  1796. charges.</td>
  1797. </tr>
  1798. <tr>
  1799. <td>22</td>
  1800. <td>Monitoring the rules and regulations and maintenance of the community
  1801. hall/auditorium has to be continued by the Zonal Offices concerned.</td>
  1802. </tr>
  1803. </tbody>
  1804. </table>
  1805. <div class="container">
  1806. <div class="text-end">
  1807. Commissioner<br>
  1808. Greater Chennai Corporation.
  1809. </div>
  1810. </div>
  1811. </div>
  1812. </div>
  1813. <div class="modal-footer">
  1814. <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
  1815. </div>
  1816. </div>
  1817. </div>
  1818. </div>
  1819. <div class="modal fade backdrop" id="ddDetailsModal" data-backdrop="static" tabindex="-1" role="dialog"
  1820. aria-labelledby="staticBackdropLabel" aria-hidden="true">
  1821. <div class="modal-dialog modal-lg" role="document">
  1822. <div class="modal-content">
  1823. <form action="/counter/saveDDdetails" id="ddform" method="post" onsubmit="return submitForm()"
  1824. enctype="multipart/form-data">
  1825. <div class="block block-rounded block-themed block-transparent mb-0">
  1826. <div class="block-header bg-primary-dark">
  1827. <h3 class="block-title" id="mtitle">Add Demand Draft Number</h3>
  1828. <div class="block-options">
  1829. <button type="button" class="btn-block-option" data-bs-dismiss="modal"
  1830. aria-label="Close">
  1831. <i class="fa fa-fw fa-times"></i>
  1832. </button>
  1833. </div>
  1834. </div>
  1835. <div class="block-content row">
  1836. <!-- Existing form fields -->
  1837. <div class="col-md-4">
  1838. <div class="form-group">
  1839. <label for="bankName">Bank Name:</label>
  1840. <input type="text" class="form-control" id="bankName" name="bankName"
  1841. placeholder="Bank Name" pattern="[A-Za-z\s-]+" required>
  1842. </div>
  1843. </div>
  1844. <div class="col-md-4">
  1845. <div class="form-group">
  1846. <label for="bankAccNo">Bank Account Number:</label>
  1847. <input type="text" class="form-control" id="bankAccNo" name="bankAccNo"
  1848. placeholder="Bank Account No" minlength="6" maxlength="24" pattern="\d+"
  1849. required>
  1850. </div>
  1851. </div>
  1852. <div class="col-md-4">
  1853. <div class="form-group">
  1854. <label for="ddNumber">Demand Draft Number:</label>
  1855. <input type="text" class="form-control" id="ddNumber" name="ddNumber"
  1856. placeholder="DD No" minlength="6" maxlength="10" pattern="\d+" required>
  1857. </div>
  1858. </div>
  1859. <div class="col-md-4">
  1860. <div class="form-group">
  1861. <label for="totalamount">Total Amount:</label>
  1862. <input type="text" class="form-control" id="totalamount" name="totalamount"
  1863. readonly>
  1864. </div>
  1865. </div>
  1866. <div class="col-4">
  1867. <div class="form-group">
  1868. <lable for="amountReceived">DD Amount:</lable>
  1869. <input type="text" class="form-control" id="amountReceived"
  1870. name="amountReceived" required="required" pattern="[0-9]">
  1871. </div>
  1872. </div>
  1873. <div class="col-md-4">
  1874. <input type="hidden" id="bookingId" name="bookingId">
  1875. </div>
  1876. <div class="row">
  1877. <div class="col">
  1878. <p class="p1 text-center"><strong>DOCUMENTS DETAILS</strong></p>
  1879. </div>
  1880. </div>
  1881. <div class="row" id="photoInputs">
  1882. <div class="col-md-8">
  1883. <div class="form-group">
  1884. <label for="counterddphoto" style="color:red;">Photo 1: Only (.JPEG,
  1885. .JPG, .PDF)
  1886. then uploading File size should not exceed above 1mb</label>
  1887. <input type="file" class="form-control dd-image" id="counterddphoto"
  1888. name="counterddphoto" accept="image/jpeg, image/jpg, image/pdf"
  1889. required>
  1890. </div>
  1891. </div>
  1892. </div>
  1893. </div>
  1894. </div>
  1895. <div class="block-content block-content-full text-end bg-body" id="mbutton">
  1896. <button type="button" class="btn btn-sm btn-alt-secondary"
  1897. data-bs-dismiss="modal">Close</button>
  1898. <button type="submit" class="btn btn-sm btn-primary">Submit</button>
  1899. </div>
  1900. </form>
  1901. </div>
  1902. </div>
  1903. </div>
  1904. </main>
  1905. <footer th:replace="~{fragments/footer2 :: footer}"></footer>
  1906. </div>
  1907. <script th:replace="~{fragments/script :: script}"></script>
  1908. <script th:replace="~{fragments/PaymentScript :: script}"></script>
  1909. <script>
  1910. $('.carousel').carousel({
  1911. interval: 6000
  1912. });
  1913. var currentStep = 1;
  1914. var updateProgressBar;
  1915. var userId;
  1916. var bookingId;
  1917. let selectedHallName = '';
  1918. let selectedZone = '';
  1919. function toggleNextButton(step) {
  1920. var nextButton = document.querySelector('.step-' + step + ' .next-step');
  1921. var fields = document.querySelectorAll('.step-' + step + ' [required]');
  1922. var allFieldsFilled = true;
  1923. fields.forEach(function (field) {
  1924. if (!field.value) {
  1925. allFieldsFilled = false;
  1926. }
  1927. });
  1928. if (allFieldsFilled) {
  1929. nextButton.disabled = false; // Enable the button
  1930. } else {
  1931. nextButton.disabled = true; // Disable the button
  1932. }
  1933. }
  1934. // Call the function for Step 1 when the page loads
  1935. document.addEventListener('DOMContentLoaded', function () {
  1936. // toggleNextButton(1);
  1937. toggleNextButton(2);
  1938. toggleNextButton(3);
  1939. });
  1940. // Attach event listeners for each step's form fields
  1941. /* document.querySelectorAll('.step-1 [required]').forEach(function(field) {
  1942. field.addEventListener('input', function() {
  1943. toggleNextButton(1);
  1944. });
  1945. });*/
  1946. document.querySelectorAll('.step-2 [required]').forEach(function (field) {
  1947. field.addEventListener('input', function () {
  1948. toggleNextButton(2);
  1949. });
  1950. });
  1951. document.querySelectorAll('.step-3 [required]').forEach(function (field) {
  1952. field.addEventListener('input', function () {
  1953. toggleNextButton(3);
  1954. });
  1955. });
  1956. function fetchReasonDocumentDetails(reasonId) {
  1957. $.ajax({
  1958. url: '/victoriahallbookingooking/admin/api/getReasonDocumentDetails',
  1959. type: 'GET',
  1960. dataType: 'json',
  1961. data: {reasonId: reasonId}
  1962. })
  1963. .done(function (data) {
  1964. const reasonFieldsContainer = $('#reasonFieldsContainer');
  1965. reasonFieldsContainer.empty();
  1966. const rowDiv = $('<div class="row"></div>');
  1967. $.each(data, function (index, detail) {
  1968. if (detail.addTextField == true) {
  1969. const fieldDiv = $('<div class="col-sm-4 form-group"></div>');
  1970. const label = $('<label>' + detail.fieldName + '</label>');
  1971. const input = $('<input type="text" class="form-control" name="' + detail.fieldName + '" required>');
  1972. // Add event listener for input validation
  1973. input.on('input', function () {
  1974. // Replace any non-letter characters with an empty string
  1975. this.value = this.value.replace(/[^a-zA-Z]/g, '');
  1976. });
  1977. fieldDiv.append(label);
  1978. fieldDiv.append(input);
  1979. rowDiv.append(fieldDiv);
  1980. }
  1981. if (detail.addDocumentField == true) {
  1982. const fieldDiv2 = $('<div class="col-sm-4 form-group"></div>');
  1983. fieldDiv2.append('<label>' + detail.docFieldName + '</label><input type="file" class="form-control file-upload-field" name="' + detail.docFieldName + '" required accept=".jpg,.jpeg, .pdf">');
  1984. rowDiv.append(fieldDiv2);
  1985. }
  1986. });
  1987. reasonFieldsContainer.append(rowDiv);
  1988. // File upload field validation for size and error display
  1989. $('.file-upload-field').on('change', function () {
  1990. const file = this.files[0];
  1991. if (file && file.size > 2097152) { // size is in bytes
  1992. $(this).addClass('error'); // Add error class
  1993. $(this).after('<div class="error-message">File size should not exceed 2 MB</div>'); // Display error message
  1994. this.value = ''; // Reset the file input
  1995. } else {
  1996. $(this).removeClass('error'); // Remove error class
  1997. $(this).next('.error-message').remove(); // Remove error message if present
  1998. }
  1999. });
  2000. })
  2001. .fail(function (xhr, status, error) {
  2002. console.error('Error fetching reason document details:', error);
  2003. });
  2004. }
  2005. // Call the function to fetch reasons and populate the dropdown when the document is ready
  2006. $(document).ready(function () {
  2007. fetchReasonsAndPopulateDropdown();
  2008. $('#reasonforbooking').change(function () {
  2009. const selectedReasonId = parseInt($(this).val()); // Convert the value to an integer
  2010. fetchReasonDocumentDetails(selectedReasonId);
  2011. });
  2012. });
  2013. var ch = 0;
  2014. function saveCounterBooking() {
  2015. // console.log("saveCounterBooking called");
  2016. $("#startPeriodDropdown").prop("disabled", false);
  2017. $("#endPeriodDropdown").prop("disabled", false);
  2018. var form = document.getElementById('booking');
  2019. var formData = new FormData(form);
  2020. // console.log(formData);
  2021. // Debugging: Log each FormData entry
  2022. for (var pair of formData.entries()) {
  2023. //console.log(pair[0] + ', ', pair[1]);
  2024. }
  2025. $.ajax({
  2026. url: '../victoriahallbookingooking/user/api/counter-booking',
  2027. type: 'POST',
  2028. data: formData,
  2029. processData: false,
  2030. contentType: false,
  2031. success: function (response) {
  2032. // console.log("response=", response);
  2033. // Update the UI with the response data
  2034. $("#bookingId").val(response.bookingId);
  2035. $("#userId").val(response.userId);
  2036. $("#selecthall_td").html(response.hallName);
  2037. $("#numDaysCount_td").html(response.noOfDays);
  2038. $("#startDateInput_td").html(response.startDate);
  2039. $("#endDateInput_td").html(response.endDate);
  2040. function getTimeOfDay(slot) {
  2041. if (slot === 1) {
  2042. return "Morning";
  2043. } else if (slot === 2) {
  2044. return "Evening";
  2045. } else {
  2046. return "Invalid slot";
  2047. }
  2048. }
  2049. $("#startingslot_td").html(getTimeOfDay(response.startingSlot) + " to " + getTimeOfDay(response.endingSlot));
  2050. $("#reasonforbooking_td").html(response.reason);
  2051. $("#hallAmount_td").html(response.hallAmount);
  2052. $("#gst_td").html(response.gst);
  2053. $("#depositAmount_td").html(response.depositAmount);
  2054. $("#discount_td").html(response.discount + "%")
  2055. $("#totalAmount_td").html(response.totalAmount);
  2056. $("#name_td").html(response.username);
  2057. $("#mobileno_td").html(response.mobileNo);
  2058. $("#usertype_td").html(response.userType);
  2059. displayDocumentDetails(response.uploadedDocs);
  2060. // Set the onclick event for the confirmPaymentBtn to include the bookingId
  2061. //$('#confirmPaymentBtn').attr('onclick', 'addnewdd(' + response.bookingId + ')');
  2062. // Enable the button to ensure it can be clicked
  2063. //$('#confirmPaymentBtn').prop('disabled', false);
  2064. },
  2065. error: function (xhr, status, error) {
  2066. console.error('Error saving booking details:', error);
  2067. }
  2068. });
  2069. }
  2070. function addnewdd(bookingId) {
  2071. // console.log("bookingId==", bookingId);
  2072. $('#ddDetailsModal').modal('show');
  2073. // Set the bookingId value in the hidden input field
  2074. $('#ddform #bookingId').val(bookingId);
  2075. // Make an AJAX request to fetch booking details
  2076. $.ajax({
  2077. url: '/victoriahallbookingooking/user/api/getBooking',
  2078. type: 'GET',
  2079. data: {bookingId: bookingId},
  2080. success: function (response) {
  2081. // Assuming the response contains the booking details
  2082. // console.log("Booking details: ", response);
  2083. // Display the amountReceived field in the modal's readonly input field
  2084. $('#totalamount').val(response.amountReceived); // Adjust according to your response structure
  2085. },
  2086. error: function (error) {
  2087. // console.log("Error fetching booking details: ", error);
  2088. }
  2089. });
  2090. }
  2091. function submitForm() {
  2092. var bookingId = $('#ddform #bookingId').val();
  2093. if (!bookingId) {
  2094. alert("Booking ID is missing!");
  2095. return false;
  2096. }
  2097. // console.log("Submitting form with bookingId=", bookingId);
  2098. return true;
  2099. }
  2100. function displayDocumentDetails(uploadedDocs) {
  2101. const uploadedDocsList = $("#uploadedDocsList");
  2102. uploadedDocsList.empty(); // Clear existing items
  2103. uploadedDocs.forEach(function (doc) {
  2104. const listItem = $('<li>');
  2105. const thumbnail = $('<img>').addClass('thumbnail-img');
  2106. if (doc.bookingDocUrl.endsWith('.pdf')) {
  2107. thumbnail.attr('src', doc.bookingDocUrl);
  2108. listItem.append(thumbnail).append(' ' + doc.documentName);
  2109. thumbnail.on('click', function () {
  2110. const pdfViewer = $('<iframe>').attr({
  2111. src: doc.bookingDocUrl
  2112. });
  2113. $('#largeImage').hide();
  2114. $('#largeImageContainer').find('iframe').remove();
  2115. $('#largeImageContainer').append(pdfViewer);
  2116. $('#largeImageContainer').show();
  2117. });
  2118. } else {
  2119. thumbnail.attr('src', doc.bookingDocUrl);
  2120. listItem.append(thumbnail).append(' ' + doc.documentName);
  2121. thumbnail.on('click', function () {
  2122. $('#largeImageContainer iframe').remove();
  2123. $('#largeImage').attr('src', doc.bookingDocUrl).show();
  2124. $('#largeImageContainer').show();
  2125. });
  2126. }
  2127. uploadedDocsList.append(listItem);
  2128. });
  2129. }
  2130. $("#closeButton").on('click', function () {
  2131. $('#largeImageContainer').hide(); // Hide the large image container
  2132. $('#largeImage').attr('src', '').hide(); // Reset and hide image
  2133. $('#largeImageContainer iframe').remove(); // Remove iframe if present
  2134. });
  2135. /*function fetchReasonsAndPopulateDropdown() {
  2136. // Make an AJAX call to fetch all reasons
  2137. $.ajax({
  2138. url: '/victoriahallbooking/admin/api/getReasons',
  2139. type: 'GET',
  2140. dataType: 'json'
  2141. })
  2142. .done(function (data) {
  2143. const reasonDropdown = $('#reasonforbooking');
  2144. reasonDropdown.empty();
  2145. reasonDropdown.append($('<option selected value="0"></option>').text('Select a reason'));
  2146. $.each(data, function (index, reason) {
  2147. reasonDropdown.append($('<option></option>').attr('value', reason.reasonId).text(reason.reason));
  2148. });
  2149. })
  2150. .fail(function (xhr, status, error) {
  2151. console.error('Error fetching reasons:', error);
  2152. });
  2153. }*/
  2154. function fetchReasonsAndPopulateDropdown() {
  2155. // Make an AJAX call to fetch all reasons
  2156. $.ajax({
  2157. url: '/victoriahallbooking/admin/api/getReasons',
  2158. type: 'GET',
  2159. dataType: 'json'
  2160. })
  2161. .done(function (data) {
  2162. const reasonDropdown = $('#reasonforbooking');
  2163. reasonDropdown.empty();
  2164. reasonDropdown.append($('<option selected value="0"></option>').text('Select a reason'));
  2165. // Populate the dropdown and store reason metadata
  2166. $.each(data, function (index, reason) {
  2167. reasonDropdown.append($('<option></option>').attr('value', reason.reasonId).text(reason.reason));
  2168. reasonMaxData.set(reason.reasonId, reason.maxdays);
  2169. reasonLabelData.set(reason.reasonId, reason.reason);
  2170. reasoncode.set(reason.reasonId, reason.reasoncode);
  2171. });
  2172. // Add change event listener to the dropdown
  2173. reasonDropdown.change(function () {
  2174. const selectedReasonId = $(this).val();
  2175. const selectedReasonCode = reasoncode.get(parseInt(selectedReasonId));
  2176. const selectedHallId = document.getElementById("statichallId").value; // Getting the selected hall ID
  2177. // Make another AJAX call to get hall details based on the selected hall ID
  2178. $.ajax({
  2179. type: 'GET',
  2180. url: '/victoriahallbooking/user/api/gethalldetails/' + selectedHallId,
  2181. success: function (response) {
  2182. // console.log(response);
  2183. const isSGE = response.sge; // Fetch SGE status from the response
  2184. const isCGE = response.cge; // Fetch CGE status from the response
  2185. // Check for State Government Event (SGE)
  2186. if (selectedReasonCode === 'SGE' && !isSGE) {
  2187. // Show popup for State govt event
  2188. Swal.fire({
  2189. title: 'Government Event',
  2190. text: 'Shenoy Nagar Community Center (Auditorium) full Mandapam (Amma Arangam) is available for state government events.',
  2191. icon: 'info',
  2192. confirmButtonText: 'OK'
  2193. }).then((result) => {
  2194. if (result.isConfirmed && !isSGE) {
  2195. window.location.href = '/victoriahallbooking/hallbookingform';
  2196. }
  2197. });
  2198. }
  2199. // Check for Central Government Event (CGE)
  2200. else if (selectedReasonCode === 'CGE' && !isCGE) {
  2201. // Show popup for Central govt event
  2202. Swal.fire({
  2203. title: 'Government Event',
  2204. text: 'Shenoy Nagar Community Center (Auditorium) full Mandapam (Amma Arangam) is available for central government events.',
  2205. icon: 'info',
  2206. confirmButtonText: 'OK'
  2207. }).then((result) => {
  2208. if (result.isConfirmed && !isCGE) {
  2209. // Redirect only if hallId is not 3
  2210. window.location.href = '/counter/counter-booking';
  2211. }
  2212. });
  2213. }
  2214. },
  2215. error: function (xhr, status, error) {
  2216. console.error('Error fetching hall details:', error);
  2217. }
  2218. });
  2219. });
  2220. })
  2221. .fail(function (xhr, status, error) {
  2222. console.error('Error fetching reasons:', error);
  2223. });
  2224. }
  2225. function togglePaymentButton(checkbox) {
  2226. var confirmPaymentBtn = document.getElementById('confirmPaymentBtn');
  2227. confirmPaymentBtn.disabled = !checkbox.checked;
  2228. }
  2229. document.getElementById('termsLink').addEventListener('click', function (event) {
  2230. event.preventDefault();
  2231. $('#termsModal').modal('show');
  2232. });
  2233. function togglePaymentButton(checkbox) {
  2234. document.getElementById('confirmPaymentBtn').disabled = !checkbox.checked;
  2235. }
  2236. function displayStep(stepNumber) {
  2237. // console.log(stepNumber);
  2238. if (stepNumber >= 1 && stepNumber <= 4) {
  2239. if (validateStep(currentStep)) {
  2240. /* console.log(currentStep);*/
  2241. $(".step-" + currentStep).hide();
  2242. $(".step-" + stepNumber).show();
  2243. currentStep = stepNumber;
  2244. updateProgressBar();
  2245. // Populate hallName, zone, and division in Step 2 and Step 3
  2246. if (stepNumber === 2 || stepNumber === 3) {
  2247. $('#hallNameDisplayStep2').text(selectedHallName);
  2248. $('#hallNameDisplayStep3').text(selectedHallName);
  2249. $('#zoneStep2').text(zone);
  2250. $('#zoneStep3').text(zone);
  2251. $('#divisionStep2').text('');
  2252. $('#divisionStep3').text('');
  2253. $('#selecthall_td').text(selectedHallName);
  2254. }
  2255. // Handle displaying the SweetAlert in Step 3
  2256. } else {
  2257. //alert("Please fill in all required fields before proceeding.");
  2258. }
  2259. }
  2260. }
  2261. function validateStep(stepNumber) {
  2262. }
  2263. $(document).ready(function () {
  2264. $('.step').hide();
  2265. $('.step-1').show();
  2266. var currentStep = 1; // Assuming you have this variable defined somewhere in your code
  2267. // Function to validate step 3
  2268. // Function to validate step 3
  2269. // Function to validate step 3
  2270. function validateStep3() {
  2271. let isValid = true;
  2272. let selectedReason = $('#reasonforbooking').val();
  2273. // Check if a reason is selected
  2274. if (!selectedReason) {
  2275. isValid = false;
  2276. } else {
  2277. // Iterate through each input associated with the selected reason
  2278. $(`#reasonFieldsContainer .${selectedReason} input[type="text"], #reasonFieldsContainer .${selectedReason} input[type="file"]`).each(function () {
  2279. if ($(this).prop('required') && !$(this).val()) {
  2280. isValid = false;
  2281. return false; // Exit the loop early if any required field is empty
  2282. }
  2283. });
  2284. }
  2285. // Enable/disable the next button based on validation
  2286. $('.next-step').prop('disabled', !isValid);
  2287. }
  2288. // Event listener for reason dropdown change
  2289. $('#reasonforbooking').change(function () {
  2290. let selectedReason = $(this).val();
  2291. // Show/hide fields based on selected reason
  2292. $('#reasonFieldsContainer').children().hide();
  2293. if (selectedReason) {
  2294. $(`#reasonFieldsContainer .${selectedReason}`).show();
  2295. }
  2296. // Validate the fields for the selected reason
  2297. validateStep3();
  2298. });
  2299. // Event listener for input changes within reason fields
  2300. $('#reasonFieldsContainer').on('change', 'input, select', function () {
  2301. validateStep3();
  2302. });
  2303. $(".next-step").click(function () {
  2304. var valid = true;
  2305. // Validate all required text inputs and file fields in Step 3
  2306. if (currentStep === 3) {
  2307. $('.step-3 input[required], .step-3 select[required]').each(function () {
  2308. if ($(this).val() === '') {
  2309. $(this).addClass('error'); // Add error class
  2310. valid = false;
  2311. return false; // Break the loop
  2312. } else {
  2313. $(this).removeClass('error'); // Remove error class if valid
  2314. }
  2315. });
  2316. $('.step-3 input[type="file"][required]').each(function () {
  2317. if ($(this)[0].files.length === 0) {
  2318. $(this).addClass('error'); // Add error class
  2319. valid = false;
  2320. return false; // Break the loop
  2321. } else {
  2322. $(this).removeClass('error'); // Remove error class if valid
  2323. }
  2324. });
  2325. }
  2326. if (!valid) {
  2327. return; // Stop if validation fails
  2328. }
  2329. if (currentStep < 4) {
  2330. $(".step-" + currentStep).fadeOut(500, function () {
  2331. if (currentStep === 4) {
  2332. $(".step-" + currentStep).fadeIn(500);
  2333. // console.log(currentStep);
  2334. updateProgressBar();
  2335. return "";
  2336. } else {
  2337. currentStep++;
  2338. $(".step-" + currentStep).fadeIn(500);
  2339. updateProgressBar();
  2340. }
  2341. });
  2342. }
  2343. });
  2344. $(".prev-step").click(function () {
  2345. if (currentStep > 1) {
  2346. $(".step-" + currentStep).fadeOut(500, function () {
  2347. currentStep--;
  2348. $(".step-" + currentStep).fadeIn(500);
  2349. updateProgressBar();
  2350. });
  2351. }
  2352. });
  2353. $(".step-2 .reset-step").click(function () {
  2354. $('.step-2 input[type="text"], .step-2 select').val(function () {
  2355. return this.defaultValue;
  2356. });
  2357. $('.step-2 input[type="checkbox"], .step-2 input[type="radio"]').prop('checked', false);
  2358. $('#endDateInput').prop('disabled', true).val('0');
  2359. $('#startPeriodDropdown').val('0');
  2360. $('#endPeriodDropdown').val('0');
  2361. $('#numDaysCount').val(''); // Reset the number of days input
  2362. $('.step-2 .error-message').hide();
  2363. toggleNextButton(2); // Ensure button state reflects field values after reset
  2364. });
  2365. $(".step-3 .reset-step").click(function () {
  2366. // Reset input fields and selects, excluding #reasonforbooking
  2367. $('.step-3 input[type="text"], input[type="file"], .step-3 select').each(function () {
  2368. $(".step-3 .next-step").prop("disabled", true);
  2369. // Check if element is not #reasonforbooking
  2370. if (!$(this).is('#reasonforbooking')) {
  2371. $(this).val(this.defaultValue);
  2372. }
  2373. });
  2374. // Hide error messages and validate step 3
  2375. $('.step-3 .error-message').hide();
  2376. validateStep3();
  2377. });
  2378. $(".step-2 .next-step").click(function () {
  2379. var reasonforbooking = $("#reasonforbooking").val();
  2380. if (reasonforbooking !== "0") {
  2381. $(".step-3 .next-step").prop("disabled", false);
  2382. } else {
  2383. $(".step-3 .next-step").prop("disabled", true);
  2384. };
  2385. });
  2386. $(".cancel-step").click(function () {
  2387. // Redirect to the cancel page or handle cancellation logic here
  2388. window.location.href = "/dashboard";
  2389. });
  2390. updateProgressBar = function () {
  2391. var progressPercentage = ((currentStep - 1) / 3) * 100;
  2392. $(".progress-bar").css("width", progressPercentage + "%");
  2393. };
  2394. // File upload field validation for size and error display
  2395. $('.file-upload-field').on('change', function () {
  2396. const file = this.files[0];
  2397. if (file && file.size > 20480) { // size is in bytes
  2398. $(this).addClass('error'); // Add error class
  2399. $(this).after('<div class="error-message">File size should not exceed 20 KB</div>'); // Display error message
  2400. this.value = ''; // Reset the file input
  2401. } else {
  2402. $(this).removeClass('error'); // Remove error class
  2403. $(this).next('.error-message').remove(); // Remove error message if present
  2404. }
  2405. });
  2406. // Initial validation check for step 3
  2407. validateStep3();
  2408. // Log statement to ensure the button is being enabled
  2409. // console.log("Enabling the button...");
  2410. $('.step-1 .next-step').prop('disabled', false);
  2411. });
  2412. $(document).ready(function () {
  2413. // Function to show/hide fields based on the selected User Type
  2414. $("#userType").change(function () {
  2415. var selectedUserType = $(this).val();
  2416. // Hide all fields initially
  2417. $("#employeeFields, #pensionerFields, #familypensionerFields").hide();
  2418. if (selectedUserType === "PUBLIC") {
  2419. $("#pensionerFields").hide();
  2420. $("#familypensionerFields").hide();
  2421. $("#employeeFields").hide();
  2422. }
  2423. else if (selectedUserType === "GCC_EMPLOYEE") {
  2424. $("#employeeFields").show();
  2425. } else if (selectedUserType === "PENSIONER") {
  2426. $("#pensionerFields").show();
  2427. } else if (selectedUserType == "FAMILYPENSIONER") {
  2428. $("#familypensionerFields").show();
  2429. }
  2430. });
  2431. // Validation for alphanumeric input
  2432. $("#employeeId, #pensionerId").on("input", function () {
  2433. var inputValue = $(this).val();
  2434. if (!/^[a-zA-Z0-9]*$/.test(inputValue)) {
  2435. alert("Please enter alphanumeric characters only.");
  2436. $(this).val("");
  2437. }
  2438. });
  2439. // Validation for numeric input
  2440. $("#wardNo").on("input", function () {
  2441. var inputValue = $(this).val();
  2442. if (!/^\d*$/.test(inputValue)) {
  2443. alert("Please enter numeric characters only for Ward No.");
  2444. $(this).val("");
  2445. }
  2446. });
  2447. });
  2448. // Function to toggle hall details container and fetch hall details
  2449. function toggleHallDetailsContainer() {
  2450. var selectBox = document.getElementById("selecthall");
  2451. var selectedValue = selectBox.options[selectBox.selectedIndex].value;
  2452. var hallDetailsContainer = document.getElementById("hallDetailsContainer");
  2453. if (selectedValue !== "") {
  2454. hallDetailsContainer.style.display = "block"; // Show hall details container if a hall is selected
  2455. // Get the selected hall ID
  2456. var hallId = selectBox.options[selectBox.selectedIndex].value;
  2457. getHallDetails(hallId); // Fetch hall details
  2458. // Other code for displaying selected details
  2459. } else {
  2460. hallDetailsContainer.style.display = "none"; // Hide hall details container if no hall is selected
  2461. // Clear the selected details in Step 2 and Step 3
  2462. $('#hallNameDisplayStep2').text('');
  2463. $('#hallNameDisplayStep3').text('');
  2464. $('#zoneStep2').text('');
  2465. $('#zoneStep3').text('');
  2466. $('#divisionStep2').text('');
  2467. $('#divisionStep3').text('');
  2468. // Clear other details if needed
  2469. }
  2470. }
  2471. var index = 0;
  2472. var hall;
  2473. $(function () {
  2474. $("#selecthall").select2();
  2475. });
  2476. $.ajax({
  2477. type: 'GET',
  2478. url: '/victoriahallbooking/user/api/gethallnames',
  2479. success: function (response) {
  2480. // Populate the dropdown options with the received hall names
  2481. var selectHallDropdown = $('#selecthall');
  2482. $.each(response, function (index, hall) {
  2483. // console.log("response==", response);
  2484. // console.log("halls", hall);
  2485. var hallId = 0;
  2486. if (hallId == hall.hallId) {
  2487. selectHallDropdown.append($('<option></option>').attr('value', hall.hallId).text(hall.hallName));
  2488. selectHallDropdown.find('option[value="' + hall.hallId + '"]').prop('selected', true);
  2489. } else {
  2490. selectHallDropdown.append($('<option></option>').attr('value', hall.hallId).text(hall.hallName));
  2491. }
  2492. });
  2493. },
  2494. error: function (xhr, status, error) {
  2495. console.error('Error fetching hall names:', error);
  2496. }
  2497. });
  2498. $(document).ready(function () {
  2499. $('#selecthall').change(function () {
  2500. var selectedHallId = $(this).val();
  2501. // console.log('Selected hall ID:', selectedHallId);
  2502. // Call the getHallDetails function with the selected hall ID
  2503. getHallDetails(selectedHallId);
  2504. });
  2505. });
  2506. // Function to retrieve hall details based on hallId
  2507. function getHallDetails(hallId) {
  2508. $.ajax({
  2509. type: 'GET',
  2510. url: '/victoriahallbooking/user/api/gethalldetails/' + hallId,
  2511. success: function (response) {
  2512. // console.log(response);
  2513. // Display the container
  2514. $('#hallDetailsContainer').show();
  2515. // Set hall details
  2516. $('#zone').html('<strong>' + response.zone + '</strong>&nbsp;&nbsp;&nbsp;&nbsp; Division: <strong>' + response.division + '</strong>');
  2517. $('#address').html('<strong>' + response.doorNo + ', ' + response.street + ', ' + response.area + ', ' + response.city + ', ' + response.pinCode + '</strong>');
  2518. // $('#address').text(response.doorNo + ', ' + response.street + ', ' + response.area + ', ' + response.city + ', ' + response.pinCode);
  2519. $('#landmark').html('<strong>' + response.landMark + '</strong>');
  2520. $('#seatingCapacity').html('<strong>' + response.seatingCapacity + '</strong>');
  2521. var parkingCapacity = response.parkingCapacity;
  2522. var parkingAvailability = parkingCapacity > 0 ? "Yes" : "No";
  2523. $('#caretakerNumber').html('<strong>' + response.hallInchargeMobno + '</strong>');
  2524. $('#rentAmount').html('<strong>' + response.depositAmount + '</strong>');
  2525. // Set amount details
  2526. $('#gst').html('<strong>' + response.gst + '</strong>');
  2527. $('#fullDayAmount').html('<strong>' + response.fullDayRent + '</strong>');
  2528. $('#halfDayAmount').html('<strong>' + response.halfDayRent + '</strong>');
  2529. $('#ebunit').html('<strong>' + response.ebCostPerUnit + '</strong>');
  2530. $('#statichallId').val(response.hallId);
  2531. // Set hall images
  2532. var carouselInner = $('#hallImagesCarousel .carousel-inner');
  2533. carouselInner.empty(); // Clear existing images
  2534. $.each(response.hallImagesList, function (index, image) {
  2535. var itemClass = (index === 0) ? 'carousel-item active' : 'carousel-item';
  2536. var img = $('<img>').addClass('d-block w-100').attr('src', image.hallImage).attr('alt', 'Hall Image');
  2537. var carouselItem = $('<div>').addClass(itemClass).append(img);
  2538. carouselInner.append(carouselItem);
  2539. });
  2540. // Clear existing floor details to prevent duplicates
  2541. $('#hallareainsqft').empty();
  2542. // Use a Set to store unique floor details
  2543. var uniqueFloorDetails = new Set();
  2544. $.each(response.floorDetailsList, function (index, hallarea) {
  2545. // Construct the text for each floor's details
  2546. var floorDetailText = hallarea.floor + " - " + hallarea.hallarea + " Sq.ft ,";
  2547. // Add to the Set if it's not a duplicate
  2548. if (!uniqueFloorDetails.has(floorDetailText)) {
  2549. uniqueFloorDetails.add(floorDetailText);
  2550. // Append the floor details to the target element
  2551. $('#hallareainsqft').append('<strong>' + floorDetailText + '</strong>');
  2552. }
  2553. });
  2554. // Initialize ViewerJS on the carousel after images are loaded
  2555. initializeViewerJS();
  2556. getBookingCalendar(hallId);
  2557. // Set hall details in Step 2 and Step 3
  2558. $('#hallNameDisplayStep2').text(response.hallName);
  2559. $('#hallNameDisplayStep3').text(response.hallName);
  2560. $('#zoneStep2').text(response.zone);
  2561. $('#zoneStep3').text(response.zone);
  2562. $('#divisionStep2').text(response.division);
  2563. $('#divisionStep3').text(response.division);
  2564. },
  2565. error: function (xhr, status, error) {
  2566. console.error('Error fetching hall details:', error);
  2567. }
  2568. });
  2569. }
  2570. function initializeViewerJS() {
  2571. // Ensure ViewerJS initialization after images are added to the DOM
  2572. var carouselInner = document.querySelector('#hallImagesCarousel .carousel-inner');
  2573. var floordetails = document.querySelector('#hallareainsqft');
  2574. // Destroy existing viewer instance if it exists
  2575. if (carouselInner.viewer) {
  2576. carouselInner.viewer.destroy();
  2577. }
  2578. if (floordetails.viewer) {
  2579. floordetails.viewer.destroy();
  2580. }
  2581. // Initialize ViewerJS
  2582. var viewer = new Viewer(carouselInner, {
  2583. inline: false,
  2584. viewed: function () {
  2585. viewer.zoomTo(0.5); // Adjust the zoom level here
  2586. },
  2587. toolbar: {
  2588. zoomIn: 4,
  2589. zoomOut: 4,
  2590. oneToOne: 4,
  2591. reset: 4,
  2592. prev: 4,
  2593. play: {
  2594. show: 4,
  2595. size: 'large',
  2596. },
  2597. next: 4,
  2598. rotateLeft: 4,
  2599. rotateRight: 4,
  2600. flipHorizontal: 4,
  2601. flipVertical: 4,
  2602. },
  2603. });
  2604. carouselInner.viewer = viewer;
  2605. }
  2606. /*function getBookingCalendar(hall_id) {
  2607. // Make an AJAX call to fetch booking data
  2608. $.ajax({
  2609. type: 'GET',
  2610. url: '/victoriahallbooking/user/api/getPastData',
  2611. data: {
  2612. hall_id: hall_id
  2613. },
  2614. success: function (response) {
  2615. window.bookingResponse = {};
  2616. if (response && Array.isArray(response)) {
  2617. $("#startDateInput").datepicker("destroy");
  2618. for (var i = 0; i < response.length; i++) {
  2619. var dateString = datepickerFormat(response[i].bdate);
  2620. window.bookingResponse[dateString] = [response[i].morningSlot, response[i].eveningSlot];
  2621. }
  2622. initializeDatepickerWithColors(hall_id);
  2623. if (response.length == 0) {
  2624. initializeDatepickerWithColors(hall_id);
  2625. }
  2626. } else {
  2627. console.error('Invalid or empty response data.');
  2628. }
  2629. },
  2630. error: function (xhr, status, error) {
  2631. console.error('Error fetching hall details:', error);
  2632. }
  2633. });
  2634. }*/
  2635. function getBookingCalendar(hall_id) {
  2636. // Make an AJAX call to fetch booking data
  2637. $.ajax({
  2638. type: 'GET',
  2639. url: '/victoriahallbooking/user/api/getPastData',
  2640. data: {
  2641. hall_id: hall_id
  2642. },
  2643. success: function (response) {
  2644. window.bookingResponse = {};
  2645. if (response && Array.isArray(response)) {
  2646. $("#startDateInput").datepicker("destroy");
  2647. for (var i = 0; i < response.length; i++) {
  2648. var dateString = datepickerFormat(response[i].bdate);
  2649. window.bookingResponse[dateString] = [response[i].morningSlot, response[i].eveningSlot, response[i].is_blocked];
  2650. }
  2651. initializeDatepickerWithColors(hall_id);
  2652. if (response.length == 0) {
  2653. initializeDatepickerWithColors(hall_id);
  2654. }
  2655. } else {
  2656. console.error('Invalid or empty response data.');
  2657. }
  2658. },
  2659. error: function (xhr, status, error) {
  2660. console.error('Error fetching hall details:', error);
  2661. }
  2662. });
  2663. }
  2664. // Function to update the end date and slot availability
  2665. function updateEndDate() {
  2666. var startDate = new Date(document.getElementById("startDateInput").value);
  2667. var formatStartDate = formatDate(startDate);
  2668. var endDateInput = document.getElementById("endDateInput");
  2669. endDateInput.innerHTML = '<option value="0">Select</option>';
  2670. endDateInput.disabled = true;
  2671. // Add options for next 7 days from the selected start date
  2672. for (var i = 0; i < 7; i++) {
  2673. var date = new Date(startDate);
  2674. date.setDate(startDate.getDate() + i);
  2675. var formattedDate = formatDate(date);
  2676. if (isNaN(date.getTime())) {
  2677. console.error("Invalid date:", date);
  2678. continue;
  2679. }
  2680. var bookingStatus = window.bookingResponse[formattedDate];
  2681. if (bookingStatus) {
  2682. if (bookingStatus[0] && bookingStatus[1]) {
  2683. break;
  2684. }
  2685. else if (bookingStatus[0]) {
  2686. if (formatStartDate == formattedDate) {
  2687. var option = document.createElement('option');
  2688. option.value = formattedDate;
  2689. option.text = formattedDate;
  2690. endDateInput.appendChild(option);
  2691. } else {
  2692. break;
  2693. }
  2694. }
  2695. else if (bookingStatus[1]) {
  2696. var option = document.createElement('option');
  2697. option.value = formattedDate;
  2698. option.text = formattedDate;
  2699. endDateInput.appendChild(option);
  2700. break;
  2701. } else {
  2702. var option = document.createElement('option');
  2703. option.value = formattedDate;
  2704. option.text = formattedDate;
  2705. endDateInput.appendChild(option);
  2706. }
  2707. } else {
  2708. var option = document.createElement('option');
  2709. option.value = formattedDate;
  2710. option.text = formattedDate;
  2711. endDateInput.appendChild(option);
  2712. }
  2713. }
  2714. endDateInput.disabled = false;
  2715. }
  2716. // Utility function to format date as yyyy-mm-dd
  2717. function formatDate(date) {
  2718. var year = date.getFullYear();
  2719. var month = ("0" + (date.getMonth() + 1)).slice(-2);
  2720. var day = ("0" + date.getDate()).slice(-2);
  2721. return year + "-" + month + "-" + day;
  2722. }
  2723. function calculateNumDays() {
  2724. if (document.getElementById("endDateInput").value == 0) {
  2725. return true;
  2726. }
  2727. var startDate = new Date(document.getElementById("startDateInput").value);
  2728. var endDate = new Date(document.getElementById("endDateInput").value);
  2729. var timeDiff = Math.abs(endDate.getTime() - startDate.getTime());
  2730. var numDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
  2731. numDays += 1;
  2732. document.getElementById("numDaysCount").value = numDays;
  2733. }
  2734. // Event listener for when the end date is selected
  2735. document.getElementById("endDateInput").addEventListener("change", function () {
  2736. calculateNumDays();
  2737. $("#endPeriodDropdown").val(0).prop("disabled", false);
  2738. var bookingStatus = window.bookingResponse[$("#endDateInput").val()];
  2739. if (bookingStatus) {
  2740. if (bookingStatus[0]) {
  2741. // console.log("hi1", bookingStatus[0]);
  2742. $("#endPeriodDropdown").val(2);
  2743. $("#endPeriodDropdown").prop("disabled", true);
  2744. }
  2745. else if (bookingStatus[1]) {
  2746. // console.log("hi2", bookingStatus[1]);
  2747. $("#endPeriodDropdown").val(1)
  2748. $("#endPeriodDropdown").prop("disabled", true);
  2749. }
  2750. } else {
  2751. $("#endPeriodDropdown").prop("disabled", false);
  2752. }
  2753. });
  2754. /*function initializeDatepickerWithColors(hallId) {
  2755. // console.log("Initializing Datepicker with hallId:", hallId); // Confirm hallId is passed here
  2756. $("#datepicker-container").datepicker("destroy");
  2757. $("#startDateInput,#datepicker-container").datepicker({
  2758. dateFormat: "yy-mm-dd",
  2759. minDate: "+7D",
  2760. maxDate: "+6M",
  2761. beforeShowDay: function (eDate) {
  2762. var dateString = $.datepicker.formatDate("yy-mm-dd", eDate);
  2763. var bookingStatus = window.bookingResponse[dateString];
  2764. if (bookingStatus) {
  2765. if (bookingStatus[0] === false && bookingStatus[1] === false) {
  2766. return [true, "highlight-greens", "Slot Available"];
  2767. } else if (bookingStatus[0] === true && bookingStatus[1] === true) {
  2768. return [true, "highlight-pink disabled", "Slot Occuiped"];
  2769. } else if (bookingStatus[0] === true && bookingStatus[1] === false) {
  2770. return [true, "highlight-yellow", "Evening Slot Available"];
  2771. }
  2772. else if (bookingStatus[0] === false && bookingStatus[1] === true) {
  2773. return [true, "highlight-violet", "Only Morning Slot Available"];
  2774. }
  2775. }
  2776. return [true, "highlight-greens", "Slot Available"];
  2777. },
  2778. });
  2779. $('#selecthall').on('click', function () {
  2780. $('#datepicker-container').datepicker('show');
  2781. });
  2782. $("#startDateInput").on("change", function () {
  2783. var selectedDate = $(this).val();
  2784. var endDate = $("#endDateInput").val();
  2785. $("#startPeriodDropdown").val(0).prop("disabled", false);
  2786. $("#endPeriodDropdown").val(0).prop("disabled", false);
  2787. var startPeriod = $("#startPeriodDropdown").val();
  2788. var endPeriod = $("#endPeriodDropdown").val();
  2789. if (endDate !== "0" && startPeriod !== "0" && endPeriod !== "0") {
  2790. $(".next-step").prop("disabled", false);
  2791. } else {
  2792. $(".next-step").prop("disabled", true);
  2793. }
  2794. var bookingStatus = window.bookingResponse[selectedDate];
  2795. if (bookingStatus) {
  2796. if (bookingStatus[0]) {
  2797. // console.log("hi3", bookingStatus[0]);
  2798. $("#startPeriodDropdown").val(2);
  2799. $("#startPeriodDropdown").prop("disabled", true);
  2800. } else if (bookingStatus[1]) {
  2801. // console.log("hi4", bookingStatus[1]);
  2802. $("#startPeriodDropdown").val(1);
  2803. $("#startPeriodDropdown").prop("disabled", true);
  2804. }
  2805. } else {
  2806. $("#startPeriodDropdown").prop("disabled", false);
  2807. }
  2808. updateEndDate(selectedDate);
  2809. });
  2810. }*/
  2811. function initializeDatepickerWithColors(hallId) {
  2812. // Destroy existing datepicker to avoid duplicate initialization
  2813. $("#datepicker-container").datepicker("destroy");
  2814. const serverDate =new Date($("#serverDate").val() + "T00:00:00")
  2815. // console.log("serverDate:", serverDate);
  2816. const maxDate = new Date(serverDate);
  2817. maxDate.setMonth(maxDate.getMonth() + 6);
  2818. // console.log(" hall booking form Max Date: "+maxDate);
  2819. // Initialize the datepicker
  2820. $("#startDateInput,#datepicker-container").datepicker({
  2821. dateFormat: "yy-mm-dd",
  2822. minDate: serverDate,
  2823. maxDate: maxDate,
  2824. beforeShowDay: function (eDate) {
  2825. const dateString = $.datepicker.formatDate("yy-mm-dd", eDate);
  2826. const bookingStatus = window.bookingResponse[dateString] || {};
  2827. // const currentDate = new Date();
  2828. serverDate.setHours(0, 0, 0, 0); // Normalize current date to midnight
  2829. eDate.setHours(0, 0, 0, 0); // Normalize selected date to midnight
  2830. // Logic for other dates
  2831. if (eDate < serverDate) {
  2832. return [false, "highlight-disabled", "Slot not Available"];
  2833. }
  2834. const isToday = eDate.getTime() === serverDate.getTime();
  2835. const currentHour = new Date().getHours();
  2836. const isBefore6AM = currentHour < 6;
  2837. const isAfter2PM = currentHour >= 14;
  2838. // Block 3-day logic for specific event types
  2839. // const today = new Date();
  2840. const blockedDate = new Date(serverDate);
  2841. blockedDate.setDate(serverDate.getDate() + 2);
  2842. if (eDate <= blockedDate && window.isThreeDayBlock) {
  2843. return [false, "highlight-disabled", "Blocked due to event type"];
  2844. }
  2845. // Logic for today
  2846. if (isToday) {
  2847. if (isBefore6AM) {
  2848. // Before 6 AM: Allow full-day booking or adjust based on booking status
  2849. return handleBookingStatus(bookingStatus, "Full Day Available");
  2850. } else if (isAfter2PM) {
  2851. // After 2 PM: Block all bookings
  2852. return handleAfter2PM(bookingStatus);
  2853. } else {
  2854. // Between 6 AM and 2 PM: Check status and disable morning slots
  2855. return handleMorningSlots(bookingStatus);
  2856. }
  2857. }
  2858. return handleBookingStatus(bookingStatus, "Slot Available");
  2859. },
  2860. });
  2861. // Show datepicker when hall is selected
  2862. $('#selecthall').off('click').on('click', function () {
  2863. $('#datepicker-container').datepicker('show');
  2864. });
  2865. // Handle changes in the start date input
  2866. $("#startDateInput").on("change", function () {
  2867. const selectedDate = $(this).val();
  2868. const bookingStatus = window.bookingResponse[selectedDate] || {};
  2869. // const currentDate = new Date();
  2870. const currentHours = serverDate.getHours();
  2871. const currentDateString = serverDate.toISOString().split("T")[0];
  2872. $("#startPeriodDropdown").val(0).prop("disabled", false);
  2873. $("#endPeriodDropdown").val(0).prop("disabled", false);
  2874. $("#numDaysCount").val('');
  2875. validateForm();
  2876. if (selectedDate === currentDateString && currentHours >= 6) {
  2877. $("#startPeriodDropdown").val(2).prop("disabled", true);
  2878. } else if (bookingStatus[0]) {
  2879. $("#startPeriodDropdown").val(2).prop("disabled", true);
  2880. } else if (bookingStatus[1]) {
  2881. $("#startPeriodDropdown").val(1).prop("disabled", true);
  2882. }
  2883. updateEndDate(selectedDate);
  2884. });
  2885. // Event type change logic
  2886. $("#reasonforbooking").on("change", function () {
  2887. const selectedEventType = $(this).find("option:selected").text().trim();
  2888. window.isThreeDayBlock = ["Commercial", "State Govt Event", "Central Govt Event"].includes(selectedEventType);
  2889. $("#datepicker-container").datepicker("refresh");
  2890. });
  2891. }
  2892. function datepickerFormat(dateString) {
  2893. var dateObject = new Date(dateString);
  2894. var year = dateObject.getFullYear();
  2895. var month = (dateObject.getMonth() + 1).toString().padStart(2, "0");
  2896. var day = dateObject.getDate().toString().padStart(2, "0");
  2897. return `${year}-${month}-${day}`;
  2898. }
  2899. // Update the event listeners to include date inputs
  2900. $("#endDateInput").on("change", function () {
  2901. var starting = $("#startPeriodDropdown").val();
  2902. var ending = $("#endPeriodDropdown").val();
  2903. var startDate = $("#startDateInput").val();
  2904. var endDate = $("#endDateInput").val();
  2905. // Call validateSlot with updated parameters
  2906. validateSlot(starting, ending, startDate, endDate);
  2907. validateForm();
  2908. });
  2909. // Event listener for changes in startPeriodDropdown
  2910. $("#startPeriodDropdown").on("change", function () {
  2911. var starting = $(this).val();
  2912. var ending = $("#endPeriodDropdown").val();
  2913. var startDate = $("#startDateInput").val();
  2914. var endDate = $("#endDateInput").val();
  2915. // Call validateSlot with updated parameters
  2916. validateSlot(starting, ending, startDate, endDate);
  2917. validateForm();
  2918. });
  2919. // Event listener for changes in endPeriodDropdown
  2920. $("#endPeriodDropdown").on("change", function () {
  2921. var starting = $("#startPeriodDropdown").val();
  2922. var ending = $(this).val();
  2923. var startDate = $("#startDateInput").val();
  2924. var endDate = $("#endDateInput").val();
  2925. // Call validateSlot with updated parameters
  2926. // console.log("hiiii");
  2927. validateSlot(starting, ending, startDate, endDate);
  2928. validateForm();
  2929. });
  2930. function validateSlot(starting, ending, startDate, endDate) {
  2931. // Check if startDate is equal to endDate and starting is 2 and ending is 1
  2932. if (startDate === endDate && starting == 2 && ending == 1) {
  2933. Swal.fire({
  2934. icon: 'error',
  2935. title: 'Oops!',
  2936. text: "The starting slot cannot be set to Evening if the ending slot is Morning when the dates are the same.",
  2937. }).then(() => {
  2938. $("#startPeriodDropdown").val(1); // Reset startPeriodDropdown to 1
  2939. });
  2940. }
  2941. validateForm(); // Call validateForm to update form validation status
  2942. }
  2943. function validateForm() {
  2944. var startDate = $("#startDateInput").val();
  2945. var endDate = $("#endDateInput").val();
  2946. var startPeriod = $("#startPeriodDropdown").val();
  2947. var endPeriod = $("#endPeriodDropdown").val();
  2948. var reasonforbooking = $("#reasonforbooking").val();
  2949. if (startDate && endDate && startPeriod !== "0" && endPeriod !== "0") {
  2950. $(".next-step").prop("disabled", false);
  2951. } else {
  2952. $(".next-step").prop("disabled", true);
  2953. }
  2954. }
  2955. // Function to toggle visibility of mobileNoContainer based on usertypes selection
  2956. function handleUserTypeChange() {
  2957. const usertypes = document.getElementById('usertypes').value;
  2958. const mobileNoContainer = document.getElementById('mobileNoContainer');
  2959. if (usertypes === 'public') {
  2960. mobileNoContainer.style.display = 'block';
  2961. } else {
  2962. mobileNoContainer.style.display = 'none';
  2963. }
  2964. }
  2965. function reloadUserInformationForm() {
  2966. // Reset the user type dropdown to 'select'
  2967. $("#usertypes").val("select");
  2968. // Hide the mobile number container
  2969. $("#mobileNoContainer").hide();
  2970. document.getElementById("userInfoForm").reset();
  2971. }
  2972. // Function to handle initial page load and browser back navigation
  2973. document.addEventListener('DOMContentLoaded', function () {
  2974. handleUserTypeChange(); // Call to initially hide/show mobileNoContainer based on usertypes
  2975. });
  2976. // Add event listener for sendOTPButton click
  2977. document.getElementById('sendOTPButton').addEventListener('click', function (event) {
  2978. event.preventDefault();
  2979. checkMobileNo();
  2980. });
  2981. function checkMobileNo() {
  2982. var mobileNo = $("#mobileNumber").val().trim(); // Get and trim the mobile number input value
  2983. // Validate the length of the mobile number
  2984. if (mobileNo.length !== 10) {
  2985. Swal.fire({
  2986. title: "Invalid Mobile Number",
  2987. text: "Please enter a 10-digit mobile number.",
  2988. icon: "error",
  2989. confirmButtonText: "OK",
  2990. });
  2991. return; // Exit function if length is not valid
  2992. }
  2993. $.ajax({
  2994. type: "GET",
  2995. url: '/victoriahallbooking/user/api/counterbookinglimit',
  2996. data: {mobileNo: mobileNo},
  2997. success: function (statusResponse) {
  2998. // console.log("hiiii", statusResponse);
  2999. if (statusResponse === "deactive") {
  3000. Swal.fire({
  3001. title: "Account Deactivated",
  3002. text: "Please contact Admin to active.",
  3003. icon: "info",
  3004. showCancelButton: false,
  3005. confirmButtonText: "OK",
  3006. });
  3007. }
  3008. else if (statusResponse === "bookinglimitreached") {
  3009. // User status is pending, show SweetAlert
  3010. Swal.fire({
  3011. title: "Booking Limitation Reached",
  3012. text: "Sorry, you have reached your booking limit. You are allowed to book up to two times in a year.",
  3013. icon: "info",
  3014. showCancelButton: false,
  3015. confirmButtonText: "OK",
  3016. });
  3017. } else if (statusResponse === "checkmobilenoexists") {
  3018. // User status is not pending, proceed to check mobile number existence
  3019. // console.log("statusResponse===", statusResponse);
  3020. $.ajax({
  3021. type: "GET",
  3022. url: '/victoriahallbooking/user/api/checkMobileExits',
  3023. data: {mobileno: mobileNo},
  3024. success: function (mobileResponse) {
  3025. if (mobileResponse === "success") {
  3026. sendOTP(mobileNo);
  3027. } else {
  3028. var alertMessage = "This Mobile Number Is Not Registered! Please register.";
  3029. $('#otpForm').modal('hide'); // Hide OTP form modal
  3030. $('#loginModal').modal('hide');
  3031. Swal.fire({
  3032. title: "Registration Required",
  3033. html: alertMessage,
  3034. icon: "info",
  3035. showCancelButton: true,
  3036. confirmButtonText: "REGISTER",
  3037. customClass: {
  3038. container: 'custom-swal-container', // Add a custom class to the container
  3039. },
  3040. backdrop: true, // Enable backdrop to prevent clicks on the main popup
  3041. }).then((result) => {
  3042. if (result.isConfirmed) {
  3043. $("#registrationModal").modal('show')
  3044. }
  3045. });
  3046. }
  3047. },
  3048. error: function (errortxt) {
  3049. console.error(errortxt);
  3050. }
  3051. });
  3052. }
  3053. },
  3054. error: function (errortxt) {
  3055. console.error(errortxt);
  3056. }
  3057. });
  3058. }
  3059. function sendOTP(mobileNum) {
  3060. if (mobileNum != "" || mobileNum != undefined || mobileNum != null) {
  3061. mobileNo = mobileNum;
  3062. $("#mobilenotxt").html(mobileNo);
  3063. $.ajax({
  3064. type: "GET",
  3065. url: '/victoriahallbooking/user/api/sendOTP',
  3066. data: {'mobileNo': mobileNo, 'purpose': 'New User'},
  3067. success: function (bodyMessage) {
  3068. if (bodyMessage != "Error") {
  3069. $('#otpForm').modal({
  3070. backdrop: 'static',
  3071. keyboard: false
  3072. });
  3073. $('#otpForm').modal('show');
  3074. startCountdown();
  3075. } else {
  3076. alert("OTP Not Send!!!");
  3077. }
  3078. }
  3079. });
  3080. }
  3081. return false;
  3082. }
  3083. function startCountdown() {
  3084. var resendTimeout;
  3085. $("#resendlink").html('Please wait..<span id="countdown">60</span>s');
  3086. var countdown = $("#countdown");
  3087. var timeleft = 60;
  3088. countdown.text(timeleft);
  3089. resendTimeout = setInterval(function () {
  3090. timeleft--;
  3091. countdown.text(timeleft);
  3092. if (timeleft <= 0) {
  3093. clearInterval(resendTimeout);
  3094. $("#resendlink").html('<a href="#" id="resend-link" class="text-info" onclick="return sendOTP(mobileNo);">Resend OTP</a>');
  3095. }
  3096. }, 1000);
  3097. }
  3098. document.getElementById("backButton").addEventListener("click", function () {
  3099. document.getElementById("profileCard").style.display = "none";
  3100. document.getElementById("container").style.display = "block";
  3101. // Reload the user information form
  3102. reloadUserInformationForm();
  3103. });
  3104. document.getElementById("nextButton").addEventListener("click", function () {
  3105. document.getElementById("profileCard").style.display = "none";
  3106. document.getElementById("nextPageCard").style.display = "block";
  3107. });
  3108. /* document.getElementById("backToProfileButton").addEventListener("click", function () {
  3109. document.getElementById("nextPageCard").style.display = "none";
  3110. document.getElementById("profileCard").style.display = "block";
  3111. });*/
  3112. var verifyLogin = "";
  3113. function verifyOtp() {
  3114. var otpInputs = $('.otp-input');
  3115. var otpValue = '';
  3116. otpInputs.each(function () {
  3117. otpValue += $(this).val();
  3118. });
  3119. var mobileNoValue = $("#mobileNumber").val();
  3120. var aadharnumber = $("#aadharnumber").val();
  3121. $.ajax({
  3122. type: "GET",
  3123. url: '/victoriahallbooking/user/api/verifyOTP',
  3124. data: {
  3125. 'otp': otpValue,
  3126. 'mobileNo': mobileNoValue
  3127. },
  3128. dataType: 'text',
  3129. success: function (bodyMessage) {
  3130. if (bodyMessage.trim() == "Success") {
  3131. // console.log("OTP is Verified!!!");
  3132. $('#otpForm').modal('hide');
  3133. if (verifyLogin == "new") {
  3134. var formData = new FormData();
  3135. formData.append('mobileNo', mobileNoValue);
  3136. formData.append('aadharnumber', aadharnumber);
  3137. formData.append('name', $('#name').val());
  3138. formData.append('email', $('#email').val());
  3139. formData.append('doorNo', $('#doorNo').val());
  3140. formData.append('street', $('#street').val());
  3141. formData.append('area', $('#area').val());
  3142. formData.append('location', $('#location').val());
  3143. formData.append('pinCode', $('#pincode').val());
  3144. var photoFile = $('#userPhoto')[0].files[0];
  3145. if (photoFile) {
  3146. formData.append('userPhoto', photoFile);
  3147. }
  3148. $.ajax({
  3149. type: "POST",
  3150. url: '/victoriahallbooking/user/api/newcounterregistrationform',
  3151. data: formData,
  3152. processData: false,
  3153. contentType: false,
  3154. success: function (response) {
  3155. // console.log("Registration successful:", response);
  3156. // alert(response.message);
  3157. showProfileDetailsInCard();
  3158. document.getElementById("profileCard").style.display = "block";
  3159. document.getElementById("container").style.display = "none";
  3160. },
  3161. error: function (jqXHR, textStatus, errorThrown) {
  3162. // console.log("Error registering user:", textStatus, errorThrown);
  3163. alert("Registration failed. Please try again.");
  3164. }
  3165. });
  3166. } else {
  3167. // If already logged in, retrieve user details and display them
  3168. $.ajax({
  3169. type: "GET",
  3170. url: '/victoriahallbooking/user/api/getUserDetails',
  3171. data: {'mobileNo': mobileNoValue},
  3172. success: function (userDetails) {
  3173. // console.log("User details retrieved:", userDetails);
  3174. showexistedProfileDetailsInCard(userDetails); // Pass the user details to the function
  3175. },
  3176. error: function (jqXHR, textStatus, errorThrown) {
  3177. // console.log("Error retrieving user details:", textStatus, errorThrown);
  3178. }
  3179. });
  3180. }
  3181. } else {
  3182. $("#otperror").html("OTP is Incorrect!!!");
  3183. }
  3184. },
  3185. error: function () {
  3186. // console.log("Error verifying OTP");
  3187. }
  3188. });
  3189. return false;
  3190. }
  3191. $('.otp-input').on('keyup', function (e) {
  3192. var $this = $(this);
  3193. if ($this.val().length === 1) {
  3194. $this.next('.otp-input').focus();
  3195. }
  3196. if ($this.val().length === 0) {
  3197. $this.prev('.otp-input').focus();
  3198. }
  3199. });
  3200. function validatePensioner() {
  3201. var pensionerId = $('#pensionerId').val();
  3202. var pensionerName = $('#pensionername').val();
  3203. var mobileNo = $('#mobileno').val();
  3204. var pinCode = $('#pincode').val();
  3205. // Validate mobile number
  3206. if (!/^\d+$/.test(mobileNo) || mobileNo.length !== 10) {
  3207. alert("Mobile number must be a 10-digit number.");
  3208. return false;
  3209. }
  3210. // Validate pincode
  3211. if (!/^\d+$/.test(pinCode) || pinCode.length !== 6) {
  3212. alert("Pincode must be a 6-digit number.");
  3213. return false;
  3214. }
  3215. $.ajax({
  3216. url: 'https://erp.chennaicorporation.gov.in/pgr/external/mobileservice',
  3217. type: 'GET',
  3218. data: {
  3219. serviceId: 'getPensionerDetailsList',
  3220. pensionerId: pensionerId
  3221. },
  3222. success: function (response) {
  3223. // Assuming response is in JSON format
  3224. var pensionerDetails = response.PensionerDetailsResult;
  3225. var message = response.Message;
  3226. // Check if the pensioner details match the entered data
  3227. var isValid = false;
  3228. for (var i = 0; i < pensionerDetails.length; i++) {
  3229. if (pensionerDetails[i].Pensioner_Code === pensionerId && pensionerDetails[i].Name === pensionerName) {
  3230. isValid = true;
  3231. break;
  3232. }
  3233. }
  3234. if (isValid) {
  3235. $('#validationResult').html('Pensioner validated successfully.');
  3236. } else {
  3237. $('#validationResult').html('Invalid pensioner ID or name.');
  3238. }
  3239. },
  3240. error: function (xhr, status, error) {
  3241. console.error('Error:', error);
  3242. $('#validationResult').html('Failed to validate pensioner. Please try again later.');
  3243. }
  3244. });
  3245. }
  3246. document.addEventListener("DOMContentLoaded", function () {
  3247. // Function to fetch employee data from the URL
  3248. function fetchEmployeeData() {
  3249. const url = "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice?serviceId=getEmployeeDetail&EmployeeID=731650";
  3250. fetch(url)
  3251. .then(response => response.json())
  3252. .then(data => {
  3253. // Get input field values
  3254. const employeeId = document.getElementById("employeeId").value;
  3255. const employeeName = document.getElementById("employeename").value;
  3256. const department = document.getElementById("department").value;
  3257. const designation = document.getElementById("designation").value;
  3258. // Compare fetched data with input field values
  3259. if (data.EmployeeID === employeeId && data.EmployeeName === employeeName && data.Department === department && data.Designation === designation) {
  3260. alert("Data validated successfully!");
  3261. } else {
  3262. alert("Error: Data validation failed!");
  3263. }
  3264. })
  3265. .catch(error => {
  3266. console.error("Error fetching employee data:", error);
  3267. alert("Error: Unable to fetch employee data. Please try again later.");
  3268. });
  3269. }
  3270. // Add event listener for button click
  3271. // document.getElementById("validateButton").addEventListener("click", fetchEmployeeData);
  3272. });
  3273. function validateUserType() {
  3274. var usertype = $("#userType").val();
  3275. if (usertype == "PUBLIC") {
  3276. validateNumber();
  3277. return false;
  3278. }
  3279. else if (usertype == "GCC_EMPLOYEE") {
  3280. var employeeId = $("#employeeId").val();
  3281. // console.log(employeeId);
  3282. $.ajax({
  3283. type: "GET",
  3284. url: '/victoriahallbooking/user/api/EmployeeDetails',
  3285. data: {'employeeId': $("#employeeId").val()},
  3286. success: function (response) {
  3287. // console.log(response);
  3288. if (response.ResultStatus == false) {
  3289. var alertMessage = "The Employee Id Not Found! " + employeeId;
  3290. Swal.fire({
  3291. title: "Oops",
  3292. html: alertMessage,
  3293. icon: "info",
  3294. showCancelButton: false,
  3295. confirmButtonText: "Ok"
  3296. });
  3297. return false;
  3298. } else if (response.ResultStatus) {
  3299. $("#employeename").val(response.EmployeeDetailsResult[0].name);
  3300. validateNumber();
  3301. }
  3302. },
  3303. error: function () {
  3304. // console.log("Error");
  3305. }
  3306. });
  3307. return false;
  3308. }
  3309. else if (usertype == "FAMILYPENSIONER") {
  3310. $.ajax({
  3311. type: "GET",
  3312. url: '/victoriahallbooking/user/api/FamilyPensionerDetails',
  3313. data: {'id': $("#familypensionerId").val()},
  3314. success: function (response) {
  3315. if (response.mobileNo) {
  3316. $("#mobileno").val(response.mobileNo);
  3317. validateNumber();
  3318. } else {
  3319. var alertMessage = "The Pensioner Id Not Found!";
  3320. Swal.fire({
  3321. title: "Oops",
  3322. html: alertMessage,
  3323. icon: "info",
  3324. showCancelButton: false,
  3325. confirmButtonText: "Ok"
  3326. });
  3327. }
  3328. },
  3329. error: function (xhr, status, error) {
  3330. console.error(xhr.responseText);
  3331. }
  3332. });
  3333. return false;
  3334. }
  3335. else if (usertype == "PENSIONER") {
  3336. $.ajax({
  3337. type: "GET",
  3338. url: '/victoriahallbooking/user/api/PensionerDetails',
  3339. data: {'id': $("#pensionerId").val()},
  3340. success: function (response) {
  3341. if (response.mobileNo) {
  3342. $("#mobileno").val(response.mobileNo);
  3343. validateNumber();
  3344. } else {
  3345. var alertMessage = "The Pensioner Id Not Found!";
  3346. Swal.fire({
  3347. title: "Oops",
  3348. html: alertMessage,
  3349. icon: "info",
  3350. showCancelButton: false,
  3351. confirmButtonText: "Ok"
  3352. });
  3353. }
  3354. },
  3355. error: function (xhr, status, error) {
  3356. console.error(xhr.responseText);
  3357. }
  3358. });
  3359. return false;
  3360. }
  3361. return false;
  3362. }
  3363. function validateNumber() {
  3364. var mobileNo = $("#mobileno").val();
  3365. $.ajax({
  3366. type: "GET",
  3367. url: '/victoriahallbooking/user/api/checkMobileExits',
  3368. data: {'mobileno': mobileNo},
  3369. success: function (bodyMessage) {
  3370. if (bodyMessage == "success") {
  3371. var alertMessage = "This Mobile Number Is Already Registered!</a>";
  3372. $('#otpForm').modal('hide');
  3373. //$('#registrationModal').modal('show');
  3374. Swal.fire({
  3375. title: "Mobile Number exist",
  3376. html: alertMessage,
  3377. icon: "info",
  3378. showCancelButton: false,
  3379. confirmButtonText: "Ok"
  3380. });
  3381. return false;
  3382. } else {
  3383. $('#registrationModal').modal('hide');
  3384. verifyLogin = "new";
  3385. sendOTP(mobileNo);
  3386. return false;
  3387. }
  3388. },
  3389. error: function (errortxt) {
  3390. console.error(errortxt);
  3391. }
  3392. });
  3393. return false;
  3394. }
  3395. function showProfileDetailsInCard() {
  3396. $.ajax({
  3397. url: '/victoriahallbooking/user/api/getuserforcounter',
  3398. type: 'GET',
  3399. data: {
  3400. 'userId': 0 // Use session user ID if not provided
  3401. },
  3402. success: function (response) {
  3403. // Check if the response contains expected user details
  3404. if (response && response.name) {
  3405. $('#p_name_card').val(response.name);
  3406. $('#p_email_card').val(response.email);
  3407. $('#p_mobnum_card').val(response.mobileNo);
  3408. $('#p_doornum_card').val(response.doorNo);
  3409. $('#p_area_card').val(response.area);
  3410. $('#p_location_card').val(response.location);
  3411. $('#p_pincode_card').val(response.pinCode);
  3412. $('#p_userstatus_card').val(response.userstatus);
  3413. $('#p_image_card').attr('src', response.profilephoto);
  3414. $('#profileCard').show(); // Show the profile card
  3415. $('#container').hide(); // Hide the container
  3416. } else {
  3417. console.error("Profile details not found in response.");
  3418. // Optionally, you can show an error message to the user
  3419. }
  3420. },
  3421. error: function (xhr, status, error) {
  3422. console.error("Error occurred while fetching user details:", xhr.responseText);
  3423. // Optionally, you can show an error message to the user
  3424. }
  3425. });
  3426. }
  3427. function showexistedProfileDetailsInCard(userDetails) {
  3428. // Check if user details are provided
  3429. if (userDetails && userDetails.name) {
  3430. $('#p_name_card').val(userDetails.name);
  3431. $('#p_email_card').val(userDetails.email);
  3432. $('#p_mobnum_card').val(userDetails.mobileNo);
  3433. $('#p_doornum_card').val(userDetails.doorNo);
  3434. $('#p_area_card').val(userDetails.area);
  3435. $('#p_location_card').val(userDetails.location);
  3436. $('#p_pincode_card').val(userDetails.pinCode);
  3437. $('#p_userstatus_card').val(userDetails.userstatus);
  3438. $('#p_image_card').attr('src', userDetails.profilephoto);
  3439. $('#profileCard').show(); // Show the profile card
  3440. $('#container').hide(); // Hide the container
  3441. } else {
  3442. console.error("Profile details not found in response.");
  3443. // Optionally, you can show an error message to the user
  3444. }
  3445. }
  3446. // Attach CSS styles for error messages dynamically
  3447. $('head').append('<style>.error-message { color: red; font-size: 12px; margin-top: 5px; }</style>');
  3448. $('.file-upload-field').on('change', function () {
  3449. const file = this.files[0];
  3450. if (file && file.size > 2097152) { // size is in bytes
  3451. $(this).addClass('error'); // Add error class
  3452. $(this).after('<div class="error-message">File size should not exceed 2 MB</div>').next('.error-message').addClass('error-text'); // Display error message with error-text class
  3453. this.value = ''; // Reset the file input
  3454. } else {
  3455. $(this).removeClass('error'); // Remove error class
  3456. $(this).next('.error-message').remove(); // Remove error message if present
  3457. }
  3458. });
  3459. document.getElementById("bankAccNo").addEventListener("input", function (e) {
  3460. var value = e.target.value;
  3461. if (!/^\d*$/.test(value)) {
  3462. e.target.setCustomValidity("Please enter only Numbers without space.");
  3463. } else {
  3464. e.target.setCustomValidity("");
  3465. }
  3466. });
  3467. document.getElementById("ddNumber").addEventListener("input", function (e) {
  3468. var value = e.target.value;
  3469. if (!/^\d*$/.test(value)) {
  3470. e.target.setCustomValidity("Please enter only Numbers without space.");
  3471. } else {
  3472. e.target.setCustomValidity("");
  3473. }
  3474. });
  3475. document.getElementById("bankName").addEventListener("input", function (e) {
  3476. var value = e.target.value;
  3477. if (!/^[A-Za-z\s-]*$/.test(value)) {
  3478. e.target.setCustomValidity("Please enter only Alphabets letters.");
  3479. } else {
  3480. e.target.setCustomValidity("");
  3481. }
  3482. });
  3483. function paymentForCounter() {
  3484. var userId = document.getElementById("userId").value;
  3485. var bookingId = document.getElementById("bookingId").value;
  3486. paymentStart(userId, bookingId, true);
  3487. }
  3488. // Newly added for calendar
  3489. function handleBookingStatus(bookingStatus, defaultMessage) {
  3490. if (bookingStatus[2]) {
  3491. return [true, "highlight-blue disabled", "GCC Blocked"];
  3492. } /*else if (bookingStatus[3]) {
  3493. return [true, "highlight-lightpink disabled", "Temporary Blocked"];
  3494. } */else if (bookingStatus[0] && bookingStatus[1]) {
  3495. return [true, "highlight-pink disabled", "Slot Occupied"];
  3496. } else if (bookingStatus[0] && !bookingStatus[1]) {
  3497. return [true, "highlight-yellow", "Evening Slot Available"];
  3498. } else if (!bookingStatus[0] && bookingStatus[1]) {
  3499. return [true, "highlight-violet", "Only Morning Slot Available"];
  3500. }
  3501. return [true, "highlight-greens", defaultMessage];
  3502. }
  3503. // Helper function: Handles logic after 2 PM
  3504. function handleAfter2PM(bookingStatus) {
  3505. if (bookingStatus[2]) {
  3506. return [true, "highlight-blue disabled", "GCC Blocked"];
  3507. } else if (bookingStatus[0] || bookingStatus[1]) {
  3508. return [true, "highlight-pink disabled", "Slot Occupied"];
  3509. }
  3510. return [false, "highlight-disabled", "Not Allowed to Book"];
  3511. }
  3512. // Helper function: Handles morning slots between 6 AM and 2 PM
  3513. function handleMorningSlots(bookingStatus) {
  3514. if (bookingStatus[2]) {
  3515. return [true, "highlight-blue disabled", "GCC Blocked"];
  3516. } else if (bookingStatus[0] && bookingStatus[1]) {
  3517. return [true, "highlight-pink disabled", "Slot Occupied"];
  3518. } else if (bookingStatus[0] && !bookingStatus[1]) {
  3519. return [true, "highlight-yellow", "Evening Slot Available"];
  3520. } else if (!bookingStatus[0] && bookingStatus[1]) {
  3521. return [false, "highlight-disabled", "Slot Occupied"];
  3522. }
  3523. return [true, "highlight-yellow", "Evening Slot Available"];
  3524. }
  3525. </script>
  3526. </body>
  3527. </html>