@quoreadmin/ui 1.10.32 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +29 -27
  3. package/dist/index10.js +2 -2
  4. package/dist/index101.js +20 -25
  5. package/dist/index102.js +34 -0
  6. package/dist/{index103.js → index104.js} +1 -1
  7. package/dist/index106.js +147 -2
  8. package/dist/index107.js +2 -37
  9. package/dist/index108.js +39 -0
  10. package/dist/index11.js +2 -2
  11. package/dist/{index109.js → index110.js} +2 -2
  12. package/dist/{index111.js → index112.js} +1 -1
  13. package/dist/{index113.js → index114.js} +3 -3
  14. package/dist/{index115.js → index116.js} +5 -5
  15. package/dist/{index117.js → index118.js} +1 -1
  16. package/dist/index12.js +2 -2
  17. package/dist/{index119.js → index120.js} +5 -5
  18. package/dist/index13.js +2 -2
  19. package/dist/{index131.js → index132.js} +2 -2
  20. package/dist/{index136.js → index137.js} +1 -1
  21. package/dist/{index138.js → index139.js} +2 -2
  22. package/dist/index14.js +2 -2
  23. package/dist/index142.js +167 -0
  24. package/dist/{index143.js → index146.js} +1 -1
  25. package/dist/index15.js +2 -2
  26. package/dist/{index147.js → index150.js} +391 -408
  27. package/dist/{index149.js → index152.js} +1 -1
  28. package/dist/{index151.js → index154.js} +10 -10
  29. package/dist/index16.js +2 -2
  30. package/dist/index160.js +581 -86
  31. package/dist/index163.js +93 -0
  32. package/dist/index165.js +87 -356
  33. package/dist/index168.js +389 -0
  34. package/dist/index17.js +2 -2
  35. package/dist/{index167.js → index170.js} +1 -1
  36. package/dist/index172.js +205 -111
  37. package/dist/index175.js +110 -87
  38. package/dist/index176.js +478 -844
  39. package/dist/index177.js +5520 -36
  40. package/dist/index178.js +90 -279
  41. package/dist/index179.js +833 -122
  42. package/dist/index18.js +2 -2
  43. package/dist/index180.js +36 -1197
  44. package/dist/index181.js +268 -760
  45. package/dist/index182.js +146 -1304
  46. package/dist/index183.js +1151 -228
  47. package/dist/index184.js +754 -88
  48. package/dist/index185.js +1308 -2
  49. package/dist/index186.js +259 -1359
  50. package/dist/index187.js +108 -0
  51. package/dist/index188.js +2 -18
  52. package/dist/index189.js +1372 -14
  53. package/dist/index19.js +2 -2
  54. package/dist/index191.js +8 -8
  55. package/dist/index192.js +10 -17
  56. package/dist/index193.js +18 -759
  57. package/dist/index194.js +18 -1177
  58. package/dist/index195.js +22 -1231
  59. package/dist/index196.js +740 -11258
  60. package/dist/index197.js +1177 -36
  61. package/dist/index198.js +1233 -43
  62. package/dist/index199.js +11258 -1209
  63. package/dist/index2.js +2 -2
  64. package/dist/index20.js +3 -3
  65. package/dist/index200.js +38 -0
  66. package/dist/index201.js +44 -5938
  67. package/dist/index202.js +1149 -128
  68. package/dist/index204.js +5933 -13
  69. package/dist/index205.js +205 -76
  70. package/dist/index206.js +28 -246
  71. package/dist/index207.js +14 -13680
  72. package/dist/index208.js +77 -26
  73. package/dist/index209.js +245 -55
  74. package/dist/index21.js +2 -2
  75. package/dist/index210.js +13655 -209
  76. package/dist/index211.js +26 -310
  77. package/dist/index212.js +43 -277
  78. package/dist/index213.js +237 -32
  79. package/dist/index214.js +303 -108
  80. package/dist/index215.js +295 -34
  81. package/dist/index216.js +33 -26
  82. package/dist/index217.js +111 -31
  83. package/dist/index218.js +35 -50
  84. package/dist/index219.js +26 -43
  85. package/dist/index22.js +2 -2
  86. package/dist/index220.js +35 -3
  87. package/dist/index221.js +51 -9
  88. package/dist/index222.js +42 -18
  89. package/dist/index223.js +4 -10
  90. package/dist/index224.js +9 -10
  91. package/dist/index225.js +18 -38
  92. package/dist/index226.js +10 -21
  93. package/dist/index227.js +10 -88
  94. package/dist/index228.js +35 -403
  95. package/dist/index229.js +21 -22
  96. package/dist/index23.js +2 -2
  97. package/dist/index230.js +67 -106
  98. package/dist/index231.js +395 -26
  99. package/dist/index232.js +17 -75
  100. package/dist/index233.js +126 -19
  101. package/dist/index234.js +34 -16
  102. package/dist/index235.js +80 -20
  103. package/dist/index236.js +12 -12
  104. package/dist/index237.js +11 -11
  105. package/dist/index238.js +19 -160
  106. package/dist/index239.js +11 -11
  107. package/dist/index24.js +2 -2
  108. package/dist/index240.js +13 -15
  109. package/dist/index241.js +129 -167
  110. package/dist/index242.js +19 -69
  111. package/dist/index243.js +21 -33
  112. package/dist/index244.js +184 -25
  113. package/dist/index245.js +68 -159
  114. package/dist/index246.js +33 -227
  115. package/dist/index247.js +39 -36
  116. package/dist/index248.js +252 -9
  117. package/dist/index249.js +8 -253
  118. package/dist/index250.js +138 -8
  119. package/dist/index251.js +68 -123
  120. package/dist/index252.js +156 -78
  121. package/dist/index253.js +228 -22
  122. package/dist/index254.js +36 -21
  123. package/dist/index255.js +10 -20
  124. package/dist/index256.js +22 -836
  125. package/dist/index257.js +21 -701
  126. package/dist/index258.js +20 -176
  127. package/dist/index259.js +836 -22
  128. package/dist/index26.js +2 -2
  129. package/dist/index260.js +701 -19
  130. package/dist/index261.js +176 -20
  131. package/dist/index262.js +22 -3
  132. package/dist/index263.js +19 -186
  133. package/dist/index264.js +19 -132
  134. package/dist/index265.js +3 -1223
  135. package/dist/index266.js +185 -18
  136. package/dist/index267.js +132 -21
  137. package/dist/index268.js +1223 -22
  138. package/dist/index269.js +13 -22
  139. package/dist/index27.js +2 -2
  140. package/dist/index270.js +15 -13
  141. package/dist/index271.js +14 -12
  142. package/dist/index272.js +29 -2
  143. package/dist/index273.js +20 -2
  144. package/dist/index274.js +20 -3709
  145. package/dist/index275.js +2 -60
  146. package/dist/index276.js +2 -83
  147. package/dist/index277.js +3690 -33
  148. package/dist/index278.js +34 -189
  149. package/dist/index279.js +82 -9
  150. package/dist/index28.js +2 -2
  151. package/dist/index280.js +34 -39
  152. package/dist/index281.js +186 -32
  153. package/dist/index282.js +9 -53
  154. package/dist/index283.js +39 -63
  155. package/dist/index284.js +35 -702
  156. package/dist/index285.js +40 -33
  157. package/dist/index286.js +40 -23
  158. package/dist/index287.js +727 -10
  159. package/dist/index288.js +38 -696
  160. package/dist/index289.js +62 -818
  161. package/dist/index29.js +2 -2
  162. package/dist/index290.js +11 -2
  163. package/dist/index291.js +694 -68
  164. package/dist/index292.js +819 -53
  165. package/dist/index293.js +2 -26
  166. package/dist/index294.js +78 -21
  167. package/dist/index295.js +53 -21
  168. package/dist/index296.js +26 -16
  169. package/dist/index297.js +22 -17
  170. package/dist/index298.js +21 -22
  171. package/dist/index299.js +16 -3
  172. package/dist/index3.js +2 -2
  173. package/dist/index30.js +2 -2
  174. package/dist/index300.js +17 -27
  175. package/dist/index301.js +22 -234
  176. package/dist/index302.js +78 -5
  177. package/dist/index303.js +21 -133
  178. package/dist/index304.js +929 -62
  179. package/dist/index305.js +21 -86
  180. package/dist/index306.js +19 -28
  181. package/dist/index307.js +18 -7
  182. package/dist/index308.js +67 -73
  183. package/dist/index309.js +19 -4
  184. package/dist/index31.js +3 -3
  185. package/dist/index310.js +19 -2
  186. package/dist/index311.js +21 -82
  187. package/dist/index312.js +21 -53
  188. package/dist/index313.js +63 -6
  189. package/dist/index314.js +83 -4
  190. package/dist/index315.js +3 -179
  191. package/dist/index316.js +25 -61
  192. package/dist/index317.js +1533 -74
  193. package/dist/index318.js +346 -1494
  194. package/dist/index319.js +2675 -330
  195. package/dist/index32.js +2 -2
  196. package/dist/index320.js +72 -2717
  197. package/dist/index321.js +3788 -76
  198. package/dist/index322.js +49 -3787
  199. package/dist/index323.js +15 -60
  200. package/dist/index324.js +84 -15
  201. package/dist/index325.js +188 -70
  202. package/dist/index326.js +220 -176
  203. package/dist/index327.js +31 -240
  204. package/dist/index328.js +125 -74
  205. package/dist/index329.js +400 -22
  206. package/dist/index33.js +2 -2
  207. package/dist/index330.js +223 -923
  208. package/dist/index331.js +5 -21
  209. package/dist/index332.js +133 -19
  210. package/dist/index333.js +67 -19
  211. package/dist/index334.js +82 -64
  212. package/dist/index335.js +29 -19
  213. package/dist/index336.js +8 -18
  214. package/dist/index337.js +74 -21
  215. package/dist/index338.js +3 -21
  216. package/dist/index339.js +2 -63
  217. package/dist/index34.js +2 -2
  218. package/dist/index340.js +77 -31
  219. package/dist/index341.js +53 -9
  220. package/dist/index342.js +6 -10
  221. package/dist/index343.js +5 -14
  222. package/dist/index344.js +179 -10
  223. package/dist/index345.js +61 -15
  224. package/dist/index346.js +75 -9
  225. package/dist/index347.js +19 -12
  226. package/dist/index348.js +19 -54
  227. package/dist/index349.js +63 -11
  228. package/dist/index35.js +2 -2
  229. package/dist/index350.js +37 -14
  230. package/dist/index351.js +8 -57
  231. package/dist/index352.js +12 -51
  232. package/dist/index353.js +49 -25
  233. package/dist/index354.js +12 -2
  234. package/dist/index355.js +14 -5
  235. package/dist/index356.js +58 -2
  236. package/dist/index357.js +52 -23
  237. package/dist/index358.js +28 -38
  238. package/dist/index359.js +2 -2
  239. package/dist/index36.js +2 -2
  240. package/dist/index360.js +4 -10
  241. package/dist/index361.js +2 -20
  242. package/dist/index362.js +23 -2
  243. package/dist/index363.js +40 -8
  244. package/dist/index364.js +2 -21
  245. package/dist/index365.js +11 -56
  246. package/dist/index366.js +18 -27
  247. package/dist/index367.js +10 -7
  248. package/dist/index368.js +9 -51
  249. package/dist/index369.js +16 -5
  250. package/dist/index37.js +2 -2
  251. package/dist/index370.js +2 -12
  252. package/dist/index371.js +8 -6
  253. package/dist/index372.js +10 -28
  254. package/dist/index373.js +14 -2
  255. package/dist/index374.js +20 -69
  256. package/dist/index375.js +54 -165
  257. package/dist/index376.js +28 -19
  258. package/dist/index377.js +6 -19
  259. package/dist/index378.js +48 -60
  260. package/dist/index379.js +6 -37
  261. package/dist/index38.js +2 -2
  262. package/dist/index380.js +10 -29
  263. package/dist/index381.js +7 -11
  264. package/dist/index382.js +28 -4
  265. package/dist/index383.js +2 -4
  266. package/dist/index384.js +69 -12
  267. package/dist/index385.js +167 -7
  268. package/dist/index386.js +133 -11
  269. package/dist/index387.js +17 -5
  270. package/dist/index388.js +101 -33
  271. package/dist/index389.js +91 -31
  272. package/dist/index39.js +2 -2
  273. package/dist/index390.js +97 -27
  274. package/dist/index391.js +28 -58
  275. package/dist/index392.js +10 -100
  276. package/dist/index393.js +3 -90
  277. package/dist/index394.js +4 -98
  278. package/dist/index395.js +13 -17
  279. package/dist/index396.js +7 -3
  280. package/dist/index397.js +12 -2
  281. package/dist/index398.js +5 -2
  282. package/dist/index399.js +33 -17
  283. package/dist/index4.js +2 -2
  284. package/dist/index40.js +2 -2
  285. package/dist/index400.js +31 -13
  286. package/dist/index401.js +28 -6
  287. package/dist/index402.js +57 -28
  288. package/dist/index403.js +489 -0
  289. package/dist/index404.js +128 -0
  290. package/dist/index405.js +5 -0
  291. package/dist/index406.js +4 -0
  292. package/dist/index407.js +4 -0
  293. package/dist/index408.js +19 -0
  294. package/dist/index409.js +15 -0
  295. package/dist/index41.js +2 -2
  296. package/dist/index410.js +8 -0
  297. package/dist/index411.js +34 -0
  298. package/dist/index42.js +4 -29
  299. package/dist/index43.js +25 -32
  300. package/dist/index44.js +32 -37
  301. package/dist/index45.js +37 -1389
  302. package/dist/index46.js +1350 -348
  303. package/dist/index47.js +367 -145
  304. package/dist/index48.js +155 -18
  305. package/dist/index49.js +16 -42
  306. package/dist/index5.js +2 -2
  307. package/dist/index50.js +45 -5
  308. package/dist/index51.js +5 -69
  309. package/dist/index52.js +67 -61
  310. package/dist/index53.js +57 -175
  311. package/dist/index54.js +173 -77
  312. package/dist/index55.js +79 -200
  313. package/dist/index56.js +206 -68
  314. package/dist/index57.js +69 -20
  315. package/dist/index58.js +20 -11
  316. package/dist/index59.js +10 -6
  317. package/dist/index6.js +2 -2
  318. package/dist/index60.js +5 -209
  319. package/dist/index61.js +210 -12
  320. package/dist/index62.js +12 -184
  321. package/dist/index63.js +176 -68
  322. package/dist/index64.js +79 -0
  323. package/dist/index66.js +7 -91
  324. package/dist/index67.js +93 -0
  325. package/dist/index7.js +2 -2
  326. package/dist/{index74.js → index75.js} +2 -2
  327. package/dist/index79.js +38 -395
  328. package/dist/index8.js +3 -3
  329. package/dist/index80.js +419 -0
  330. package/dist/{index83.js → index84.js} +4 -4
  331. package/dist/{index85.js → index86.js} +1 -1
  332. package/dist/index88.js +23 -143
  333. package/dist/index89.js +156 -0
  334. package/dist/index9.js +2 -2
  335. package/dist/{index90.js → index91.js} +5 -5
  336. package/dist/{index92.js → index93.js} +5 -5
  337. package/dist/index99.js +204 -0
  338. package/dist/src/components/date-picker/date-picker.d.ts +33 -0
  339. package/dist/src/components/date-picker/date-picker.stories.d.ts +108 -0
  340. package/dist/src/components/popper/popper.vue.d.ts +90 -0
  341. package/dist/src/components/popper/use-popper.d.ts +37 -0
  342. package/dist/src/index.d.ts +1 -0
  343. package/package.json +2 -1
  344. package/dist/index100.js +0 -29
  345. package/dist/index105.js +0 -149
  346. package/dist/index157.js +0 -575
  347. package/dist/index162.js +0 -120
  348. package/dist/index169.js +0 -210
  349. package/dist/index173.js +0 -497
  350. package/dist/index174.js +0 -5524
  351. package/dist/index190.js +0 -20
  352. package/dist/index203.js +0 -37
  353. package/dist/index65.js +0 -9
  354. package/dist/index78.js +0 -62
  355. package/dist/index87.js +0 -36
  356. package/dist/index98.js +0 -132
  357. package/dist/src/components/room-details-popover/room-details-popover.d.ts +0 -2142
  358. /package/dist/{index121.js → index122.js} +0 -0
  359. /package/dist/{index123.js → index124.js} +0 -0
  360. /package/dist/{index125.js → index126.js} +0 -0
  361. /package/dist/{index127.js → index128.js} +0 -0
  362. /package/dist/{index129.js → index130.js} +0 -0
  363. /package/dist/{index134.js → index135.js} +0 -0
  364. /package/dist/{index141.js → index144.js} +0 -0
  365. /package/dist/{index145.js → index148.js} +0 -0
  366. /package/dist/{index153.js → index156.js} +0 -0
  367. /package/dist/{index155.js → index158.js} +0 -0
  368. /package/dist/{index68.js → index69.js} +0 -0
  369. /package/dist/{index70.js → index71.js} +0 -0
  370. /package/dist/{index72.js → index73.js} +0 -0
  371. /package/dist/{index76.js → index77.js} +0 -0
  372. /package/dist/{index81.js → index82.js} +0 -0
  373. /package/dist/{index94.js → index95.js} +0 -0
  374. /package/dist/{index96.js → index97.js} +0 -0
@@ -1,33 +1,35 @@
1
- import { defineComponent as It, ref as i, computed as _, watch as B, onMounted as Tt, onUnmounted as Dt } from "vue";
2
- import { useI18n as Ot } from "vue-i18n";
3
- import { DateTime as I } from "./index174.js";
4
- import "./index197.js";
5
- import kt from "./index2.js";
6
- import Et from "./index3.js";
7
- import At from "./index4.js";
8
- import St from "./index21.js";
9
- import bt from "./index28.js";
10
- import Nt from "./index41.js";
11
- import Ct from "./index20.js";
12
- import Mt from "./index48.js";
13
- import Rt from "./index50.js";
14
- import Ht from "./index49.js";
15
- import Lt from "./index52.js";
16
- import X from "./index198.js";
17
- const Pt = 996, Zt = It({
1
+ import { defineComponent as ht, ref as i, computed as g, watch as B, onMounted as yt, onUnmounted as gt } from "vue";
2
+ import { useI18n as _t } from "vue-i18n";
3
+ import { DateTime as _ } from "./index177.js";
4
+ import "./index200.js";
5
+ import wt from "./index2.js";
6
+ import It from "./index3.js";
7
+ import Tt from "./index4.js";
8
+ import Dt from "./index21.js";
9
+ import Ot from "./index28.js";
10
+ import kt from "./index42.js";
11
+ import Et from "./index41.js";
12
+ import At from "./index20.js";
13
+ import St from "./index49.js";
14
+ import Nt from "./index51.js";
15
+ import bt from "./index50.js";
16
+ import Mt from "./index53.js";
17
+ import J from "./index201.js";
18
+ const Ct = 996, Kt = ht({
18
19
  name: "QRoomDetailsPopover",
19
20
  components: {
20
- QAccordion: kt,
21
- QActivityItem: Et,
22
- QAvatar: At,
23
- QDatePicker: Ct,
24
- QDivider: St,
25
- QIcon: bt,
26
- QPopover: Nt,
27
- QTag: Mt,
28
- QTextarea: Ht,
29
- QTimePicker: Rt,
30
- QTooltip: Lt
21
+ QAccordion: wt,
22
+ QActivityItem: It,
23
+ QAvatar: Tt,
24
+ QDatePicker: At,
25
+ QDivider: Dt,
26
+ QIcon: Ot,
27
+ QPopper: kt,
28
+ QPopover: Et,
29
+ QTag: St,
30
+ QTextarea: bt,
31
+ QTimePicker: Nt,
32
+ QTooltip: Mt
31
33
  },
32
34
  props: {
33
35
  id: {
@@ -171,11 +173,14 @@ const Pt = 996, Zt = It({
171
173
  }
172
174
  },
173
175
  emits: ["create:callback", "create:todo", "refresh:pms", "show:toast", "toggle"],
174
- setup(s, { emit: f }) {
175
- const { t: u } = Ot(), Te = () => {
176
- const e = /* @__PURE__ */ new Date(), t = e.getHours(), a = e.getMinutes(), o = t >= 12 ? "PM" : "AM";
177
- return `${t % 12 || 12}:${String(a).padStart(2, "0")} ${o}`;
178
- }, De = "11:59 PM", r = i(s.room), ie = i(!1), ue = i("left"), Z = i([
176
+ setup(s, { emit: p }) {
177
+ const { t: u } = _t(), he = () => {
178
+ const e = _.now().setZone(s.propertyTimeZone), a = e.isValid ? e : _.now(), t = a.hour, o = a.minute, n = t >= 12 ? "PM" : "AM";
179
+ return `${t % 12 || 12}:${String(o).padStart(2, "0")} ${n}`;
180
+ }, K = () => {
181
+ const e = _.now().setZone(s.propertyTimeZone), a = e.isValid ? e : _.now();
182
+ return new Date(a.year, a.month - 1, a.day, 12, 0, 0, 0);
183
+ }, ye = "11:59 PM", r = i(s.room), re = i(!1), z = i([
179
184
  {
180
185
  id: 1,
181
186
  label: u("HC_DEPARTMENT")
@@ -188,7 +193,7 @@ const Pt = 996, Zt = It({
188
193
  id: 0,
189
194
  label: u("HC_ANYONE")
190
195
  }
191
- ]), b = i(""), p = i({
196
+ ]), N = i(""), f = i({
192
197
  checkInDate: /* @__PURE__ */ new Date(),
193
198
  checkOutDate: /* @__PURE__ */ new Date(),
194
199
  guestEmail: "",
@@ -200,11 +205,11 @@ const Pt = 996, Zt = It({
200
205
  problem: null,
201
206
  notes: "",
202
207
  tokenId: r.value?.tokenId
203
- }), G = i(250), U = i(290), C = i([]), Oe = i([]), ee = i(!0), te = i(!0), M = i({
208
+ }), M = i([]), ge = i([]), Z = i(!0), X = i(!0), C = i({
204
209
  info: !0,
205
210
  tickets: !0,
206
211
  comments: !0
207
- }), ae = i(!0), He = i(s.guestDetails), O = i([]), y = i({
212
+ }), ee = i(!0), Se = i(s.guestDetails), O = i([]), y = i({
208
213
  actionItems: !1,
209
214
  activity: !1,
210
215
  conversationToggle: !1,
@@ -213,7 +218,7 @@ const Pt = 996, Zt = It({
213
218
  roomNotices: !1,
214
219
  sendingMessage: !1,
215
220
  tickets: !1
216
- }), N = i([]), ce = i([]), de = i("bottom"), R = i(null), H = i(!1), W = i(!1), j = i(""), me = i(!1), S = i(!1), k = i(null), $ = i(null), Le = 3e4, d = i({
221
+ }), b = i([]), le = i([]), R = i(null), L = i(!1), G = i(!1), U = i(""), ie = i(!1), S = i(!1), k = i(null), j = i(null), Ne = 3e4, d = i({
217
222
  assignType: null,
218
223
  department: null,
219
224
  due: /* @__PURE__ */ new Date(),
@@ -223,7 +228,7 @@ const Pt = 996, Zt = It({
223
228
  requestedBy: null,
224
229
  when: null,
225
230
  where: null
226
- }), Q = i([
231
+ }), $ = i([
227
232
  {
228
233
  id: 0,
229
234
  label: u("HC_STAFF_MEMBER")
@@ -232,14 +237,14 @@ const Pt = 996, Zt = It({
232
237
  id: 1,
233
238
  label: u("HC_HOTEL_GUEST")
234
239
  }
235
- ]), ve = i(!1), E = i(null), g = i({
236
- endDate: /* @__PURE__ */ new Date(),
240
+ ]), ue = i(!1), E = i(null), w = i({
241
+ endDate: K(),
237
242
  issue: null,
238
243
  notes: "",
239
- startDate: /* @__PURE__ */ new Date(),
240
- startTime: Te(),
241
- endTime: De
242
- }), Y = i([]), oe = i(!1), pe = i([]), Pe = i(!0), A = i([]), L = i([]), qe = i([
244
+ startDate: K(),
245
+ startTime: he(),
246
+ endTime: ye
247
+ }), W = i([]), te = i(!1), ce = i([]), be = i(!0), A = i([]), P = i([]), Me = i([
243
248
  {
244
249
  label: u("HC_COMPLAINT"),
245
250
  id: "complaint"
@@ -256,7 +261,7 @@ const Pt = 996, Zt = It({
256
261
  label: u("HC_WORK_ORDER"),
257
262
  id: "work_order"
258
263
  }
259
- ]), V = i(), P = i(null), v = i({
264
+ ]), H = i(null), v = i({
260
265
  assignType: null,
261
266
  department: null,
262
267
  due: /* @__PURE__ */ new Date(),
@@ -265,7 +270,7 @@ const Pt = 996, Zt = It({
265
270
  notes: "",
266
271
  person: null,
267
272
  requestedBy: null
268
- }), fe = i([]), q = i([]), x = i([]), xe = _(() => {
273
+ }), de = i([]), q = i([]), F = i([]), Ce = g(() => {
269
274
  switch (r.value.cleaning?.name) {
270
275
  case "CLEAN":
271
276
  case "INSPECTED":
@@ -278,95 +283,95 @@ const Pt = 996, Zt = It({
278
283
  default:
279
284
  return "";
280
285
  }
281
- }), Fe = _(() => {
286
+ }), Re = g(() => {
282
287
  const e = r.value?.hkTaskTypeId || s.room?.hkTaskTypeId;
283
- return Number(e) === Pt;
284
- }), Be = _(() => s.cleanInitiativeInfo?.cleanInitiativeName ?? r.value?.cleanInitiativeInfo?.cleanInitiativeName ?? "Greener Stay"), Ge = _(() => s.cleanInitiativeInfo?.imgUrl ?? r.value?.cleanInitiativeInfo?.imgUrl ?? ""), Ue = _(() => {
285
- const e = b.value.toLowerCase();
286
- return s.quickReplies.filter((t) => t.toLowerCase().match(e));
287
- }), We = _(() => {
288
- if (!N.value.length) return [];
288
+ return Number(e) === Ct;
289
+ }), Le = g(() => s.cleanInitiativeInfo?.cleanInitiativeName ?? r.value?.cleanInitiativeInfo?.cleanInitiativeName ?? "Greener Stay"), Pe = g(() => s.cleanInitiativeInfo?.imgUrl ?? r.value?.cleanInitiativeInfo?.imgUrl ?? ""), He = g(() => s.position === "top" || s.position === "bottom" ? s.align === "right" ? `${s.position}-end` : s.align === "center" ? s.position : `${s.position}-start` : s.position === "left" || s.position === "right" ? s.align === "bottom" ? `${s.position}-end` : s.align === "middle" || s.align === "center" ? s.position : `${s.position}-start` : "bottom-start"), qe = g(() => {
290
+ const e = N.value.toLowerCase();
291
+ return s.quickReplies.filter((a) => a.toLowerCase().match(e));
292
+ }), Fe = g(() => {
293
+ if (!b.value.length) return [];
289
294
  const e = [];
290
- let t = null;
291
- return N.value.forEach((a) => {
292
- const o = I.fromFormat(
293
- a.dateUtc,
295
+ let a = null;
296
+ return b.value.forEach((t) => {
297
+ const o = _.fromFormat(
298
+ t.dateUtc,
294
299
  "yyyy-MM-dd HH:mm:ss",
295
300
  { zone: "utc" }
296
301
  ).setZone(s.propertyTimeZone), n = o.toFormat("yyyy-MM-dd-HH");
297
- n !== t && (e.push({
302
+ n !== a && (e.push({
298
303
  type: "separator",
299
304
  label: o.toFormat("ccc, LLL d 'at' h:mma").replace("AM", "am").replace("PM", "pm"),
300
305
  hourKey: n
301
- }), t = n), e.push({
306
+ }), a = n), e.push({
302
307
  type: "message",
303
- ...a,
308
+ ...t,
304
309
  formattedTime: o.toFormat("h:mma").replace("AM", "am").replace("PM", "pm")
305
310
  });
306
311
  }), e;
307
- }), ke = _(() => A.value.length ? !!A.value.find(
308
- (t) => t.type === "complaint"
309
- ) : !1), je = _(() => A.value.length ? !!A.value.find(
310
- (t) => t.type === "callback"
311
- ) : !1), $e = _(() => {
312
+ }), _e = g(() => A.value.length ? !!A.value.find(
313
+ (a) => a.type === "complaint"
314
+ ) : !1), xe = g(() => A.value.length ? !!A.value.find(
315
+ (a) => a.type === "callback"
316
+ ) : !1), Be = g(() => {
312
317
  let e = [];
313
- return O.value[0] && O.value[0].options === void 0 ? O.value.forEach((t) => {
318
+ return O.value[0] && O.value[0].options === void 0 ? O.value.forEach((a) => {
314
319
  e.push({
315
- id: parseInt(t.id),
316
- label: t.display_name
320
+ id: parseInt(a.id),
321
+ label: a.display_name
317
322
  });
318
323
  }) : e = O.value, e;
319
- }), Ee = _(() => r.value.occupancy?.name === "OCCUPIED"), Qe = _(() => Ee.value && ke.value ? "HK_ROOM_STATUS_Occupied_Complaint" : "HK_ROOM_STATUS_Occupied"), Ye = _(() => {
324
+ }), we = g(() => r.value.occupancy?.name === "OCCUPIED"), Ge = g(() => we.value && _e.value ? "HK_ROOM_STATUS_Occupied_Complaint" : "HK_ROOM_STATUS_Occupied"), Ue = g(() => {
320
325
  switch (E.value?.id) {
321
326
  case "request":
322
327
  case "work_order":
323
- return Z.value[0];
328
+ return z.value[0];
324
329
  default:
325
330
  return null;
326
331
  }
327
- }), Ve = _(() => {
328
- if (C.value)
332
+ }), je = g(() => {
333
+ if (M.value)
329
334
  switch (E.value?.id) {
330
335
  case "request":
331
- return C.value.find((e) => parseInt(e.id) === 4);
336
+ return M.value.find((e) => parseInt(e.id) === 4);
332
337
  case "work_order":
333
- return C.value.find((e) => parseInt(e.id) === 2);
338
+ return M.value.find((e) => parseInt(e.id) === 2);
334
339
  default:
335
340
  return null;
336
341
  }
337
342
  return null;
338
- }), Je = _(() => {
343
+ }), $e = g(() => {
339
344
  switch (E.value?.id) {
340
345
  case "request":
341
- return Q.value[1];
346
+ return $.value[1];
342
347
  case "work_order":
343
- return Q.value[0];
348
+ return $.value[0];
344
349
  default:
345
350
  return null;
346
351
  }
347
- }), Ke = _(() => {
352
+ }), We = g(() => {
348
353
  let e = "";
349
354
  if (r.value && r.value.reservations[0]) {
350
- const t = I.fromISO(
355
+ const a = _.fromISO(
351
356
  r.value.reservations[0].arrivalDate
352
- ), a = t.toFormat("MMM"), o = t.day, n = t.year, l = I.fromISO(
357
+ ), t = a.toFormat("MMM"), o = a.day, n = a.year, l = _.fromISO(
353
358
  r.value.reservations[0].departureDate
354
359
  ), c = l.toFormat("MMM"), m = l.day, h = l.year;
355
- e += a + " " + o, n !== h && (e += ", " + n), a === c ? e += "-" + m : e += " - " + c + " " + m, e += ", " + h;
360
+ e += t + " " + o, n !== h && (e += ", " + n), t === c ? e += "-" + m : e += " - " + c + " " + m, e += ", " + h;
356
361
  }
357
362
  return e;
358
- }), ze = _(() => {
359
- let e = Y.value;
363
+ }), Qe = g(() => {
364
+ let e = W.value;
360
365
  return e = [...new Set(e)], e;
361
- }), Xe = _(() => {
366
+ }), Ve = g(() => {
362
367
  const e = E.value?.id;
363
368
  if (!e)
364
369
  return !1;
365
370
  switch (e) {
366
371
  case "room_notice":
367
- return g.value.issue && g.value.startDate && g.value.endDate;
372
+ return w.value.issue && w.value.startDate && w.value.endDate;
368
373
  case "complaint":
369
- return p.value.problem && p.value.guestName && p.value.guestMood;
374
+ return f.value.problem && f.value.guestName && f.value.guestMood;
370
375
  case "work_order":
371
376
  return v.value.item && v.value.issue && v.value.requestedBy && v.value.due && (v.value.assignType && v.value.assignType.id === 0 || v.value.assignType && v.value.assignType.id === 1 && v.value.department || v.value.assignType && v.value.assignType.id === 2 && v.value.person);
372
377
  case "request":
@@ -374,88 +379,88 @@ const Pt = 996, Zt = It({
374
379
  default:
375
380
  return !1;
376
381
  }
377
- }), Ae = () => {
378
- oe.value = !1, H.value = !1, ie.value = !1, ve.value = !1, O.value = [], ce.value = [], fe.value = [], q.value = [], x.value = [], E.value = null, g.value.issue = null, g.value.startDate = /* @__PURE__ */ new Date(), g.value.endDate = /* @__PURE__ */ new Date(), g.value.startTime = Te(), g.value.endTime = De, g.value.notes = "", p.value.guestName = "", p.value.guestEmail = "", p.value.guestPhone = "", p.value.guestMood = null, p.value.guestLoyalty = "", p.value.problem = null, p.value.checkInDate = /* @__PURE__ */ new Date(), p.value.checkOutDate = /* @__PURE__ */ new Date(), p.value.notes = "", v.value.assignType = null, v.value.department = null, v.value.person = null, v.value.due = /* @__PURE__ */ new Date(), v.value.item = null, v.value.issue = null, v.value.notes = "", d.value.assignType = null, d.value.department = null, d.value.person = null, d.value.due = /* @__PURE__ */ new Date(), d.value.item = null, d.value.notes = "", d.value.when = null, d.value.where = null;
379
- }, Ze = async () => {
380
- f("create:callback", r.value), f("toggle", !1);
381
- }, F = (e) => {
382
- const t = [];
382
+ }), Ie = () => {
383
+ te.value = !1, L.value = !1, re.value = !1, ue.value = !1, O.value = [], le.value = [], de.value = [], q.value = [], F.value = [], E.value = null, w.value.issue = null, w.value.startDate = K(), w.value.endDate = K(), w.value.startTime = he(), w.value.endTime = ye, w.value.notes = "", f.value.guestName = "", f.value.guestEmail = "", f.value.guestPhone = "", f.value.guestMood = null, f.value.guestLoyalty = "", f.value.problem = null, f.value.checkInDate = /* @__PURE__ */ new Date(), f.value.checkOutDate = /* @__PURE__ */ new Date(), f.value.notes = "", v.value.assignType = null, v.value.department = null, v.value.person = null, v.value.due = /* @__PURE__ */ new Date(), v.value.item = null, v.value.issue = null, v.value.notes = "", d.value.assignType = null, d.value.department = null, d.value.person = null, d.value.due = /* @__PURE__ */ new Date(), d.value.item = null, d.value.notes = "", d.value.when = null, d.value.where = null;
384
+ }, Ye = async () => {
385
+ p("create:callback", r.value), p("toggle", !1);
386
+ }, x = (e) => {
387
+ const a = [];
383
388
  (Array.isArray(e) ? e : Object.values(e)).forEach((o) => {
384
- const n = o.senderType || o.sender_type, l = o.senderName || "", c = o.senderId || o.sender_id, m = o.profileImg || o.profile_img, h = l ? l.split(" ") : ["", ""], w = o.user_first_name || o.guest_first_name || h[0] || "", z = o.user_last_name || o.guest_last_name || h.slice(1).join(" ") || "", re = w && z ? `${w} ${z}` : w || "Auto-Reply", le = n === "system" || n === "user", T = n === "guest";
389
+ const n = o.senderType || o.sender_type, l = o.senderName || "", c = o.senderId || o.sender_id, m = o.profileImg || o.profile_img, h = l ? l.split(" ") : ["", ""], I = o.user_first_name || o.guest_first_name || h[0] || "", Y = o.user_last_name || o.guest_last_name || h.slice(1).join(" ") || "", se = I && Y ? `${I} ${Y}` : I || "Auto-Reply", ne = n === "system" || n === "user", T = n === "guest";
385
390
  let D = {
386
391
  id: o.id,
387
392
  isPropertyEmployee: n === "user",
388
393
  isSent: !!o.sent,
389
394
  isSystemMessage: n === "system",
390
- isStaffMessage: le,
395
+ isStaffMessage: ne,
391
396
  isGuestMessage: T,
392
397
  comment: o.content,
393
398
  dateUtc: o.sent || o.created,
394
399
  user: {
395
- firstName: w || "Auto-Reply",
400
+ firstName: I || "Auto-Reply",
396
401
  icon: "",
397
402
  id: c || "system-message",
398
403
  initials: "",
399
- lastName: z || "",
400
- name: re,
404
+ lastName: Y || "",
405
+ name: se,
401
406
  src: m || ""
402
407
  }
403
408
  };
404
- D.user.firstName && D.user.lastName ? D.user.initials = D.user.firstName[0] + D.user.lastName[0] : D.user.firstName && (D.user.initials = D.user.firstName[0]), le && (D.user.icon = "property-fill"), t.push(D);
405
- }), N.value = t;
406
- }, et = (e) => {
409
+ D.user.firstName && D.user.lastName ? D.user.initials = D.user.firstName[0] + D.user.lastName[0] : D.user.firstName && (D.user.initials = D.user.firstName[0]), ne && (D.user.icon = "property-fill"), a.push(D);
410
+ }), b.value = a;
411
+ }, Je = (e) => {
407
412
  if (!e || e.length === 0) return;
408
- (Array.isArray(e) ? e : Object.values(e)).forEach((a) => {
409
- if (N.value.some((D) => D.id === a.id))
413
+ (Array.isArray(e) ? e : Object.values(e)).forEach((t) => {
414
+ if (b.value.some((D) => D.id === t.id))
410
415
  return;
411
- const o = a.senderType || a.sender_type, n = a.senderName || "", l = a.senderId || a.sender_id, c = a.profileImg || a.profile_img, m = n ? n.split(" ") : ["", ""], h = a.user_first_name || a.guest_first_name || m[0] || "", w = a.user_last_name || a.guest_last_name || m.slice(1).join(" ") || "", z = h && w ? `${h} ${w}` : h || "Auto-Reply", re = o === "system" || o === "user", le = o === "guest";
416
+ const o = t.senderType || t.sender_type, n = t.senderName || "", l = t.senderId || t.sender_id, c = t.profileImg || t.profile_img, m = n ? n.split(" ") : ["", ""], h = t.user_first_name || t.guest_first_name || m[0] || "", I = t.user_last_name || t.guest_last_name || m.slice(1).join(" ") || "", Y = h && I ? `${h} ${I}` : h || "Auto-Reply", se = o === "system" || o === "user", ne = o === "guest";
412
417
  let T = {
413
- id: a.id,
418
+ id: t.id,
414
419
  isPropertyEmployee: o === "user",
415
- isSent: !!a.sent,
420
+ isSent: !!t.sent,
416
421
  isSystemMessage: o === "system",
417
- isStaffMessage: re,
418
- isGuestMessage: le,
419
- comment: a.content,
420
- dateUtc: a.sent || a.created,
422
+ isStaffMessage: se,
423
+ isGuestMessage: ne,
424
+ comment: t.content,
425
+ dateUtc: t.sent || t.created,
421
426
  user: {
422
427
  firstName: h || "Auto-Reply",
423
428
  icon: "",
424
429
  id: l || "system-message",
425
430
  initials: "",
426
- lastName: w || "",
427
- name: z,
431
+ lastName: I || "",
432
+ name: Y,
428
433
  src: c || ""
429
434
  }
430
435
  };
431
- T.user.firstName && T.user.lastName ? T.user.initials = T.user.firstName[0] + T.user.lastName[0] : T.user.firstName && (T.user.initials = T.user.firstName[0]), re && (T.user.icon = "property-fill"), N.value.push(T);
436
+ T.user.firstName && T.user.lastName ? T.user.initials = T.user.firstName[0] + T.user.lastName[0] : T.user.firstName && (T.user.initials = T.user.firstName[0]), se && (T.user.icon = "property-fill"), b.value.push(T);
432
437
  });
433
- }, he = async (e = !1) => {
438
+ }, me = async (e = !1) => {
434
439
  if (s.showComments && r.value.tokenId) {
435
440
  e || (y.value.messages = !0);
436
441
  try {
437
- let t = `/api/client/connect/getMessages.php?tokenId=${r.value.tokenId}`;
438
- e && k.value !== null && (t += `&lastMsgId=${k.value}`);
439
- const o = await (await fetch(t, {
442
+ let a = `/api/client/connect/getMessages.php?tokenId=${r.value.tokenId}`;
443
+ e && k.value !== null && (a += `&lastMsgId=${k.value}`);
444
+ const o = await (await fetch(a, {
440
445
  method: "GET",
441
446
  credentials: "include"
442
447
  })).json();
443
448
  if (o.status === "error")
444
449
  throw new Error(o.message || "Failed to get messages");
445
450
  if (S.value = !o.closed, o.messages && o.messages.length > 0) {
446
- k.value = o.messages[o.messages.length - 1].id, e ? et(o.messages) : F(o.messages);
447
- const n = setTimeout(K, 100);
448
- L.value.push(n);
449
- } else e || F(o.messages || []);
450
- } catch (t) {
451
- console.error("getChatMessages error:", t);
451
+ k.value = o.messages[o.messages.length - 1].id, e ? Je(o.messages) : x(o.messages);
452
+ const n = setTimeout(V, 100);
453
+ P.value.push(n);
454
+ } else e || x(o.messages || []);
455
+ } catch (a) {
456
+ console.error("getChatMessages error:", a);
452
457
  } finally {
453
458
  e || (y.value.messages = !1);
454
459
  }
455
460
  }
456
- }, tt = (e) => {
457
- const t = I.utc(), a = I.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = t.diff(
458
- a,
461
+ }, Ke = (e) => {
462
+ const a = _.utc(), t = _.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = a.diff(
463
+ t,
459
464
  [
460
465
  "years",
461
466
  "months",
@@ -476,24 +481,24 @@ const Pt = 996, Zt = It({
476
481
  return h === 1 ? u("HC_ONE_MINUTE_AGO") : u("HC_X_MINUTES_AGO", { minutes: h });
477
482
  if (h === 0)
478
483
  return u("HC_A_MOMENT_AGO");
479
- }, at = async () => {
480
- s.showGuestDetails && se(), ye(), J(), ne(), f("refresh:pms", r.value);
481
- }, se = async () => {
484
+ }, ze = async () => {
485
+ s.showGuestDetails && ae(), ve(), Q(), oe(), p("refresh:pms", r.value);
486
+ }, ae = async () => {
482
487
  try {
483
488
  y.value.pms = !0;
484
- const e = new AbortController(), t = setTimeout(() => e.abort(), 45e3);
485
- L.value.push(t);
486
- const a = s.pmsBaseUrl;
487
- if (!a)
489
+ const e = new AbortController(), a = setTimeout(() => e.abort(), 45e3);
490
+ P.value.push(a);
491
+ const t = s.pmsBaseUrl;
492
+ if (!t)
488
493
  throw new Error("PMS base URL is required");
489
494
  const o = {
490
495
  Authorization: "Bearer " + (() => {
491
- const w = `; ${document.cookie}`.split("; QV2Auth=");
492
- return w.length === 2 && w.pop()?.split(";").shift() || "";
496
+ const I = `; ${document.cookie}`.split("; QV2Auth=");
497
+ return I.length === 2 && I.pop()?.split(";").shift() || "";
493
498
  })(),
494
499
  "Content-Type": "application/json"
495
500
  }, n = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room.id, l = await fetch(
496
- `${a}/vendors/properties/statuses/${s.propertyId}/rooms`,
501
+ `${t}/vendors/properties/statuses/${s.propertyId}/rooms`,
497
502
  {
498
503
  method: "POST",
499
504
  headers: o,
@@ -501,21 +506,21 @@ const Pt = 996, Zt = It({
501
506
  body: JSON.stringify({ roomsIds: [n] })
502
507
  }
503
508
  );
504
- clearTimeout(t), l.ok || be(l);
509
+ clearTimeout(a), l.ok || De(l);
505
510
  const c = await l.json(), m = c.data?.pmsRooms || c.data?.rooms || c.rooms || [];
506
511
  R.value = m, m.length > 0 ? r.value = {
507
512
  ...m[0],
508
513
  tokenId: m[0].tokenId || s.room.tokenId
509
514
  } : r.value = s.room, y.value.pms = !1;
510
515
  } catch (e) {
511
- return y.value.pms = !1, f("show:toast", {
516
+ return y.value.pms = !1, p("show:toast", {
512
517
  show: !0,
513
518
  message: u("HC_FAILED_TO_LOAD_PMS_DATA"),
514
519
  variant: "error",
515
520
  icon: "exclamation-circle"
516
521
  }), e;
517
522
  }
518
- }, ye = async () => {
523
+ }, ve = async () => {
519
524
  try {
520
525
  y.value.roomNotices = !0;
521
526
  const e = await fetch(
@@ -523,10 +528,10 @@ const Pt = 996, Zt = It({
523
528
  );
524
529
  if (!e.ok)
525
530
  throw new Error(`HTTP error! status: ${e.status}`);
526
- const t = await e.json();
527
- Y.value = t.notices;
531
+ const a = await e.json();
532
+ W.value = a.notices;
528
533
  } catch (e) {
529
- console.error("Error getting room notices:", e), Y.value = [], f("show:toast", {
534
+ console.error("Error getting room notices:", e), W.value = [], p("show:toast", {
530
535
  show: !0,
531
536
  message: u("HC_FAILED_TO_LOAD_ROOM_NOTICES"),
532
537
  variant: "error",
@@ -535,11 +540,11 @@ const Pt = 996, Zt = It({
535
540
  } finally {
536
541
  y.value.roomNotices = !1;
537
542
  }
538
- }, ge = async () => {
543
+ }, fe = async () => {
539
544
  try {
540
545
  const e = new FormData();
541
546
  e.append("property_id", s.propertyId), e.append("filter", "tasks_new");
542
- const [t, a] = await Promise.all([
547
+ const [a, t] = await Promise.all([
543
548
  fetch("/api/client/common/getDepartments.php", {
544
549
  method: "POST"
545
550
  }),
@@ -547,10 +552,10 @@ const Pt = 996, Zt = It({
547
552
  method: "POST",
548
553
  body: e
549
554
  })
550
- ]), o = await t.json(), n = await a.json();
555
+ ]), o = await a.json(), n = await t.json();
551
556
  if (o.departments && (o.departments.forEach((l) => {
552
557
  l.label = l.display_name;
553
- }), C.value = o.departments), n.users) {
558
+ }), M.value = o.departments), n.users) {
554
559
  const l = [];
555
560
  let c = {
556
561
  group: "",
@@ -558,41 +563,41 @@ const Pt = 996, Zt = It({
558
563
  };
559
564
  n.users.forEach((m) => {
560
565
  m.translated_department !== c.group && (c.group && l.push({ ...c }), c.group = m.translated_department, c.options = []), c.options.push(m);
561
- }), c.group && l.push({ ...c }), Oe.value = l;
566
+ }), c.group && l.push({ ...c }), ge.value = l;
562
567
  }
563
568
  } catch (e) {
564
- console.error("Error getting shared data:", e), f("show:toast", {
569
+ console.error("Error getting shared data:", e), p("show:toast", {
565
570
  show: !0,
566
571
  message: u("HC_FAILED_TO_LOAD_SHARED_DATA"),
567
572
  variant: "error",
568
573
  icon: "exclamation-circle"
569
574
  });
570
575
  }
571
- }, Se = async () => {
576
+ }, Te = async () => {
572
577
  try {
573
- const t = await (await fetch(
578
+ const a = await (await fetch(
574
579
  `/api/client/connect/getStayDetails.php?tokenId=${r.value.tokenId}`,
575
580
  {
576
581
  method: "GET",
577
582
  credentials: "include"
578
583
  }
579
584
  )).json();
580
- if (t.status === "error")
581
- throw new Error(t.message || "Failed to get stay details");
582
- t.userName && (p.value.guestName = t.userName), t.cellPhone && (p.value.guestPhone = t.cellPhone), t.email && (p.value.guestEmail = t.email), t.checkIn && (p.value.checkInDate = I.fromISO(
583
- t.checkIn
584
- ).toJSDate()), t.checkOut && (p.value.checkOutDate = I.fromISO(
585
- t.checkOut
585
+ if (a.status === "error")
586
+ throw new Error(a.message || "Failed to get stay details");
587
+ a.userName && (f.value.guestName = a.userName), a.cellPhone && (f.value.guestPhone = a.cellPhone), a.email && (f.value.guestEmail = a.email), a.checkIn && (f.value.checkInDate = _.fromISO(
588
+ a.checkIn
589
+ ).toJSDate()), a.checkOut && (f.value.checkOutDate = _.fromISO(
590
+ a.checkOut
586
591
  ).toJSDate());
587
592
  } catch (e) {
588
- console.error("getStayDetails error:", e), f("show:toast", {
593
+ console.error("getStayDetails error:", e), p("show:toast", {
589
594
  show: !0,
590
595
  message: u("HC_FAILED_TO_LOAD_STAY_DETAILS"),
591
596
  variant: "error",
592
597
  icon: "exclamation-circle"
593
598
  });
594
599
  }
595
- }, ot = (e) => {
600
+ }, Ze = (e) => {
596
601
  switch (e) {
597
602
  case "complaint":
598
603
  return "red-30";
@@ -605,7 +610,7 @@ const Pt = 996, Zt = It({
605
610
  case "task":
606
611
  return "green-20";
607
612
  }
608
- }, st = (e) => {
613
+ }, Xe = (e) => {
609
614
  switch (e) {
610
615
  case "complaint":
611
616
  return "face-frown";
@@ -618,7 +623,7 @@ const Pt = 996, Zt = It({
618
623
  case "task":
619
624
  return "check";
620
625
  }
621
- }, J = async () => {
626
+ }, Q = async () => {
622
627
  try {
623
628
  y.value.tickets = !0;
624
629
  const e = await fetch(
@@ -626,10 +631,10 @@ const Pt = 996, Zt = It({
626
631
  );
627
632
  if (!e.ok)
628
633
  throw new Error(`HTTP error! status: ${e.status}`);
629
- const t = await e.json();
630
- A.value = t.tickets;
634
+ const a = await e.json();
635
+ A.value = a.tickets;
631
636
  } catch (e) {
632
- console.error("Error getting tickets:", e), A.value = [], f("show:toast", {
637
+ console.error("Error getting tickets:", e), A.value = [], p("show:toast", {
633
638
  show: !0,
634
639
  message: u("HC_FAILED_TO_LOAD_TICKETS"),
635
640
  variant: "error",
@@ -638,19 +643,19 @@ const Pt = 996, Zt = It({
638
643
  } finally {
639
644
  y.value.tickets = !1;
640
645
  }
641
- }, ne = async () => {
646
+ }, oe = async () => {
642
647
  if (s.showActivity)
643
648
  try {
644
649
  y.value.activity = !0;
645
- const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = await fetch(
650
+ const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, a = await fetch(
646
651
  "/api/client/common/getCleaningsInspections.php?propertyId=" + s.propertyId + "&areaId=" + e
647
652
  );
648
- if (!t.ok)
649
- throw new Error(`HTTP error! status: ${t.status}`);
650
- const a = await t.json();
651
- pe.value = a.inspections || [];
653
+ if (!a.ok)
654
+ throw new Error(`HTTP error! status: ${a.status}`);
655
+ const t = await a.json();
656
+ ce.value = t.inspections || [];
652
657
  } catch (e) {
653
- console.error("Error getting activity:", e), pe.value = [], f("show:toast", {
658
+ console.error("Error getting activity:", e), ce.value = [], p("show:toast", {
654
659
  show: !0,
655
660
  message: u("HC_FAILED_TO_LOAD_ACTIVITY"),
656
661
  variant: "error",
@@ -659,19 +664,19 @@ const Pt = 996, Zt = It({
659
664
  } finally {
660
665
  y.value.activity = !1;
661
666
  }
662
- }, be = async (e) => {
663
- const t = await e.text();
664
- let a;
667
+ }, De = async (e) => {
668
+ const a = await e.text();
669
+ let t;
665
670
  try {
666
- a = JSON.parse(t).response;
671
+ t = JSON.parse(a).response;
667
672
  } catch {
668
- a = { code: e.status, message: t };
673
+ t = { code: e.status, message: a };
669
674
  }
670
- return a.code === 401 ? (window.location.href = "/logout.php?unauthorized=1", { error: a }) : a;
671
- }, nt = (e) => {
672
- const t = document.querySelectorAll(".pulse");
673
- if (t && t.length) {
674
- const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = document.getElementById("room-" + a), n = o?.classList;
675
+ return t.code === 401 ? (window.location.href = "/logout.php?unauthorized=1", { error: t }) : t;
676
+ }, et = (e) => {
677
+ const a = document.querySelectorAll(".pulse");
678
+ if (a && a.length) {
679
+ const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = document.getElementById("room-" + t), n = o?.classList;
675
680
  switch (e) {
676
681
  case "room_notice":
677
682
  (n?.contains("roombox_unsel") || n?.contains("roombox_unsel_active")) && (o?.classList.remove(), o?.classList.add("roomnoticeroombox_sel"));
@@ -687,93 +692,93 @@ const Pt = 996, Zt = It({
687
692
  break;
688
693
  }
689
694
  const l = setTimeout(() => {
690
- t.forEach((c) => {
695
+ a.forEach((c) => {
691
696
  c.classList.remove("pulse");
692
697
  });
693
698
  }, 4500);
694
- L.value.push(l);
699
+ P.value.push(l);
695
700
  }
696
- }, rt = () => {
701
+ }, tt = () => {
697
702
  window.open("/guest/overview.php", "_blank");
698
- }, lt = (e) => {
699
- let t = "";
703
+ }, at = (e) => {
704
+ let a = "";
700
705
  switch (e.type) {
701
706
  case "complaint":
702
- t = `/complaints/complaints_view.php?id=${e.id}`;
707
+ a = `/complaints/complaints_view.php?id=${e.id}`;
703
708
  break;
704
709
  case "request":
705
- t = `/tasks/hk_request.php?id=${e.id}`;
710
+ a = `/tasks/hk_request.php?id=${e.id}`;
706
711
  break;
707
712
  case "satisfaction-call":
708
- t = `/tasks/task_callback.php?id=${e.id}`;
713
+ a = `/tasks/task_callback.php?id=${e.id}`;
709
714
  break;
710
715
  case "work-order":
711
- t = `/tasks/workorder.php?id=${e.id}`;
716
+ a = `/tasks/workorder.php?id=${e.id}`;
712
717
  break;
713
718
  case "task":
714
- t = `/tasks/task.php?id=${e.id}`;
719
+ a = `/tasks/task.php?id=${e.id}`;
715
720
  break;
716
721
  default:
717
722
  return "#";
718
723
  }
719
- window.open(t, "_blank");
720
- }, it = (e) => {
724
+ window.open(a, "_blank");
725
+ }, ot = (e) => {
721
726
  e.link && window.open(e.link, "_blank");
722
- }, ut = async () => {
723
- ve.value = !0;
724
- const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = r.value?.qv2Rooms?.qRoomName || r.value?.name || s.room?.name, a = {
727
+ }, st = async () => {
728
+ ue.value = !0;
729
+ const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, a = r.value?.qv2Rooms?.qRoomName || r.value?.name || s.room?.name, t = {
725
730
  type: E.value?.id,
726
731
  propertyId: s.propertyId,
727
- userId: P.value,
732
+ userId: H.value,
728
733
  areaId: e,
729
- areaName: t
734
+ areaName: a
730
735
  };
731
736
  switch (E.value?.id) {
732
737
  case "complaint":
733
- a.tokenId = r.value.tokenId, a.problemId = p.value.problem.id, a.guestName = p.value.guestName, a.guestPhone = p.value.guestPhone, a.guestEmail = p.value.guestEmail, a.guestLoyalty = p.value.guestLoyalty, a.guestMood = p.value.guestMood.id, a.checkInDate = I.fromJSDate(p.value.checkInDate).toFormat(
738
+ t.tokenId = r.value.tokenId, t.problemId = f.value.problem.id, t.guestName = f.value.guestName, t.guestPhone = f.value.guestPhone, t.guestEmail = f.value.guestEmail, t.guestLoyalty = f.value.guestLoyalty, t.guestMood = f.value.guestMood.id, t.checkInDate = _.fromJSDate(f.value.checkInDate).toFormat(
734
739
  "yyyy-MM-dd"
735
- ), a.checkOutDate = I.fromJSDate(p.value.checkOutDate).toFormat(
740
+ ), t.checkOutDate = _.fromJSDate(f.value.checkOutDate).toFormat(
736
741
  "yyyy-MM-dd"
737
- ), a.notes = p.value.notes, a.inHouse = 2, a.source = "dashboard", f("create:todo", a);
742
+ ), t.notes = f.value.notes, t.inHouse = 2, t.source = "dashboard", p("create:todo", t);
738
743
  break;
739
744
  case "request":
740
- a.itemId = d.value.item.id, a.assignType = d.value.assignType.id, a.occupied = d.value.requestedBy.id, a.notes = d.value.notes, a.dueDate = I.fromJSDate(d.value.due).toFormat("yyyy-MM-dd"), d.value.assignType.id === 1 && (a.department = d.value.department.id), d.value.assignType.id === 2 && (a.person = d.value.person.id), s.allowWhenWhere && (a.requestWhen = d.value.when ? d.value.when.id : "", a.requestWhere = d.value.where ? d.value.where.id : ""), f("create:todo", a);
745
+ t.itemId = d.value.item.id, t.assignType = d.value.assignType.id, t.occupied = d.value.requestedBy.id, t.notes = d.value.notes, t.dueDate = _.fromJSDate(d.value.due).toFormat("yyyy-MM-dd"), d.value.assignType.id === 1 && (t.department = d.value.department.id), d.value.assignType.id === 2 && (t.person = d.value.person.id), s.allowWhenWhere && (t.requestWhen = d.value.when ? d.value.when.id : "", t.requestWhere = d.value.where ? d.value.where.id : ""), p("create:todo", t);
741
746
  break;
742
747
  case "room_notice":
743
- a.issueId = g.value.issue.id, a.startDate = I.fromJSDate(g.value.startDate).toFormat("yyyy-MM-dd"), a.endDate = I.fromJSDate(g.value.endDate).toFormat("yyyy-MM-dd"), a.startTime = g.value.startTime || "", a.endTime = g.value.endTime || "", a.notes = g.value.notes, f("create:todo", a);
748
+ t.issueId = w.value.issue.id, t.startDate = _.fromJSDate(w.value.startDate).toFormat("yyyy-MM-dd"), t.endDate = _.fromJSDate(w.value.endDate).toFormat("yyyy-MM-dd"), t.startTime = w.value.startTime || "", t.endTime = w.value.endTime || "", t.notes = w.value.notes, p("create:todo", t);
744
749
  break;
745
750
  case "work_order":
746
- a.itemId = v.value.item.id, a.issueId = v.value.issue.id, a.assignType = v.value.assignType.id, a.occupied = v.value.requestedBy.id, a.notes = v.value.notes, a.dueDate = I.fromJSDate(v.value.due).toFormat("yyyy-MM-dd"), v.value.assignType.id === 1 && (a.department = v.value.department.id), v.value.assignType.id === 2 && (a.person = v.value.person.id), f("create:todo", a);
751
+ t.itemId = v.value.item.id, t.issueId = v.value.issue.id, t.assignType = v.value.assignType.id, t.occupied = v.value.requestedBy.id, t.notes = v.value.notes, t.dueDate = _.fromJSDate(v.value.due).toFormat("yyyy-MM-dd"), v.value.assignType.id === 1 && (t.department = v.value.department.id), v.value.assignType.id === 2 && (t.person = v.value.person.id), p("create:todo", t);
747
752
  break;
748
753
  }
749
- }, ct = (e) => {
750
- we(), Ie(), s.hover && f("toggle", e);
751
- }, dt = (e) => {
752
- Ce(), b.value = e;
753
- }, mt = async (e) => {
754
- if (E.value = e, O.value = [], g.value.issue = null, p.value.problem = null, v.value.item = null, v.value.issue = null, d.value.item = null, !E.value) {
754
+ }, nt = (e) => {
755
+ s.hover && p("toggle", e);
756
+ }, rt = (e) => {
757
+ ke(), N.value = e;
758
+ }, lt = async (e) => {
759
+ if (E.value = e, O.value = [], w.value.issue = null, f.value.problem = null, v.value.item = null, v.value.issue = null, d.value.item = null, !E.value) {
755
760
  y.value.actionItems = !1;
756
761
  return;
757
762
  }
758
763
  y.value.actionItems = !0;
759
- const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, a = new FormData();
760
- switch (a.append("property_id", s.propertyId), a.append("area_id", t), e.id) {
764
+ const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = new FormData();
765
+ switch (t.append("property_id", s.propertyId), t.append("area_id", a), e.id) {
761
766
  case "complaint":
762
767
  try {
763
- r.value.tokenId && await Se();
768
+ r.value.tokenId && await Te();
764
769
  const n = await (await fetch("/api/client/common/getComplaintProblemsByPropertyId.php", {
765
770
  method: "POST",
766
- body: a
771
+ body: t
767
772
  })).json();
768
773
  n.items && (O.value = n.items);
769
- const l = await X.post(
774
+ const l = await J.post(
770
775
  "/api/client/common/getComplaintMoods.php"
771
776
  );
772
777
  l.data.items.forEach((c) => {
773
778
  c.label = c.display_name;
774
- }), ce.value = l.data.items;
779
+ }), le.value = l.data.items;
775
780
  } catch (o) {
776
- console.error("Error loading complaint options:", o), f("show:toast", {
781
+ console.error("Error loading complaint options:", o), p("show:toast", {
777
782
  show: !0,
778
783
  message: u("HC_FAILED_TO_LOAD_COMPLAINT_OPTIONS"),
779
784
  variant: "error",
@@ -787,11 +792,11 @@ const Pt = 996, Zt = It({
787
792
  try {
788
793
  const n = await (await fetch("/api/client/common/getRoomNoticeIssuesByPropertyId.php", {
789
794
  method: "POST",
790
- body: a
795
+ body: t
791
796
  })).json();
792
797
  n.items && (O.value = n.items);
793
798
  } catch (o) {
794
- console.error("Error loading room notice options:", o), f("show:toast", {
799
+ console.error("Error loading room notice options:", o), p("show:toast", {
795
800
  show: !0,
796
801
  message: u("HC_FAILED_TO_LOAD_ROOM_NOTICE_OPTIONS"),
797
802
  variant: "error",
@@ -803,12 +808,12 @@ const Pt = 996, Zt = It({
803
808
  break;
804
809
  case "request":
805
810
  try {
806
- d.value.requestedBy = Q.value[1], d.value.assignType = Z.value[0];
811
+ d.value.requestedBy = $.value[1], d.value.assignType = z.value[0];
807
812
  const n = await (await fetch("/api/client/common/getHousekeepingItemsByPropertyId.php", {
808
813
  method: "POST",
809
- body: a
814
+ body: t
810
815
  })).json();
811
- if (n.items && (O.value = n.items), await ge(), d.value.department = C.value.find(
816
+ if (n.items && (O.value = n.items), await fe(), d.value.department = M.value.find(
812
817
  (l) => parseInt(l.id) === 4
813
818
  ), s.allowWhenWhere)
814
819
  try {
@@ -825,13 +830,13 @@ const Pt = 996, Zt = It({
825
830
  id: h.id,
826
831
  label: h.name,
827
832
  value: h.id
828
- })) : q.value = [], m.where && Array.isArray(m.where) ? x.value = m.where.map((h) => ({
833
+ })) : q.value = [], m.where && Array.isArray(m.where) ? F.value = m.where.map((h) => ({
829
834
  id: h.id,
830
835
  label: h.name,
831
836
  value: h.id
832
- })) : x.value = [];
837
+ })) : F.value = [];
833
838
  } catch (l) {
834
- console.error("Error loading When/Where options:", l), q.value = [], x.value = [], f("show:toast", {
839
+ console.error("Error loading When/Where options:", l), q.value = [], F.value = [], p("show:toast", {
835
840
  show: !0,
836
841
  message: u("HC_FAILED_TO_LOAD_WHEN_WHERE_OPTIONS"),
837
842
  variant: "error",
@@ -839,7 +844,7 @@ const Pt = 996, Zt = It({
839
844
  });
840
845
  }
841
846
  } catch (o) {
842
- console.error("Error loading request options:", o), f("show:toast", {
847
+ console.error("Error loading request options:", o), p("show:toast", {
843
848
  show: !0,
844
849
  message: u("HC_FAILED_TO_LOAD_REQUEST_OPTIONS"),
845
850
  variant: "error",
@@ -851,10 +856,10 @@ const Pt = 996, Zt = It({
851
856
  break;
852
857
  case "work_order":
853
858
  try {
854
- v.value.requestedBy = Q.value[0], v.value.assignType = Z.value[0];
859
+ v.value.requestedBy = $.value[0], v.value.assignType = z.value[0];
855
860
  const n = await (await fetch("/api/client/common/getItemsByRoomId.php", {
856
861
  method: "POST",
857
- body: a
862
+ body: t
858
863
  })).json(), l = [];
859
864
  let c = {
860
865
  group: "",
@@ -863,20 +868,20 @@ const Pt = 996, Zt = It({
863
868
  n.items && (n.items.forEach((m) => {
864
869
  m.section_name !== c.group && (c.group && l.push({ ...c }), c.group = m.section_name, c.options = []), m.label && c.options.push(m);
865
870
  }), c.group && l.push({ ...c })), O.value = l, await Promise.all([
866
- X.post(
871
+ J.post(
867
872
  "/api/client/common/getWorkOrderIssues.php"
868
873
  ),
869
- ge()
874
+ fe()
870
875
  ]).then((m) => {
871
876
  const h = m[0];
872
- h.data.issues.forEach((w) => {
873
- w.label = w.display_name;
874
- }), fe.value = h.data.issues;
875
- }), v.value.department = C.value.find(
877
+ h.data.issues.forEach((I) => {
878
+ I.label = I.display_name;
879
+ }), de.value = h.data.issues;
880
+ }), v.value.department = M.value.find(
876
881
  (m) => parseInt(m.id) === 2
877
882
  );
878
883
  } catch (o) {
879
- console.error("Error loading work order options:", o), f("show:toast", {
884
+ console.error("Error loading work order options:", o), p("show:toast", {
880
885
  show: !0,
881
886
  message: u("HC_FAILED_TO_LOAD_WORK_ORDER_OPTIONS"),
882
887
  variant: "error",
@@ -890,29 +895,29 @@ const Pt = 996, Zt = It({
890
895
  y.value.actionItems = !1;
891
896
  return;
892
897
  }
893
- }, vt = () => {
894
- oe.value = !oe.value, ie.value = !1;
895
- }, Ne = () => {
896
- const e = document.getElementById("comment-field"), t = document.getElementById("hidden-text");
897
- e.style.height = t?.offsetHeight + "px";
898
- }, K = () => {
898
+ }, it = () => {
899
+ te.value = !te.value, re.value = !1;
900
+ }, Oe = () => {
901
+ const e = document.getElementById("comment-field"), a = document.getElementById("hidden-text");
902
+ e.style.height = a?.offsetHeight + "px";
903
+ }, V = () => {
899
904
  const e = document.getElementById("comments-container");
900
905
  e?.scroll({
901
906
  top: e.scrollHeight,
902
907
  behavior: "smooth"
903
908
  });
904
- }, pt = async (e) => {
905
- if (e && e.type === "keydown" && e.preventDefault(), r.value.tokenId && b.value && !H.value) {
909
+ }, ut = async (e) => {
910
+ if (e && e.type === "keydown" && e.preventDefault(), r.value.tokenId && N.value && !L.value) {
906
911
  y.value.sendingMessage = !0;
907
912
  try {
908
- const t = new FormData();
909
- t.append("tokenId", r.value.tokenId), t.append("content", b.value), t.append("senderId", P.value || "");
910
- const a = await X.post(
913
+ const a = new FormData();
914
+ a.append("tokenId", r.value.tokenId), a.append("content", N.value), a.append("senderId", H.value || "");
915
+ const t = await J.post(
911
916
  "/api/client/connect/sendMessage.php",
912
- t
917
+ a
913
918
  );
914
- if (a.data.status === "error") {
915
- f("show:toast", {
919
+ if (t.data.status === "error") {
920
+ p("show:toast", {
916
921
  show: !0,
917
922
  message: u("HC_FAILED_TO_SEND_MESSAGE"),
918
923
  variant: "error",
@@ -920,9 +925,9 @@ const Pt = 996, Zt = It({
920
925
  });
921
926
  return;
922
927
  }
923
- b.value = "", S.value = !a.data.closed, a.data.messages && (F(a.data.messages), a.data.messages.length > 0 && (k.value = a.data.messages[a.data.messages.length - 1].id)), K();
924
- } catch (t) {
925
- console.error("sendChatMessage error:", t), f("show:toast", {
928
+ N.value = "", S.value = !t.data.closed, t.data.messages && (x(t.data.messages), t.data.messages.length > 0 && (k.value = t.data.messages[t.data.messages.length - 1].id)), V();
929
+ } catch (a) {
930
+ console.error("sendChatMessage error:", a), p("show:toast", {
926
931
  show: !0,
927
932
  message: u("HC_FAILED_TO_SEND_MESSAGE"),
928
933
  variant: "error",
@@ -932,15 +937,15 @@ const Pt = 996, Zt = It({
932
937
  y.value.sendingMessage = !1;
933
938
  }
934
939
  }
935
- }, ft = async () => {
936
- if (!(!r.value.tokenId || !P.value)) {
940
+ }, ct = async () => {
941
+ if (!(!r.value.tokenId || !H.value)) {
937
942
  y.value.conversationToggle = !0;
938
943
  try {
939
- const e = S.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php", t = new FormData();
940
- t.append("tokenId", r.value.tokenId), t.append("userId", P.value), S.value && k.value !== null && t.append("lastMsgId", k.value.toString());
941
- const a = await X.post(e, t);
942
- if (a.data.status === "error") {
943
- f("show:toast", {
944
+ const e = S.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php", a = new FormData();
945
+ a.append("tokenId", r.value.tokenId), a.append("userId", H.value), S.value && k.value !== null && a.append("lastMsgId", k.value.toString());
946
+ const t = await J.post(e, a);
947
+ if (t.data.status === "error") {
948
+ p("show:toast", {
944
949
  show: !0,
945
950
  message: u("HC_FAILED_TO_UPDATE_CONVERSATION"),
946
951
  variant: "error",
@@ -948,14 +953,14 @@ const Pt = 996, Zt = It({
948
953
  });
949
954
  return;
950
955
  }
951
- S.value = !a.data.closed, a.data.messages && (F(a.data.messages), a.data.messages.length > 0 && (k.value = a.data.messages[a.data.messages.length - 1].id)), f("show:toast", {
956
+ S.value = !t.data.closed, t.data.messages && (x(t.data.messages), t.data.messages.length > 0 && (k.value = t.data.messages[t.data.messages.length - 1].id)), p("show:toast", {
952
957
  show: !0,
953
958
  message: S.value ? u("HC_CONVERSATION_REOPENED") : u("HC_CONVERSATION_CLOSED"),
954
959
  variant: "success",
955
960
  icon: "check-circle"
956
961
  });
957
962
  } catch (e) {
958
- console.error("toggleMarkOpenClose error:", e), f("show:toast", {
963
+ console.error("toggleMarkOpenClose error:", e), p("show:toast", {
959
964
  show: !0,
960
965
  message: u("HC_FAILED_TO_UPDATE_CONVERSATION"),
961
966
  variant: "error",
@@ -965,18 +970,18 @@ const Pt = 996, Zt = It({
965
970
  y.value.conversationToggle = !1;
966
971
  }
967
972
  }
968
- }, ht = async () => {
969
- if (s.isTestEnvironment && !(!r.value?.tokenId || !j.value.trim())) {
970
- me.value = !0;
973
+ }, dt = async () => {
974
+ if (s.isTestEnvironment && !(!r.value?.tokenId || !U.value.trim())) {
975
+ ie.value = !0;
971
976
  try {
972
977
  const e = new FormData();
973
- e.append("tokenId", r.value.tokenId), e.append("content", j.value.trim());
974
- const t = await X.post(
978
+ e.append("tokenId", r.value.tokenId), e.append("content", U.value.trim());
979
+ const a = await J.post(
975
980
  "/api/client/connect/simulateInbound.php",
976
981
  e
977
982
  );
978
- if (t.data.status === "error") {
979
- f("show:toast", {
983
+ if (a.data.status === "error") {
984
+ p("show:toast", {
980
985
  show: !0,
981
986
  message: u("HC_FAILED_TO_SIMULATE_MESSAGE"),
982
987
  variant: "error",
@@ -984,55 +989,39 @@ const Pt = 996, Zt = It({
984
989
  });
985
990
  return;
986
991
  }
987
- t.data.messages && (F(t.data.messages), S.value = !t.data.closed, t.data.messages.length > 0 && (k.value = t.data.messages[t.data.messages.length - 1].id)), j.value = "", W.value = !1, K(), f("show:toast", {
992
+ a.data.messages && (x(a.data.messages), S.value = !a.data.closed, a.data.messages.length > 0 && (k.value = a.data.messages[a.data.messages.length - 1].id)), U.value = "", G.value = !1, V(), p("show:toast", {
988
993
  show: !0,
989
994
  message: u("HC_SIMULATED_GUEST_REPLY"),
990
995
  variant: "success",
991
996
  icon: "check-circle"
992
997
  });
993
998
  } catch (e) {
994
- console.error("simulateGuestReply error:", e), f("show:toast", {
999
+ console.error("simulateGuestReply error:", e), p("show:toast", {
995
1000
  show: !0,
996
1001
  message: u("HC_FAILED_TO_SIMULATE_MESSAGE"),
997
1002
  variant: "error",
998
1003
  icon: "exclamation-circle"
999
1004
  });
1000
1005
  } finally {
1001
- me.value = !1;
1006
+ ie.value = !1;
1002
1007
  }
1003
1008
  }
1004
- }, yt = () => {
1005
- W.value = !W.value, W.value || (j.value = "");
1006
- }, gt = () => {
1007
- $.value || ($.value = setInterval(() => {
1008
- document.visibilityState === "visible" && he(!0);
1009
- }, Le));
1010
- }, _e = () => {
1011
- $.value && (clearInterval($.value), $.value = null);
1012
- }, we = () => {
1013
- if (s.align === "left" || s.align === "right") {
1014
- const e = V.value?.getBoundingClientRect().left, t = window.innerWidth;
1015
- ue.value = t - e < U.value ? "right" : "left";
1016
- } else {
1017
- const e = V.value?.getBoundingClientRect().top, t = window.innerHeight;
1018
- ue.value = t - e < G.value ? "bottom" : "top";
1019
- }
1020
- }, Ie = () => {
1021
- if (s.position === "top" || s.position === "bottom") {
1022
- const e = V.value?.getBoundingClientRect().top, t = window.innerHeight;
1023
- de.value = t - e < G.value ? "top" : "bottom";
1024
- } else {
1025
- const e = V.value?.getBoundingClientRect().left, t = window.innerWidth;
1026
- de.value = t - e < U.value ? "left" : "right";
1027
- }
1028
- }, Ce = () => {
1029
- H.value = !H.value, H.value ? (b.value = "", M.value.info = te.value, M.value.tickets = ae.value, M.value.comments = ee.value, te.value = !1, ae.value = !1, document.getElementById("comment-field")?.focus()) : (te.value = M.value.info, ae.value = M.value.tickets, ee.value = M.value.comments);
1030
- }, _t = async (e, t) => {
1031
- const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = new FormData();
1032
- if (o.append("property_id", s.propertyId), o.append("room_ids", JSON.stringify([a])), await J(), A.value) {
1009
+ }, mt = () => {
1010
+ G.value = !G.value, G.value || (U.value = "");
1011
+ }, vt = () => {
1012
+ j.value || (j.value = setInterval(() => {
1013
+ document.visibilityState === "visible" && me(!0);
1014
+ }, Ne));
1015
+ }, pe = () => {
1016
+ j.value && (clearInterval(j.value), j.value = null);
1017
+ }, ke = () => {
1018
+ L.value = !L.value, L.value ? (N.value = "", C.value.info = X.value, C.value.tickets = ee.value, C.value.comments = Z.value, X.value = !1, ee.value = !1, document.getElementById("comment-field")?.focus()) : (X.value = C.value.info, ee.value = C.value.tickets, Z.value = C.value.comments);
1019
+ }, ft = async (e, a) => {
1020
+ const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = new FormData();
1021
+ if (o.append("property_id", s.propertyId), o.append("room_ids", JSON.stringify([t])), await Q(), A.value) {
1033
1022
  const n = [];
1034
1023
  A.value.forEach((l) => {
1035
- l.id === e && l.type === t ? n.unshift({
1024
+ l.id === e && l.type === a ? n.unshift({
1036
1025
  ...l,
1037
1026
  isNew: !0
1038
1027
  }) : n.push({
@@ -1043,147 +1032,141 @@ const Pt = 996, Zt = It({
1043
1032
  }
1044
1033
  };
1045
1034
  B(() => s.open, () => {
1046
- if (s.open && s.showComments && N.value.length) {
1047
- const e = setTimeout(K, 500);
1048
- L.value.push(e);
1035
+ if (s.open && s.showComments && b.value.length) {
1036
+ const e = setTimeout(V, 500);
1037
+ P.value.push(e);
1049
1038
  }
1050
- s.open || (Ae(), _e(), k.value = null, N.value = [], S.value = !1);
1039
+ s.open || (Ie(), pe(), k.value = null, b.value = [], S.value = !1);
1051
1040
  }), B(
1052
- () => [s.open, s.showComments, ee.value, r.value?.tokenId],
1053
- ([e, t, a, o]) => {
1054
- e && t && a && o ? gt() : _e();
1041
+ () => [s.open, s.showComments, Z.value, r.value?.tokenId],
1042
+ ([e, a, t, o]) => {
1043
+ e && a && t && o ? vt() : pe();
1055
1044
  }
1056
- ), B(b, () => {
1057
- const e = setTimeout(Ne, 100);
1058
- L.value.push(e);
1059
- }), B(() => s.allowWhenWhere, (e, t) => {
1060
- t === !0 && e === !1 && (d.value.when = null, d.value.where = null, q.value = [], x.value = []);
1045
+ ), B(N, () => {
1046
+ const e = setTimeout(Oe, 100);
1047
+ P.value.push(e);
1048
+ }), B(() => s.allowWhenWhere, (e, a) => {
1049
+ a === !0 && e === !1 && (d.value.when = null, d.value.where = null, q.value = [], F.value = []);
1061
1050
  });
1062
- const Me = () => !!(s.room.reservations || s.room.cleaning || s.room.occupancy || s.room.hkTaskTypeId != null), wt = () => Array.isArray(s.room.roomNoticeIssues) && s.room.roomNoticeIssues.length > 0, Re = () => {
1063
- wt() ? Y.value = s.room.roomNoticeIssues : ye();
1051
+ const Ee = () => !!(s.room.reservations || s.room.cleaning || s.room.occupancy || s.room.hkTaskTypeId != null), pt = () => Array.isArray(s.room.roomNoticeIssues) && s.room.roomNoticeIssues.length > 0, Ae = () => {
1052
+ pt() ? W.value = s.room.roomNoticeIssues : ve();
1064
1053
  };
1065
- return B(() => s.open, async (e, t) => {
1066
- e && !t && (Me() ? (r.value = s.room, R.value = [s.room]) : s.showGuestDetails && !R.value ? await se() : r.value || (r.value = s.room), J(), Re(), ne(), s.showComments && he());
1054
+ return B(() => s.open, async (e, a) => {
1055
+ e && !a && (Ee() ? (r.value = s.room, R.value = [s.room]) : s.showGuestDetails && !R.value ? await ae() : r.value || (r.value = s.room), Q(), Ae(), oe(), s.showComments && me());
1067
1056
  }), B(
1068
1057
  () => s.room.id,
1069
- (e, t) => {
1070
- e !== t && (r.value = s.room, R.value = null, s.open && (Me() ? R.value = [s.room] : s.showGuestDetails && se(), J(), Re(), ne()));
1058
+ (e, a) => {
1059
+ e !== a && (r.value = s.room, R.value = null, s.open && (Ee() ? R.value = [s.room] : s.showGuestDetails && ae(), Q(), Ae(), oe()));
1071
1060
  }
1072
- ), Tt(async () => {
1061
+ ), yt(async () => {
1073
1062
  const e = JSON.parse(
1074
1063
  window.localStorage.getItem("authenticated")
1075
1064
  );
1076
- P.value = e?.user?.id || window.userId || "", r.value = s.room, s.size === "sm" && (G.value = 140, U.value = 160), s.size === "lg" && (G.value = 250, U.value = 440), we(), Ie();
1077
- }), Dt(() => {
1078
- L.value.forEach((e) => {
1065
+ H.value = e?.user?.id || window.userId || "", r.value = s.room;
1066
+ }), gt(() => {
1067
+ P.value.forEach((e) => {
1079
1068
  clearTimeout(e);
1080
- }), _e();
1069
+ }), pe();
1081
1070
  }), {
1082
- DateTime: I,
1071
+ DateTime: _,
1083
1072
  // Refs
1084
- activityList: pe,
1085
- actionMenuOpen: ie,
1086
- alignment: ue,
1087
- assignTypes: Z,
1088
- comment: b,
1089
- complaint: p,
1090
- componentHeight: G,
1091
- componentWidth: U,
1092
- departments: C,
1093
- departmentUsers: Oe,
1094
- expandActivity: Pe,
1095
- expandComments: ee,
1096
- expandGuestInfo: te,
1097
- expandedStates: M,
1098
- expandTickets: ae,
1099
- guestDetailsData: He,
1073
+ activityList: ce,
1074
+ actionMenuOpen: re,
1075
+ assignTypes: z,
1076
+ comment: N,
1077
+ complaint: f,
1078
+ departments: M,
1079
+ departmentUsers: ge,
1080
+ expandActivity: be,
1081
+ expandComments: Z,
1082
+ expandGuestInfo: X,
1083
+ expandedStates: C,
1084
+ expandTickets: ee,
1085
+ guestDetailsData: Se,
1100
1086
  itemOptions: O,
1101
1087
  loading: y,
1102
- messages: N,
1103
- moodOptions: ce,
1088
+ messages: b,
1089
+ moodOptions: le,
1104
1090
  pmsData: R,
1105
- positioning: de,
1106
- quickReplyOpen: H,
1091
+ preferredPlacement: He,
1092
+ quickReplyOpen: L,
1107
1093
  request: d,
1108
- requestedByOptions: Q,
1109
- requestLoading: ve,
1094
+ requestedByOptions: $,
1095
+ requestLoading: ue,
1110
1096
  requestType: E,
1111
1097
  roomDetailsData: r,
1112
- roomNotice: g,
1113
- roomNotices: Y,
1114
- showCreateRequest: oe,
1098
+ roomNotice: w,
1099
+ roomNotices: W,
1100
+ showCreateRequest: te,
1115
1101
  ticketsList: A,
1116
- todoOptions: qe,
1117
- trigger: V,
1118
- userId: P,
1102
+ todoOptions: Me,
1103
+ userId: H,
1119
1104
  workOrder: v,
1120
- workOrderIssues: fe,
1105
+ workOrderIssues: de,
1121
1106
  whenOptions: q,
1122
- whereOptions: x,
1107
+ whereOptions: F,
1123
1108
  // Guest Connect state
1124
1109
  isConversationOpen: S,
1125
1110
  lastMessageId: k,
1126
1111
  // Simulate Guest Reply state (test environments only)
1127
- simulateOpen: W,
1128
- simulateContent: j,
1129
- simulateLoading: me,
1112
+ simulateOpen: G,
1113
+ simulateContent: U,
1114
+ simulateLoading: ie,
1130
1115
  // Computed
1131
- cleanliness: xe,
1132
- greenerStayIconUrl: Ge,
1133
- greenerStayTooltipContent: Be,
1134
- isGreenerStay: Fe,
1135
- filteredReplies: Ue,
1136
- groupedMessages: We,
1137
- hasGuestCallback: je,
1138
- hasComplaint: ke,
1139
- itemOptionsList: $e,
1140
- occupied: Ee,
1141
- occupancyTooltipContent: Qe,
1142
- selectedAssignType: Ye,
1143
- selectedDepartment: Ve,
1144
- selectedRequestedBy: Je,
1145
- stayDetails: Ke,
1146
- tagsList: ze,
1147
- validateToDo: Xe,
1116
+ cleanliness: Ce,
1117
+ greenerStayIconUrl: Pe,
1118
+ greenerStayTooltipContent: Le,
1119
+ isGreenerStay: Re,
1120
+ filteredReplies: qe,
1121
+ groupedMessages: Fe,
1122
+ hasGuestCallback: xe,
1123
+ hasComplaint: _e,
1124
+ itemOptionsList: Be,
1125
+ occupied: we,
1126
+ occupancyTooltipContent: Ge,
1127
+ selectedAssignType: Ue,
1128
+ selectedDepartment: je,
1129
+ selectedRequestedBy: $e,
1130
+ stayDetails: We,
1131
+ tagsList: Qe,
1132
+ validateToDo: Ve,
1148
1133
  // Methods
1149
- closeRequest: Ae,
1150
- createCallback: Ze,
1151
- getActivity: ne,
1152
- createMessageList: F,
1153
- getChatMessages: he,
1154
- getHowLongAgo: tt,
1155
- getPMSData: se,
1156
- getRoomNotices: ye,
1157
- getSharedData: ge,
1158
- getStayDetails: Se,
1159
- getTicketColor: ot,
1160
- getTicketIcon: st,
1161
- getTickets: J,
1162
- handleFailedResponse: be,
1163
- handlePulse: nt,
1164
- onClickActivity: it,
1165
- onClickEditConnectGuest: rt,
1166
- onClickTicket: lt,
1167
- onCreateRequestSubmit: ut,
1168
- onHoverToggle: ct,
1169
- onSelectQuickReply: dt,
1170
- onSelectToDo: mt,
1171
- openRequest: vt,
1172
- refreshPMSData: at,
1173
- resizeTextarea: Ne,
1174
- scrollToConnectBottom: K,
1175
- sendChatMessage: pt,
1176
- setAlignment: we,
1177
- setPositioning: Ie,
1178
- toggleMarkOpenClose: ft,
1179
- toggleQuickReply: Ce,
1180
- updateTickets: _t,
1134
+ closeRequest: Ie,
1135
+ createCallback: Ye,
1136
+ getActivity: oe,
1137
+ createMessageList: x,
1138
+ getChatMessages: me,
1139
+ getHowLongAgo: Ke,
1140
+ getPMSData: ae,
1141
+ getRoomNotices: ve,
1142
+ getSharedData: fe,
1143
+ getStayDetails: Te,
1144
+ getTicketColor: Ze,
1145
+ getTicketIcon: Xe,
1146
+ getTickets: Q,
1147
+ handleFailedResponse: De,
1148
+ handlePulse: et,
1149
+ onClickActivity: ot,
1150
+ onClickEditConnectGuest: tt,
1151
+ onClickTicket: at,
1152
+ onCreateRequestSubmit: st,
1153
+ onHoverToggle: nt,
1154
+ onSelectQuickReply: rt,
1155
+ onSelectToDo: lt,
1156
+ openRequest: it,
1157
+ refreshPMSData: ze,
1158
+ resizeTextarea: Oe,
1159
+ scrollToConnectBottom: V,
1160
+ sendChatMessage: ut,
1161
+ toggleMarkOpenClose: ct,
1162
+ toggleQuickReply: ke,
1163
+ updateTickets: ft,
1181
1164
  // Simulate Guest Reply methods (test environments only)
1182
- simulateGuestReply: ht,
1183
- toggleSimulateOpen: yt
1165
+ simulateGuestReply: dt,
1166
+ toggleSimulateOpen: mt
1184
1167
  };
1185
1168
  }
1186
1169
  });
1187
1170
  export {
1188
- Zt as default
1171
+ Kt as default
1189
1172
  };