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.

1676 lines
56 KiB

2 years ago
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
  3. <head th:replace="~{fragments/head :: head}"></head>
  4. <script src="https://cdn.jsdelivr.net/npm/compressorjs@5.0.3/dist/compressor.js"></script>
  5. <script src="https://cdn.jsdelivr.net/npm/sockjs-client"></script>
  6. <!--<script src="https://cdn.jsdelivr.net/npm/stompjs"></script>-->
  7. <script src="https://cdn.jsdelivr.net/npm/stompjs@2.3.3/lib/stomp.min.js"></script>
  8. <style>
  9. .table-align {
  10. width: 100%;
  11. }
  12. .td-align {
  13. padding: 8px;
  14. border: 1px solid #ddd;
  15. }
  16. @media (max-width: 600px) {
  17. .td-align {
  18. display: block;
  19. width: 100%;
  20. box-sizing: border-box;
  21. }
  22. }
  23. .center-table {
  24. justify-content: center;
  25. align-items: center;
  26. }
  27. .highlight-blue .ui-state-default {
  28. background: blue !important;
  29. color: #FFF !important;
  30. }
  31. .highlight-greens .ui-state-default {
  32. background: green !important;
  33. color: #FFF !important;
  34. }
  35. .highlight-yellow .ui-state-default {
  36. background: yellow !important;
  37. color: #000 !important;
  38. }
  39. .highlight-violet .ui-state-default {
  40. background: #a93da9 !important;
  41. color: #000 !important;
  42. }
  43. .highlight-pink .ui-state-default {
  44. background: red !important;
  45. color: #000 !important;
  46. }
  47. .highlight-lightpink .ui-state-default {
  48. background: lightpink !important;
  49. color: #FFF !important;
  50. }
  51. .btn-square-md {
  52. width: 16px !important;
  53. max-width: 100% !important;
  54. max-height: 50% !important;
  55. height: 30px !important;
  56. text-align: center;
  57. padding: 0px;
  58. font-size: 2px;
  59. }
  60. .disabled {
  61. pointer-events: none;
  62. opacity: 1;
  63. /* Example: reduce opacity to indicate disabled state */
  64. }
  65. .ui-datepicker {
  66. width: 100%;
  67. background-color: #333;
  68. }
  69. .ui-datepicker-header {
  70. background-color: #f0f0f0;
  71. /* Light gray background for header */
  72. border: none;
  73. border-radius: 5px 5px 0 0;
  74. }
  75. .ui-datepicker-title {
  76. font-size: 1.2em;
  77. margin: 0;
  78. padding: 10px;
  79. text-align: center;
  80. }
  81. .ui-datepicker-calendar {
  82. margin: 0;
  83. padding: 0;
  84. color: white;
  85. /* Text color for dates */
  86. font-weight: bold;
  87. /* Bold font for dates */
  88. }
  89. .ui-datepicker-calendar th,
  90. .ui-datepicker-calendar td {
  91. text-align: center;
  92. }
  93. .ui-datepicker-week-end {
  94. color: yellow;
  95. font-weight: bold;
  96. }
  97. /* Style for the label */
  98. .date-label {
  99. display: block;
  100. margin-bottom: 6px;
  101. font-weight: bold;
  102. }
  103. .highlight-current-date a {
  104. background-color: green;
  105. /* Current date highlight color */
  106. color: white;
  107. }
  108. .highlight-greens a {
  109. background-color: green;
  110. color: white;
  111. }
  112. .highlight-blue a {
  113. background-color: blue;
  114. color: white;
  115. }
  116. .highlight-yellow a {
  117. background-color: yellow;
  118. color: black;
  119. /* Change text color for visibility */
  120. }
  121. .highlight-pink a,
  122. input[type=button]:disabled {
  123. background-color: pink;
  124. /* Pink highlight for disabled or booked dates */
  125. color: white;
  126. }
  127. .highlight-lightpink a,
  128. input[type=button]:disabled {
  129. background-color: lightpink;
  130. color: white;
  131. }
  132. .highlight-orange a {
  133. background-color: orange;
  134. /* Orange highlight color */
  135. color: white;
  136. }
  137. input[type=button]:disabled {
  138. background: red;
  139. }
  140. .hidden {
  141. display: none;
  142. }
  143. #selecthall.select2-container--default .select2-selection--single {
  144. height: 35px;
  145. border: 1px solid #ddd;
  146. padding-left: 10px;
  147. }
  148. .select2-container--default .select2-selection--single .select2-selection__rendered {
  149. color: #444;
  150. line-height: 28px;
  151. margin-top: -8px;
  152. }
  153. #hallDetailsContainer {
  154. display: flex;
  155. flex-direction: column;
  156. align-items: center;
  157. /* Center items horizontally */
  158. justify-content: center;
  159. /* Center items vertically */
  160. border: 1px solid #ccc;
  161. border-radius: 5px;
  162. padding: 20px;
  163. margin-top: 20px;
  164. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  165. background-color: #fff;
  166. }
  167. /* Style for the image */
  168. #hallImagesCarousel {
  169. margin-bottom: 20px;
  170. }
  171. .row {
  172. display: flex;
  173. flex-wrap: wrap;
  174. margin-right: 0px;
  175. margin-left: 0px;
  176. }
  177. .col-md-6 {
  178. width: 50%;
  179. padding: 0 10px;
  180. /* Optional: Add padding to columns */
  181. }
  182. @media (max-width: 768px) {
  183. .col-md-6 {
  184. width: 100%;
  185. /* Full width on smaller screens */
  186. }
  187. }
  188. #hallDetailsContainer p {
  189. margin: 0;
  190. padding: 5px 0;
  191. }
  192. #hallDetailsContainer p:nth-child(even) {
  193. background-color: #f9f9f9;
  194. }
  195. /* CSS styles for the amount details container */
  196. #amountDetailsContainer {
  197. border: 1px solid #ccc;
  198. border-radius: 5px;
  199. padding: 20px;
  200. margin-top: 20px;
  201. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  202. background-color: #fff;
  203. }
  204. #amountDetailsContainer h4 {
  205. margin-top: 0;
  206. margin-bottom: 10px;
  207. }
  208. #amountDetailsContainer div {
  209. list-style: none;
  210. padding: 0;
  211. }
  212. #amountDetailsContainer p {
  213. margin-bottom: 10px;
  214. }
  215. #amountDetailsContainer p span {
  216. font-weight: bold;
  217. }
  218. #amountDetailsContainer p:nth-child(even) {
  219. background-color: #f9f9f9;
  220. }
  221. /* Style for the image container */
  222. #hallImagesCarousel {
  223. display: flex;
  224. justify-content: center;
  225. /* Center content horizontally */
  226. align-items: center;
  227. /* Center content vertically */
  228. margin-bottom: 20px;
  229. position: relative;
  230. }
  231. /* Style for the images inside the carousel */
  232. .carousel-item img {
  233. max-width: 100%;
  234. /* Ensure image does not exceed container width */
  235. min-height: 9%;
  236. /* Maintain aspect ratio */
  237. display: block;
  238. /* Ensure image is block-level element */
  239. max-width: 100%;
  240. max-height: 100%;
  241. display: block;
  242. margin: 0 auto;
  243. /* Center the image horizontally */
  244. }
  245. .content-container {
  246. padding: 20px;
  247. }
  248. .otp-input {
  249. width: 30px;
  250. height: 30px;
  251. border: 1px solid #ccc;
  252. border-radius: 5px;
  253. text-align: center;
  254. font-size: 16px;
  255. margin-right: 10px;
  256. }
  257. /* Ensures content within these classes is centered */
  258. .modal-header,
  259. .modal-body,
  260. .modal-footer,
  261. #resend-container {
  262. text-align: center;
  263. }
  264. /* Center content with Flexbox if needed */
  265. .center-flex {
  266. display: flex;
  267. justify-content: center;
  268. align-items: center;
  269. flex-direction: column;
  270. /* Stack elements vertically */
  271. }
  272. /* Adjust the margin of the otp-input-box for better alignment */
  273. .otp-input-box {
  274. justify-content: center;
  275. margin: 0 auto;
  276. /* Centers the box horizontally */
  277. align-items: center;
  278. /* Align items in the center for flex containers */
  279. width: 100%;
  280. }
  281. .center-content {
  282. display: flex;
  283. justify-content: center;
  284. align-items: center;
  285. height: 100%;
  286. /* Or set a specific height */
  287. flex-direction: column;
  288. /* Stack children vertically */
  289. }
  290. /* To ensure the form takes up the necessary width */
  291. .form-group {
  292. width: 100%;
  293. /* Adjust based on your layout's needs */
  294. }
  295. /* Custom styles for the jQuery UI Dialog */
  296. .custom-dialog .ui-dialog-content {
  297. background-color: #fff;
  298. color: #333;
  299. padding: 20px;
  300. }
  301. .custom-dialog .ui-dialog-titlebar {
  302. background: #007bff;
  303. color: #ffffff;
  304. }
  305. .custom-dialog .ui-dialog-buttonpane {
  306. background-color: #f1f1f1;
  307. }
  308. .custom-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button {
  309. background-color: #007bff;
  310. color: #ffffff;
  311. border-color: #007bff;
  312. }
  313. .custom-dialog a {
  314. color: #007bff;
  315. text-decoration: none;
  316. }
  317. .custom-dialog a:hover {
  318. text-decoration: underline;
  319. }
  320. table {
  321. width: 100%;
  322. border-collapse: collapse;
  323. }
  324. th,
  325. td {
  326. border: 1px solid black;
  327. padding: 8px;
  328. text-align: center;
  329. }
  330. .date-box {
  331. border: 1px solid #ccc;
  332. padding: 10px;
  333. margin: 5px;
  334. text-align: center;
  335. background-color: #f8f9fa;
  336. border-radius: 5px;
  337. }
  338. .checkbox-label {
  339. display: block;
  340. margin-top: 5px;
  341. }
  342. #calendar {
  343. margin-top: 20px;
  344. padding: 20px;
  345. border: 1px solid #ccc;
  346. border-radius: 5px;
  347. background-color: #f8f9fa;
  348. }
  349. /* Style for date checkboxes */
  350. .date-checkboxes {
  351. margin-top: 10px;
  352. }
  353. label {
  354. margin-right: 10px;
  355. }
  356. .ui-datepicker-container {
  357. width: 100%
  358. }
  359. .fixedcontainer {
  360. width: 250%;
  361. margin: 40px 0;
  362. }
  363. .ui-widget {
  364. width: 40%
  365. }
  366. .ui-datepicker {
  367. padding: 3px;
  368. border: 1px solid #ccc;
  369. border-radius: 5px;
  370. background-color: white;
  371. left: 29.1418px;
  372. }
  373. .ui-datepicker-header {
  374. background-color: #f0f0f0;
  375. border: none;
  376. border-radius: 5px 5px 0 0;
  377. }
  378. .ui-datepicker-title {
  379. font-size: 1.2em;
  380. margin: 0;
  381. padding: 10px;
  382. text-align: center;
  383. }
  384. .ui-datepicker-calendar {
  385. margin: 0;
  386. padding: 0;
  387. font-weight: bold;
  388. /* Bold font for dates */
  389. }
  390. .ui-datepicker-calendar th,
  391. .ui-datepicker-calendar td {
  392. padding: 5px;
  393. text-align: center;
  394. }
  395. .ui-datepicker-calendar .ui-state-default {
  396. cursor: pointer;
  397. width: 100%;
  398. height: 100%;
  399. display: flex;
  400. justify-content: center;
  401. align-items: center;
  402. }
  403. .ui-datepicker-week-end {
  404. color: black;
  405. font-weight: bold;
  406. }
  407. .ui-datepicker-calendar th span {
  408. color: black;
  409. font-weight: bold;
  410. }
  411. .booking-form-container {
  412. margin: 20px auto;
  413. padding: 20px;
  414. border: 1px solid #ddd;
  415. border-radius: 8px;
  416. background-color: #f9f9f9;
  417. max-width: 960px;
  418. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  419. }
  420. .booking-form-container label {
  421. font-weight: bold;
  422. }
  423. .booking-form-container .form-control {
  424. margin-bottom: 10px;
  425. }
  426. .booking-form-container .btn-primary {
  427. background-color: #017bff;
  428. }
  429. .white-background {
  430. background-color: white;
  431. /* Set the background color as needed */
  432. border: 1px solid #ccc;
  433. /* Optional: Add border for better visualization */
  434. padding: 20px;
  435. margin-bottom: 20px;
  436. overflow: hidden;
  437. /* Hide overflow content during animation */
  438. position: relative;
  439. }
  440. .slide-left {
  441. animation: slideLeft 0.5s ease both;
  442. }
  443. .slide-right {
  444. animation: slideRight 0.5s ease both;
  445. }
  446. @keyframes slideLeft {
  447. 0% {
  448. transform: translateX(0);
  449. }
  450. 100% {
  451. transform: translateX(-100%);
  452. opacity: 0;
  453. }
  454. }
  455. @keyframes slideRight {
  456. 0% {
  457. transform: translateX(-100%);
  458. opacity: 0;
  459. }
  460. 100% {
  461. transform: translateX(0);
  462. opacity: 1;
  463. }
  464. }
  465. /* Apply styles to the booking-section container */
  466. .booking-section {
  467. margin: 20px auto;
  468. padding: 20px;
  469. border: 1px solid #ddd;
  470. border-radius: 8px;
  471. background-color: #f9f9f9;
  472. max-width: 960px;
  473. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  474. }
  475. .booking-section label {
  476. font-weight: bold;
  477. }
  478. .booking-section .form-control {
  479. margin-bottom: 10px;
  480. }
  481. .booking-section .btn-primary {
  482. background-color: #017bff;
  483. }
  484. /* Apply white background to the booking-section */
  485. #reasonforbookingSection {
  486. background-color: #ffffff;
  487. /* White background color */
  488. padding: 20px;
  489. /* Optional: Add padding for spacing */
  490. }
  491. body {
  492. font-family: Arial, sans-serif;
  493. margin: 0;
  494. padding: 0;
  495. }
  496. .progressbar {
  497. display: flex;
  498. margin-bottom: 20px;
  499. }
  500. .progress-step {
  501. width: 100%;
  502. height: 9px;
  503. background-color: #e0e0e0;
  504. /* Light gray background */
  505. border-radius: 10px;
  506. /* Rounded corners */
  507. margin-right: 10px;
  508. }
  509. .progress-step-active {
  510. background-color: #4caf50;
  511. /* Green active step */
  512. color: white;
  513. /* White text color */
  514. font-weight: bold;
  515. /* Bold font for active step */
  516. }
  517. .progress {
  518. width: 100%;
  519. height: 10px;
  520. background-color: #ddd;
  521. position: relative;
  522. }
  523. .progress-step::before {
  524. content: attr(data-title);
  525. display: block;
  526. position: absolute;
  527. top: 20px;
  528. left: 50%;
  529. transform: translateX(-50%);
  530. font-size: 12px;
  531. color: #888;
  532. }
  533. .form {
  534. margin-bottom: 20px;
  535. }
  536. .form-step {
  537. display: none;
  538. margin-bottom: 20px;
  539. }
  540. .form-step-active {
  541. display: block;
  542. }
  543. .btn-prev,
  544. .btn-next {
  545. padding: 10px 20px;
  546. font-size: 14px;
  547. cursor: pointer;
  548. border: none;
  549. background-color: #337ab7;
  550. color: #fff;
  551. }
  552. .btn-prev {
  553. margin-right: 10px;
  554. }
  555. /* Media Query for small screens */
  556. @media (max-width: 768px) {
  557. .progress-step::before {
  558. display: none;
  559. /* Hide step titles on small screens */
  560. }
  561. }
  562. #container {
  563. max-width: 1183px;
  564. }
  565. .step-container {
  566. position: relative;
  567. text-align: center;
  568. transform: translateY(-60%);
  569. }
  570. .step-circle {
  571. width: 30px;
  572. height: 30px;
  573. line-height: 29px;
  574. text-align: center;
  575. border-radius: 50%;
  576. cursor: pointer;
  577. background-color: #016d6f;
  578. color: white;
  579. border: 2px solid #016d6f;
  580. }
  581. .step-circle.active {
  582. background-color: #FFFFFF;
  583. color: #016d6f;
  584. }
  585. .step-line {
  586. position: absolute;
  587. top: 16px;
  588. left: 50px;
  589. width: calc(100% - 100px);
  590. height: 2px;
  591. background-color: #FFFFFF;
  592. /* Set the line color here */
  593. z-index: -1;
  594. }
  595. #multi-step-form {
  596. overflow-x: hidden;
  597. }
  598. body {
  599. font-family: Arial, sans-serif;
  600. margin: 0;
  601. padding: 0;
  602. }
  603. .custom-container {
  604. padding: 20px;
  605. border-radius: 8px;
  606. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  607. background-color: #FFFFFF;
  608. border: 1px solid #CCCCCC;
  609. overflow: auto;
  610. }
  611. .header {
  612. z-index: 1000;
  613. margin-bottom: 20px;
  614. }
  615. .logo-img {
  616. height: 30px;
  617. position: absolute;
  618. left: 10px;
  619. top: 10px;
  620. }
  621. .header h6 {
  622. color: white;
  623. text-align: center;
  624. margin: 0;
  625. line-height: 2.1;
  626. }
  627. .invoice-details h3 {
  628. margin: 5px 0;
  629. }
  630. .invoice-details p {
  631. margin: 5px 0;
  632. /* Adjusted margin for <p> tags */
  633. }
  634. .total-section {
  635. margin-top: 20px;
  636. text-align: right;
  637. }
  638. .step-content p {
  639. display: inline-block;
  640. margin-right: 20px;
  641. margin-bottom: 20px;
  642. }
  643. .error {
  644. border: 1px solid red;
  645. }
  646. .error-message {
  647. color: red;
  648. font-size: 12px;
  649. padding-top: 5px;
  650. }
  651. /* Style for small thumbnail images */
  652. .thumbnail-img {
  653. width: 44px;
  654. /* Adjust the width as needed */
  655. height: 35px;
  656. /* Adjust the height as needed */
  657. cursor: pointer;
  658. /* Show cursor as pointer on hover */
  659. margin-right: 10px;
  660. /* Optional margin between images */
  661. }
  662. .large-image-container {
  663. position: fixed;
  664. top: 10%;
  665. left: 34%;
  666. width: 36%;
  667. height: 72%;
  668. background-color: slategrey;
  669. z-index: 1050;
  670. /* High z-index to ensure it's on top of other content */
  671. padding: 25px;
  672. box-sizing: border-box;
  673. overflow: hidden;
  674. /* Prevents scrollbars from iframe from appearing outside the container */
  675. }
  676. #largeImage {
  677. max-width: 90%;
  678. /* Limit maximum width of large image */
  679. max-height: 90vh;
  680. /* Limit maximum height of large image */
  681. display: block;
  682. /* Ensure it behaves as a block element */
  683. margin: 0 auto;
  684. /* Center horizontally */
  685. }
  686. .btn-square-md {
  687. width: 72px !important;
  688. max-width: 100% !important;
  689. max-height: 50% !important;
  690. height: 18px !important;
  691. text-align: center;
  692. padding: 0px;
  693. font-size: 2px;
  694. }
  695. .close-button {
  696. position: absolute;
  697. top: 5px;
  698. right: 5px;
  699. z-index: 1051;
  700. /* Ensure close button is above the iframe */
  701. }
  702. iframe {
  703. width: 100%;
  704. height: 100%;
  705. /* Take full size of the container minus any paddings if necessary */
  706. border: none;
  707. }
  708. #uploadedDocsList {
  709. list-style-type: none;
  710. /* Removes the bullet points */
  711. padding: 0;
  712. /* Removes padding */
  713. margin: 0;
  714. /* Removes margin */
  715. }
  716. #uploadedDocsList li {
  717. margin-bottom: 10px;
  718. text-wrap: balance;
  719. /* Adds space between items */
  720. }
  721. #termsModal .table td,
  722. #termsModal .table th {
  723. padding: 0.5rem;
  724. /* Reducing padding */
  725. font-size: 0.8rem;
  726. /* Smaller font size */
  727. }
  728. .table-wrap td {
  729. white-space: normal;
  730. word-wrap: break-word;
  731. }
  732. .swal2-container {
  733. z-index: 9999999999999 !important;
  734. /* Adjust this value if needed */
  735. }
  736. #ui-datepicker-div {
  737. width: 40%;
  738. }
  739. /* Media query for mobile screens */
  740. @media (max-width: 768px) {
  741. #ui-datepicker-div {
  742. width: 72%;
  743. }
  744. }
  745. .highlight-disabled {
  746. cursor: default !important;
  747. /* Default cursor for disabled dates */
  748. }
  749. .form-check-label {
  750. padding-left: 0px
  751. }
  752. h5 {
  753. margin-left: 10px;
  754. }
  755. .table-bordered {
  756. border: 1px solid black;
  757. /* Set the border color to black */
  758. }
  759. .table-bordered td,
  760. .table-bordered th {
  761. border-color: black;
  762. /* Ensure that all table cells and headers have a black border */
  763. }
  764. .sand-clock::before {
  765. content: "\231B";
  766. /* Unicode for hourglass icon */
  767. display: inline-block;
  768. animation: move 1.5s infinite;
  769. font-size: 1.2em;
  770. /* Adjust size as needed */
  771. }
  772. /* Animation keyframes */
  773. @keyframes move {
  774. 0% {
  775. transform: translateY(0);
  776. }
  777. 50% {
  778. transform: translateY(-5px);
  779. }
  780. 100% {
  781. transform: translateY(0);
  782. }
  783. }
  784. .snackbar {
  785. visibility: hidden;
  786. min-width: 250px;
  787. margin-left: -125px;
  788. background-color: #333;
  789. color: #fff;
  790. text-align: center;
  791. border-radius: 5px;
  792. padding: 16px;
  793. position: fixed;
  794. z-index: 1;
  795. left: 50%;
  796. bottom: 30px;
  797. font-size: 17px;
  798. }
  799. .snackbar.show {
  800. visibility: visible;
  801. animation: fadeInOut 0.5s, fadeOut 0.5s 2.5s;
  802. }
  803. @keyframes fadeInOut {
  804. from {
  805. bottom: 0;
  806. opacity: 0;
  807. }
  808. to {
  809. bottom: 30px;
  810. opacity: 1;
  811. }
  812. }
  813. @keyframes fadeOut {
  814. from {
  815. bottom: 30px;
  816. opacity: 1;
  817. }
  818. to {
  819. bottom: 0;
  820. opacity: 0;
  821. }
  822. }
  823. .highlight-blue .ui-state-default {
  824. background: blue !important;
  825. color: #FFF !important;
  826. }
  827. .highlight-blue a {
  828. background-color: blue;
  829. color: white;
  830. }
  831. </style>
  832. <body>
  833. <!-- Pre-loader start-->
  834. <div class="theme-loader">
  835. <div class="ball-scale">
  836. <div class='contain'>
  837. <div class="ring">
  838. <div class="frame"></div>
  839. </div>
  840. <div class="ring">
  841. <div class="frame"></div>
  842. </div>
  843. <div class="ring">
  844. <div class="frame"></div>
  845. </div>
  846. <div class="ring">
  847. <div class="frame"></div>
  848. </div>
  849. <div class="ring">
  850. <div class="frame"></div>
  851. </div>
  852. <div class="ring">
  853. <div class="frame"></div>
  854. </div>
  855. <div class="ring">
  856. <div class="frame"></div>
  857. </div>
  858. <div class="ring">
  859. <div class="frame"></div>
  860. </div>
  861. <div class="ring">
  862. <div class="frame"></div>
  863. </div>
  864. <div class="ring">
  865. <div class="frame"></div>
  866. </div>
  867. </div>
  868. </div>
  869. </div>
  870. <!--Pre-loader end\-->
  871. <div id="pcoded" class="pcoded">
  872. <div class="pcoded-container">
  873. <!-- Menu header end ;-->
  874. <div class="pcoded-main-container">
  875. <!--Menu header start-->
  876. <nav th:replace="~{fragments/nav-user :: nav}"></nav>
  877. <!-- Menu header end-->
  878. <div class="pcoded-main-container">
  879. <nav th:replace="~{fragments/nav-usermenu :: nav}"></nav>
  880. <div class="pcoded-wrapper">
  881. <div class="pcoded-content">
  882. <div class="pcoded-inner-content">
  883. <div class="page-header m-t-20">
  884. </div>
  885. <!--Page-header end-->
  886. <!--Page body start -->
  887. <div class="page-body">
  888. <div class="row">
  889. <div class="col-sm-12">
  890. <!--Register your self card start -->
  891. <div>
  892. <div id="container" class="container mt-5">
  893. <div class="step step-1">
  894. <!--<h5>Step:1</h5>-->
  895. <div class="container custom-container"
  896. style="border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); background-color: #FFFFFF; border: 1px solid #CCCCCC;overflow-x: hidden;">
  897. <!-- Updated inline styles -->
  898. <div class="row justify-content-center">
  899. <div class="col-sm-6 col-md-6 col-lg-6">
  900. <label class="form-check-label"
  901. for="selecthall">Select Hall:</label>
  902. <select id="selecthall" class="form-control"
  903. name="hallId" required
  904. onchange="toggleHallDetailsContainer()">
  905. <option value="">Select a hall</option>
  906. </select>
  907. </div>
  908. </div>
  909. <br>
  910. <!-- Main content row-->
  911. <div id="hallDetailsContainer" style="display: none;">
  912. <!-- Initially hidden-->
  913. <div class="row">
  914. <input type="hidden" id="serverDate" th:value=${serverDate}>
  915. <!--Hall Images Carousel -->
  916. <div class="col-md-6 col-lg-6 col-sm-6">
  917. <h6>Hall Images:</h6>
  918. <br>
  919. <div id="hallImagesCarousel"
  920. class="carousel slide" data-ride="carousel">
  921. <div class="carousel-inner">
  922. <div class="carousel-item active">
  923. <img id="hallImage"
  924. class="d-block w-100"
  925. alt="Hall Image">
  926. </div>
  927. </div>
  928. <a class="carousel-control-prev"
  929. href="#hallImagesCarousel" role="button"
  930. data-slide="prev">
  931. <span class="carousel-control-prev-icon"
  932. aria-hidden="true"></span>
  933. <span class="sr-only">Previous</span>
  934. </a>
  935. <a class="carousel-control-next"
  936. href="#hallImagesCarousel" role="button"
  937. data-slide="next">
  938. <span class="carousel-control-next-icon"
  939. aria-hidden="true"></span>
  940. <span class="sr-only">Next</span>
  941. </a>
  942. </div>
  943. </div>
  944. <div class="col-md-6 col-lg-6 col-sm-6">
  945. <div id="datepicker-container"
  946. class="fixedcontainer"></div>
  947. <div class="row">
  948. <div class="col col-lg-2 col-sm-2 col-md-2">
  949. <button type="button"
  950. class="btn btn-primary btn-square-md"
  951. style="background-color:#008000;"></button>
  952. <span style="margin-left: 21px;">Day<br>
  953. (Available)</span>
  954. </div>
  955. <div class="col col-lg-2 col-sm-2 col-md-2">
  956. <button type="button"
  957. class="btn btn-primary btn-square-md"
  958. style="background-color: #ac2bac;"></button>
  959. <span style="margin-left: 14px;">Morning <br>
  960. (Available)</span>
  961. </div>
  962. <div class="col col-lg-2 col-sm-2 col-md-2">
  963. <button type="button"
  964. class="btn btn-primary btn-square-md"
  965. style="background-color:#FFEA00;"></button>
  966. <span style="margin-left: 14px;">Evening<br>
  967. (Available)</span>
  968. </div>
  969. <div class="col col-lg-2 col-sm-2 col-md-2">
  970. <button type="button"
  971. class="btn btn-primary btn-square-md"
  972. style="background-color: red;"></button>
  973. <span style="margin-left: 14px;">Not
  974. Available</span>
  975. </div>
  976. <div class="col col-lg-2 col-sm-2 col-md-2">
  977. <button type="button"
  978. class="btn btn-primary btn-square-md"
  979. style="background-color: blue;"></button>
  980. <span style="margin-left: 14px;">Gcc
  981. Blocked</span>
  982. </div>
  983. <!--<div class="col col-lg-2 col-sm-2 col-md-2">
  984. <button type="button"
  985. class="btn btn-primary btn-square-md"
  986. style="background-color: lightpink"></button>
  987. <span style="margin-left:-2px;">Temporary Blocked</span>
  988. </div>-->
  989. </div>
  990. </div>
  991. <br>
  992. <!-- Hall Details -->
  993. <div class="col-md-6 col-lg-6 col-sm-6">
  994. <div id="hallDetails">
  995. <br>
  996. <h6><b>Hall Details:</b></h6>
  997. <p>Zone: <span id="zone"></span></p>
  998. <p>Address: <span id="address"></span></p>
  999. <p>Landmark: <span id="landmark"></span></p>
  1000. <p>Total Area: <span
  1001. id="hallareainsqft"></span></p>
  1002. <p>Seating Capacity: <span
  1003. id="seatingCapacity"></span></p>
  1004. <p>Parking Capacity: <span
  1005. id="parkingCapacity"></span></p>
  1006. <input type="hidden" id="statichallId">
  1007. </div>
  1008. </div>
  1009. <br>
  1010. <!--&lt;!&ndash; Amount Details &ndash;&gt;-->
  1011. <div class="col-md-6 col-lg-6 col-sm-6">
  1012. <div id="amountDetails">
  1013. <br>
  1014. <h6><b>Amount Details:</b></h6>
  1015. <p>Security Deposit: Rs <span
  1016. id="rentAmount"></span></p>
  1017. <p>Full Day Rent: Rs <span
  1018. id="fullDayAmount"></span></p>
  1019. <p>Half Day Rent: Rs <span
  1020. id="halfDayAmount"></span></p>
  1021. <p>GST: <span id="gst"></span>%</p>
  1022. <p>EB for 1 Unit:* Rs <span
  1023. id="ebunit"></span></p>
  1024. <p>CareTaker Number: <span
  1025. id="caretakerNumber"></span></p>
  1026. <input type="hidden" id="depositAmount"
  1027. name="depositamount" value="100">
  1028. <input type="hidden" id="hallamount"
  1029. name="hallamount" value="100">
  1030. </div>
  1031. </div>
  1032. </div>
  1033. <div
  1034. class="row d-flex justify-content-center align-items-center">
  1035. <button type="button"
  1036. class="btn btn-primary details-btn"
  1037. id="hallrent" onclick="calculatehallrent()">
  1038. Calculate Hall Rent
  1039. </button>
  1040. </div>
  1041. </div>
  1042. </div>
  1043. </div>
  1044. </div>
  1045. </div>
  1046. </div>
  1047. <!--&lt;!&ndash; Page body end &ndash;&gt;-->
  1048. </div>
  1049. </div>
  1050. <!--&lt;!&ndash; Main-body end &ndash;&gt;-->
  1051. </div>
  1052. </div>
  1053. </div>
  1054. </div>
  1055. <!--Modal HTML for Bootstrap 5-->
  1056. <div class="modal fade" id="termsModal" tabindex="-1" aria-labelledby="termsModalLabel" aria-hidden="true">
  1057. <div class="modal-dialog modal-lg">
  1058. <div class="modal-content">
  1059. <div class="modal-header">
  1060. <h5 class="modal-title" id="termsModalLabel">Terms and Conditions</h5>
  1061. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  1062. </div>
  1063. <div class="modal-content" style="height: 100vh;">
  1064. <iframe src="media/images/CC Rules & Regulations for Online _Tamil.pdf" width="100%"
  1065. height="600px"></iframe>
  1066. </div>
  1067. </div>
  1068. </div>
  1069. </div>
  1070. </div>
  1071. </div>
  1072. </div>
  1073. <div th:replace="~{fragments/loginreg :: div}"></div>
  1074. <script th:replace="~{fragments/script :: script}"></script>
  1075. <script th:replace="~{fragments/logRegiOtpScript :: script}"></script>
  1076. <script th:replace="~{fragments/PaymentScript :: script}"></script>
  1077. <script src="https://cdn.jsdelivr.net/npm/compressorjs@latest/dist/compressor.min.js"></script>
  1078. <script>
  1079. var hallIdDuplicate;
  1080. const urlParams = new URLSearchParams(window.location.search);
  1081. const hallId = urlParams.get('hallId');
  1082. $(document).ready(function () {
  1083. if (hallId != null) {
  1084. getHallDetails(hallId);
  1085. hallIdDuplicate = hallId;
  1086. $("#selecthall").val(hallId);
  1087. }
  1088. });
  1089. var index = 0;
  1090. var hall;
  1091. // Initialize select2 with closeOnSelect option
  1092. $("#selecthall").select2({
  1093. closeOnSelect: true // Ensures dropdown closes on selecting an option
  1094. });
  1095. // Force close dropdown on change (fallback for any conflict)
  1096. $('#selecthall').on('change', function () {
  1097. $(this).select2('close');
  1098. });
  1099. $.ajax({
  1100. type: 'GET',
  1101. url: '/communityhall/user/api/gethallnames',
  1102. success: function (response) {
  1103. // Populate the dropdown options with the received hall names
  1104. var selectHallDropdown = $('#selecthall');
  1105. $.each(response, function (index, hall) {
  1106. if (hallId == hall.hallId) {
  1107. selectHallDropdown.append($('<option></option>').attr('value', hall.hallId).text(hall.hallName));
  1108. selectHallDropdown.find('option[value="' + hall.hallId + '"]').prop('selected', true);
  1109. } else {
  1110. selectHallDropdown.append($('<option></option>').attr('value', hall.hallId).text(hall.hallName));
  1111. }
  1112. });
  1113. },
  1114. error: function (xhr, status, error) {
  1115. console.error('Error fetching hall names:', error);
  1116. }
  1117. });
  1118. $(document).ready(function () {
  1119. $('#selecthall').change(function () {
  1120. var selectedHallId = $(this).val();
  1121. // Call the getHallDetails function with the selected hall ID
  1122. // urlParams.set('hallId', selectedHallId);
  1123. hallIdDuplicate = selectedHallId;
  1124. getHallDetails(selectedHallId);
  1125. });
  1126. });
  1127. // Function to retrieve hall details based on hallId
  1128. function getHallDetails(hallId) {
  1129. $.ajax({
  1130. type: 'GET',
  1131. url: '/communityhall/user/api/gethalldetails/' + hallId,
  1132. success: function (response) {
  1133. console.log(response);
  1134. // Display the container
  1135. $('#hallDetailsContainer').show();
  1136. // Set hall details
  1137. $('#zone').html('<strong>' + response.zone + '</strong>&nbsp;&nbsp;&nbsp;&nbsp; Division: <strong>' + response.division + '</strong>');
  1138. $('#address').html('<strong>' + response.doorNo + ', ' + response.street + ', ' + response.area + ', ' + response.city + ', ' + response.pinCode + '</strong>');
  1139. $('#landmark').html('<strong>' + response.landMark + '</strong>');
  1140. $('#seatingCapacity').html('<strong>' + response.seatingCapacity + '</strong>');
  1141. var parkingCapacity = response.parkingCapacity;
  1142. var parkingAvailability = parkingCapacity > 0 ? "Yes" : "No";
  1143. $('#parkingCapacity').html('<strong>' + parkingAvailability + '</strong>');
  1144. $('#caretakerNumber').html('<strong>' + response.hallInchargeMobno + '</strong>');
  1145. $('#rentAmount').html('<strong>' + response.depositAmount + '</strong>');
  1146. $('#gst').html('<strong>' + response.gst + '</strong>');
  1147. $('#fullDayAmount').html('<strong>' + response.fullDayRent + '</strong>');
  1148. $('#halfDayAmount').html('<strong>' + response.halfDayRent + '</strong>');
  1149. $('#ebunit').html('<strong>' + response.ebCostPerUnit + '</strong>');
  1150. $('#statichallId').val(response.hallId);
  1151. // Set hall images
  1152. var carouselInner = $('#hallImagesCarousel .carousel-inner');
  1153. carouselInner.empty(); // Clear existing images
  1154. $.each(response.hallImagesList, function (index, image) {
  1155. var itemClass = (index === 0) ? 'carousel-item active' : 'carousel-item';
  1156. var img = $('<img>').addClass('d-block w-100').attr('src', image.hallImage).attr('alt', 'Hall Image');
  1157. var carouselItem = $('<div>').addClass(itemClass).append(img);
  1158. carouselInner.append(carouselItem);
  1159. });
  1160. // Clear existing floor details to prevent duplicates
  1161. $('#hallareainsqft').empty();
  1162. // Use a Set to store unique floor details
  1163. var uniqueFloorDetails = new Set();
  1164. $.each(response.floorDetailsList, function (index, hallarea) {
  1165. // Construct the text for each floor's details
  1166. var floorDetailText = hallarea.floor + " - " + hallarea.hallarea + " Sq.ft ,";
  1167. // Add to the Set if it's not a duplicate
  1168. if (!uniqueFloorDetails.has(floorDetailText)) {
  1169. uniqueFloorDetails.add(floorDetailText);
  1170. // Append the floor details to the target element
  1171. $('#hallareainsqft').append('<strong>' + floorDetailText + '</strong>');
  1172. }
  1173. });
  1174. // Initialize ViewerJS on the carousel after images are loaded
  1175. initializeViewerJS();
  1176. getBookingCalendar(hallId);
  1177. //connectToWebSocket(hallId);
  1178. // Set hall details in Step 2 and Step 3
  1179. $('#hallNameDisplayStep2').text(response.hallName);
  1180. $('#hallNameDisplayStep3').text(response.hallName);
  1181. $('#zoneStep2').text(response.zone);
  1182. $('#zoneStep3').text(response.zone);
  1183. $('#divisionStep2').text(response.division);
  1184. $('#divisionStep3').text(response.division);
  1185. },
  1186. error: function (xhr, status, error) {
  1187. console.error('Error fetching hall details:', error);
  1188. }
  1189. });
  1190. }
  1191. function initializeViewerJS() {
  1192. // Ensure ViewerJS initialization after images are added to the DOM
  1193. var carouselInner = document.querySelector('#hallImagesCarousel .carousel-inner');
  1194. var floordetails = document.querySelector('#hallareainsqft');
  1195. // Destroy existing viewer instance if it exists
  1196. if (carouselInner.viewer) {
  1197. carouselInner.viewer.destroy();
  1198. }
  1199. if (floordetails.viewer) {
  1200. floordetails.viewer.destroy();
  1201. }
  1202. // Initialize ViewerJS
  1203. var viewer = new Viewer(carouselInner, {
  1204. inline: false,
  1205. viewed: function () {
  1206. viewer.zoomTo(0.5); // Adjust the zoom level here
  1207. },
  1208. toolbar: {
  1209. zoomIn: 4,
  1210. zoomOut: 4,
  1211. oneToOne: 4,
  1212. reset: 4,
  1213. prev: 4,
  1214. play: {
  1215. show: 4,
  1216. size: 'large',
  1217. },
  1218. next: 4,
  1219. rotateLeft: 4,
  1220. rotateRight: 4,
  1221. flipHorizontal: 4,
  1222. flipVertical: 4,
  1223. },
  1224. });
  1225. carouselInner.viewer = viewer;
  1226. }
  1227. function getBookingCalendar(hall_id) {
  1228. // Make an AJAX call to fetch booking data
  1229. $.ajax({
  1230. type: 'GET',
  1231. url: '/communityhall/user/api/getPastData',
  1232. data: {
  1233. hall_id: hall_id
  1234. },
  1235. success: function (response) {
  1236. console.log(response);
  1237. window.bookingResponse = {};
  1238. if (response && Array.isArray(response)) {
  1239. $("#startDateInput").datepicker("destroy");
  1240. for (var i = 0; i < response.length; i++) {
  1241. var dateString = datepickerFormat(response[i].bdate);
  1242. window.bookingResponse[dateString] = [response[i].morningSlot, response[i].eveningSlot, response[i].is_blocked];
  1243. }
  1244. initializeDatepickerWithColors(hall_id);
  1245. if (response.length == 0) {
  1246. initializeDatepickerWithColors(hall_id);
  1247. }
  1248. } else {
  1249. console.error('Invalid or empty response data.');
  1250. }
  1251. },
  1252. error: function (xhr, status, error) {
  1253. console.error('Error fetching hall details:', error);
  1254. }
  1255. });
  1256. }
  1257. /*function connectToWebSocket(hall_id) {
  1258. //console.log("Connecting to WebSocket for hall_id:", hall_id);
  1259. const socket = new SockJS('/ws');
  1260. const stompClient = Stomp.over(socket);
  1261. stompClient.connect({}, function () {
  1262. //console.log("Connected to WebSocket");
  1263. // Subscribe to the topic specific to the hall_id
  1264. const topic = `/topic/bookingCalendar/${hall_id}`;
  1265. stompClient.subscribe(topic, function (message) {
  1266. try {
  1267. const response = JSON.parse(message.body); // Parse the response
  1268. processBookingData(response, hall_id); // Process and update the calendar
  1269. } catch (error) {
  1270. console.error("Failed to parse message body: ", error);
  1271. }
  1272. });
  1273. // Request initial data for the hall
  1274. requestBookingData(hall_id, stompClient);
  1275. }, function (error) {
  1276. // console.error("WebSocket connection failed: ", error);
  1277. });
  1278. }
  1279. function requestBookingData(hall_id, stompClient) {
  1280. //console.log("Requesting booking data for hall_id:", hall_id);
  1281. // Send hall_id as a JSON object
  1282. stompClient.send('/app/getPastData', {}, JSON.stringify({hall_id: hall_id}));
  1283. }
  1284. function processBookingData(response, hall_id) {
  1285. //console.log("Processing booking data for hall_id:", hall_id);
  1286. //console.log("Response: ", response);
  1287. window.bookingResponse = {};
  1288. if (response && Array.isArray(response)) {
  1289. $("#startDateInput").datepicker("destroy");
  1290. for (let i = 0; i < response.length; i++) {
  1291. const dateString = datepickerFormat(response[i].bdate);
  1292. window.bookingResponse[dateString] = [
  1293. response[i].morningSlot,
  1294. response[i].eveningSlot,
  1295. response[i].is_blocked,
  1296. response[i].temp_blocked,
  1297. ];
  1298. }
  1299. initializeDatepickerWithColors(hall_id);
  1300. } else {
  1301. console.error("Invalid or empty response data.");
  1302. }
  1303. }*/
  1304. // Function to update the end date and slot availability
  1305. function initializeDatepickerWithColors(hallId) {
  1306. // Destroy existing datepicker to avoid duplicate initialization
  1307. $("#datepicker-container").datepicker("destroy");
  1308. const serverDate =new Date($("#serverDate").val() + "T00:00:00")
  1309. console.log("serverDate:", serverDate);
  1310. const maxDate = new Date(serverDate);
  1311. maxDate.setMonth(maxDate.getMonth() + 6);
  1312. console.log("Max Date: "+maxDate);
  1313. // Initialize the datepicker
  1314. $("#startDateInput,#datepicker-container").datepicker({
  1315. dateFormat: "yy-mm-dd",
  1316. minDate: serverDate,
  1317. maxDate: maxDate,
  1318. beforeShowDay: function (eDate) {
  1319. const dateString = $.datepicker.formatDate("yy-mm-dd", eDate);
  1320. const bookingStatus = window.bookingResponse[dateString] || {};
  1321. // const currentDate = new Date();
  1322. serverDate.setHours(0, 0, 0, 0); // Normalize current date to midnight
  1323. eDate.setHours(0, 0, 0, 0); // Normalize selected date to midnight
  1324. // Logic for other dates
  1325. if (eDate < serverDate) {
  1326. return [false, "highlight-disabled", "Slot not Available"];
  1327. }
  1328. const isToday = eDate.getTime() === serverDate.getTime();
  1329. const currentHour = new Date().getHours();
  1330. const isBefore6AM = currentHour < 6;
  1331. const isAfter2PM = currentHour >= 14;
  1332. // Block 3-day logic for specific event types
  1333. // const today = new Date();
  1334. const blockedDate = new Date(serverDate);
  1335. blockedDate.setDate(serverDate.getDate() + 2);
  1336. if (eDate <= blockedDate && window.isThreeDayBlock) {
  1337. return [false, "highlight-disabled", "Blocked due to event type"];
  1338. }
  1339. // Logic for today
  1340. if (isToday) {
  1341. if (isBefore6AM) {
  1342. // Before 6 AM: Allow full-day booking or adjust based on booking status
  1343. return handleBookingStatus(bookingStatus, "Full Day Available");
  1344. } else if (isAfter2PM) {
  1345. // After 2 PM: Block all bookings
  1346. return handleAfter2PM(bookingStatus);
  1347. } else {
  1348. // Between 6 AM and 2 PM: Check status and disable morning slots
  1349. return handleMorningSlots(bookingStatus);
  1350. }
  1351. }
  1352. return handleBookingStatus(bookingStatus, "Slot Available");
  1353. },
  1354. });
  1355. // Show datepicker when hall is selected
  1356. $('#selecthall').off('click').on('click', function () {
  1357. $('#datepicker-container').datepicker('show');
  1358. });
  1359. // Handle changes in the start date input
  1360. $("#startDateInput").on("change", function () {
  1361. const selectedDate = $(this).val();
  1362. const bookingStatus = window.bookingResponse[selectedDate] || {};
  1363. const currentDate = new Date();
  1364. const currentHours = currentDate.getHours();
  1365. const currentDateString = currentDate.toISOString().split("T")[0];
  1366. $("#startPeriodDropdown").val(0).prop("disabled", false);
  1367. $("#endPeriodDropdown").val(0).prop("disabled", false);
  1368. $("#numDaysCount").val('');
  1369. validateForm();
  1370. if (selectedDate === currentDateString && currentHours >= 6) {
  1371. $("#startPeriodDropdown").val(2).prop("disabled", true);
  1372. } else if (bookingStatus[0]) {
  1373. $("#startPeriodDropdown").val(2).prop("disabled", true);
  1374. } else if (bookingStatus[1]) {
  1375. $("#startPeriodDropdown").val(1).prop("disabled", true);
  1376. }
  1377. updateEndDate(selectedDate);
  1378. });
  1379. // Event type change logic
  1380. $("#reasonforbooking").on("change", function () {
  1381. const selectedEventType = $(this).find("option:selected").text().trim();
  1382. window.isThreeDayBlock = ["Commercial", "State Govt Event", "Central Govt Event"].includes(selectedEventType);
  1383. $("#datepicker-container").datepicker("refresh");
  1384. });
  1385. }
  1386. function handleBookingStatus(bookingStatus, defaultMessage) {
  1387. if (bookingStatus[2]) {
  1388. return [true, "highlight-blue disabled", "GCC Blocked"];
  1389. } /*else if (bookingStatus[3]) {
  1390. return [true, "highlight-lightpink disabled", "Temporary Blocked"];
  1391. } */else if (bookingStatus[0] && bookingStatus[1]) {
  1392. return [true, "highlight-pink disabled", "Slot Occupied"];
  1393. } else if (bookingStatus[0] && !bookingStatus[1]) {
  1394. return [true, "highlight-yellow", "Evening Slot Available"];
  1395. } else if (!bookingStatus[0] && bookingStatus[1]) {
  1396. return [true, "highlight-violet", "Only Morning Slot Available"];
  1397. }
  1398. return [true, "highlight-greens", defaultMessage];
  1399. }
  1400. // Helper function: Handles logic after 2 PM
  1401. function handleAfter2PM(bookingStatus) {
  1402. if (bookingStatus[2]) {
  1403. return [true, "highlight-blue disabled", "GCC Blocked"];
  1404. } else if (bookingStatus[0] || bookingStatus[1]) {
  1405. return [true, "highlight-pink disabled", "Slot Occupied"];
  1406. }
  1407. return [false, "highlight-disabled", "Not Allowed to Book"];
  1408. }
  1409. // Helper function: Handles morning slots between 6 AM and 2 PM
  1410. function handleMorningSlots(bookingStatus) {
  1411. if (bookingStatus[2]) {
  1412. return [true, "highlight-blue disabled", "GCC Blocked"];
  1413. } else if (bookingStatus[0] && bookingStatus[1]) {
  1414. return [false, "highlight-pink disabled", "Slot Occupied"];
  1415. } else if (bookingStatus[0] && !bookingStatus[1]) {
  1416. return [true, "highlight-yellow", "Evening Slot Available"];
  1417. } else if (!bookingStatus[0] && bookingStatus[1]) {
  1418. return [false, "highlight-disabled", "Slot Occupied"];
  1419. }
  1420. return [true, "highlight-yellow", "Evening Slot Available"];
  1421. }
  1422. function datepickerFormat(dateString) {
  1423. var dateObject = new Date(dateString);
  1424. var year = dateObject.getFullYear();
  1425. var month = (dateObject.getMonth() + 1).toString().padStart(2, "0");
  1426. var day = dateObject.getDate().toString().padStart(2, "0");
  1427. return `${year}-${month}-${day}`;
  1428. }
  1429. function calculatehallrent() {
  1430. window.location.href = "/communityhall/hallAmountCalculation?hallId=" + hallIdDuplicate;
  1431. }
  1432. </script>
  1433. </body>
  1434. </html>