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