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.

3475 lines
104 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. <!-- Registration Form Fields -->
  814. <div class="row">
  815. <div class="col-sm-4">
  816. <div class="form-group">
  817. <label for="name">Name:<span class="required-field">*</span></label>
  818. <input type="text" class="form-control" id="name" name="name"
  819. placeholder="First Name" required>
  820. </div>
  821. </div>
  822. <div class="col-sm-4">
  823. <div class="form-group">
  824. <label for="mobileno">Mobile Number:<span
  825. class="required-field">*</span></label>
  826. <input type="text" class="form-control" id="mobileno" name="mobileNo"
  827. placeholder="Mobile No" minlength="10" maxlength="10"
  828. pattern="[0-9]{10}"
  829. onkeypress="return event.charCode >= 48 && event.charCode <= 57"
  830. required>
  831. </div>
  832. </div>
  833. <div class="col-sm-4">
  834. <div class="form-group">
  835. <label for="userPhoto">Profile Photo:</label>
  836. <input type="file" class="form-control hall-image file-upload-field"
  837. id="userPhoto" name="userPhoto"
  838. accept="image/jpeg, image/png, image/gif">
  839. </div>
  840. </div>
  841. </div>
  842. <div class="row">
  843. <div class="col-sm-4">
  844. <div class="form-group">
  845. <label for="email">Mail:</label>
  846. <input type="email" class="form-control" id="email" name="email"
  847. placeholder="email" maxlength="255">
  848. </div>
  849. </div>
  850. <div class="col-sm-4">
  851. <div class="form-group">
  852. <label for="doorNo">Door No:<span
  853. class="required-field">*</span></label>
  854. <input type="text" class="form-control" id="doorNo" name="doorNo"
  855. placeholder="doorNo" required>
  856. </div>
  857. </div>
  858. <div class="col-sm-4">
  859. <div class="form-group">
  860. <label for="street">Street:<span class="required-field">*</span></label>
  861. <input type="text" class="form-control" id="street" name="street"
  862. placeholder="street" required>
  863. </div>
  864. </div>
  865. </div>
  866. <div class="row">
  867. <div class="col-sm-4">
  868. <div class="form-group">
  869. <label for="area">Area:<span class="required-field">*</span></label>
  870. <input type="area" class="form-control" id="area" name="area"
  871. placeholder="area" required>
  872. </div>
  873. </div>
  874. <div class="col-sm-4">
  875. <div class="form-group">
  876. <label for="location">Location:<span
  877. class="required-field">*</span></label>
  878. <input type="text" class="form-control" id="location" name="location"
  879. placeholder="location" required>
  880. </div>
  881. </div>
  882. <div class="col-sm-4">
  883. <div class="form-group">
  884. <label for="pincode">Pincode:<span
  885. class="required-field">*</span></label>
  886. <input type="text" class="form-control" id="pincode" name="pinCode"
  887. placeholder="pincode" minlength="6" maxlength="6" pattern="[0-9]{6}"
  888. onkeypress="return event.charCode >= 48 && event.charCode <= 57"
  889. required>
  890. </div>
  891. </div>
  892. </div>
  893. <div class="row">
  894. <div class="col-sm-4" style="margin-left:0%">
  895. <div class="form-group">
  896. <label for="userType">User Type:<span
  897. class="required-field">*</span></label>
  898. <select class="form-control" id="userType" name="usertype"
  899. placeholder="User Type">
  900. <option value="PUBLIC">General Public</option>
  901. </select>
  902. </div>
  903. </div>
  904. <div class="hidden" id="employeeFields" style="display:none">
  905. <div class="row">
  906. <div class="col-sm-3">
  907. <div class="form-group">
  908. <label for="employeeId">Employee ID<span
  909. class="required">*</span>:</label>
  910. <input type="text" class="form-control" id="employeeId"
  911. name="employeeId" placeholder="Employee ID">
  912. </div>
  913. </div>
  914. <div class="col-sm-3">
  915. <div class="form-group">
  916. <label for="employeename">Employee Name<span
  917. class="required">*</span>:</label>
  918. <input type="text" class="form-control" id="employeename"
  919. name="employeename" placeholder="Employee Name">
  920. </div>
  921. </div>
  922. </div>
  923. </div>
  924. <div class="hidden" id="pensionerFields" style="display:none">
  925. <div class="row">
  926. <div class="col-sm-6">
  927. <label for="pensionerId">Pensioner ID<span
  928. class="required">*</span>:</label>
  929. <input type="text" class="form-control" id="pensionerId"
  930. name="pensionerId" placeholder="Pensioner ID">
  931. </div>
  932. <div class="col-sm-6">
  933. <label for="pensionername">Pensioner Name<span
  934. class="required">*</span>:</label>
  935. <input type="text" class="form-control" id="pensionername"
  936. name="pensionername" placeholder="Pensioner Name" disabled>
  937. </div>
  938. </div>
  939. <div id="validationResult"></div>
  940. </div>
  941. <div class="hidden" id="familypensionerFields" style="display:none">
  942. <div class="row">
  943. <div class="col-sm-6">
  944. <label for="familypensionerId">Pensioner ID<span
  945. class="required">*</span>:</label>
  946. <input type="text" class="form-control" id="familypensionerId"
  947. name="pensionerId" placeholder="Pensioner ID">
  948. </div>
  949. <div class="col-sm-6">
  950. <label for="familypensionername">Pensioner Name<span
  951. class="required">*</span>:</label>
  952. <input type="text" class="form-control" id="familypensionername"
  953. name="familypensionername" placeholder="Pensioner Name"
  954. disabled>
  955. </div>
  956. </div>
  957. <div id="validationResult"></div>
  958. </div>
  959. </div>
  960. <div class="form-row">
  961. <div class="col text-center">
  962. <button type="submit" class="btn btn-primary"
  963. style="background-color: #2c726c !important">Submit</button>
  964. </div>
  965. </div>
  966. </form>
  967. </div>
  968. </div>
  969. </div>
  970. </div>
  971. </div>
  972. <!--Profile modal-->
  973. <div class="card" id="profileCard" tabindex="-1" aria-labelledby="profileCardLabel"
  974. style="display: none; margin-top: 35px; margin-left: 25px; margin-right: 25px;" aria-hidden="true">
  975. <div class="block-header bg-primary-dark">
  976. <h5 class="modal-title" id="profileCardLabel" style="color: white;">User Details</h5>
  977. </div>
  978. <div class="card-body">
  979. <div class="row">
  980. <div class="col-sm-4">
  981. <div
  982. 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);">
  983. <img id="p_image_card" name="p_image_card" style="width: 100%; height: 100%;" alt="-">
  984. </div>
  985. </div>
  986. <div class="col-sm-8">
  987. <div class="row">
  988. <div class="col-sm-6">
  989. <label for="p_name_card">Name:</label>
  990. <input type="text" class="form-control" id="p_name_card" readonly>
  991. </div>
  992. <div class="col-sm-6">
  993. <label for="p_email_card">Email:</label>
  994. <input type="text" class="form-control" id="p_email_card" readonly>
  995. </div>
  996. <div class="col-sm-6">
  997. <label for="p_mobnum_card">Mobile No:</label>
  998. <input type="text" class="form-control" id="p_mobnum_card" readonly>
  999. </div>
  1000. <div class="col-sm-6">
  1001. <label for="p_doornum_card">Door no:</label>
  1002. <input type="text" class="form-control" id="p_doornum_card" readonly>
  1003. </div>
  1004. <div class="col-sm-6">
  1005. <label for="p_area_card">Area:</label>
  1006. <input type="text" class="form-control" id="p_area_card" readonly>
  1007. </div>
  1008. <div class="col-sm-6">
  1009. <label for="p_location_card">Location:</label>
  1010. <input type="text" class="form-control" id="p_location_card" readonly>
  1011. </div>
  1012. <div class="col-sm-6">
  1013. <label for="p_pincode_card">Pincode:</label>
  1014. <input type="text" class="form-control" id="p_pincode_card" readonly>
  1015. </div>
  1016. <div class="col-sm-6">
  1017. <label for="p_userstatus_card">User Status:</label>
  1018. <input type="text" class="form-control" id="p_userstatus_card" readonly>
  1019. </div>
  1020. </div>
  1021. </div>
  1022. </div>
  1023. <div class="row mt-3">
  1024. <div class="col-sm-6">
  1025. <button type="button" class="btn btn-secondary" id="backButton">Back</button>
  1026. </div>
  1027. <div class="col-sm-6 text-end">
  1028. <button type="button" class="btn btn-primary" id="nextButton">Next</button>
  1029. </div>
  1030. </div>
  1031. </div>
  1032. </div>
  1033. <!--Hallbooking Form-->
  1034. <div class="card" id="nextPageCard" tabindex="-1" aria-labelledby="nextPageCardLabel"
  1035. style="display: none; margin-top: 35px; margin-left: 25px; margin-right: 25px;" aria-hidden="true">
  1036. <div class="block-header bg-primary-dark">
  1037. <h5 class="modal-title" id="nextPageCardLabel" style="color:white">Hall Booking Details</h5>
  1038. </div>
  1039. <div class="card-body">
  1040. <br>
  1041. <div class="progress px-1" style="height: 3px;">
  1042. <div class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0"
  1043. aria-valuemin="0" aria-valuemax="100">
  1044. </div>
  1045. </div>
  1046. <div class="step-container d-flex justify-content-between">
  1047. <div class="step-circle" onclick="displayStep(1)">1</div>
  1048. <div class="step-circle" onclick="displayStep(2)">2</div>
  1049. <div class="step-circle" onclick="displayStep(3)">3</div>
  1050. <div class="step-circle" onclick="displayStep(4)">4</div>
  1051. </div>
  1052. </br>
  1053. <form action="javascript:void(0);" id="booking" method="post" enctype="multipart/form-data"
  1054. onsubmit="return saveCounterBooking()">
  1055. <div class="step step-1">
  1056. <div class="container custom-container"
  1057. 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;">
  1058. <!-- Updated inline styles -->
  1059. <div class="row justify-content-center">
  1060. <div class="col-sm-6 col-md-6 col-lg-6">
  1061. <label class="form-check-label" for="selecthall">Select Hall:</label>
  1062. <select id="selecthall" class="form-control" name="hallId" required
  1063. onchange="toggleHallDetailsContainer()">
  1064. <option value="">Select a hall</option>
  1065. </select>
  1066. </div>
  1067. </div>
  1068. <br>
  1069. <!-- Main content row -->
  1070. <div id="hallDetailsContainer" style="display: none;">
  1071. <!-- Initially hidden -->
  1072. <div class="row">
  1073. <!-- Hall Images Carousel -->
  1074. <div class="col-md-6 col-lg-6 col-sm-6">
  1075. <h6>Hall Images:</h6>
  1076. <br>
  1077. <div id="hallImagesCarousel" class="carousel slide" data-ride="carousel">
  1078. <div class="carousel-inner">
  1079. <div class="carousel-item active">
  1080. <img id="hallImage" class="d-block w-100" alt="Hall Image">
  1081. </div>
  1082. </div>
  1083. <a class="carousel-control-prev" href="#hallImagesCarousel"
  1084. role="button" data-slide="prev">
  1085. <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  1086. <span class="sr-only">Previous</span>
  1087. </a>
  1088. <a class="carousel-control-next" href="#hallImagesCarousel"
  1089. role="button" data-slide="next">
  1090. <span class="carousel-control-next-icon" aria-hidden="true"></span>
  1091. <span class="sr-only">Next</span>
  1092. </a>
  1093. </div>
  1094. </div>
  1095. <div class="col-md-6 col-lg-6 col-sm-6">
  1096. <div id="datepicker-container" class="fixedcontainer"></div>
  1097. <div class="row">
  1098. <div class="col col-lg-2 col-sm-2 col-md-2">
  1099. <button type="button" class="btn btn-primary btn-square-md"
  1100. style="background-color:#008000;"></button>
  1101. <span style="margin-left: 21px;">Day<br>
  1102. (Available)</span>
  1103. </div>
  1104. <div class="col col-lg-2 col-sm-2 col-md-2">
  1105. <button type="button" class="btn btn-primary btn-square-md"
  1106. style="background-color: #ac2bac;"></button>
  1107. <span style="margin-left: 14px;">Morning <br>
  1108. &nbsp;&nbsp;(Available)</span>
  1109. </div>
  1110. <div class="col col-lg-2 col-sm-2 col-md-2">
  1111. <button type="button" class="btn btn-primary btn-square-md"
  1112. style="background-color:#FFEA00;"></button>
  1113. <span style="margin-left: 14px;">Evening<br>
  1114. &nbsp;&nbsp;(Available)</span>
  1115. </div>
  1116. <div class="col col-lg-2 col-sm-2 col-md-2">
  1117. <button type="button" class="btn btn-primary btn-square-md"
  1118. style="background-color: red;"></button>
  1119. <span style="margin-left: 14px;">Not Available</span>
  1120. </div>
  1121. </div>
  1122. </div>
  1123. <br>
  1124. <!-- Hall Details -->
  1125. <div class="col-md-6 col-lg-6 col-sm-6">
  1126. <div id="hallDetails">
  1127. <br>
  1128. <h6>Hall Details:</h6>
  1129. <p>Zone: <span id="zone"></span></p>
  1130. <p>Division: <span id="division"></span>
  1131. </p>
  1132. <p>Address: <span id="address"></span>
  1133. </p>
  1134. <p>Landmark: <span id="landmark"></span>
  1135. </p>
  1136. <p>Seating Capacity: <span id="seatingCapacity"></span></p>
  1137. <p>CareTaker Number: <span id="caretakerNumber"></span></p>
  1138. </div>
  1139. </div>
  1140. <br>
  1141. <!-- Amount Details -->
  1142. <div class="col-md-6 col-lg-6 col-sm-6">
  1143. <div id="amountDetails">
  1144. <br>
  1145. <h6>Amount Details:</h6>
  1146. <p>Security Deposit: Rs <span id="rentAmount"></span></p>
  1147. <p>Full Day Rent: Rs <span id="fullDayAmount"></span></p>
  1148. <p>Half Day Rent: Rs <span id="halfDayAmount"></span></p>
  1149. <p>GST: <span id="gst"></span>%</p>
  1150. <p>EB for 1 Unit: Rs <span id="ebunit"></span></p>
  1151. <input type="hidden" id="depositAmount" name="depositamount"
  1152. value="100">
  1153. <input type="hidden" id="hallamount" name="hallamount" value="100">
  1154. </div>
  1155. </div>
  1156. </div>
  1157. <div class="row">
  1158. <div class="col-md-12 col-sm-12 col-lg-12">
  1159. <!-- Center align the button -->
  1160. <button type="button" class="btn btn-primary next-step"
  1161. style="background-color: #016d6f; color: white;float: right;">Book
  1162. & Continue</button>
  1163. </div>
  1164. </div>
  1165. </div>
  1166. </div>
  1167. </div>
  1168. <div class="step step-2">
  1169. <div class="container custom-container"
  1170. style=" padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); background-color: #FFFFFF; border: 1px solid #CCCCCC;">
  1171. <!-- Updated inline styles -->
  1172. <div class="mb-3">
  1173. <div class="row">
  1174. <div class="col-md-12 col-lg-12 col-sm-12">
  1175. <table class="table table-bordered">
  1176. <tbody>
  1177. <tr>
  1178. <td><strong>Hall Name:</strong>
  1179. <span id="hallNameDisplayStep2"></span>
  1180. </td>
  1181. <td><strong>Zone: </strong>
  1182. <span id="zoneStep2"></span>
  1183. </td>
  1184. <td><strong>Division: </strong>
  1185. <span id="divisionStep2"></span>
  1186. </td>
  1187. </tr>
  1188. </tbody>
  1189. </table>
  1190. </div>
  1191. <div class="row">
  1192. <div class="col col-lg-3 col-md-3 col-sm-3" style="display: flex; ">
  1193. <button type="button" class="btn btn-primary btn-square-md"
  1194. style="background-color:#008000;"></button>
  1195. <span style="margin-left: 10px;">Day(Available)</span>
  1196. </div>
  1197. <div class="col col-lg-3 col-md-3 col-sm-3" style="display: flex; ">
  1198. <button type="button" class="btn btn-primary btn-square-md"
  1199. style="background-color: #ac2bac;"></button>
  1200. <span style="margin-left: 10px;">Morning(Available)</span>
  1201. </div>
  1202. <div class="col col-lg-3 col-md-3 col-sm-3" style="display: flex; ">
  1203. <button type="button" class="btn btn-primary btn-square-md"
  1204. style="background-color:#FFEA00;"></button>
  1205. <span style="margin-left: 10px;">Evening(Available)</span>
  1206. </div>
  1207. <div class="col col-lg-3 col-md-3 col-sm-3" style="display: flex; ">
  1208. <button type="button" class="btn btn-primary btn-square-md"
  1209. style="background-color: red;"></button>
  1210. <span style="margin-left: 26px;">Not Available <br>
  1211. </span>
  1212. </div>
  1213. </div>
  1214. <div class="col-sm-4 col-lg-4 col-md-4">
  1215. <label for="startDateInput">Start Date:</label>
  1216. <!-- Input field for start date -->
  1217. <input type="text" id="startDateInput" name="startDate"
  1218. class="date-input form-control" style="background-color:white" readonly
  1219. required>
  1220. </div>
  1221. <div class="col-sm-4 col-lg-4 col-md-4">
  1222. <label for="endDateInput">End Date:</label>
  1223. <select id="endDateInput" name="endDate" class="form-control" disabled>
  1224. <option value="0">Select</option>
  1225. </select>
  1226. </div>
  1227. <div class="col-sm-4 col-lg-4 col-md-4">
  1228. <label for="numDaysCount">Number of
  1229. Days:</label>
  1230. <input class="form-control" id="numDaysCount" name="days" value=""
  1231. style="background-color: white;" readonly>
  1232. </div>
  1233. <div class="col-sm-4 col-lg-4 col-md-4">
  1234. <label for="startPeriodDropdown">Start
  1235. Period:</label>
  1236. <select id="startPeriodDropdown" name="startingSlot" class="form-control"
  1237. required>
  1238. <option value="0">select</option>
  1239. <option value="1">Morning (6:00
  1240. AM)</option>
  1241. <option value="2">Evening (2:00
  1242. PM)</option>
  1243. </select>
  1244. </div>
  1245. <div class="col-sm-4 col-lg-4 col-md-4">
  1246. <label>End
  1247. Period:</label>
  1248. <select id="endPeriodDropdown" name="endingSlot" class="form-control"
  1249. required>
  1250. <option value="0">select</option>
  1251. <option value="1">Morning (2:00
  1252. PM)</option>
  1253. <option value="2">Evening (10:00
  1254. PM)</option>
  1255. </select>
  1256. </div>
  1257. </div>
  1258. <br>
  1259. <div class="row">
  1260. <div class="col-md-12 col-lg-12 col-sm-12 text-center">
  1261. <!-- Center align the button -->
  1262. <button type="button" class="btn btn-primary prev-step"
  1263. style="background-color: #016d6f; color: white;float: left;">Previous</button>
  1264. <button type="button" class="btn btn-warning reset-step"
  1265. style=" background-color: orangered; color: white; margin: auto;">Reset</button>
  1266. <button type="button" class="btn btn-primary next-step"
  1267. style="background-color: #016d6f; color: white; float: right;">Next</button>
  1268. </div>
  1269. </div>
  1270. </div>
  1271. </div>
  1272. </div>
  1273. <div class="step step-3">
  1274. <!-- Step 3 form fields here -->
  1275. <div class="container custom-container"
  1276. style="padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); background-color: #FFFFFF; border: 1px solid #CCCCCC;">
  1277. <div class="mb-3">
  1278. <div class="block-content block-content-full ">
  1279. <div class="card-body">
  1280. <div class="col-md-12 col-sm-12 col-lg-12">
  1281. <table class="table table-bordered">
  1282. <tbody>
  1283. <tr>
  1284. <td><strong>Hall
  1285. Name:</strong><span
  1286. id="hallNameDisplayStep3"></span>
  1287. </td>
  1288. <td><strong>Zone:
  1289. </strong><span id="zoneStep3"></span>
  1290. </td>
  1291. <td><strong>Division:
  1292. </strong><span id="divisionStep3"></span>
  1293. </td>
  1294. </tr>
  1295. </tbody>
  1296. </table>
  1297. <input type="hidden" id="userId" name="userId">
  1298. <div class="col-sm-4 col-lg-4 col-md-4">
  1299. <label class="form-check-label" for="reasonforbooking">Reason
  1300. for
  1301. Booking</label>
  1302. <select type="text" class="form-control" id="reasonforbooking"
  1303. name="reasonId" required>
  1304. </select>
  1305. </div>
  1306. <br>
  1307. <div id="reasonFieldsContainer">
  1308. </div>
  1309. <input type="hidden" name="bookingId" id="bookingId" value="0">
  1310. </div>
  1311. </div>
  1312. <div class="row">
  1313. <div class="col-md-12 col-lg-12 col-sm-12 text-center">
  1314. <!-- Center align the button -->
  1315. <button type="button" class="btn btn-primary prev-step"
  1316. style="background-color: #016d6f; color: white; float: left;">Previous</button>
  1317. <button type="button" class="btn btn-warning reset-step"
  1318. style="background-color: orangered; color: white; margin: auto;">Reset</button>
  1319. <button type="submit" class="btn btn-primary next-step"
  1320. style="background-color: #016d6f; color: white; float: right;">Next</button>
  1321. <!--<button type="button"
  1322. class="btn btn-secondary cancel-step">Cancel</button>-->
  1323. </div>
  1324. </div>
  1325. </div>
  1326. </div>
  1327. </div>
  1328. </div>
  1329. <div class="step step-4">
  1330. <div class="container custom-container">
  1331. <div class="header" style="background-color: rgb(21,69,93); position: relative;">
  1332. <img src="media/images/logo-sm.png" alt="Logo"
  1333. style="position: absolute; left: 10px; top: 7px; height: 30px;">
  1334. <h6 style="color: white; text-align: center; line-height: 3.1;">
  1335. Payment Confirmation Receipt</h6>
  1336. </div>
  1337. <div class="col-md-12">
  1338. <table class="table table-bordered">
  1339. <tbody>
  1340. <tr>
  1341. <td><strong>Full Name:</strong> <span id="name_td"></span></td>
  1342. <td><strong>MobileNumber:</strong> <span id="mobileno_td"></span></td>
  1343. <td><strong>User Type:</strong> <span id="usertype_td"></span></td>
  1344. </tr>
  1345. </tbody>
  1346. </table>
  1347. </div>
  1348. <div class="row">
  1349. <div class="col-md-6">
  1350. <table class="table table-bordered">
  1351. <tbody>
  1352. <tr>
  1353. <td><strong>Hall Name:</strong></td>
  1354. <td><span id="selecthall_td"></span>
  1355. </td>
  1356. </tr>
  1357. <tr>
  1358. <td><strong>No. of Days:</strong>
  1359. </td>
  1360. <td><span id="numDaysCount_td"></span>
  1361. </td>
  1362. </tr>
  1363. <tr>
  1364. <td><strong>Start Date:</strong>
  1365. </td>
  1366. <td><span id="startDateInput_td"></span>
  1367. </td>
  1368. </tr>
  1369. <tr>
  1370. <td><strong>End Date:</strong></td>
  1371. <td><span id="endDateInput_td"></span>
  1372. </td>
  1373. </tr>
  1374. <tr>
  1375. <td><strong>Startinng Slot & Ending Slot</strong></td>
  1376. <td><span id="startingslot_td"></span>
  1377. </td>
  1378. </tr>
  1379. <tr>
  1380. <td><strong>Uploaded
  1381. Documents:</strong></td>
  1382. <td>
  1383. <!-- List to display uploaded docs with small images and names -->
  1384. <div id="uploadedDocsList" class="uploaded-docs-list">
  1385. <!-- Each item in the list will have a small image and name -->
  1386. </div>
  1387. </td>
  1388. </tr>
  1389. <div id="largeImageContainer" class="large-image-container"
  1390. style="display: none;">
  1391. <button id="closeButton" type="button" class="close-button">
  1392. <i class="fa fa-times"></i>
  1393. </button>
  1394. <img id="largeImage" src="" alt="Large Image">
  1395. </div>
  1396. </tbody>
  1397. </table>
  1398. </div>
  1399. <div class="col-md-6">
  1400. <table class="table table-bordered">
  1401. <tbody>
  1402. <tr>
  1403. <td><strong>ReasonforBooking:</strong>
  1404. </td>
  1405. <td><span id="reasonforbooking_td"></span>
  1406. </td>
  1407. </tr>
  1408. <tr>
  1409. <td><strong>Hall Amount:</strong>
  1410. </td>
  1411. <td><span id="hallAmount_td">Rs</span>
  1412. </td>
  1413. </tr>
  1414. <tr>
  1415. <td><strong>GST:</strong></td>
  1416. <td><span id="gst_td">Rs</span></td>
  1417. </tr>
  1418. <tr>
  1419. <td><strong>Refundable
  1420. Deposit:</strong></td>
  1421. <td><span id="depositAmount_td">Rs</span>
  1422. </td>
  1423. </tr>
  1424. <tr>
  1425. <td><strong>Discount:</strong></td>
  1426. <td><span id="discount_td">0%</span>
  1427. </td>
  1428. </tr>
  1429. <tr>
  1430. <td><strong>Total Amount:</strong>
  1431. </td>
  1432. <td><span id="totalAmount_td">Rs</span>
  1433. </td>
  1434. </tr>
  1435. </tbody>
  1436. </table>
  1437. </div>
  1438. </div>
  1439. <div class="row">
  1440. <div class="col-md-12 text-center">
  1441. <!-- Center align the button -->
  1442. <button type="button" class="btn btn-primary prev-step"
  1443. style="background-color: #016d6f; color: white;float: left;">Previous</button>
  1444. </div>
  1445. </div>
  1446. <div align="center">
  1447. <label data-toggle="tooltip" data-placement="top"
  1448. title="Check community hall list for Terms and Conditions">
  1449. <input type="checkbox" id="checkin" onchange="togglePaymentButton(this)" />
  1450. <a href="#" id="termsLink">I agree to the Terms and Conditions</a>
  1451. </label>
  1452. <button type="button" id="confirmPaymentBtn" class="btn btn-success"
  1453. onclick="paymentForCounter()" disabled>Confirm Payment</button>
  1454. <input type="hidden" id="btnSubmit"></input>
  1455. </div>
  1456. </div>
  1457. </div>
  1458. <!--<div class="row mt-3">
  1459. <div class="col-sm-6">
  1460. <button type="button" class="btn btn-secondary" id="backToProfileButton">Back</button>
  1461. </div>
  1462. </div>-->
  1463. </form>
  1464. </div>
  1465. </div>
  1466. <div class="modal fade" id="termsModal" tabindex="-1" aria-labelledby="termsModalLabel" aria-hidden="true">
  1467. <div class="modal-dialog modal-lg">
  1468. <div class="modal-content">
  1469. <div class="modal-header">
  1470. <h5 class="modal-title" id="termsModalLabel">Terms and Conditions</h5>
  1471. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  1472. </div>
  1473. <div class="modal-body">
  1474. <div class="table-responsive">
  1475. <table class="table table-bordered table-wrap">
  1476. <tbody>
  1477. <tr>
  1478. <td>1</td>
  1479. <td>Community center shall be booked on daily rental basis for religious,
  1480. social,
  1481. and cultural purposes only. Political based functions, against the
  1482. Government
  1483. Policy and illegal programmes shall not be allowed.</td>
  1484. </tr>
  1485. <tr>
  1486. <td>2</td>
  1487. <td><b>Address proof</b> of the applicant should be furnished with filled in
  1488. application in two copies.</td>
  1489. </tr>
  1490. <tr>
  1491. <td>3</td>
  1492. <td>For marriage, <b>bride and bridegroom photos</b> and age proof should be
  1493. furnished in two copies. (21 years should be completed for men and 18
  1494. years
  1495. should be completed for women)</td>
  1496. </tr>
  1497. <tr>
  1498. <td>4</td>
  1499. <td>For Reception bride and bridegroom photos (two copies) should be
  1500. furnished.</td>
  1501. </tr>
  1502. <tr>
  1503. <td>5</td>
  1504. <td>For Birthday/Ear boring/Puberty/Betrothal/Upanayanam and seemantham
  1505. functions
  1506. photo of the individual should be furnished.</td>
  1507. </tr>
  1508. <tr>
  1509. <td>6</td>
  1510. <td>Separate application to be made for the other than family functions with
  1511. <b>No
  1512. Objection Certificate from the Police Department</b> concerned
  1513. jurisdiction
  1514. of the community hall.</td>
  1515. </tr>
  1516. <tr>
  1517. <td>7</td>
  1518. <td>Those who have applied with required documents and necessary payment
  1519. will be
  1520. given first priority (First come, first served basis)</td>
  1521. </tr>
  1522. <tr>
  1523. <td>8</td>
  1524. <td>Order shall not be transferred to any reason. No permission shall be
  1525. given any
  1526. one to perform the function other than allotted person.</td>
  1527. </tr>
  1528. <tr>
  1529. <td>9</td>
  1530. <td>No permission shall be given to perform function other than mentioned in
  1531. the
  1532. allotment order.</td>
  1533. </tr>
  1534. <tr>
  1535. <td>10</td>
  1536. <td>In case of essentiality for Greater Chennai Corporation for the purpose
  1537. of
  1538. meetings, relief measures on natural calamities and election period
  1539. permission
  1540. order will be cancelled with short intimation.</td>
  1541. </tr>
  1542. <tr>
  1543. <td>11</td>
  1544. <td>Emblem and Name of the Greater Chennai Corporation shall not be
  1545. permitted to be
  1546. displayed or to be used in any other manner.</td>
  1547. </tr>
  1548. <tr>
  1549. <td>12</td>
  1550. <td>Function should be performed without stigma of Greater Chennai
  1551. Corporation.</td>
  1552. </tr>
  1553. <tr>
  1554. <td>13</td>
  1555. <td>After finishing the function, all materials other than Corporation
  1556. should be
  1557. removed from the community center.</td>
  1558. </tr>
  1559. <tr>
  1560. <td>14</td>
  1561. <td>Cooking should be done only in the kitchen or place provided for the
  1562. purpose.
  1563. </td>
  1564. </tr>
  1565. <tr>
  1566. <td>15</td>
  1567. <td>The Corporation will not be responsible for any theft or loss of motor
  1568. vehicles,
  1569. properties or any damages which occur to the parties.</td>
  1570. </tr>
  1571. <tr>
  1572. <td>16</td>
  1573. <td>Vessels, furniture and other materials of the Corporation should not be
  1574. taken
  1575. out from the community center, and no nails, posters, stickers and
  1576. notices fixed
  1577. in the walls.</td>
  1578. </tr>
  1579. <tr>
  1580. <td>17</td>
  1581. <td>The electricity consumption charge has to be deducted from the amount
  1582. deposit if
  1583. any additional electrical illuminations of decorations have to be done
  1584. prior
  1585. approval of the Electrical Engineer, Corporation of Chennai has to be
  1586. obtained.
  1587. </td>
  1588. </tr>
  1589. <tr>
  1590. <td>18</td>
  1591. <td>No nuisance like spitting, throwing leaves and other materials on the
  1592. neighborhood premises etc.</td>
  1593. </tr>
  1594. <tr>
  1595. <td>19</td>
  1596. <td>Permission order will be given only to the applicant.</td>
  1597. </tr>
  1598. <tr>
  1599. <td>20</td>
  1600. <td>The Commissioner is empowered to grant permission or reject the
  1601. application
  1602. without assigning any reasons therefor.</td>
  1603. </tr>
  1604. <tr>
  1605. <td>21</td>
  1606. <td>If vessels and other materials, chair, table of the Corporation received
  1607. for the
  1608. function, it has to be returned safely after the function is over. If
  1609. any
  1610. damages or loss of material, programmer is responsible and should pay
  1611. the
  1612. charges.</td>
  1613. </tr>
  1614. <tr>
  1615. <td>22</td>
  1616. <td>Monitoring the rules and regulations and maintenance of the community
  1617. hall/auditorium has to be continued by the Zonal Offices concerned.</td>
  1618. </tr>
  1619. </tbody>
  1620. </table>
  1621. <div class="container">
  1622. <div class="text-end">
  1623. Commissioner<br>
  1624. Greater Chennai Corporation.
  1625. </div>
  1626. </div>
  1627. </div>
  1628. </div>
  1629. <div class="modal-footer">
  1630. <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
  1631. </div>
  1632. </div>
  1633. </div>
  1634. </div>
  1635. <div class="modal fade backdrop" id="ddDetailsModal" data-backdrop="static" tabindex="-1" role="dialog"
  1636. aria-labelledby="staticBackdropLabel" aria-hidden="true">
  1637. <div class="modal-dialog modal-lg" role="document">
  1638. <div class="modal-content">
  1639. <form action="/counter/saveDDdetails" id="ddform" method="post" onsubmit="return submitForm()"
  1640. enctype="multipart/form-data">
  1641. <div class="block block-rounded block-themed block-transparent mb-0">
  1642. <div class="block-header bg-primary-dark">
  1643. <h3 class="block-title" id="mtitle">Add Demand Draft Number</h3>
  1644. <div class="block-options">
  1645. <button type="button" class="btn-block-option" data-bs-dismiss="modal"
  1646. aria-label="Close">
  1647. <i class="fa fa-fw fa-times"></i>
  1648. </button>
  1649. </div>
  1650. </div>
  1651. <div class="block-content row">
  1652. <!-- Existing form fields -->
  1653. <div class="col-md-4">
  1654. <div class="form-group">
  1655. <label for="bankName">Bank Name:</label>
  1656. <input type="text" class="form-control" id="bankName" name="bankName"
  1657. placeholder="Bank Name" pattern="[A-Za-z\s-]+" required>
  1658. </div>
  1659. </div>
  1660. <div class="col-md-4">
  1661. <div class="form-group">
  1662. <label for="bankAccNo">Bank Account Number:</label>
  1663. <input type="text" class="form-control" id="bankAccNo" name="bankAccNo"
  1664. placeholder="Bank Account No" minlength="6" maxlength="24" pattern="\d+"
  1665. required>
  1666. </div>
  1667. </div>
  1668. <div class="col-md-4">
  1669. <div class="form-group">
  1670. <label for="ddNumber">Demand Draft Number:</label>
  1671. <input type="text" class="form-control" id="ddNumber" name="ddNumber"
  1672. placeholder="DD No" minlength="6" maxlength="10" pattern="\d+" required>
  1673. </div>
  1674. </div>
  1675. <div class="col-md-4">
  1676. <div class="form-group">
  1677. <label for="totalamount">Total Amount:</label>
  1678. <input type="text" class="form-control" id="totalamount" name="totalamount"
  1679. readonly>
  1680. </div>
  1681. </div>
  1682. <div class="col-4">
  1683. <div class="form-group">
  1684. <lable for="amountReceived">DD Amount:</lable>
  1685. <input type="text" class="form-control" id="amountReceived"
  1686. name="amountReceived" required="required" pattern="[0-9]">
  1687. </div>
  1688. </div>
  1689. <div class="col-md-4">
  1690. <input type="hidden" id="bookingId" name="bookingId">
  1691. </div>
  1692. <div class="row">
  1693. <div class="col">
  1694. <p class="p1 text-center"><strong>DOCUMENTS DETAILS</strong></p>
  1695. </div>
  1696. </div>
  1697. <div class="row" id="photoInputs">
  1698. <div class="col-md-8">
  1699. <div class="form-group">
  1700. <label for="counterddphoto" style="color:red;">Photo 1: Only (.JPEG,
  1701. .JPG, .PDF)
  1702. then uploading File size should not exceed above 1mb</label>
  1703. <input type="file" class="form-control dd-image" id="counterddphoto"
  1704. name="counterddphoto" accept="image/jpeg, image/jpg, image/pdf"
  1705. required>
  1706. </div>
  1707. </div>
  1708. </div>
  1709. </div>
  1710. </div>
  1711. <div class="block-content block-content-full text-end bg-body" id="mbutton">
  1712. <button type="button" class="btn btn-sm btn-alt-secondary"
  1713. data-bs-dismiss="modal">Close</button>
  1714. <button type="submit" class="btn btn-sm btn-primary">Submit</button>
  1715. </div>
  1716. </form>
  1717. </div>
  1718. </div>
  1719. </div>
  1720. </main>
  1721. <footer th:replace="~{fragments/footer2 :: footer}"></footer>
  1722. </div>
  1723. <script th:replace="~{fragments/script :: script}"></script>
  1724. <script th:replace="~{fragments/PaymentScript :: script}"></script>
  1725. <script>
  1726. $('.carousel').carousel({
  1727. interval: 6000
  1728. });
  1729. var currentStep = 1;
  1730. var updateProgressBar;
  1731. var userId;
  1732. var bookingId;
  1733. let selectedHallName = '';
  1734. let selectedZone = '';
  1735. function toggleNextButton(step) {
  1736. var nextButton = document.querySelector('.step-' + step + ' .next-step');
  1737. var fields = document.querySelectorAll('.step-' + step + ' [required]');
  1738. var allFieldsFilled = true;
  1739. fields.forEach(function (field) {
  1740. if (!field.value) {
  1741. allFieldsFilled = false;
  1742. }
  1743. });
  1744. if (allFieldsFilled) {
  1745. nextButton.disabled = false; // Enable the button
  1746. } else {
  1747. nextButton.disabled = true; // Disable the button
  1748. }
  1749. }
  1750. // Call the function for Step 1 when the page loads
  1751. document.addEventListener('DOMContentLoaded', function () {
  1752. // toggleNextButton(1);
  1753. toggleNextButton(2);
  1754. toggleNextButton(3);
  1755. });
  1756. // Attach event listeners for each step's form fields
  1757. /* document.querySelectorAll('.step-1 [required]').forEach(function(field) {
  1758. field.addEventListener('input', function() {
  1759. toggleNextButton(1);
  1760. });
  1761. });*/
  1762. document.querySelectorAll('.step-2 [required]').forEach(function (field) {
  1763. field.addEventListener('input', function () {
  1764. toggleNextButton(2);
  1765. });
  1766. });
  1767. document.querySelectorAll('.step-3 [required]').forEach(function (field) {
  1768. field.addEventListener('input', function () {
  1769. toggleNextButton(3);
  1770. });
  1771. });
  1772. function fetchReasonDocumentDetails(reasonId) {
  1773. $.ajax({
  1774. url: '/victoriahallbooking/admin/api/getReasonDocumentDetails',
  1775. type: 'GET',
  1776. dataType: 'json',
  1777. data: {reasonId: reasonId}
  1778. })
  1779. .done(function (data) {
  1780. const reasonFieldsContainer = $('#reasonFieldsContainer');
  1781. reasonFieldsContainer.empty();
  1782. const rowDiv = $('<div class="row"></div>');
  1783. $.each(data, function (index, detail) {
  1784. if (detail.addTextField == true) {
  1785. const fieldDiv = $('<div class="col-sm-4 form-group"></div>');
  1786. const label = $('<label>' + detail.fieldName + '</label>');
  1787. const input = $('<input type="text" class="form-control" name="' + detail.fieldName + '" required>');
  1788. // Add event listener for input validation
  1789. input.on('input', function () {
  1790. // Replace any non-letter characters with an empty string
  1791. this.value = this.value.replace(/[^a-zA-Z]/g, '');
  1792. });
  1793. fieldDiv.append(label);
  1794. fieldDiv.append(input);
  1795. rowDiv.append(fieldDiv);
  1796. }
  1797. if (detail.addDocumentField == true) {
  1798. const fieldDiv2 = $('<div class="col-sm-4 form-group"></div>');
  1799. fieldDiv2.append('<label>' + detail.docFieldName + '</label><input type="file" class="form-control file-upload-field" name="' + detail.docFieldName + '" required accept=".jpg,.jpeg, .pdf">');
  1800. rowDiv.append(fieldDiv2);
  1801. }
  1802. });
  1803. reasonFieldsContainer.append(rowDiv);
  1804. // File upload field validation for size and error display
  1805. $('.file-upload-field').on('change', function () {
  1806. const file = this.files[0];
  1807. if (file && file.size > 2097152) { // size is in bytes
  1808. $(this).addClass('error'); // Add error class
  1809. $(this).after('<div class="error-message">File size should not exceed 2 MB</div>'); // Display error message
  1810. this.value = ''; // Reset the file input
  1811. } else {
  1812. $(this).removeClass('error'); // Remove error class
  1813. $(this).next('.error-message').remove(); // Remove error message if present
  1814. }
  1815. });
  1816. })
  1817. .fail(function (xhr, status, error) {
  1818. console.error('Error fetching reason document details:', error);
  1819. });
  1820. }
  1821. // Call the function to fetch reasons and populate the dropdown when the document is ready
  1822. $(document).ready(function () {
  1823. fetchReasonsAndPopulateDropdown();
  1824. $('#reasonforbooking').change(function () {
  1825. const selectedReasonId = parseInt($(this).val()); // Convert the value to an integer
  1826. fetchReasonDocumentDetails(selectedReasonId);
  1827. });
  1828. });
  1829. var ch = 0;
  1830. function saveCounterBooking() {
  1831. // console.log("saveCounterBooking called");
  1832. $("#startPeriodDropdown").prop("disabled", false);
  1833. $("#endPeriodDropdown").prop("disabled", false);
  1834. var form = document.getElementById('booking');
  1835. var formData = new FormData(form);
  1836. console.log(formData);
  1837. $.ajax({
  1838. url: '../victoriahallbooking/user/api/counter-booking',
  1839. type: 'POST',
  1840. data: formData,
  1841. processData: false,
  1842. contentType: false,
  1843. success: function (response) {
  1844. // console.log("response=", response);
  1845. // Update the UI with the response data
  1846. $("#bookingId").val(response.bookingId);
  1847. $("#userId").val(response.userId);
  1848. $("#selecthall_td").html(response.hallName);
  1849. $("#numDaysCount_td").html(response.noOfDays);
  1850. $("#startDateInput_td").html(response.startDate);
  1851. $("#endDateInput_td").html(response.endDate);
  1852. function getTimeOfDay(slot) {
  1853. if (slot === 1) {
  1854. return "Morning";
  1855. } else if (slot === 2) {
  1856. return "Evening";
  1857. } else {
  1858. return "Invalid slot";
  1859. }
  1860. }
  1861. $("#startingslot_td").html(getTimeOfDay(response.startingSlot) + " to " + getTimeOfDay(response.endingSlot));
  1862. $("#reasonforbooking_td").html(response.reason);
  1863. $("#hallAmount_td").html(response.hallAmount);
  1864. $("#gst_td").html(response.gst);
  1865. $("#depositAmount_td").html(response.depositAmount);
  1866. $("#discount_td").html(response.discount + "%")
  1867. $("#totalAmount_td").html(response.totalAmount);
  1868. $("#name_td").html(response.username);
  1869. $("#mobileno_td").html(response.mobileNo);
  1870. $("#usertype_td").html(response.userType);
  1871. displayDocumentDetails(response.uploadedDocs);
  1872. // Set the onclick event for the confirmPaymentBtn to include the bookingId
  1873. //$('#confirmPaymentBtn').attr('onclick', 'addnewdd(' + response.bookingId + ')');
  1874. // Enable the button to ensure it can be clicked
  1875. //$('#confirmPaymentBtn').prop('disabled', false);
  1876. },
  1877. error: function (xhr, status, error) {
  1878. console.error('Error saving booking details:', error);
  1879. }
  1880. });
  1881. }
  1882. function addnewdd(bookingId) {
  1883. // console.log("bookingId==", bookingId);
  1884. $('#ddDetailsModal').modal('show');
  1885. // Set the bookingId value in the hidden input field
  1886. $('#ddform #bookingId').val(bookingId);
  1887. // Make an AJAX request to fetch booking details
  1888. $.ajax({
  1889. url: '/victoriahallbooking/user/api/getBooking',
  1890. type: 'GET',
  1891. data: {bookingId: bookingId},
  1892. success: function (response) {
  1893. // Assuming the response contains the booking details
  1894. console.log("Booking details: ", response);
  1895. // Display the amountReceived field in the modal's readonly input field
  1896. $('#totalamount').val(response.amountReceived); // Adjust according to your response structure
  1897. },
  1898. error: function (error) {
  1899. // console.log("Error fetching booking details: ", error);
  1900. }
  1901. });
  1902. }
  1903. function submitForm() {
  1904. var bookingId = $('#ddform #bookingId').val();
  1905. if (!bookingId) {
  1906. alert("Booking ID is missing!");
  1907. return false;
  1908. }
  1909. // console.log("Submitting form with bookingId=", bookingId);
  1910. return true;
  1911. }
  1912. function displayDocumentDetails(uploadedDocs) {
  1913. const uploadedDocsList = $("#uploadedDocsList");
  1914. uploadedDocsList.empty(); // Clear existing items
  1915. uploadedDocs.forEach(function (doc) {
  1916. const listItem = $('<li>');
  1917. const thumbnail = $('<img>').addClass('thumbnail-img');
  1918. if (doc.bookingDocUrl.endsWith('.pdf')) {
  1919. thumbnail.attr('src', doc.bookingDocUrl);
  1920. listItem.append(thumbnail).append(' ' + doc.documentName);
  1921. thumbnail.on('click', function () {
  1922. const pdfViewer = $('<iframe>').attr({
  1923. src: doc.bookingDocUrl
  1924. });
  1925. $('#largeImage').hide();
  1926. $('#largeImageContainer').find('iframe').remove();
  1927. $('#largeImageContainer').append(pdfViewer);
  1928. $('#largeImageContainer').show();
  1929. });
  1930. } else {
  1931. thumbnail.attr('src', doc.bookingDocUrl);
  1932. listItem.append(thumbnail).append(' ' + doc.documentName);
  1933. thumbnail.on('click', function () {
  1934. $('#largeImageContainer iframe').remove();
  1935. $('#largeImage').attr('src', doc.bookingDocUrl).show();
  1936. $('#largeImageContainer').show();
  1937. });
  1938. }
  1939. uploadedDocsList.append(listItem);
  1940. });
  1941. }
  1942. $("#closeButton").on('click', function () {
  1943. $('#largeImageContainer').hide(); // Hide the large image container
  1944. $('#largeImage').attr('src', '').hide(); // Reset and hide image
  1945. $('#largeImageContainer iframe').remove(); // Remove iframe if present
  1946. });
  1947. function fetchReasonsAndPopulateDropdown() {
  1948. // Make an AJAX call to fetch all reasons
  1949. $.ajax({
  1950. url: '/victoriahallbooking/admin/api/getReasons',
  1951. type: 'GET',
  1952. dataType: 'json'
  1953. })
  1954. .done(function (data) {
  1955. const reasonDropdown = $('#reasonforbooking');
  1956. reasonDropdown.empty();
  1957. reasonDropdown.append($('<option selected value="0"></option>').text('Select a reason'));
  1958. $.each(data, function (index, reason) {
  1959. reasonDropdown.append($('<option></option>').attr('value', reason.reasonId).text(reason.reason));
  1960. });
  1961. })
  1962. .fail(function (xhr, status, error) {
  1963. console.error('Error fetching reasons:', error);
  1964. });
  1965. }
  1966. function togglePaymentButton(checkbox) {
  1967. var confirmPaymentBtn = document.getElementById('confirmPaymentBtn');
  1968. confirmPaymentBtn.disabled = !checkbox.checked;
  1969. }
  1970. document.getElementById('termsLink').addEventListener('click', function (event) {
  1971. event.preventDefault();
  1972. $('#termsModal').modal('show');
  1973. });
  1974. function togglePaymentButton(checkbox) {
  1975. document.getElementById('confirmPaymentBtn').disabled = !checkbox.checked;
  1976. }
  1977. function displayStep(stepNumber) {
  1978. // console.log(stepNumber);
  1979. if (stepNumber >= 1 && stepNumber <= 4) {
  1980. if (validateStep(currentStep)) {
  1981. /* console.log(currentStep);*/
  1982. $(".step-" + currentStep).hide();
  1983. $(".step-" + stepNumber).show();
  1984. currentStep = stepNumber;
  1985. updateProgressBar();
  1986. // Populate hallName, zone, and division in Step 2 and Step 3
  1987. if (stepNumber === 2 || stepNumber === 3) {
  1988. $('#hallNameDisplayStep2').text(selectedHallName);
  1989. $('#hallNameDisplayStep3').text(selectedHallName);
  1990. $('#zoneStep2').text(zone);
  1991. $('#zoneStep3').text(zone);
  1992. $('#divisionStep2').text('');
  1993. $('#divisionStep3').text('');
  1994. $('#selecthall_td').text(selectedHallName);
  1995. }
  1996. // Handle displaying the SweetAlert in Step 3
  1997. } else {
  1998. //alert("Please fill in all required fields before proceeding.");
  1999. }
  2000. }
  2001. }
  2002. function validateStep(stepNumber) {
  2003. }
  2004. $(document).ready(function () {
  2005. $('.step').hide();
  2006. $('.step-1').show();
  2007. var currentStep = 1; // Assuming you have this variable defined somewhere in your code
  2008. // Function to validate step 3
  2009. // Function to validate step 3
  2010. // Function to validate step 3
  2011. function validateStep3() {
  2012. let isValid = true;
  2013. let selectedReason = $('#reasonforbooking').val();
  2014. // Check if a reason is selected
  2015. if (!selectedReason) {
  2016. isValid = false;
  2017. } else {
  2018. // Iterate through each input associated with the selected reason
  2019. $(`#reasonFieldsContainer .${selectedReason} input[type="text"], #reasonFieldsContainer .${selectedReason} input[type="file"]`).each(function () {
  2020. if ($(this).prop('required') && !$(this).val()) {
  2021. isValid = false;
  2022. return false; // Exit the loop early if any required field is empty
  2023. }
  2024. });
  2025. }
  2026. // Enable/disable the next button based on validation
  2027. $('.next-step').prop('disabled', !isValid);
  2028. }
  2029. // Event listener for reason dropdown change
  2030. $('#reasonforbooking').change(function () {
  2031. let selectedReason = $(this).val();
  2032. // Show/hide fields based on selected reason
  2033. $('#reasonFieldsContainer').children().hide();
  2034. if (selectedReason) {
  2035. $(`#reasonFieldsContainer .${selectedReason}`).show();
  2036. }
  2037. // Validate the fields for the selected reason
  2038. validateStep3();
  2039. });
  2040. // Event listener for input changes within reason fields
  2041. $('#reasonFieldsContainer').on('change', 'input, select', function () {
  2042. validateStep3();
  2043. });
  2044. $(".next-step").click(function () {
  2045. var valid = true;
  2046. // Validate all required text inputs and file fields in Step 3
  2047. if (currentStep === 3) {
  2048. $('.step-3 input[required], .step-3 select[required]').each(function () {
  2049. if ($(this).val() === '') {
  2050. $(this).addClass('error'); // Add error class
  2051. valid = false;
  2052. return false; // Break the loop
  2053. } else {
  2054. $(this).removeClass('error'); // Remove error class if valid
  2055. }
  2056. });
  2057. $('.step-3 input[type="file"][required]').each(function () {
  2058. if ($(this)[0].files.length === 0) {
  2059. $(this).addClass('error'); // Add error class
  2060. valid = false;
  2061. return false; // Break the loop
  2062. } else {
  2063. $(this).removeClass('error'); // Remove error class if valid
  2064. }
  2065. });
  2066. }
  2067. if (!valid) {
  2068. return; // Stop if validation fails
  2069. }
  2070. if (currentStep < 4) {
  2071. $(".step-" + currentStep).fadeOut(500, function () {
  2072. if (currentStep === 4) {
  2073. $(".step-" + currentStep).fadeIn(500);
  2074. // console.log(currentStep);
  2075. updateProgressBar();
  2076. return "";
  2077. } else {
  2078. currentStep++;
  2079. $(".step-" + currentStep).fadeIn(500);
  2080. updateProgressBar();
  2081. }
  2082. });
  2083. }
  2084. });
  2085. $(".prev-step").click(function () {
  2086. if (currentStep > 1) {
  2087. $(".step-" + currentStep).fadeOut(500, function () {
  2088. currentStep--;
  2089. $(".step-" + currentStep).fadeIn(500);
  2090. updateProgressBar();
  2091. });
  2092. }
  2093. });
  2094. $(".step-2 .reset-step").click(function () {
  2095. $('.step-2 input[type="text"], .step-2 select').val(function () {
  2096. return this.defaultValue;
  2097. });
  2098. $('.step-2 input[type="checkbox"], .step-2 input[type="radio"]').prop('checked', false);
  2099. $('#endDateInput').prop('disabled', true).val('0');
  2100. $('#startPeriodDropdown').val('0');
  2101. $('#endPeriodDropdown').val('0');
  2102. $('#numDaysCount').val(''); // Reset the number of days input
  2103. $('.step-2 .error-message').hide();
  2104. toggleNextButton(2); // Ensure button state reflects field values after reset
  2105. });
  2106. $(".step-3 .reset-step").click(function () {
  2107. // Reset input fields and selects, excluding #reasonforbooking
  2108. $('.step-3 input[type="text"], input[type="file"], .step-3 select').each(function () {
  2109. $(".step-3 .next-step").prop("disabled", true);
  2110. // Check if element is not #reasonforbooking
  2111. if (!$(this).is('#reasonforbooking')) {
  2112. $(this).val(this.defaultValue);
  2113. }
  2114. });
  2115. // Hide error messages and validate step 3
  2116. $('.step-3 .error-message').hide();
  2117. validateStep3();
  2118. });
  2119. $(".step-2 .next-step").click(function () {
  2120. var reasonforbooking = $("#reasonforbooking").val();
  2121. if (reasonforbooking !== "0") {
  2122. $(".step-3 .next-step").prop("disabled", false);
  2123. } else {
  2124. $(".step-3 .next-step").prop("disabled", true);
  2125. };
  2126. });
  2127. $(".cancel-step").click(function () {
  2128. // Redirect to the cancel page or handle cancellation logic here
  2129. window.location.href = "/dashboard";
  2130. });
  2131. updateProgressBar = function () {
  2132. var progressPercentage = ((currentStep - 1) / 3) * 100;
  2133. $(".progress-bar").css("width", progressPercentage + "%");
  2134. };
  2135. // File upload field validation for size and error display
  2136. $('.file-upload-field').on('change', function () {
  2137. const file = this.files[0];
  2138. if (file && file.size > 20480) { // size is in bytes
  2139. $(this).addClass('error'); // Add error class
  2140. $(this).after('<div class="error-message">File size should not exceed 20 KB</div>'); // Display error message
  2141. this.value = ''; // Reset the file input
  2142. } else {
  2143. $(this).removeClass('error'); // Remove error class
  2144. $(this).next('.error-message').remove(); // Remove error message if present
  2145. }
  2146. });
  2147. // Initial validation check for step 3
  2148. validateStep3();
  2149. // Log statement to ensure the button is being enabled
  2150. // console.log("Enabling the button...");
  2151. $('.step-1 .next-step').prop('disabled', false);
  2152. });
  2153. $(document).ready(function () {
  2154. // Function to show/hide fields based on the selected User Type
  2155. $("#userType").change(function () {
  2156. var selectedUserType = $(this).val();
  2157. // Hide all fields initially
  2158. $("#employeeFields, #pensionerFields, #familypensionerFields").hide();
  2159. if (selectedUserType === "PUBLIC") {
  2160. $("#pensionerFields").hide();
  2161. $("#familypensionerFields").hide();
  2162. $("#employeeFields").hide();
  2163. }
  2164. else if (selectedUserType === "GCC_EMPLOYEE") {
  2165. $("#employeeFields").show();
  2166. } else if (selectedUserType === "PENSIONER") {
  2167. $("#pensionerFields").show();
  2168. } else if (selectedUserType == "FAMILYPENSIONER") {
  2169. $("#familypensionerFields").show();
  2170. }
  2171. });
  2172. // Validation for alphanumeric input
  2173. $("#employeeId, #pensionerId").on("input", function () {
  2174. var inputValue = $(this).val();
  2175. if (!/^[a-zA-Z0-9]*$/.test(inputValue)) {
  2176. alert("Please enter alphanumeric characters only.");
  2177. $(this).val("");
  2178. }
  2179. });
  2180. // Validation for numeric input
  2181. $("#wardNo").on("input", function () {
  2182. var inputValue = $(this).val();
  2183. if (!/^\d*$/.test(inputValue)) {
  2184. alert("Please enter numeric characters only for Ward No.");
  2185. $(this).val("");
  2186. }
  2187. });
  2188. });
  2189. // Function to toggle hall details container and fetch hall details
  2190. function toggleHallDetailsContainer() {
  2191. var selectBox = document.getElementById("selecthall");
  2192. var selectedValue = selectBox.options[selectBox.selectedIndex].value;
  2193. var hallDetailsContainer = document.getElementById("hallDetailsContainer");
  2194. if (selectedValue !== "") {
  2195. hallDetailsContainer.style.display = "block"; // Show hall details container if a hall is selected
  2196. // Get the selected hall ID
  2197. var hallId = selectBox.options[selectBox.selectedIndex].value;
  2198. getHallDetails(hallId); // Fetch hall details
  2199. // Other code for displaying selected details
  2200. } else {
  2201. hallDetailsContainer.style.display = "none"; // Hide hall details container if no hall is selected
  2202. // Clear the selected details in Step 2 and Step 3
  2203. $('#hallNameDisplayStep2').text('');
  2204. $('#hallNameDisplayStep3').text('');
  2205. $('#zoneStep2').text('');
  2206. $('#zoneStep3').text('');
  2207. $('#divisionStep2').text('');
  2208. $('#divisionStep3').text('');
  2209. // Clear other details if needed
  2210. }
  2211. }
  2212. var index = 0;
  2213. var hall;
  2214. $(function () {
  2215. $("#selecthall").select2();
  2216. });
  2217. $.ajax({
  2218. type: 'GET',
  2219. url: '/victoriahallbooking/user/api/gethallnames',
  2220. success: function (response) {
  2221. // Populate the dropdown options with the received hall names
  2222. var selectHallDropdown = $('#selecthall');
  2223. $.each(response, function (index, hall) {
  2224. // console.log("response==", response);
  2225. // console.log("halls", hall);
  2226. var hallId = 0;
  2227. if (hallId == hall.hallId) {
  2228. selectHallDropdown.append($('<option></option>').attr('value', hall.hallId).text(hall.hallName));
  2229. selectHallDropdown.find('option[value="' + hall.hallId + '"]').prop('selected', true);
  2230. } else {
  2231. selectHallDropdown.append($('<option></option>').attr('value', hall.hallId).text(hall.hallName));
  2232. }
  2233. });
  2234. },
  2235. error: function (xhr, status, error) {
  2236. console.error('Error fetching hall names:', error);
  2237. }
  2238. });
  2239. $(document).ready(function () {
  2240. $('#selecthall').change(function () {
  2241. var selectedHallId = $(this).val();
  2242. // console.log('Selected hall ID:', selectedHallId);
  2243. // Call the getHallDetails function with the selected hall ID
  2244. getHallDetails(selectedHallId);
  2245. });
  2246. });
  2247. // Function to retrieve hall details based on hallId
  2248. function getHallDetails(hallId) {
  2249. $.ajax({
  2250. type: 'GET',
  2251. url: '/victoriahallbooking/user/api/gethalldetails/' + hallId,
  2252. success: function (response) {
  2253. // console.log(response);
  2254. // Display the container
  2255. $('#hallDetailsContainer').show();
  2256. // Set hall details
  2257. $('#zone').text(response.zone);
  2258. $('#division').text(response.division);
  2259. $('#address').text(response.doorNo + ', ' + response.street + ', ' + response.area + ', ' + response.city + ', ' + response.pinCode);
  2260. $('#landmark').text(response.landMark);
  2261. $('#seatingCapacity').text(response.seatingCapacity);
  2262. $('#caretakerNumber').text(response.hallInchargeMobno);
  2263. $('#rentAmount').text(response.depositAmount);
  2264. // Set amount details
  2265. $('#gst').text(response.gst);
  2266. $('#fullDayAmount').text(response.fullDayRent);
  2267. $('#halfDayAmount').text(response.halfDayRent);
  2268. $('#ebunit').text(response.ebCostPerUnit);
  2269. // Set hall images
  2270. var carouselInner = $('#hallImagesCarousel .carousel-inner');
  2271. carouselInner.empty(); // Clear existing images
  2272. $.each(response.hallImagesList, function (index, image) {
  2273. var itemClass = (index === 0) ? 'carousel-item active' : 'carousel-item';
  2274. var img = $('<img>').addClass('d-block w-100').attr('src', image.hallImage).attr('alt', 'Hall Image');
  2275. var carouselItem = $('<div>').addClass(itemClass).append(img);
  2276. carouselInner.append(carouselItem);
  2277. });
  2278. // Initialize ViewerJS on the carousel after images are loaded
  2279. var viewer = new Viewer(document.getElementById('hallImagesCarousel'), {
  2280. inline: false,
  2281. viewed: function () {
  2282. viewer.zoomTo(0.5); // Adjust the zoom level here
  2283. },
  2284. toolbar: {
  2285. zoomIn: 4,
  2286. zoomOut: 4,
  2287. oneToOne: 4,
  2288. reset: 4,
  2289. prev: 4,
  2290. play: {
  2291. show: 4,
  2292. size: 'large',
  2293. },
  2294. next: 4,
  2295. rotateLeft: 4,
  2296. rotateRight: 4,
  2297. flipHorizontal: 4,
  2298. flipVertical: 4,
  2299. },
  2300. });
  2301. getBookingCalendar(hallId);
  2302. // Set hall details in Step 2 and Step 3
  2303. $('#hallNameDisplayStep2').text(response.hallName);
  2304. $('#hallNameDisplayStep3').text(response.hallName);
  2305. $('#zoneStep2').text(response.zone);
  2306. $('#zoneStep3').text(response.zone);
  2307. $('#divisionStep2').text(response.division);
  2308. $('#divisionStep3').text(response.division);
  2309. },
  2310. error: function (xhr, status, error) {
  2311. console.error('Error fetching hall details:', error);
  2312. }
  2313. });
  2314. }
  2315. function getBookingCalendar(hall_id) {
  2316. // Make an AJAX call to fetch booking data
  2317. $.ajax({
  2318. type: 'GET',
  2319. url: '/victoriahallbooking/user/api/getPastData',
  2320. data: {
  2321. hall_id: hall_id
  2322. },
  2323. success: function (response) {
  2324. window.bookingResponse = {};
  2325. if (response && Array.isArray(response)) {
  2326. $("#startDateInput").datepicker("destroy");
  2327. for (var i = 0; i < response.length; i++) {
  2328. var dateString = datepickerFormat(response[i].bdate);
  2329. window.bookingResponse[dateString] = [response[i].morningSlot, response[i].eveningSlot];
  2330. }
  2331. initializeDatepickerWithColors(hall_id);
  2332. if (response.length == 0) {
  2333. initializeDatepickerWithColors(hall_id);
  2334. }
  2335. } else {
  2336. console.error('Invalid or empty response data.');
  2337. }
  2338. },
  2339. error: function (xhr, status, error) {
  2340. console.error('Error fetching hall details:', error);
  2341. }
  2342. });
  2343. }
  2344. // Function to update the end date and slot availability
  2345. function updateEndDate() {
  2346. var startDate = new Date(document.getElementById("startDateInput").value);
  2347. var formatStartDate = formatDate(startDate);
  2348. var endDateInput = document.getElementById("endDateInput");
  2349. endDateInput.innerHTML = '<option value="0">Select</option>';
  2350. endDateInput.disabled = true;
  2351. // Add options for next 7 days from the selected start date
  2352. for (var i = 0; i < 7; i++) {
  2353. var date = new Date(startDate);
  2354. date.setDate(startDate.getDate() + i);
  2355. var formattedDate = formatDate(date);
  2356. if (isNaN(date.getTime())) {
  2357. console.error("Invalid date:", date);
  2358. continue;
  2359. }
  2360. var bookingStatus = window.bookingResponse[formattedDate];
  2361. if (bookingStatus) {
  2362. if (bookingStatus[0] && bookingStatus[1]) {
  2363. break;
  2364. }
  2365. else if (bookingStatus[0]) {
  2366. if (formatStartDate == formattedDate) {
  2367. var option = document.createElement('option');
  2368. option.value = formattedDate;
  2369. option.text = formattedDate;
  2370. endDateInput.appendChild(option);
  2371. } else {
  2372. break;
  2373. }
  2374. }
  2375. else if (bookingStatus[1]) {
  2376. var option = document.createElement('option');
  2377. option.value = formattedDate;
  2378. option.text = formattedDate;
  2379. endDateInput.appendChild(option);
  2380. break;
  2381. } else {
  2382. var option = document.createElement('option');
  2383. option.value = formattedDate;
  2384. option.text = formattedDate;
  2385. endDateInput.appendChild(option);
  2386. }
  2387. } else {
  2388. var option = document.createElement('option');
  2389. option.value = formattedDate;
  2390. option.text = formattedDate;
  2391. endDateInput.appendChild(option);
  2392. }
  2393. }
  2394. endDateInput.disabled = false;
  2395. }
  2396. // Utility function to format date as yyyy-mm-dd
  2397. function formatDate(date) {
  2398. var year = date.getFullYear();
  2399. var month = ("0" + (date.getMonth() + 1)).slice(-2);
  2400. var day = ("0" + date.getDate()).slice(-2);
  2401. return year + "-" + month + "-" + day;
  2402. }
  2403. function calculateNumDays() {
  2404. if (document.getElementById("endDateInput").value == 0) {
  2405. return true;
  2406. }
  2407. var startDate = new Date(document.getElementById("startDateInput").value);
  2408. var endDate = new Date(document.getElementById("endDateInput").value);
  2409. var timeDiff = Math.abs(endDate.getTime() - startDate.getTime());
  2410. var numDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
  2411. numDays += 1;
  2412. document.getElementById("numDaysCount").value = numDays;
  2413. }
  2414. // Event listener for when the end date is selected
  2415. document.getElementById("endDateInput").addEventListener("change", function () {
  2416. calculateNumDays();
  2417. $("#endPeriodDropdown").val(0).prop("disabled", false);
  2418. var bookingStatus = window.bookingResponse[$("#endDateInput").val()];
  2419. if (bookingStatus) {
  2420. if (bookingStatus[0]) {
  2421. // console.log("hi1", bookingStatus[0]);
  2422. $("#endPeriodDropdown").val(2);
  2423. $("#endPeriodDropdown").prop("disabled", true);
  2424. }
  2425. else if (bookingStatus[1]) {
  2426. // console.log("hi2", bookingStatus[1]);
  2427. $("#endPeriodDropdown").val(1)
  2428. $("#endPeriodDropdown").prop("disabled", true);
  2429. }
  2430. } else {
  2431. $("#endPeriodDropdown").prop("disabled", false);
  2432. }
  2433. });
  2434. function initializeDatepickerWithColors(hallId) {
  2435. // console.log("Initializing Datepicker with hallId:", hallId); // Confirm hallId is passed here
  2436. $("#datepicker-container").datepicker("destroy");
  2437. $("#startDateInput,#datepicker-container").datepicker({
  2438. dateFormat: "yy-mm-dd",
  2439. minDate: "+7D",
  2440. maxDate: "+6M",
  2441. beforeShowDay: function (eDate) {
  2442. var dateString = $.datepicker.formatDate("yy-mm-dd", eDate);
  2443. var bookingStatus = window.bookingResponse[dateString];
  2444. if (bookingStatus) {
  2445. if (bookingStatus[0] === false && bookingStatus[1] === false) {
  2446. return [true, "highlight-greens", "Slot Available"];
  2447. } else if (bookingStatus[0] === true && bookingStatus[1] === true) {
  2448. return [true, "highlight-pink disabled", "Slot Occuiped"];
  2449. } else if (bookingStatus[0] === true && bookingStatus[1] === false) {
  2450. return [true, "highlight-yellow", "Evening Slot Available"];
  2451. }
  2452. else if (bookingStatus[0] === false && bookingStatus[1] === true) {
  2453. return [true, "highlight-violet", "Only Morning Slot Available"];
  2454. }
  2455. }
  2456. return [true, "highlight-greens", "Slot Available"];
  2457. },
  2458. });
  2459. $('#selecthall').on('click', function () {
  2460. $('#datepicker-container').datepicker('show');
  2461. });
  2462. $("#startDateInput").on("change", function () {
  2463. var selectedDate = $(this).val();
  2464. var endDate = $("#endDateInput").val();
  2465. $("#startPeriodDropdown").val(0).prop("disabled", false);
  2466. $("#endPeriodDropdown").val(0).prop("disabled", false);
  2467. var startPeriod = $("#startPeriodDropdown").val();
  2468. var endPeriod = $("#endPeriodDropdown").val();
  2469. if (endDate !== "0" && startPeriod !== "0" && endPeriod !== "0") {
  2470. $(".next-step").prop("disabled", false);
  2471. } else {
  2472. $(".next-step").prop("disabled", true);
  2473. }
  2474. var bookingStatus = window.bookingResponse[selectedDate];
  2475. if (bookingStatus) {
  2476. if (bookingStatus[0]) {
  2477. // console.log("hi3", bookingStatus[0]);
  2478. $("#startPeriodDropdown").val(2);
  2479. $("#startPeriodDropdown").prop("disabled", true);
  2480. } else if (bookingStatus[1]) {
  2481. // console.log("hi4", bookingStatus[1]);
  2482. $("#startPeriodDropdown").val(1);
  2483. $("#startPeriodDropdown").prop("disabled", true);
  2484. }
  2485. } else {
  2486. $("#startPeriodDropdown").prop("disabled", false);
  2487. }
  2488. updateEndDate(selectedDate);
  2489. });
  2490. }
  2491. function datepickerFormat(dateString) {
  2492. var dateObject = new Date(dateString);
  2493. var year = dateObject.getFullYear();
  2494. var month = (dateObject.getMonth() + 1).toString().padStart(2, "0");
  2495. var day = dateObject.getDate().toString().padStart(2, "0");
  2496. return `${year}-${month}-${day}`;
  2497. }
  2498. // Update the event listeners to include date inputs
  2499. $("#endDateInput").on("change", function () {
  2500. var starting = $("#startPeriodDropdown").val();
  2501. var ending = $("#endPeriodDropdown").val();
  2502. var startDate = $("#startDateInput").val();
  2503. var endDate = $("#endDateInput").val();
  2504. // Call validateSlot with updated parameters
  2505. validateSlot(starting, ending, startDate, endDate);
  2506. validateForm();
  2507. });
  2508. // Event listener for changes in startPeriodDropdown
  2509. $("#startPeriodDropdown").on("change", function () {
  2510. var starting = $(this).val();
  2511. var ending = $("#endPeriodDropdown").val();
  2512. var startDate = $("#startDateInput").val();
  2513. var endDate = $("#endDateInput").val();
  2514. // Call validateSlot with updated parameters
  2515. validateSlot(starting, ending, startDate, endDate);
  2516. validateForm();
  2517. });
  2518. // Event listener for changes in endPeriodDropdown
  2519. $("#endPeriodDropdown").on("change", function () {
  2520. var starting = $("#startPeriodDropdown").val();
  2521. var ending = $(this).val();
  2522. var startDate = $("#startDateInput").val();
  2523. var endDate = $("#endDateInput").val();
  2524. // Call validateSlot with updated parameters
  2525. // console.log("hiiii");
  2526. validateSlot(starting, ending, startDate, endDate);
  2527. validateForm();
  2528. });
  2529. function validateSlot(starting, ending, startDate, endDate) {
  2530. // Check if startDate is equal to endDate and starting is 2 and ending is 1
  2531. if (startDate === endDate && starting == 2 && ending == 1) {
  2532. Swal.fire({
  2533. icon: 'error',
  2534. title: 'Oops!',
  2535. text: "The starting slot cannot be set to Evening if the ending slot is Morning when the dates are the same.",
  2536. }).then(() => {
  2537. $("#startPeriodDropdown").val(1); // Reset startPeriodDropdown to 1
  2538. });
  2539. }
  2540. validateForm(); // Call validateForm to update form validation status
  2541. }
  2542. function validateForm() {
  2543. var startDate = $("#startDateInput").val();
  2544. var endDate = $("#endDateInput").val();
  2545. var startPeriod = $("#startPeriodDropdown").val();
  2546. var endPeriod = $("#endPeriodDropdown").val();
  2547. var reasonforbooking = $("#reasonforbooking").val();
  2548. if (startDate && endDate && startPeriod !== "0" && endPeriod !== "0") {
  2549. $(".next-step").prop("disabled", false);
  2550. } else {
  2551. $(".next-step").prop("disabled", true);
  2552. }
  2553. }
  2554. // Function to toggle visibility of mobileNoContainer based on usertypes selection
  2555. function handleUserTypeChange() {
  2556. const usertypes = document.getElementById('usertypes').value;
  2557. const mobileNoContainer = document.getElementById('mobileNoContainer');
  2558. if (usertypes === 'public') {
  2559. mobileNoContainer.style.display = 'block';
  2560. } else {
  2561. mobileNoContainer.style.display = 'none';
  2562. }
  2563. }
  2564. function reloadUserInformationForm() {
  2565. // Reset the user type dropdown to 'select'
  2566. $("#usertypes").val("select");
  2567. // Hide the mobile number container
  2568. $("#mobileNoContainer").hide();
  2569. document.getElementById("userInfoForm").reset();
  2570. }
  2571. // Function to handle initial page load and browser back navigation
  2572. document.addEventListener('DOMContentLoaded', function () {
  2573. handleUserTypeChange(); // Call to initially hide/show mobileNoContainer based on usertypes
  2574. });
  2575. // Add event listener for sendOTPButton click
  2576. document.getElementById('sendOTPButton').addEventListener('click', function (event) {
  2577. event.preventDefault();
  2578. checkMobileNo();
  2579. });
  2580. function checkMobileNo() {
  2581. var mobileNo = $("#mobileNumber").val().trim(); // Get and trim the mobile number input value
  2582. // Validate the length of the mobile number
  2583. if (mobileNo.length !== 10) {
  2584. Swal.fire({
  2585. title: "Invalid Mobile Number",
  2586. text: "Please enter a 10-digit mobile number.",
  2587. icon: "error",
  2588. confirmButtonText: "OK",
  2589. });
  2590. return; // Exit function if length is not valid
  2591. }
  2592. $.ajax({
  2593. type: "GET",
  2594. url: '/victoriahallbooking/user/api/counterbookinglimit',
  2595. data: {mobileNo: mobileNo},
  2596. success: function (statusResponse) {
  2597. // console.log("hiiii", statusResponse);
  2598. if (statusResponse === "deactive") {
  2599. Swal.fire({
  2600. title: "Account Deactivated",
  2601. text: "Please contact Admin to active.",
  2602. icon: "info",
  2603. showCancelButton: false,
  2604. confirmButtonText: "OK",
  2605. });
  2606. }
  2607. else if (statusResponse === "bookinglimitreached") {
  2608. // User status is pending, show SweetAlert
  2609. Swal.fire({
  2610. title: "Booking Limitation Reached",
  2611. text: "Sorry, you have reached your booking limit. You are allowed to book up to two times in a year.",
  2612. icon: "info",
  2613. showCancelButton: false,
  2614. confirmButtonText: "OK",
  2615. });
  2616. } else if (statusResponse === "checkmobilenoexists") {
  2617. // User status is not pending, proceed to check mobile number existence
  2618. // console.log("statusResponse===", statusResponse);
  2619. $.ajax({
  2620. type: "GET",
  2621. url: '/victoriahallbooking/user/api/checkMobileExits',
  2622. data: {mobileno: mobileNo},
  2623. success: function (mobileResponse) {
  2624. if (mobileResponse === "success") {
  2625. sendOTP(mobileNo);
  2626. } else {
  2627. var alertMessage = "This Mobile Number Is Not Registered! Please register.";
  2628. $('#otpForm').modal('hide'); // Hide OTP form modal
  2629. $('#loginModal').modal('hide');
  2630. Swal.fire({
  2631. title: "Registration Required",
  2632. html: alertMessage,
  2633. icon: "info",
  2634. showCancelButton: true,
  2635. confirmButtonText: "REGISTER",
  2636. customClass: {
  2637. container: 'custom-swal-container', // Add a custom class to the container
  2638. },
  2639. backdrop: true, // Enable backdrop to prevent clicks on the main popup
  2640. }).then((result) => {
  2641. if (result.isConfirmed) {
  2642. $("#registrationModal").modal('show')
  2643. }
  2644. });
  2645. }
  2646. },
  2647. error: function (errortxt) {
  2648. console.error(errortxt);
  2649. }
  2650. });
  2651. }
  2652. },
  2653. error: function (errortxt) {
  2654. console.error(errortxt);
  2655. }
  2656. });
  2657. }
  2658. function sendOTP(mobileNum) {
  2659. if (mobileNum != "" || mobileNum != undefined || mobileNum != null) {
  2660. mobileNo = mobileNum;
  2661. $("#mobilenotxt").html(mobileNo);
  2662. $.ajax({
  2663. type: "GET",
  2664. url: '/victoriahallbooking/user/api/sendOTP',
  2665. data: {'mobileNo': mobileNo, 'purpose': 'New User'},
  2666. success: function (bodyMessage) {
  2667. if (bodyMessage != "Error") {
  2668. $('#otpForm').modal({
  2669. backdrop: 'static',
  2670. keyboard: false
  2671. });
  2672. $('#otpForm').modal('show');
  2673. startCountdown();
  2674. } else {
  2675. alert("OTP Not Send!!!");
  2676. }
  2677. }
  2678. });
  2679. }
  2680. return false;
  2681. }
  2682. function startCountdown() {
  2683. var resendTimeout;
  2684. $("#resendlink").html('Please wait..<span id="countdown">60</span>s');
  2685. var countdown = $("#countdown");
  2686. var timeleft = 60;
  2687. countdown.text(timeleft);
  2688. resendTimeout = setInterval(function () {
  2689. timeleft--;
  2690. countdown.text(timeleft);
  2691. if (timeleft <= 0) {
  2692. clearInterval(resendTimeout);
  2693. $("#resendlink").html('<a href="#" id="resend-link" class="text-info" onclick="return sendOTP(mobileNo);">Resend OTP</a>');
  2694. }
  2695. }, 1000);
  2696. }
  2697. document.getElementById("backButton").addEventListener("click", function () {
  2698. document.getElementById("profileCard").style.display = "none";
  2699. document.getElementById("container").style.display = "block";
  2700. // Reload the user information form
  2701. reloadUserInformationForm();
  2702. });
  2703. document.getElementById("nextButton").addEventListener("click", function () {
  2704. document.getElementById("profileCard").style.display = "none";
  2705. document.getElementById("nextPageCard").style.display = "block";
  2706. });
  2707. /* document.getElementById("backToProfileButton").addEventListener("click", function () {
  2708. document.getElementById("nextPageCard").style.display = "none";
  2709. document.getElementById("profileCard").style.display = "block";
  2710. });*/
  2711. var verifyLogin = "";
  2712. function verifyOtp() {
  2713. var otpInputs = $('.otp-input');
  2714. var otpValue = '';
  2715. otpInputs.each(function () {
  2716. otpValue += $(this).val();
  2717. });
  2718. var mobileNoValue = $("#mobileNumber").val();
  2719. $.ajax({
  2720. type: "GET",
  2721. url: '/victoriahallbooking/user/api/verifyOTP',
  2722. data: {
  2723. 'otp': otpValue,
  2724. 'mobileNo': mobileNoValue
  2725. },
  2726. dataType: 'text',
  2727. success: function (bodyMessage) {
  2728. if (bodyMessage.trim() == "Success") {
  2729. // console.log("OTP is Verified!!!");
  2730. $('#otpForm').modal('hide');
  2731. if (verifyLogin == "new") {
  2732. var formData = new FormData();
  2733. formData.append('mobileNo', mobileNoValue);
  2734. formData.append('name', $('#name').val());
  2735. formData.append('email', $('#email').val());
  2736. formData.append('doorNo', $('#doorNo').val());
  2737. formData.append('street', $('#street').val());
  2738. formData.append('area', $('#area').val());
  2739. formData.append('location', $('#location').val());
  2740. formData.append('pinCode', $('#pincode').val());
  2741. var photoFile = $('#userPhoto')[0].files[0];
  2742. if (photoFile) {
  2743. formData.append('userPhoto', photoFile);
  2744. }
  2745. $.ajax({
  2746. type: "POST",
  2747. url: '/victoriahallbooking/user/api/newcounterregistrationform',
  2748. data: formData,
  2749. processData: false,
  2750. contentType: false,
  2751. success: function (response) {
  2752. // console.log("Registration successful:", response);
  2753. // alert(response.message);
  2754. showProfileDetailsInCard();
  2755. document.getElementById("profileCard").style.display = "block";
  2756. document.getElementById("container").style.display = "none";
  2757. },
  2758. error: function (jqXHR, textStatus, errorThrown) {
  2759. // console.log("Error registering user:", textStatus, errorThrown);
  2760. alert("Registration failed. Please try again.");
  2761. }
  2762. });
  2763. } else {
  2764. // If already logged in, retrieve user details and display them
  2765. $.ajax({
  2766. type: "GET",
  2767. url: '/victoriahallbooking/user/api/getUserDetails',
  2768. data: {'mobileNo': mobileNoValue},
  2769. success: function (userDetails) {
  2770. // console.log("User details retrieved:", userDetails);
  2771. showexistedProfileDetailsInCard(userDetails); // Pass the user details to the function
  2772. },
  2773. error: function (jqXHR, textStatus, errorThrown) {
  2774. // console.log("Error retrieving user details:", textStatus, errorThrown);
  2775. }
  2776. });
  2777. }
  2778. } else {
  2779. $("#otperror").html("OTP is Incorrect!!!");
  2780. }
  2781. },
  2782. error: function () {
  2783. // console.log("Error verifying OTP");
  2784. }
  2785. });
  2786. return false;
  2787. }
  2788. $('.otp-input').on('keyup', function (e) {
  2789. var $this = $(this);
  2790. if ($this.val().length === 1) {
  2791. $this.next('.otp-input').focus();
  2792. }
  2793. if ($this.val().length === 0) {
  2794. $this.prev('.otp-input').focus();
  2795. }
  2796. });
  2797. function validatePensioner() {
  2798. var pensionerId = $('#pensionerId').val();
  2799. var pensionerName = $('#pensionername').val();
  2800. var mobileNo = $('#mobileno').val();
  2801. var pinCode = $('#pincode').val();
  2802. // Validate mobile number
  2803. if (!/^\d+$/.test(mobileNo) || mobileNo.length !== 10) {
  2804. alert("Mobile number must be a 10-digit number.");
  2805. return false;
  2806. }
  2807. // Validate pincode
  2808. if (!/^\d+$/.test(pinCode) || pinCode.length !== 6) {
  2809. alert("Pincode must be a 6-digit number.");
  2810. return false;
  2811. }
  2812. $.ajax({
  2813. url: 'https://erp.chennaicorporation.gov.in/pgr/external/mobileservice',
  2814. type: 'GET',
  2815. data: {
  2816. serviceId: 'getPensionerDetailsList',
  2817. pensionerId: pensionerId
  2818. },
  2819. success: function (response) {
  2820. // Assuming response is in JSON format
  2821. var pensionerDetails = response.PensionerDetailsResult;
  2822. var message = response.Message;
  2823. // Check if the pensioner details match the entered data
  2824. var isValid = false;
  2825. for (var i = 0; i < pensionerDetails.length; i++) {
  2826. if (pensionerDetails[i].Pensioner_Code === pensionerId && pensionerDetails[i].Name === pensionerName) {
  2827. isValid = true;
  2828. break;
  2829. }
  2830. }
  2831. if (isValid) {
  2832. $('#validationResult').html('Pensioner validated successfully.');
  2833. } else {
  2834. $('#validationResult').html('Invalid pensioner ID or name.');
  2835. }
  2836. },
  2837. error: function (xhr, status, error) {
  2838. console.error('Error:', error);
  2839. $('#validationResult').html('Failed to validate pensioner. Please try again later.');
  2840. }
  2841. });
  2842. }
  2843. document.addEventListener("DOMContentLoaded", function () {
  2844. // Function to fetch employee data from the URL
  2845. function fetchEmployeeData() {
  2846. const url = "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice?serviceId=getEmployeeDetail&EmployeeID=731650";
  2847. fetch(url)
  2848. .then(response => response.json())
  2849. .then(data => {
  2850. // Get input field values
  2851. const employeeId = document.getElementById("employeeId").value;
  2852. const employeeName = document.getElementById("employeename").value;
  2853. const department = document.getElementById("department").value;
  2854. const designation = document.getElementById("designation").value;
  2855. // Compare fetched data with input field values
  2856. if (data.EmployeeID === employeeId && data.EmployeeName === employeeName && data.Department === department && data.Designation === designation) {
  2857. alert("Data validated successfully!");
  2858. } else {
  2859. alert("Error: Data validation failed!");
  2860. }
  2861. })
  2862. .catch(error => {
  2863. console.error("Error fetching employee data:", error);
  2864. alert("Error: Unable to fetch employee data. Please try again later.");
  2865. });
  2866. }
  2867. // Add event listener for button click
  2868. // document.getElementById("validateButton").addEventListener("click", fetchEmployeeData);
  2869. });
  2870. function validateUserType() {
  2871. var usertype = $("#userType").val();
  2872. if (usertype == "PUBLIC") {
  2873. validateNumber();
  2874. return false;
  2875. }
  2876. else if (usertype == "GCC_EMPLOYEE") {
  2877. var employeeId = $("#employeeId").val();
  2878. // console.log(employeeId);
  2879. $.ajax({
  2880. type: "GET",
  2881. url: '/victoriahallbooking/user/api/EmployeeDetails',
  2882. data: {'employeeId': $("#employeeId").val()},
  2883. success: function (response) {
  2884. // console.log(response);
  2885. if (response.ResultStatus == false) {
  2886. var alertMessage = "The Employee Id Not Found! " + employeeId;
  2887. Swal.fire({
  2888. title: "Oops",
  2889. html: alertMessage,
  2890. icon: "info",
  2891. showCancelButton: false,
  2892. confirmButtonText: "Ok"
  2893. });
  2894. return false;
  2895. } else if (response.ResultStatus) {
  2896. $("#employeename").val(response.EmployeeDetailsResult[0].name);
  2897. validateNumber();
  2898. }
  2899. },
  2900. error: function () {
  2901. // console.log("Error");
  2902. }
  2903. });
  2904. return false;
  2905. }
  2906. else if (usertype == "FAMILYPENSIONER") {
  2907. $.ajax({
  2908. type: "GET",
  2909. url: '/victoriahallbooking/user/api/FamilyPensionerDetails',
  2910. data: {'id': $("#familypensionerId").val()},
  2911. success: function (response) {
  2912. if (response.mobileNo) {
  2913. $("#mobileno").val(response.mobileNo);
  2914. validateNumber();
  2915. } else {
  2916. var alertMessage = "The Pensioner Id Not Found!";
  2917. Swal.fire({
  2918. title: "Oops",
  2919. html: alertMessage,
  2920. icon: "info",
  2921. showCancelButton: false,
  2922. confirmButtonText: "Ok"
  2923. });
  2924. }
  2925. },
  2926. error: function (xhr, status, error) {
  2927. console.error(xhr.responseText);
  2928. }
  2929. });
  2930. return false;
  2931. }
  2932. else if (usertype == "PENSIONER") {
  2933. $.ajax({
  2934. type: "GET",
  2935. url: '/victoriahallbooking/user/api/PensionerDetails',
  2936. data: {'id': $("#pensionerId").val()},
  2937. success: function (response) {
  2938. if (response.mobileNo) {
  2939. $("#mobileno").val(response.mobileNo);
  2940. validateNumber();
  2941. } else {
  2942. var alertMessage = "The Pensioner Id Not Found!";
  2943. Swal.fire({
  2944. title: "Oops",
  2945. html: alertMessage,
  2946. icon: "info",
  2947. showCancelButton: false,
  2948. confirmButtonText: "Ok"
  2949. });
  2950. }
  2951. },
  2952. error: function (xhr, status, error) {
  2953. console.error(xhr.responseText);
  2954. }
  2955. });
  2956. return false;
  2957. }
  2958. return false;
  2959. }
  2960. function validateNumber() {
  2961. var mobileNo = $("#mobileno").val();
  2962. $.ajax({
  2963. type: "GET",
  2964. url: '/victoriahallbooking/user/api/checkMobileExits',
  2965. data: {'mobileno': mobileNo},
  2966. success: function (bodyMessage) {
  2967. if (bodyMessage == "success") {
  2968. var alertMessage = "This Mobile Number Is Already Registered!</a>";
  2969. $('#otpForm').modal('hide');
  2970. //$('#registrationModal').modal('show');
  2971. Swal.fire({
  2972. title: "Mobile Number exist",
  2973. html: alertMessage,
  2974. icon: "info",
  2975. showCancelButton: false,
  2976. confirmButtonText: "Ok"
  2977. });
  2978. return false;
  2979. } else {
  2980. $('#registrationModal').modal('hide');
  2981. verifyLogin = "new";
  2982. sendOTP(mobileNo);
  2983. return false;
  2984. }
  2985. },
  2986. error: function (errortxt) {
  2987. console.error(errortxt);
  2988. }
  2989. });
  2990. return false;
  2991. }
  2992. function showProfileDetailsInCard() {
  2993. $.ajax({
  2994. url: '/victoriahallbooking/user/api/getuserforcounter',
  2995. type: 'GET',
  2996. data: {
  2997. 'userId': 0 // Use session user ID if not provided
  2998. },
  2999. success: function (response) {
  3000. // Check if the response contains expected user details
  3001. if (response && response.name) {
  3002. $('#p_name_card').val(response.name);
  3003. $('#p_email_card').val(response.email);
  3004. $('#p_mobnum_card').val(response.mobileNo);
  3005. $('#p_doornum_card').val(response.doorNo);
  3006. $('#p_area_card').val(response.area);
  3007. $('#p_location_card').val(response.location);
  3008. $('#p_pincode_card').val(response.pinCode);
  3009. $('#p_userstatus_card').val(response.userstatus);
  3010. $('#p_image_card').attr('src', response.profilephoto);
  3011. $('#profileCard').show(); // Show the profile card
  3012. $('#container').hide(); // Hide the container
  3013. } else {
  3014. console.error("Profile details not found in response.");
  3015. // Optionally, you can show an error message to the user
  3016. }
  3017. },
  3018. error: function (xhr, status, error) {
  3019. console.error("Error occurred while fetching user details:", xhr.responseText);
  3020. // Optionally, you can show an error message to the user
  3021. }
  3022. });
  3023. }
  3024. function showexistedProfileDetailsInCard(userDetails) {
  3025. // Check if user details are provided
  3026. if (userDetails && userDetails.name) {
  3027. $('#p_name_card').val(userDetails.name);
  3028. $('#p_email_card').val(userDetails.email);
  3029. $('#p_mobnum_card').val(userDetails.mobileNo);
  3030. $('#p_doornum_card').val(userDetails.doorNo);
  3031. $('#p_area_card').val(userDetails.area);
  3032. $('#p_location_card').val(userDetails.location);
  3033. $('#p_pincode_card').val(userDetails.pinCode);
  3034. $('#p_userstatus_card').val(userDetails.userstatus);
  3035. $('#p_image_card').attr('src', userDetails.profilephoto);
  3036. $('#profileCard').show(); // Show the profile card
  3037. $('#container').hide(); // Hide the container
  3038. } else {
  3039. console.error("Profile details not found in response.");
  3040. // Optionally, you can show an error message to the user
  3041. }
  3042. }
  3043. // Attach CSS styles for error messages dynamically
  3044. $('head').append('<style>.error-message { color: red; font-size: 12px; margin-top: 5px; }</style>');
  3045. $('.file-upload-field').on('change', function () {
  3046. const file = this.files[0];
  3047. if (file && file.size > 2097152) { // size is in bytes
  3048. $(this).addClass('error'); // Add error class
  3049. $(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
  3050. this.value = ''; // Reset the file input
  3051. } else {
  3052. $(this).removeClass('error'); // Remove error class
  3053. $(this).next('.error-message').remove(); // Remove error message if present
  3054. }
  3055. });
  3056. document.getElementById("bankAccNo").addEventListener("input", function (e) {
  3057. var value = e.target.value;
  3058. if (!/^\d*$/.test(value)) {
  3059. e.target.setCustomValidity("Please enter only Numbers without space.");
  3060. } else {
  3061. e.target.setCustomValidity("");
  3062. }
  3063. });
  3064. document.getElementById("ddNumber").addEventListener("input", function (e) {
  3065. var value = e.target.value;
  3066. if (!/^\d*$/.test(value)) {
  3067. e.target.setCustomValidity("Please enter only Numbers without space.");
  3068. } else {
  3069. e.target.setCustomValidity("");
  3070. }
  3071. });
  3072. document.getElementById("bankName").addEventListener("input", function (e) {
  3073. var value = e.target.value;
  3074. if (!/^[A-Za-z\s-]*$/.test(value)) {
  3075. e.target.setCustomValidity("Please enter only Alphabets letters.");
  3076. } else {
  3077. e.target.setCustomValidity("");
  3078. }
  3079. });
  3080. function paymentForCounter() {
  3081. var userId = document.getElementById("userId").value;
  3082. var bookingId = document.getElementById("bookingId").value;
  3083. paymentStart(userId, bookingId, true);
  3084. }
  3085. </script>
  3086. </body>
  3087. </html>