@quoreadmin/ui 1.8.3 → 1.8.5

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