@quoreadmin/ui 1.10.32 → 1.10.33

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 (193) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index147.js +253 -250
  3. package/dist/index157.js +204 -191
  4. package/dist/index182.js +14 -14
  5. package/dist/index183.js +3 -3
  6. package/dist/index186.js +4 -4
  7. package/dist/index193.js +10 -10
  8. package/dist/index195.js +10 -10
  9. package/dist/index198.js +17 -17
  10. package/dist/index201.js +28 -28
  11. package/dist/index202.js +2 -2
  12. package/dist/index203.js +2 -2
  13. package/dist/index204.js +1 -1
  14. package/dist/index212.js +4 -4
  15. package/dist/index213.js +84 -29
  16. package/dist/index214.js +400 -109
  17. package/dist/index215.js +22 -36
  18. package/dist/index216.js +33 -26
  19. package/dist/index217.js +111 -31
  20. package/dist/index218.js +35 -50
  21. package/dist/index219.js +26 -43
  22. package/dist/index220.js +35 -3
  23. package/dist/index221.js +51 -9
  24. package/dist/index222.js +42 -18
  25. package/dist/index223.js +4 -10
  26. package/dist/index224.js +9 -10
  27. package/dist/index225.js +18 -38
  28. package/dist/index226.js +10 -21
  29. package/dist/index227.js +10 -88
  30. package/dist/index228.js +35 -403
  31. package/dist/index229.js +21 -22
  32. package/dist/index230.js +156 -122
  33. package/dist/index231.js +225 -35
  34. package/dist/index232.js +37 -80
  35. package/dist/index233.js +10 -20
  36. package/dist/index234.js +160 -19
  37. package/dist/index235.js +10 -10
  38. package/dist/index236.js +11 -11
  39. package/dist/index237.js +15 -13
  40. package/dist/index238.js +167 -129
  41. package/dist/index239.js +69 -19
  42. package/dist/index240.js +33 -21
  43. package/dist/index241.js +25 -184
  44. package/dist/index242.js +21 -69
  45. package/dist/index243.js +22 -34
  46. package/dist/index244.js +19 -39
  47. package/dist/index245.js +833 -158
  48. package/dist/index246.js +683 -209
  49. package/dist/index247.js +176 -37
  50. package/dist/index248.js +20 -10
  51. package/dist/index249.js +20 -253
  52. package/dist/index250.js +21 -7
  53. package/dist/index251.js +20 -138
  54. package/dist/index252.js +20 -83
  55. package/dist/index253.js +3 -22
  56. package/dist/index254.js +186 -21
  57. package/dist/index255.js +132 -19
  58. package/dist/index256.js +1131 -744
  59. package/dist/index257.js +104 -679
  60. package/dist/index258.js +20 -176
  61. package/dist/index259.js +11 -11
  62. package/dist/index260.js +15 -13
  63. package/dist/index261.js +37 -19
  64. package/dist/index262.js +29 -3
  65. package/dist/index263.js +19 -186
  66. package/dist/index264.js +18 -131
  67. package/dist/index265.js +2 -1223
  68. package/dist/index266.js +2 -20
  69. package/dist/index267.js +80 -22
  70. package/dist/index268.js +13 -15
  71. package/dist/index269.js +12 -21
  72. package/dist/index270.js +253 -20
  73. package/dist/index271.js +8 -20
  74. package/dist/index272.js +138 -2
  75. package/dist/index273.js +83 -2
  76. package/dist/index274.js +6 -6
  77. package/dist/index275.js +1 -1
  78. package/dist/index276.js +1 -1
  79. package/dist/index289.js +2 -2
  80. package/dist/index290.js +54 -2
  81. package/dist/index291.js +2 -2
  82. package/dist/index292.js +25 -53
  83. package/dist/index293.js +15 -19
  84. package/dist/index294.js +9 -9
  85. package/dist/index295.js +16 -22
  86. package/dist/index296.js +15 -14
  87. package/dist/index297.js +21 -15
  88. package/dist/index298.js +3 -23
  89. package/dist/index299.js +27 -3
  90. package/dist/index300.js +2 -27
  91. package/dist/index301.js +74 -230
  92. package/dist/index302.js +21 -5
  93. package/dist/index303.js +925 -124
  94. package/dist/index304.js +21 -67
  95. package/dist/index305.js +18 -85
  96. package/dist/index306.js +19 -28
  97. package/dist/index307.js +67 -7
  98. package/dist/index308.js +19 -75
  99. package/dist/index309.js +19 -4
  100. package/dist/index310.js +22 -2
  101. package/dist/index311.js +21 -82
  102. package/dist/index312.js +62 -53
  103. package/dist/index313.js +1533 -5
  104. package/dist/index314.js +385 -4
  105. package/dist/index315.js +2700 -148
  106. package/dist/index316.js +83 -60
  107. package/dist/index317.js +3798 -75
  108. package/dist/index318.js +55 -1529
  109. package/dist/index319.js +14 -385
  110. package/dist/index320.js +67 -2714
  111. package/dist/index321.js +189 -73
  112. package/dist/index322.js +222 -3774
  113. package/dist/index323.js +32 -55
  114. package/dist/index324.js +234 -14
  115. package/dist/index325.js +5 -83
  116. package/dist/index326.js +122 -190
  117. package/dist/index327.js +61 -239
  118. package/dist/index328.js +83 -75
  119. package/dist/index329.js +28 -21
  120. package/dist/index330.js +9 -935
  121. package/dist/index331.js +74 -21
  122. package/dist/index332.js +3 -19
  123. package/dist/index333.js +2 -20
  124. package/dist/index334.js +80 -66
  125. package/dist/index335.js +53 -18
  126. package/dist/index336.js +6 -19
  127. package/dist/index337.js +4 -21
  128. package/dist/index338.js +178 -21
  129. package/dist/index339.js +62 -62
  130. package/dist/index340.js +74 -36
  131. package/dist/index341.js +8 -9
  132. package/dist/index342.js +13 -10
  133. package/dist/index343.js +54 -13
  134. package/dist/index344.js +12 -10
  135. package/dist/index345.js +12 -15
  136. package/dist/index346.js +57 -8
  137. package/dist/index347.js +51 -12
  138. package/dist/index348.js +25 -49
  139. package/dist/index349.js +2 -12
  140. package/dist/index350.js +5 -14
  141. package/dist/index351.js +2 -58
  142. package/dist/index352.js +23 -52
  143. package/dist/index353.js +38 -28
  144. package/dist/index354.js +2 -2
  145. package/dist/index355.js +10 -4
  146. package/dist/index356.js +20 -2
  147. package/dist/index357.js +9 -22
  148. package/dist/index358.js +9 -40
  149. package/dist/index359.js +17 -2
  150. package/dist/index360.js +2 -11
  151. package/dist/index361.js +9 -20
  152. package/dist/index362.js +10 -2
  153. package/dist/index363.js +13 -8
  154. package/dist/index364.js +19 -20
  155. package/dist/index365.js +19 -55
  156. package/dist/index366.js +63 -28
  157. package/dist/index367.js +37 -7
  158. package/dist/index368.js +18 -49
  159. package/dist/index369.js +56 -6
  160. package/dist/index370.js +27 -10
  161. package/dist/index371.js +7 -7
  162. package/dist/index372.js +51 -27
  163. package/dist/index373.js +6 -2
  164. package/dist/index374.js +11 -69
  165. package/dist/index375.js +6 -166
  166. package/dist/index376.js +28 -20
  167. package/dist/index377.js +2 -20
  168. package/dist/index378.js +67 -61
  169. package/dist/index379.js +166 -36
  170. package/dist/index380.js +17 -31
  171. package/dist/index381.js +100 -10
  172. package/dist/index382.js +90 -3
  173. package/dist/index383.js +98 -4
  174. package/dist/index386.js +30 -11
  175. package/dist/index387.js +10 -4
  176. package/dist/index388.js +4 -33
  177. package/dist/index389.js +4 -31
  178. package/dist/index390.js +12 -28
  179. package/dist/index391.js +5 -61
  180. package/dist/index392.js +33 -101
  181. package/dist/index393.js +31 -91
  182. package/dist/index394.js +27 -97
  183. package/dist/index395.js +60 -16
  184. package/dist/index396.js +1 -1
  185. package/dist/index401.js +1 -1
  186. package/dist/index402.js +2 -2
  187. package/dist/index45.js +9 -7
  188. package/dist/index50.js +2 -2
  189. package/dist/index98.js +101 -29
  190. package/dist/src/components/date-picker/date-picker.d.ts +33 -0
  191. package/dist/src/components/date-picker/date-picker.stories.d.ts +108 -0
  192. package/dist/src/components/room-details-popover/room-details-popover.d.ts +37 -12
  193. package/package.json +1 -1
package/dist/index147.js CHANGED
@@ -1,33 +1,33 @@
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";
1
+ import { defineComponent as Tt, ref as i, computed as w, watch as B, onMounted as Dt, onUnmounted as Ot } from "vue";
2
+ import { useI18n as kt } from "vue-i18n";
3
+ import { DateTime as g } from "./index174.js";
4
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({
5
+ import Et from "./index2.js";
6
+ import At from "./index3.js";
7
+ import St from "./index4.js";
8
+ import bt from "./index21.js";
9
+ import Nt from "./index28.js";
10
+ import Ct from "./index41.js";
11
+ import Mt from "./index20.js";
12
+ import Rt from "./index48.js";
13
+ import Ht from "./index50.js";
14
+ import Lt from "./index49.js";
15
+ import Pt from "./index52.js";
16
+ import Z from "./index198.js";
17
+ const qt = 996, ea = Tt({
18
18
  name: "QRoomDetailsPopover",
19
19
  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
20
+ QAccordion: Et,
21
+ QActivityItem: At,
22
+ QAvatar: St,
23
+ QDatePicker: Mt,
24
+ QDivider: bt,
25
+ QIcon: Nt,
26
+ QPopover: Ct,
27
+ QTag: Rt,
28
+ QTextarea: Lt,
29
+ QTimePicker: Ht,
30
+ QTooltip: Pt
31
31
  },
32
32
  props: {
33
33
  id: {
@@ -172,10 +172,13 @@ const Pt = 996, Zt = It({
172
172
  },
173
173
  emits: ["create:callback", "create:todo", "refresh:pms", "show:toast", "toggle"],
174
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([
175
+ const { t: u } = kt(), De = () => {
176
+ const e = g.now().setZone(s.propertyTimeZone), t = e.isValid ? e : g.now(), a = t.hour, o = t.minute, n = a >= 12 ? "PM" : "AM";
177
+ return `${a % 12 || 12}:${String(o).padStart(2, "0")} ${n}`;
178
+ }, X = () => {
179
+ const e = g.now().setZone(s.propertyTimeZone), t = e.isValid ? e : g.now();
180
+ return new Date(t.year, t.month - 1, t.day, 12, 0, 0, 0);
181
+ }, Oe = "11:59 PM", r = i(s.room), ue = i(!1), ce = i("left"), ee = i([
179
182
  {
180
183
  id: 1,
181
184
  label: u("HC_DEPARTMENT")
@@ -200,11 +203,11 @@ const Pt = 996, Zt = It({
200
203
  problem: null,
201
204
  notes: "",
202
205
  tokenId: r.value?.tokenId
203
- }), G = i(250), U = i(290), C = i([]), Oe = i([]), ee = i(!0), te = i(!0), M = i({
206
+ }), G = i(250), U = i(290), C = i([]), ke = i([]), te = i(!0), ae = i(!0), M = i({
204
207
  info: !0,
205
208
  tickets: !0,
206
209
  comments: !0
207
- }), ae = i(!0), He = i(s.guestDetails), O = i([]), y = i({
210
+ }), oe = i(!0), Le = i(s.guestDetails), O = i([]), y = i({
208
211
  actionItems: !1,
209
212
  activity: !1,
210
213
  conversationToggle: !1,
@@ -213,7 +216,7 @@ const Pt = 996, Zt = It({
213
216
  roomNotices: !1,
214
217
  sendingMessage: !1,
215
218
  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({
219
+ }), N = 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), Pe = 3e4, d = i({
217
220
  assignType: null,
218
221
  department: null,
219
222
  due: /* @__PURE__ */ new Date(),
@@ -232,14 +235,14 @@ const Pt = 996, Zt = It({
232
235
  id: 1,
233
236
  label: u("HC_HOTEL_GUEST")
234
237
  }
235
- ]), ve = i(!1), E = i(null), g = i({
236
- endDate: /* @__PURE__ */ new Date(),
238
+ ]), pe = i(!1), E = i(null), _ = i({
239
+ endDate: X(),
237
240
  issue: null,
238
241
  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([
242
+ startDate: X(),
243
+ startTime: De(),
244
+ endTime: Oe
245
+ }), V = i([]), se = i(!1), fe = i([]), qe = i(!0), A = i([]), L = i([]), Fe = i([
243
246
  {
244
247
  label: u("HC_COMPLAINT"),
245
248
  id: "complaint"
@@ -256,7 +259,7 @@ const Pt = 996, Zt = It({
256
259
  label: u("HC_WORK_ORDER"),
257
260
  id: "work_order"
258
261
  }
259
- ]), V = i(), P = i(null), v = i({
262
+ ]), Y = i(), P = i(null), v = i({
260
263
  assignType: null,
261
264
  department: null,
262
265
  due: /* @__PURE__ */ new Date(),
@@ -265,7 +268,7 @@ const Pt = 996, Zt = It({
265
268
  notes: "",
266
269
  person: null,
267
270
  requestedBy: null
268
- }), fe = i([]), q = i([]), x = i([]), xe = _(() => {
271
+ }), he = i([]), q = i([]), F = i([]), xe = w(() => {
269
272
  switch (r.value.cleaning?.name) {
270
273
  case "CLEAN":
271
274
  case "INSPECTED":
@@ -278,18 +281,18 @@ const Pt = 996, Zt = It({
278
281
  default:
279
282
  return "";
280
283
  }
281
- }), Fe = _(() => {
284
+ }), Be = w(() => {
282
285
  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 = _(() => {
286
+ return Number(e) === qt;
287
+ }), Ge = w(() => s.cleanInitiativeInfo?.cleanInitiativeName ?? r.value?.cleanInitiativeInfo?.cleanInitiativeName ?? "Greener Stay"), Ue = w(() => s.cleanInitiativeInfo?.imgUrl ?? r.value?.cleanInitiativeInfo?.imgUrl ?? ""), We = w(() => {
285
288
  const e = b.value.toLowerCase();
286
289
  return s.quickReplies.filter((t) => t.toLowerCase().match(e));
287
- }), We = _(() => {
290
+ }), je = w(() => {
288
291
  if (!N.value.length) return [];
289
292
  const e = [];
290
293
  let t = null;
291
294
  return N.value.forEach((a) => {
292
- const o = I.fromFormat(
295
+ const o = g.fromFormat(
293
296
  a.dateUtc,
294
297
  "yyyy-MM-dd HH:mm:ss",
295
298
  { zone: "utc" }
@@ -304,11 +307,11 @@ const Pt = 996, Zt = It({
304
307
  formattedTime: o.toFormat("h:mma").replace("AM", "am").replace("PM", "pm")
305
308
  });
306
309
  }), e;
307
- }), ke = _(() => A.value.length ? !!A.value.find(
310
+ }), Ee = w(() => A.value.length ? !!A.value.find(
308
311
  (t) => t.type === "complaint"
309
- ) : !1), je = _(() => A.value.length ? !!A.value.find(
312
+ ) : !1), $e = w(() => A.value.length ? !!A.value.find(
310
313
  (t) => t.type === "callback"
311
- ) : !1), $e = _(() => {
314
+ ) : !1), Qe = w(() => {
312
315
  let e = [];
313
316
  return O.value[0] && O.value[0].options === void 0 ? O.value.forEach((t) => {
314
317
  e.push({
@@ -316,15 +319,15 @@ const Pt = 996, Zt = It({
316
319
  label: t.display_name
317
320
  });
318
321
  }) : 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 = _(() => {
322
+ }), Ae = w(() => r.value.occupancy?.name === "OCCUPIED"), Ve = w(() => Ae.value && Ee.value ? "HK_ROOM_STATUS_Occupied_Complaint" : "HK_ROOM_STATUS_Occupied"), Ye = w(() => {
320
323
  switch (E.value?.id) {
321
324
  case "request":
322
325
  case "work_order":
323
- return Z.value[0];
326
+ return ee.value[0];
324
327
  default:
325
328
  return null;
326
329
  }
327
- }), Ve = _(() => {
330
+ }), Je = w(() => {
328
331
  if (C.value)
329
332
  switch (E.value?.id) {
330
333
  case "request":
@@ -335,7 +338,7 @@ const Pt = 996, Zt = It({
335
338
  return null;
336
339
  }
337
340
  return null;
338
- }), Je = _(() => {
341
+ }), ze = w(() => {
339
342
  switch (E.value?.id) {
340
343
  case "request":
341
344
  return Q.value[1];
@@ -344,27 +347,27 @@ const Pt = 996, Zt = It({
344
347
  default:
345
348
  return null;
346
349
  }
347
- }), Ke = _(() => {
350
+ }), Ke = w(() => {
348
351
  let e = "";
349
352
  if (r.value && r.value.reservations[0]) {
350
- const t = I.fromISO(
353
+ const t = g.fromISO(
351
354
  r.value.reservations[0].arrivalDate
352
- ), a = t.toFormat("MMM"), o = t.day, n = t.year, l = I.fromISO(
355
+ ), a = t.toFormat("MMM"), o = t.day, n = t.year, l = g.fromISO(
353
356
  r.value.reservations[0].departureDate
354
357
  ), c = l.toFormat("MMM"), m = l.day, h = l.year;
355
358
  e += a + " " + o, n !== h && (e += ", " + n), a === c ? e += "-" + m : e += " - " + c + " " + m, e += ", " + h;
356
359
  }
357
360
  return e;
358
- }), ze = _(() => {
359
- let e = Y.value;
361
+ }), Ze = w(() => {
362
+ let e = V.value;
360
363
  return e = [...new Set(e)], e;
361
- }), Xe = _(() => {
364
+ }), Xe = w(() => {
362
365
  const e = E.value?.id;
363
366
  if (!e)
364
367
  return !1;
365
368
  switch (e) {
366
369
  case "room_notice":
367
- return g.value.issue && g.value.startDate && g.value.endDate;
370
+ return _.value.issue && _.value.startDate && _.value.endDate;
368
371
  case "complaint":
369
372
  return p.value.problem && p.value.guestName && p.value.guestMood;
370
373
  case "work_order":
@@ -374,48 +377,48 @@ const Pt = 996, Zt = It({
374
377
  default:
375
378
  return !1;
376
379
  }
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
+ }), Se = () => {
381
+ se.value = !1, H.value = !1, ue.value = !1, pe.value = !1, O.value = [], de.value = [], he.value = [], q.value = [], F.value = [], E.value = null, _.value.issue = null, _.value.startDate = X(), _.value.endDate = X(), _.value.startTime = De(), _.value.endTime = Oe, _.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;
382
+ }, et = async () => {
380
383
  f("create:callback", r.value), f("toggle", !1);
381
- }, F = (e) => {
384
+ }, x = (e) => {
382
385
  const t = [];
383
386
  (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";
387
+ 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] || "", K = o.user_last_name || o.guest_last_name || h.slice(1).join(" ") || "", le = I && K ? `${I} ${K}` : I || "Auto-Reply", ie = n === "system" || n === "user", T = n === "guest";
385
388
  let D = {
386
389
  id: o.id,
387
390
  isPropertyEmployee: n === "user",
388
391
  isSent: !!o.sent,
389
392
  isSystemMessage: n === "system",
390
- isStaffMessage: le,
393
+ isStaffMessage: ie,
391
394
  isGuestMessage: T,
392
395
  comment: o.content,
393
396
  dateUtc: o.sent || o.created,
394
397
  user: {
395
- firstName: w || "Auto-Reply",
398
+ firstName: I || "Auto-Reply",
396
399
  icon: "",
397
400
  id: c || "system-message",
398
401
  initials: "",
399
- lastName: z || "",
400
- name: re,
402
+ lastName: K || "",
403
+ name: le,
401
404
  src: m || ""
402
405
  }
403
406
  };
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);
407
+ 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);
405
408
  }), N.value = t;
406
- }, et = (e) => {
409
+ }, tt = (e) => {
407
410
  if (!e || e.length === 0) return;
408
411
  (Array.isArray(e) ? e : Object.values(e)).forEach((a) => {
409
412
  if (N.value.some((D) => D.id === a.id))
410
413
  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";
414
+ 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] || "", I = a.user_last_name || a.guest_last_name || m.slice(1).join(" ") || "", K = h && I ? `${h} ${I}` : h || "Auto-Reply", le = o === "system" || o === "user", ie = o === "guest";
412
415
  let T = {
413
416
  id: a.id,
414
417
  isPropertyEmployee: o === "user",
415
418
  isSent: !!a.sent,
416
419
  isSystemMessage: o === "system",
417
- isStaffMessage: re,
418
- isGuestMessage: le,
420
+ isStaffMessage: le,
421
+ isGuestMessage: ie,
419
422
  comment: a.content,
420
423
  dateUtc: a.sent || a.created,
421
424
  user: {
@@ -423,14 +426,14 @@ const Pt = 996, Zt = It({
423
426
  icon: "",
424
427
  id: l || "system-message",
425
428
  initials: "",
426
- lastName: w || "",
427
- name: z,
429
+ lastName: I || "",
430
+ name: K,
428
431
  src: c || ""
429
432
  }
430
433
  };
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);
434
+ 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"), N.value.push(T);
432
435
  });
433
- }, he = async (e = !1) => {
436
+ }, ye = async (e = !1) => {
434
437
  if (s.showComments && r.value.tokenId) {
435
438
  e || (y.value.messages = !0);
436
439
  try {
@@ -443,18 +446,18 @@ const Pt = 996, Zt = It({
443
446
  if (o.status === "error")
444
447
  throw new Error(o.message || "Failed to get messages");
445
448
  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);
449
+ k.value = o.messages[o.messages.length - 1].id, e ? tt(o.messages) : x(o.messages);
450
+ const n = setTimeout(z, 100);
448
451
  L.value.push(n);
449
- } else e || F(o.messages || []);
452
+ } else e || x(o.messages || []);
450
453
  } catch (t) {
451
454
  console.error("getChatMessages error:", t);
452
455
  } finally {
453
456
  e || (y.value.messages = !1);
454
457
  }
455
458
  }
456
- }, tt = (e) => {
457
- const t = I.utc(), a = I.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = t.diff(
459
+ }, at = (e) => {
460
+ const t = g.utc(), a = g.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = t.diff(
458
461
  a,
459
462
  [
460
463
  "years",
@@ -476,9 +479,9 @@ const Pt = 996, Zt = It({
476
479
  return h === 1 ? u("HC_ONE_MINUTE_AGO") : u("HC_X_MINUTES_AGO", { minutes: h });
477
480
  if (h === 0)
478
481
  return u("HC_A_MOMENT_AGO");
479
- }, at = async () => {
480
- s.showGuestDetails && se(), ye(), J(), ne(), f("refresh:pms", r.value);
481
- }, se = async () => {
482
+ }, ot = async () => {
483
+ s.showGuestDetails && ne(), ge(), J(), re(), f("refresh:pms", r.value);
484
+ }, ne = async () => {
482
485
  try {
483
486
  y.value.pms = !0;
484
487
  const e = new AbortController(), t = setTimeout(() => e.abort(), 45e3);
@@ -488,8 +491,8 @@ const Pt = 996, Zt = It({
488
491
  throw new Error("PMS base URL is required");
489
492
  const o = {
490
493
  Authorization: "Bearer " + (() => {
491
- const w = `; ${document.cookie}`.split("; QV2Auth=");
492
- return w.length === 2 && w.pop()?.split(";").shift() || "";
494
+ const I = `; ${document.cookie}`.split("; QV2Auth=");
495
+ return I.length === 2 && I.pop()?.split(";").shift() || "";
493
496
  })(),
494
497
  "Content-Type": "application/json"
495
498
  }, n = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room.id, l = await fetch(
@@ -501,7 +504,7 @@ const Pt = 996, Zt = It({
501
504
  body: JSON.stringify({ roomsIds: [n] })
502
505
  }
503
506
  );
504
- clearTimeout(t), l.ok || be(l);
507
+ clearTimeout(t), l.ok || Ne(l);
505
508
  const c = await l.json(), m = c.data?.pmsRooms || c.data?.rooms || c.rooms || [];
506
509
  R.value = m, m.length > 0 ? r.value = {
507
510
  ...m[0],
@@ -515,7 +518,7 @@ const Pt = 996, Zt = It({
515
518
  icon: "exclamation-circle"
516
519
  }), e;
517
520
  }
518
- }, ye = async () => {
521
+ }, ge = async () => {
519
522
  try {
520
523
  y.value.roomNotices = !0;
521
524
  const e = await fetch(
@@ -524,9 +527,9 @@ const Pt = 996, Zt = It({
524
527
  if (!e.ok)
525
528
  throw new Error(`HTTP error! status: ${e.status}`);
526
529
  const t = await e.json();
527
- Y.value = t.notices;
530
+ V.value = t.notices;
528
531
  } catch (e) {
529
- console.error("Error getting room notices:", e), Y.value = [], f("show:toast", {
532
+ console.error("Error getting room notices:", e), V.value = [], f("show:toast", {
530
533
  show: !0,
531
534
  message: u("HC_FAILED_TO_LOAD_ROOM_NOTICES"),
532
535
  variant: "error",
@@ -535,7 +538,7 @@ const Pt = 996, Zt = It({
535
538
  } finally {
536
539
  y.value.roomNotices = !1;
537
540
  }
538
- }, ge = async () => {
541
+ }, _e = async () => {
539
542
  try {
540
543
  const e = new FormData();
541
544
  e.append("property_id", s.propertyId), e.append("filter", "tasks_new");
@@ -558,7 +561,7 @@ const Pt = 996, Zt = It({
558
561
  };
559
562
  n.users.forEach((m) => {
560
563
  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;
564
+ }), c.group && l.push({ ...c }), ke.value = l;
562
565
  }
563
566
  } catch (e) {
564
567
  console.error("Error getting shared data:", e), f("show:toast", {
@@ -568,7 +571,7 @@ const Pt = 996, Zt = It({
568
571
  icon: "exclamation-circle"
569
572
  });
570
573
  }
571
- }, Se = async () => {
574
+ }, be = async () => {
572
575
  try {
573
576
  const t = await (await fetch(
574
577
  `/api/client/connect/getStayDetails.php?tokenId=${r.value.tokenId}`,
@@ -579,9 +582,9 @@ const Pt = 996, Zt = It({
579
582
  )).json();
580
583
  if (t.status === "error")
581
584
  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(
585
+ 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 = g.fromISO(
583
586
  t.checkIn
584
- ).toJSDate()), t.checkOut && (p.value.checkOutDate = I.fromISO(
587
+ ).toJSDate()), t.checkOut && (p.value.checkOutDate = g.fromISO(
585
588
  t.checkOut
586
589
  ).toJSDate());
587
590
  } catch (e) {
@@ -592,7 +595,7 @@ const Pt = 996, Zt = It({
592
595
  icon: "exclamation-circle"
593
596
  });
594
597
  }
595
- }, ot = (e) => {
598
+ }, st = (e) => {
596
599
  switch (e) {
597
600
  case "complaint":
598
601
  return "red-30";
@@ -605,7 +608,7 @@ const Pt = 996, Zt = It({
605
608
  case "task":
606
609
  return "green-20";
607
610
  }
608
- }, st = (e) => {
611
+ }, nt = (e) => {
609
612
  switch (e) {
610
613
  case "complaint":
611
614
  return "face-frown";
@@ -638,7 +641,7 @@ const Pt = 996, Zt = It({
638
641
  } finally {
639
642
  y.value.tickets = !1;
640
643
  }
641
- }, ne = async () => {
644
+ }, re = async () => {
642
645
  if (s.showActivity)
643
646
  try {
644
647
  y.value.activity = !0;
@@ -648,9 +651,9 @@ const Pt = 996, Zt = It({
648
651
  if (!t.ok)
649
652
  throw new Error(`HTTP error! status: ${t.status}`);
650
653
  const a = await t.json();
651
- pe.value = a.inspections || [];
654
+ fe.value = a.inspections || [];
652
655
  } catch (e) {
653
- console.error("Error getting activity:", e), pe.value = [], f("show:toast", {
656
+ console.error("Error getting activity:", e), fe.value = [], f("show:toast", {
654
657
  show: !0,
655
658
  message: u("HC_FAILED_TO_LOAD_ACTIVITY"),
656
659
  variant: "error",
@@ -659,7 +662,7 @@ const Pt = 996, Zt = It({
659
662
  } finally {
660
663
  y.value.activity = !1;
661
664
  }
662
- }, be = async (e) => {
665
+ }, Ne = async (e) => {
663
666
  const t = await e.text();
664
667
  let a;
665
668
  try {
@@ -668,7 +671,7 @@ const Pt = 996, Zt = It({
668
671
  a = { code: e.status, message: t };
669
672
  }
670
673
  return a.code === 401 ? (window.location.href = "/logout.php?unauthorized=1", { error: a }) : a;
671
- }, nt = (e) => {
674
+ }, rt = (e) => {
672
675
  const t = document.querySelectorAll(".pulse");
673
676
  if (t && t.length) {
674
677
  const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = document.getElementById("room-" + a), n = o?.classList;
@@ -693,9 +696,9 @@ const Pt = 996, Zt = It({
693
696
  }, 4500);
694
697
  L.value.push(l);
695
698
  }
696
- }, rt = () => {
699
+ }, lt = () => {
697
700
  window.open("/guest/overview.php", "_blank");
698
- }, lt = (e) => {
701
+ }, it = (e) => {
699
702
  let t = "";
700
703
  switch (e.type) {
701
704
  case "complaint":
@@ -717,10 +720,10 @@ const Pt = 996, Zt = It({
717
720
  return "#";
718
721
  }
719
722
  window.open(t, "_blank");
720
- }, it = (e) => {
723
+ }, ut = (e) => {
721
724
  e.link && window.open(e.link, "_blank");
722
- }, ut = async () => {
723
- ve.value = !0;
725
+ }, ct = async () => {
726
+ pe.value = !0;
724
727
  const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = r.value?.qv2Rooms?.qRoomName || r.value?.name || s.room?.name, a = {
725
728
  type: E.value?.id,
726
729
  propertyId: s.propertyId,
@@ -730,28 +733,28 @@ const Pt = 996, Zt = It({
730
733
  };
731
734
  switch (E.value?.id) {
732
735
  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(
736
+ 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 = g.fromJSDate(p.value.checkInDate).toFormat(
734
737
  "yyyy-MM-dd"
735
- ), a.checkOutDate = I.fromJSDate(p.value.checkOutDate).toFormat(
738
+ ), a.checkOutDate = g.fromJSDate(p.value.checkOutDate).toFormat(
736
739
  "yyyy-MM-dd"
737
740
  ), a.notes = p.value.notes, a.inHouse = 2, a.source = "dashboard", f("create:todo", a);
738
741
  break;
739
742
  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);
743
+ 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 = g.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);
741
744
  break;
742
745
  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);
746
+ a.issueId = _.value.issue.id, a.startDate = g.fromJSDate(_.value.startDate).toFormat("yyyy-MM-dd"), a.endDate = g.fromJSDate(_.value.endDate).toFormat("yyyy-MM-dd"), a.startTime = _.value.startTime || "", a.endTime = _.value.endTime || "", a.notes = _.value.notes, f("create:todo", a);
744
747
  break;
745
748
  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);
749
+ 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 = g.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);
747
750
  break;
748
751
  }
749
- }, ct = (e) => {
750
- we(), Ie(), s.hover && f("toggle", e);
751
752
  }, 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) {
753
+ Ie(), Te(), s.hover && f("toggle", e);
754
+ }, mt = (e) => {
755
+ Me(), b.value = e;
756
+ }, vt = async (e) => {
757
+ if (E.value = e, O.value = [], _.value.issue = null, p.value.problem = null, v.value.item = null, v.value.issue = null, d.value.item = null, !E.value) {
755
758
  y.value.actionItems = !1;
756
759
  return;
757
760
  }
@@ -760,18 +763,18 @@ const Pt = 996, Zt = It({
760
763
  switch (a.append("property_id", s.propertyId), a.append("area_id", t), e.id) {
761
764
  case "complaint":
762
765
  try {
763
- r.value.tokenId && await Se();
766
+ r.value.tokenId && await be();
764
767
  const n = await (await fetch("/api/client/common/getComplaintProblemsByPropertyId.php", {
765
768
  method: "POST",
766
769
  body: a
767
770
  })).json();
768
771
  n.items && (O.value = n.items);
769
- const l = await X.post(
772
+ const l = await Z.post(
770
773
  "/api/client/common/getComplaintMoods.php"
771
774
  );
772
775
  l.data.items.forEach((c) => {
773
776
  c.label = c.display_name;
774
- }), ce.value = l.data.items;
777
+ }), de.value = l.data.items;
775
778
  } catch (o) {
776
779
  console.error("Error loading complaint options:", o), f("show:toast", {
777
780
  show: !0,
@@ -803,12 +806,12 @@ const Pt = 996, Zt = It({
803
806
  break;
804
807
  case "request":
805
808
  try {
806
- d.value.requestedBy = Q.value[1], d.value.assignType = Z.value[0];
809
+ d.value.requestedBy = Q.value[1], d.value.assignType = ee.value[0];
807
810
  const n = await (await fetch("/api/client/common/getHousekeepingItemsByPropertyId.php", {
808
811
  method: "POST",
809
812
  body: a
810
813
  })).json();
811
- if (n.items && (O.value = n.items), await ge(), d.value.department = C.value.find(
814
+ if (n.items && (O.value = n.items), await _e(), d.value.department = C.value.find(
812
815
  (l) => parseInt(l.id) === 4
813
816
  ), s.allowWhenWhere)
814
817
  try {
@@ -825,13 +828,13 @@ const Pt = 996, Zt = It({
825
828
  id: h.id,
826
829
  label: h.name,
827
830
  value: h.id
828
- })) : q.value = [], m.where && Array.isArray(m.where) ? x.value = m.where.map((h) => ({
831
+ })) : q.value = [], m.where && Array.isArray(m.where) ? F.value = m.where.map((h) => ({
829
832
  id: h.id,
830
833
  label: h.name,
831
834
  value: h.id
832
- })) : x.value = [];
835
+ })) : F.value = [];
833
836
  } catch (l) {
834
- console.error("Error loading When/Where options:", l), q.value = [], x.value = [], f("show:toast", {
837
+ console.error("Error loading When/Where options:", l), q.value = [], F.value = [], f("show:toast", {
835
838
  show: !0,
836
839
  message: u("HC_FAILED_TO_LOAD_WHEN_WHERE_OPTIONS"),
837
840
  variant: "error",
@@ -851,7 +854,7 @@ const Pt = 996, Zt = It({
851
854
  break;
852
855
  case "work_order":
853
856
  try {
854
- v.value.requestedBy = Q.value[0], v.value.assignType = Z.value[0];
857
+ v.value.requestedBy = Q.value[0], v.value.assignType = ee.value[0];
855
858
  const n = await (await fetch("/api/client/common/getItemsByRoomId.php", {
856
859
  method: "POST",
857
860
  body: a
@@ -863,15 +866,15 @@ const Pt = 996, Zt = It({
863
866
  n.items && (n.items.forEach((m) => {
864
867
  m.section_name !== c.group && (c.group && l.push({ ...c }), c.group = m.section_name, c.options = []), m.label && c.options.push(m);
865
868
  }), c.group && l.push({ ...c })), O.value = l, await Promise.all([
866
- X.post(
869
+ Z.post(
867
870
  "/api/client/common/getWorkOrderIssues.php"
868
871
  ),
869
- ge()
872
+ _e()
870
873
  ]).then((m) => {
871
874
  const h = m[0];
872
- h.data.issues.forEach((w) => {
873
- w.label = w.display_name;
874
- }), fe.value = h.data.issues;
875
+ h.data.issues.forEach((I) => {
876
+ I.label = I.display_name;
877
+ }), he.value = h.data.issues;
875
878
  }), v.value.department = C.value.find(
876
879
  (m) => parseInt(m.id) === 2
877
880
  );
@@ -890,24 +893,24 @@ const Pt = 996, Zt = It({
890
893
  y.value.actionItems = !1;
891
894
  return;
892
895
  }
893
- }, vt = () => {
894
- oe.value = !oe.value, ie.value = !1;
895
- }, Ne = () => {
896
+ }, pt = () => {
897
+ se.value = !se.value, ue.value = !1;
898
+ }, Ce = () => {
896
899
  const e = document.getElementById("comment-field"), t = document.getElementById("hidden-text");
897
900
  e.style.height = t?.offsetHeight + "px";
898
- }, K = () => {
901
+ }, z = () => {
899
902
  const e = document.getElementById("comments-container");
900
903
  e?.scroll({
901
904
  top: e.scrollHeight,
902
905
  behavior: "smooth"
903
906
  });
904
- }, pt = async (e) => {
907
+ }, ft = async (e) => {
905
908
  if (e && e.type === "keydown" && e.preventDefault(), r.value.tokenId && b.value && !H.value) {
906
909
  y.value.sendingMessage = !0;
907
910
  try {
908
911
  const t = new FormData();
909
912
  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 = await Z.post(
911
914
  "/api/client/connect/sendMessage.php",
912
915
  t
913
916
  );
@@ -920,7 +923,7 @@ const Pt = 996, Zt = It({
920
923
  });
921
924
  return;
922
925
  }
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();
926
+ b.value = "", S.value = !a.data.closed, a.data.messages && (x(a.data.messages), a.data.messages.length > 0 && (k.value = a.data.messages[a.data.messages.length - 1].id)), z();
924
927
  } catch (t) {
925
928
  console.error("sendChatMessage error:", t), f("show:toast", {
926
929
  show: !0,
@@ -932,13 +935,13 @@ const Pt = 996, Zt = It({
932
935
  y.value.sendingMessage = !1;
933
936
  }
934
937
  }
935
- }, ft = async () => {
938
+ }, ht = async () => {
936
939
  if (!(!r.value.tokenId || !P.value)) {
937
940
  y.value.conversationToggle = !0;
938
941
  try {
939
942
  const e = S.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php", t = new FormData();
940
943
  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);
944
+ const a = await Z.post(e, t);
942
945
  if (a.data.status === "error") {
943
946
  f("show:toast", {
944
947
  show: !0,
@@ -948,7 +951,7 @@ const Pt = 996, Zt = It({
948
951
  });
949
952
  return;
950
953
  }
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", {
954
+ S.value = !a.data.closed, a.data.messages && (x(a.data.messages), a.data.messages.length > 0 && (k.value = a.data.messages[a.data.messages.length - 1].id)), f("show:toast", {
952
955
  show: !0,
953
956
  message: S.value ? u("HC_CONVERSATION_REOPENED") : u("HC_CONVERSATION_CLOSED"),
954
957
  variant: "success",
@@ -965,13 +968,13 @@ const Pt = 996, Zt = It({
965
968
  y.value.conversationToggle = !1;
966
969
  }
967
970
  }
968
- }, ht = async () => {
971
+ }, yt = async () => {
969
972
  if (s.isTestEnvironment && !(!r.value?.tokenId || !j.value.trim())) {
970
- me.value = !0;
973
+ ve.value = !0;
971
974
  try {
972
975
  const e = new FormData();
973
976
  e.append("tokenId", r.value.tokenId), e.append("content", j.value.trim());
974
- const t = await X.post(
977
+ const t = await Z.post(
975
978
  "/api/client/connect/simulateInbound.php",
976
979
  e
977
980
  );
@@ -984,7 +987,7 @@ const Pt = 996, Zt = It({
984
987
  });
985
988
  return;
986
989
  }
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", {
990
+ t.data.messages && (x(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, z(), f("show:toast", {
988
991
  show: !0,
989
992
  message: u("HC_SIMULATED_GUEST_REPLY"),
990
993
  variant: "success",
@@ -998,36 +1001,36 @@ const Pt = 996, Zt = It({
998
1001
  icon: "exclamation-circle"
999
1002
  });
1000
1003
  } finally {
1001
- me.value = !1;
1004
+ ve.value = !1;
1002
1005
  }
1003
1006
  }
1004
- }, yt = () => {
1005
- W.value = !W.value, W.value || (j.value = "");
1006
1007
  }, gt = () => {
1008
+ W.value = !W.value, W.value || (j.value = "");
1009
+ }, _t = () => {
1007
1010
  $.value || ($.value = setInterval(() => {
1008
- document.visibilityState === "visible" && he(!0);
1009
- }, Le));
1010
- }, _e = () => {
1011
- $.value && (clearInterval($.value), $.value = null);
1011
+ document.visibilityState === "visible" && ye(!0);
1012
+ }, Pe));
1012
1013
  }, we = () => {
1014
+ $.value && (clearInterval($.value), $.value = null);
1015
+ }, Ie = () => {
1013
1016
  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";
1017
+ const e = Y.value?.getBoundingClientRect().left, t = window.innerWidth;
1018
+ ce.value = t - e < U.value ? "right" : "left";
1016
1019
  } else {
1017
- const e = V.value?.getBoundingClientRect().top, t = window.innerHeight;
1018
- ue.value = t - e < G.value ? "bottom" : "top";
1020
+ const e = Y.value?.getBoundingClientRect().top, t = window.innerHeight;
1021
+ ce.value = t - e < G.value ? "bottom" : "top";
1019
1022
  }
1020
- }, Ie = () => {
1023
+ }, Te = () => {
1021
1024
  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";
1025
+ const e = Y.value?.getBoundingClientRect().top, t = window.innerHeight;
1026
+ me.value = t - e < G.value ? "top" : "bottom";
1024
1027
  } else {
1025
- const e = V.value?.getBoundingClientRect().left, t = window.innerWidth;
1026
- de.value = t - e < U.value ? "left" : "right";
1028
+ const e = Y.value?.getBoundingClientRect().left, t = window.innerWidth;
1029
+ me.value = t - e < U.value ? "left" : "right";
1027
1030
  }
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
+ }, Me = () => {
1032
+ H.value = !H.value, H.value ? (b.value = "", M.value.info = ae.value, M.value.tickets = oe.value, M.value.comments = te.value, ae.value = !1, oe.value = !1, document.getElementById("comment-field")?.focus()) : (ae.value = M.value.info, oe.value = M.value.tickets, te.value = M.value.comments);
1033
+ }, wt = async (e, t) => {
1031
1034
  const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = new FormData();
1032
1035
  if (o.append("property_id", s.propertyId), o.append("room_ids", JSON.stringify([a])), await J(), A.value) {
1033
1036
  const n = [];
@@ -1044,146 +1047,146 @@ const Pt = 996, Zt = It({
1044
1047
  };
1045
1048
  B(() => s.open, () => {
1046
1049
  if (s.open && s.showComments && N.value.length) {
1047
- const e = setTimeout(K, 500);
1050
+ const e = setTimeout(z, 500);
1048
1051
  L.value.push(e);
1049
1052
  }
1050
- s.open || (Ae(), _e(), k.value = null, N.value = [], S.value = !1);
1053
+ s.open || (Se(), we(), k.value = null, N.value = [], S.value = !1);
1051
1054
  }), B(
1052
- () => [s.open, s.showComments, ee.value, r.value?.tokenId],
1055
+ () => [s.open, s.showComments, te.value, r.value?.tokenId],
1053
1056
  ([e, t, a, o]) => {
1054
- e && t && a && o ? gt() : _e();
1057
+ e && t && a && o ? _t() : we();
1055
1058
  }
1056
1059
  ), B(b, () => {
1057
- const e = setTimeout(Ne, 100);
1060
+ const e = setTimeout(Ce, 100);
1058
1061
  L.value.push(e);
1059
1062
  }), B(() => s.allowWhenWhere, (e, t) => {
1060
- t === !0 && e === !1 && (d.value.when = null, d.value.where = null, q.value = [], x.value = []);
1063
+ t === !0 && e === !1 && (d.value.when = null, d.value.where = null, q.value = [], F.value = []);
1061
1064
  });
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();
1065
+ const Re = () => !!(s.room.reservations || s.room.cleaning || s.room.occupancy || s.room.hkTaskTypeId != null), It = () => Array.isArray(s.room.roomNoticeIssues) && s.room.roomNoticeIssues.length > 0, He = () => {
1066
+ It() ? V.value = s.room.roomNoticeIssues : ge();
1064
1067
  };
1065
1068
  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());
1069
+ e && !t && (Re() ? (r.value = s.room, R.value = [s.room]) : s.showGuestDetails && !R.value ? await ne() : r.value || (r.value = s.room), J(), He(), re(), s.showComments && ye());
1067
1070
  }), B(
1068
1071
  () => s.room.id,
1069
1072
  (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()));
1073
+ e !== t && (r.value = s.room, R.value = null, s.open && (Re() ? R.value = [s.room] : s.showGuestDetails && ne(), J(), He(), re()));
1071
1074
  }
1072
- ), Tt(async () => {
1075
+ ), Dt(async () => {
1073
1076
  const e = JSON.parse(
1074
1077
  window.localStorage.getItem("authenticated")
1075
1078
  );
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(() => {
1079
+ 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), Ie(), Te();
1080
+ }), Ot(() => {
1078
1081
  L.value.forEach((e) => {
1079
1082
  clearTimeout(e);
1080
- }), _e();
1083
+ }), we();
1081
1084
  }), {
1082
- DateTime: I,
1085
+ DateTime: g,
1083
1086
  // Refs
1084
- activityList: pe,
1085
- actionMenuOpen: ie,
1086
- alignment: ue,
1087
- assignTypes: Z,
1087
+ activityList: fe,
1088
+ actionMenuOpen: ue,
1089
+ alignment: ce,
1090
+ assignTypes: ee,
1088
1091
  comment: b,
1089
1092
  complaint: p,
1090
1093
  componentHeight: G,
1091
1094
  componentWidth: U,
1092
1095
  departments: C,
1093
- departmentUsers: Oe,
1094
- expandActivity: Pe,
1095
- expandComments: ee,
1096
- expandGuestInfo: te,
1096
+ departmentUsers: ke,
1097
+ expandActivity: qe,
1098
+ expandComments: te,
1099
+ expandGuestInfo: ae,
1097
1100
  expandedStates: M,
1098
- expandTickets: ae,
1099
- guestDetailsData: He,
1101
+ expandTickets: oe,
1102
+ guestDetailsData: Le,
1100
1103
  itemOptions: O,
1101
1104
  loading: y,
1102
1105
  messages: N,
1103
- moodOptions: ce,
1106
+ moodOptions: de,
1104
1107
  pmsData: R,
1105
- positioning: de,
1108
+ positioning: me,
1106
1109
  quickReplyOpen: H,
1107
1110
  request: d,
1108
1111
  requestedByOptions: Q,
1109
- requestLoading: ve,
1112
+ requestLoading: pe,
1110
1113
  requestType: E,
1111
1114
  roomDetailsData: r,
1112
- roomNotice: g,
1113
- roomNotices: Y,
1114
- showCreateRequest: oe,
1115
+ roomNotice: _,
1116
+ roomNotices: V,
1117
+ showCreateRequest: se,
1115
1118
  ticketsList: A,
1116
- todoOptions: qe,
1117
- trigger: V,
1119
+ todoOptions: Fe,
1120
+ trigger: Y,
1118
1121
  userId: P,
1119
1122
  workOrder: v,
1120
- workOrderIssues: fe,
1123
+ workOrderIssues: he,
1121
1124
  whenOptions: q,
1122
- whereOptions: x,
1125
+ whereOptions: F,
1123
1126
  // Guest Connect state
1124
1127
  isConversationOpen: S,
1125
1128
  lastMessageId: k,
1126
1129
  // Simulate Guest Reply state (test environments only)
1127
1130
  simulateOpen: W,
1128
1131
  simulateContent: j,
1129
- simulateLoading: me,
1132
+ simulateLoading: ve,
1130
1133
  // Computed
1131
1134
  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,
1135
+ greenerStayIconUrl: Ue,
1136
+ greenerStayTooltipContent: Ge,
1137
+ isGreenerStay: Be,
1138
+ filteredReplies: We,
1139
+ groupedMessages: je,
1140
+ hasGuestCallback: $e,
1141
+ hasComplaint: Ee,
1142
+ itemOptionsList: Qe,
1143
+ occupied: Ae,
1144
+ occupancyTooltipContent: Ve,
1142
1145
  selectedAssignType: Ye,
1143
- selectedDepartment: Ve,
1144
- selectedRequestedBy: Je,
1146
+ selectedDepartment: Je,
1147
+ selectedRequestedBy: ze,
1145
1148
  stayDetails: Ke,
1146
- tagsList: ze,
1149
+ tagsList: Ze,
1147
1150
  validateToDo: Xe,
1148
1151
  // 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,
1152
+ closeRequest: Se,
1153
+ createCallback: et,
1154
+ getActivity: re,
1155
+ createMessageList: x,
1156
+ getChatMessages: ye,
1157
+ getHowLongAgo: at,
1158
+ getPMSData: ne,
1159
+ getRoomNotices: ge,
1160
+ getSharedData: _e,
1161
+ getStayDetails: be,
1162
+ getTicketColor: st,
1163
+ getTicketIcon: nt,
1161
1164
  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,
1165
+ handleFailedResponse: Ne,
1166
+ handlePulse: rt,
1167
+ onClickActivity: ut,
1168
+ onClickEditConnectGuest: lt,
1169
+ onClickTicket: it,
1170
+ onCreateRequestSubmit: ct,
1171
+ onHoverToggle: dt,
1172
+ onSelectQuickReply: mt,
1173
+ onSelectToDo: vt,
1174
+ openRequest: pt,
1175
+ refreshPMSData: ot,
1176
+ resizeTextarea: Ce,
1177
+ scrollToConnectBottom: z,
1178
+ sendChatMessage: ft,
1179
+ setAlignment: Ie,
1180
+ setPositioning: Te,
1181
+ toggleMarkOpenClose: ht,
1182
+ toggleQuickReply: Me,
1183
+ updateTickets: wt,
1181
1184
  // Simulate Guest Reply methods (test environments only)
1182
- simulateGuestReply: ht,
1183
- toggleSimulateOpen: yt
1185
+ simulateGuestReply: yt,
1186
+ toggleSimulateOpen: gt
1184
1187
  };
1185
1188
  }
1186
1189
  });
1187
1190
  export {
1188
- Zt as default
1191
+ ea as default
1189
1192
  };