@quoreadmin/ui 1.8.8 → 1.8.10

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