@quoreadmin/ui 1.10.29 → 1.10.30

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 (151) hide show
  1. package/dist/index147.js +149 -149
  2. package/dist/index149.js +1 -1
  3. package/dist/index151.js +4 -4
  4. package/dist/index165.js +1 -1
  5. package/dist/index169.js +7 -7
  6. package/dist/index186.js +4 -4
  7. package/dist/index193.js +8 -8
  8. package/dist/index195.js +8 -8
  9. package/dist/index197.js +36 -1228
  10. package/dist/index198.js +46 -0
  11. package/dist/index199.js +1106 -5816
  12. package/dist/index201.js +5922 -19
  13. package/dist/index202.js +199 -10
  14. package/dist/index203.js +33 -76
  15. package/dist/index204.js +14 -249
  16. package/dist/index205.js +72 -13678
  17. package/dist/index206.js +253 -27
  18. package/dist/index207.js +13669 -48
  19. package/dist/index208.js +25 -236
  20. package/dist/index209.js +45 -293
  21. package/dist/index210.js +179 -238
  22. package/dist/index211.js +311 -36
  23. package/dist/index212.js +296 -43
  24. package/dist/index216.js +2 -2
  25. package/dist/index217.js +1 -1
  26. package/dist/index219.js +4 -4
  27. package/dist/index221.js +1 -1
  28. package/dist/index222.js +1 -1
  29. package/dist/index223.js +1 -1
  30. package/dist/index224.js +4 -4
  31. package/dist/index226.js +1 -1
  32. package/dist/index230.js +159 -159
  33. package/dist/index231.js +228 -20
  34. package/dist/index232.js +36 -19
  35. package/dist/index233.js +10 -22
  36. package/dist/index234.js +129 -167
  37. package/dist/index235.js +19 -69
  38. package/dist/index236.js +20 -34
  39. package/dist/index237.js +21 -39
  40. package/dist/index238.js +185 -113
  41. package/dist/index239.js +57 -25
  42. package/dist/index240.js +31 -77
  43. package/dist/index241.js +39 -19
  44. package/dist/index242.js +126 -19
  45. package/dist/index243.js +34 -16
  46. package/dist/index244.js +80 -20
  47. package/dist/index245.js +19 -160
  48. package/dist/index246.js +20 -228
  49. package/dist/index247.js +19 -36
  50. package/dist/index248.js +20 -10
  51. package/dist/index249.js +3709 -22
  52. package/dist/index250.js +60 -22
  53. package/dist/index251.js +83 -20
  54. package/dist/index252.js +39 -823
  55. package/dist/index253.js +198 -685
  56. package/dist/index254.js +9 -175
  57. package/dist/index255.js +57 -22
  58. package/dist/index256.js +61 -20
  59. package/dist/index257.js +54 -20
  60. package/dist/index258.js +81 -3
  61. package/dist/index259.js +711 -170
  62. package/dist/index260.js +41 -127
  63. package/dist/index261.js +55 -1214
  64. package/dist/index262.js +11 -20
  65. package/dist/index263.js +705 -22
  66. package/dist/index264.js +820 -22
  67. package/dist/index265.js +15 -22
  68. package/dist/index266.js +15 -13
  69. package/dist/index267.js +12 -12
  70. package/dist/index268.js +836 -2
  71. package/dist/index269.js +702 -2
  72. package/dist/index270.js +170 -3703
  73. package/dist/index271.js +22 -60
  74. package/dist/index272.js +20 -83
  75. package/dist/index273.js +20 -52
  76. package/dist/index274.js +3 -215
  77. package/dist/index275.js +187 -10
  78. package/dist/index276.js +128 -52
  79. package/dist/index277.js +1214 -52
  80. package/dist/index278.js +20 -54
  81. package/dist/index279.js +22 -81
  82. package/dist/index280.js +21 -727
  83. package/dist/index281.js +29 -47
  84. package/dist/index282.js +20 -64
  85. package/dist/index283.js +20 -11
  86. package/dist/index284.js +2 -705
  87. package/dist/index285.js +2 -820
  88. package/dist/index290.js +3 -54
  89. package/dist/index291.js +25 -77
  90. package/dist/index292.js +53 -25
  91. package/dist/index293.js +78 -21
  92. package/dist/index294.js +17 -13
  93. package/dist/index295.js +22 -16
  94. package/dist/index296.js +22 -17
  95. package/dist/index297.js +15 -22
  96. package/dist/index298.js +17 -3
  97. package/dist/index299.js +23 -27
  98. package/dist/index302.js +1 -1
  99. package/dist/index303.js +1 -1
  100. package/dist/index305.js +1 -1
  101. package/dist/index306.js +2 -2
  102. package/dist/index307.js +15 -79
  103. package/dist/index308.js +83 -21
  104. package/dist/index309.js +186 -919
  105. package/dist/index310.js +246 -22
  106. package/dist/index311.js +78 -19
  107. package/dist/index312.js +15 -13
  108. package/dist/index313.js +930 -64
  109. package/dist/index314.js +21 -18
  110. package/dist/index315.js +20 -19
  111. package/dist/index316.js +11 -13
  112. package/dist/index317.js +68 -21
  113. package/dist/index318.js +16 -60
  114. package/dist/index319.js +19 -15
  115. package/dist/index320.js +21 -83
  116. package/dist/index321.js +22 -202
  117. package/dist/index322.js +63 -246
  118. package/dist/index340.js +9 -36
  119. package/dist/index341.js +10 -9
  120. package/dist/index342.js +14 -13
  121. package/dist/index343.js +10 -55
  122. package/dist/index344.js +16 -11
  123. package/dist/index345.js +8 -13
  124. package/dist/index346.js +12 -57
  125. package/dist/index347.js +51 -48
  126. package/dist/index348.js +9 -28
  127. package/dist/index349.js +14 -2
  128. package/dist/index350.js +58 -5
  129. package/dist/index351.js +52 -2
  130. package/dist/index352.js +30 -22
  131. package/dist/index353.js +2 -41
  132. package/dist/index354.js +5 -2
  133. package/dist/index355.js +2 -11
  134. package/dist/index356.js +22 -19
  135. package/dist/index357.js +40 -9
  136. package/dist/index358.js +2 -10
  137. package/dist/index359.js +10 -16
  138. package/dist/index360.js +20 -2
  139. package/dist/index361.js +2 -9
  140. package/dist/index362.js +9 -10
  141. package/dist/index363.js +37 -14
  142. package/dist/index364.js +1 -1
  143. package/dist/index365.js +1 -1
  144. package/dist/index366.js +1 -1
  145. package/dist/index380.js +100 -16
  146. package/dist/index381.js +90 -100
  147. package/dist/index382.js +98 -91
  148. package/dist/index383.js +16 -97
  149. package/dist/src/components/room-details-popover/room-details-popover.d.ts +9 -3
  150. package/package.json +1 -1
  151. package/dist/index200.js +0 -209
package/dist/index147.js CHANGED
@@ -1,30 +1,30 @@
1
1
  import { defineComponent as It, ref as i, computed as _, watch as B, onMounted as Tt, onUnmounted as Dt } from "vue";
2
2
  import { useI18n as Ot } from "vue-i18n";
3
3
  import { DateTime as I } from "./index174.js";
4
- import "./index211.js";
4
+ import "./index197.js";
5
5
  import kt from "./index2.js";
6
6
  import Et from "./index3.js";
7
7
  import At from "./index4.js";
8
8
  import St from "./index21.js";
9
9
  import bt from "./index28.js";
10
- import Mt from "./index41.js";
11
- import Nt from "./index20.js";
12
- import Ct from "./index48.js";
10
+ import Nt from "./index41.js";
11
+ import Ct from "./index20.js";
12
+ import Mt from "./index48.js";
13
13
  import Rt from "./index50.js";
14
14
  import Ht from "./index49.js";
15
15
  import Lt from "./index52.js";
16
- import X from "./index212.js";
16
+ import X from "./index198.js";
17
17
  const Pt = 996, Zt = It({
18
18
  name: "QRoomDetailsPopover",
19
19
  components: {
20
20
  QAccordion: kt,
21
21
  QActivityItem: Et,
22
22
  QAvatar: At,
23
- QDatePicker: Nt,
23
+ QDatePicker: Ct,
24
24
  QDivider: St,
25
25
  QIcon: bt,
26
- QPopover: Mt,
27
- QTag: Ct,
26
+ QPopover: Nt,
27
+ QTag: Mt,
28
28
  QTextarea: Ht,
29
29
  QTimePicker: Rt,
30
30
  QTooltip: Lt
@@ -172,21 +172,21 @@ const Pt = 996, Zt = It({
172
172
  },
173
173
  emits: ["create:callback", "create:todo", "refresh:pms", "show:toast", "toggle"],
174
174
  setup(s, { emit: f }) {
175
- const { t: c } = Ot(), Te = () => {
176
- const e = /* @__PURE__ */ new Date(), t = e.getHours() * 60 + e.getMinutes(), a = Math.round(t / 15) * 15, o = Math.floor(a / 60) % 24, n = a % 60, r = o >= 12 ? "PM" : "AM";
177
- return `${o % 12 || 12}:${String(n).padStart(2, "0")} ${r}`;
178
- }, De = "11:59 PM", l = i(s.room), ie = i(!1), ue = i("left"), Z = i([
175
+ const { t: u } = Ot(), Te = () => {
176
+ const e = /* @__PURE__ */ new Date(), t = e.getHours(), a = e.getMinutes(), o = t >= 12 ? "PM" : "AM";
177
+ return `${t % 12 || 12}:${String(a).padStart(2, "0")} ${o}`;
178
+ }, De = "11:59 PM", r = i(s.room), ie = i(!1), ue = i("left"), Z = i([
179
179
  {
180
180
  id: 1,
181
- label: c("HC_DEPARTMENT")
181
+ label: u("HC_DEPARTMENT")
182
182
  },
183
183
  {
184
184
  id: 2,
185
- label: c("HC_PERSON")
185
+ label: u("HC_PERSON")
186
186
  },
187
187
  {
188
188
  id: 0,
189
- label: c("HC_ANYONE")
189
+ label: u("HC_ANYONE")
190
190
  }
191
191
  ]), b = i(""), p = i({
192
192
  checkInDate: /* @__PURE__ */ new Date(),
@@ -196,11 +196,11 @@ const Pt = 996, Zt = It({
196
196
  guestMood: null,
197
197
  guestName: "",
198
198
  guestPhone: "",
199
- inHouse: !!l.value?.tokenId || !1,
199
+ inHouse: !!r.value?.tokenId || !1,
200
200
  problem: null,
201
201
  notes: "",
202
- tokenId: l.value?.tokenId
203
- }), G = i(250), U = i(290), N = i([]), Oe = i([]), ee = i(!0), te = i(!0), C = i({
202
+ tokenId: r.value?.tokenId
203
+ }), G = i(250), U = i(290), C = i([]), Oe = i([]), ee = i(!0), te = i(!0), M = i({
204
204
  info: !0,
205
205
  tickets: !0,
206
206
  comments: !0
@@ -213,7 +213,7 @@ const Pt = 996, Zt = It({
213
213
  roomNotices: !1,
214
214
  sendingMessage: !1,
215
215
  tickets: !1
216
- }), M = i([]), ce = i([]), de = i("bottom"), R = i(null), H = i(!1), W = i(!1), j = i(""), me = i(!1), S = i(!1), k = i(null), $ = i(null), Le = 3e4, d = i({
216
+ }), N = i([]), ce = i([]), de = i("bottom"), R = i(null), H = i(!1), W = i(!1), j = i(""), me = i(!1), S = i(!1), k = i(null), $ = i(null), Le = 3e4, d = i({
217
217
  assignType: null,
218
218
  department: null,
219
219
  due: /* @__PURE__ */ new Date(),
@@ -226,11 +226,11 @@ const Pt = 996, Zt = It({
226
226
  }), Q = i([
227
227
  {
228
228
  id: 0,
229
- label: c("HC_STAFF_MEMBER")
229
+ label: u("HC_STAFF_MEMBER")
230
230
  },
231
231
  {
232
232
  id: 1,
233
- label: c("HC_HOTEL_GUEST")
233
+ label: u("HC_HOTEL_GUEST")
234
234
  }
235
235
  ]), ve = i(!1), E = i(null), g = i({
236
236
  endDate: /* @__PURE__ */ new Date(),
@@ -241,19 +241,19 @@ const Pt = 996, Zt = It({
241
241
  endTime: De
242
242
  }), Y = i([]), oe = i(!1), pe = i([]), Pe = i(!0), A = i([]), L = i([]), qe = i([
243
243
  {
244
- label: c("HC_COMPLAINT"),
244
+ label: u("HC_COMPLAINT"),
245
245
  id: "complaint"
246
246
  },
247
247
  {
248
- label: c("HC_REQUEST"),
248
+ label: u("HC_REQUEST"),
249
249
  id: "request"
250
250
  },
251
251
  {
252
- label: c("HC_ROOM_NOTICE"),
252
+ label: u("HC_ROOM_NOTICE"),
253
253
  id: "room_notice"
254
254
  },
255
255
  {
256
- label: c("HC_WORK_ORDER"),
256
+ label: u("HC_WORK_ORDER"),
257
257
  id: "work_order"
258
258
  }
259
259
  ]), V = i(), P = i(null), v = i({
@@ -266,7 +266,7 @@ const Pt = 996, Zt = It({
266
266
  person: null,
267
267
  requestedBy: null
268
268
  }), fe = i([]), q = i([]), x = i([]), xe = _(() => {
269
- switch (l.value.cleaning?.name) {
269
+ switch (r.value.cleaning?.name) {
270
270
  case "CLEAN":
271
271
  case "INSPECTED":
272
272
  return "CLEAN";
@@ -279,16 +279,16 @@ const Pt = 996, Zt = It({
279
279
  return "";
280
280
  }
281
281
  }), Fe = _(() => {
282
- const e = l.value?.hkTaskTypeId || s.room?.hkTaskTypeId;
282
+ const e = r.value?.hkTaskTypeId || s.room?.hkTaskTypeId;
283
283
  return Number(e) === Pt;
284
- }), Be = _(() => s.cleanInitiativeInfo?.cleanInitiativeName ?? l.value?.cleanInitiativeInfo?.cleanInitiativeName ?? "Greener Stay"), Ge = _(() => s.cleanInitiativeInfo?.imgUrl ?? l.value?.cleanInitiativeInfo?.imgUrl ?? ""), Ue = _(() => {
284
+ }), Be = _(() => s.cleanInitiativeInfo?.cleanInitiativeName ?? r.value?.cleanInitiativeInfo?.cleanInitiativeName ?? "Greener Stay"), Ge = _(() => s.cleanInitiativeInfo?.imgUrl ?? r.value?.cleanInitiativeInfo?.imgUrl ?? ""), Ue = _(() => {
285
285
  const e = b.value.toLowerCase();
286
286
  return s.quickReplies.filter((t) => t.toLowerCase().match(e));
287
287
  }), We = _(() => {
288
- if (!M.value.length) return [];
288
+ if (!N.value.length) return [];
289
289
  const e = [];
290
290
  let t = null;
291
- return M.value.forEach((a) => {
291
+ return N.value.forEach((a) => {
292
292
  const o = I.fromFormat(
293
293
  a.dateUtc,
294
294
  "yyyy-MM-dd HH:mm:ss",
@@ -316,7 +316,7 @@ const Pt = 996, Zt = It({
316
316
  label: t.display_name
317
317
  });
318
318
  }) : e = O.value, e;
319
- }), Ee = _(() => l.value.occupancy?.name === "OCCUPIED"), Qe = _(() => Ee.value && ke.value ? "HK_ROOM_STATUS_Occupied_Complaint" : "HK_ROOM_STATUS_Occupied"), Ye = _(() => {
319
+ }), Ee = _(() => r.value.occupancy?.name === "OCCUPIED"), Qe = _(() => Ee.value && ke.value ? "HK_ROOM_STATUS_Occupied_Complaint" : "HK_ROOM_STATUS_Occupied"), Ye = _(() => {
320
320
  switch (E.value?.id) {
321
321
  case "request":
322
322
  case "work_order":
@@ -325,12 +325,12 @@ const Pt = 996, Zt = It({
325
325
  return null;
326
326
  }
327
327
  }), Ve = _(() => {
328
- if (N.value)
328
+ if (C.value)
329
329
  switch (E.value?.id) {
330
330
  case "request":
331
- return N.value.find((e) => parseInt(e.id) === 4);
331
+ return C.value.find((e) => parseInt(e.id) === 4);
332
332
  case "work_order":
333
- return N.value.find((e) => parseInt(e.id) === 2);
333
+ return C.value.find((e) => parseInt(e.id) === 2);
334
334
  default:
335
335
  return null;
336
336
  }
@@ -346,13 +346,13 @@ const Pt = 996, Zt = It({
346
346
  }
347
347
  }), Ke = _(() => {
348
348
  let e = "";
349
- if (l.value && l.value.reservations[0]) {
349
+ if (r.value && r.value.reservations[0]) {
350
350
  const t = I.fromISO(
351
- l.value.reservations[0].arrivalDate
352
- ), a = t.toFormat("MMM"), o = t.day, n = t.year, r = I.fromISO(
353
- l.value.reservations[0].departureDate
354
- ), u = r.toFormat("MMM"), m = r.day, h = r.year;
355
- e += a + " " + o, n !== h && (e += ", " + n), a === u ? e += "-" + m : e += " - " + u + " " + m, e += ", " + h;
351
+ r.value.reservations[0].arrivalDate
352
+ ), a = t.toFormat("MMM"), o = t.day, n = t.year, l = I.fromISO(
353
+ r.value.reservations[0].departureDate
354
+ ), c = l.toFormat("MMM"), m = l.day, h = l.year;
355
+ e += a + " " + o, n !== h && (e += ", " + n), a === c ? e += "-" + m : e += " - " + c + " " + m, e += ", " + h;
356
356
  }
357
357
  return e;
358
358
  }), ze = _(() => {
@@ -377,11 +377,11 @@ const Pt = 996, Zt = It({
377
377
  }), Ae = () => {
378
378
  oe.value = !1, H.value = !1, ie.value = !1, ve.value = !1, O.value = [], ce.value = [], fe.value = [], q.value = [], x.value = [], E.value = null, g.value.issue = null, g.value.startDate = /* @__PURE__ */ new Date(), g.value.endDate = /* @__PURE__ */ new Date(), g.value.startTime = Te(), g.value.endTime = De, g.value.notes = "", p.value.guestName = "", p.value.guestEmail = "", p.value.guestPhone = "", p.value.guestMood = null, p.value.guestLoyalty = "", p.value.problem = null, p.value.checkInDate = /* @__PURE__ */ new Date(), p.value.checkOutDate = /* @__PURE__ */ new Date(), p.value.notes = "", v.value.assignType = null, v.value.department = null, v.value.person = null, v.value.due = /* @__PURE__ */ new Date(), v.value.item = null, v.value.issue = null, v.value.notes = "", d.value.assignType = null, d.value.department = null, d.value.person = null, d.value.due = /* @__PURE__ */ new Date(), d.value.item = null, d.value.notes = "", d.value.when = null, d.value.where = null;
379
379
  }, Ze = async () => {
380
- f("create:callback", l.value), f("toggle", !1);
380
+ f("create:callback", r.value), f("toggle", !1);
381
381
  }, F = (e) => {
382
382
  const t = [];
383
383
  (Array.isArray(e) ? e : Object.values(e)).forEach((o) => {
384
- const n = o.senderType || o.sender_type, r = o.senderName || "", u = o.senderId || o.sender_id, m = o.profileImg || o.profile_img, h = r ? r.split(" ") : ["", ""], w = o.user_first_name || o.guest_first_name || h[0] || "", z = o.user_last_name || o.guest_last_name || h.slice(1).join(" ") || "", re = w && z ? `${w} ${z}` : w || "Auto-Reply", le = n === "system" || n === "user", T = n === "guest";
384
+ const n = o.senderType || o.sender_type, l = o.senderName || "", c = o.senderId || o.sender_id, m = o.profileImg || o.profile_img, h = l ? l.split(" ") : ["", ""], w = o.user_first_name || o.guest_first_name || h[0] || "", z = o.user_last_name || o.guest_last_name || h.slice(1).join(" ") || "", re = w && z ? `${w} ${z}` : w || "Auto-Reply", le = n === "system" || n === "user", T = n === "guest";
385
385
  let D = {
386
386
  id: o.id,
387
387
  isPropertyEmployee: n === "user",
@@ -394,7 +394,7 @@ const Pt = 996, Zt = It({
394
394
  user: {
395
395
  firstName: w || "Auto-Reply",
396
396
  icon: "",
397
- id: u || "system-message",
397
+ id: c || "system-message",
398
398
  initials: "",
399
399
  lastName: z || "",
400
400
  name: re,
@@ -402,13 +402,13 @@ const Pt = 996, Zt = It({
402
402
  }
403
403
  };
404
404
  D.user.firstName && D.user.lastName ? D.user.initials = D.user.firstName[0] + D.user.lastName[0] : D.user.firstName && (D.user.initials = D.user.firstName[0]), le && (D.user.icon = "property-fill"), t.push(D);
405
- }), M.value = t;
405
+ }), N.value = t;
406
406
  }, et = (e) => {
407
407
  if (!e || e.length === 0) return;
408
408
  (Array.isArray(e) ? e : Object.values(e)).forEach((a) => {
409
- if (M.value.some((D) => D.id === a.id))
409
+ if (N.value.some((D) => D.id === a.id))
410
410
  return;
411
- const o = a.senderType || a.sender_type, n = a.senderName || "", r = a.senderId || a.sender_id, u = a.profileImg || a.profile_img, m = n ? n.split(" ") : ["", ""], h = a.user_first_name || a.guest_first_name || m[0] || "", w = a.user_last_name || a.guest_last_name || m.slice(1).join(" ") || "", z = h && w ? `${h} ${w}` : h || "Auto-Reply", re = o === "system" || o === "user", le = o === "guest";
411
+ const o = a.senderType || a.sender_type, n = a.senderName || "", l = a.senderId || a.sender_id, c = a.profileImg || a.profile_img, m = n ? n.split(" ") : ["", ""], h = a.user_first_name || a.guest_first_name || m[0] || "", w = a.user_last_name || a.guest_last_name || m.slice(1).join(" ") || "", z = h && w ? `${h} ${w}` : h || "Auto-Reply", re = o === "system" || o === "user", le = o === "guest";
412
412
  let T = {
413
413
  id: a.id,
414
414
  isPropertyEmployee: o === "user",
@@ -421,20 +421,20 @@ const Pt = 996, Zt = It({
421
421
  user: {
422
422
  firstName: h || "Auto-Reply",
423
423
  icon: "",
424
- id: r || "system-message",
424
+ id: l || "system-message",
425
425
  initials: "",
426
426
  lastName: w || "",
427
427
  name: z,
428
- src: u || ""
428
+ src: c || ""
429
429
  }
430
430
  };
431
- T.user.firstName && T.user.lastName ? T.user.initials = T.user.firstName[0] + T.user.lastName[0] : T.user.firstName && (T.user.initials = T.user.firstName[0]), re && (T.user.icon = "property-fill"), M.value.push(T);
431
+ T.user.firstName && T.user.lastName ? T.user.initials = T.user.firstName[0] + T.user.lastName[0] : T.user.firstName && (T.user.initials = T.user.firstName[0]), re && (T.user.icon = "property-fill"), N.value.push(T);
432
432
  });
433
433
  }, he = async (e = !1) => {
434
- if (s.showComments && l.value.tokenId) {
434
+ if (s.showComments && r.value.tokenId) {
435
435
  e || (y.value.messages = !0);
436
436
  try {
437
- let t = `/api/client/connect/getMessages.php?tokenId=${l.value.tokenId}`;
437
+ let t = `/api/client/connect/getMessages.php?tokenId=${r.value.tokenId}`;
438
438
  e && k.value !== null && (t += `&lastMsgId=${k.value}`);
439
439
  const o = await (await fetch(t, {
440
440
  method: "GET",
@@ -463,21 +463,21 @@ const Pt = 996, Zt = It({
463
463
  "hours",
464
464
  "minutes"
465
465
  ]
466
- ), n = Math.floor(o.years), r = Math.floor(o.months), u = Math.floor(o.days), m = Math.floor(o.hours), h = Math.floor(o.minutes);
466
+ ), 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);
467
467
  if (n)
468
- return n === 1 ? c("HC_ONE_YEAR_AGO") : c("HC_X_YEARS_AGO", { years: n });
469
- if (r)
470
- return r === 1 ? c("HC_ONE_MONTH_AGO") : c("HC_X_MONTHS_AGO", { months: r });
471
- if (u)
472
- return u === 1 ? c("HC_ONE_DAY_AGO") : c("HC_X_DAYS_AGO", { days: u });
468
+ return n === 1 ? u("HC_ONE_YEAR_AGO") : u("HC_X_YEARS_AGO", { years: n });
469
+ if (l)
470
+ return l === 1 ? u("HC_ONE_MONTH_AGO") : u("HC_X_MONTHS_AGO", { months: l });
471
+ if (c)
472
+ return c === 1 ? u("HC_ONE_DAY_AGO") : u("HC_X_DAYS_AGO", { days: c });
473
473
  if (m)
474
- return m === 1 ? c("HC_ONE_HOUR_AGO") : c("HC_X_HOURS_AGO", { hours: m });
474
+ return m === 1 ? u("HC_ONE_HOUR_AGO") : u("HC_X_HOURS_AGO", { hours: m });
475
475
  if (h)
476
- return h === 1 ? c("HC_ONE_MINUTE_AGO") : c("HC_X_MINUTES_AGO", { minutes: h });
476
+ return h === 1 ? u("HC_ONE_MINUTE_AGO") : u("HC_X_MINUTES_AGO", { minutes: h });
477
477
  if (h === 0)
478
- return c("HC_A_MOMENT_AGO");
478
+ return u("HC_A_MOMENT_AGO");
479
479
  }, at = async () => {
480
- s.showGuestDetails && se(), ye(), J(), ne(), f("refresh:pms", l.value);
480
+ s.showGuestDetails && se(), ye(), J(), ne(), f("refresh:pms", r.value);
481
481
  }, se = async () => {
482
482
  try {
483
483
  y.value.pms = !0;
@@ -492,7 +492,7 @@ const Pt = 996, Zt = It({
492
492
  return w.length === 2 && w.pop()?.split(";").shift() || "";
493
493
  })(),
494
494
  "Content-Type": "application/json"
495
- }, n = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room.id, r = await fetch(
495
+ }, n = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room.id, l = await fetch(
496
496
  `${a}/vendors/properties/statuses/${s.propertyId}/rooms`,
497
497
  {
498
498
  method: "POST",
@@ -501,16 +501,16 @@ const Pt = 996, Zt = It({
501
501
  body: JSON.stringify({ roomsIds: [n] })
502
502
  }
503
503
  );
504
- clearTimeout(t), r.ok || be(r);
505
- const u = await r.json(), m = u.data?.pmsRooms || u.data?.rooms || u.rooms || [];
506
- R.value = m, m.length > 0 ? l.value = {
504
+ clearTimeout(t), l.ok || be(l);
505
+ const c = await l.json(), m = c.data?.pmsRooms || c.data?.rooms || c.rooms || [];
506
+ R.value = m, m.length > 0 ? r.value = {
507
507
  ...m[0],
508
508
  tokenId: m[0].tokenId || s.room.tokenId
509
- } : l.value = s.room, y.value.pms = !1;
509
+ } : r.value = s.room, y.value.pms = !1;
510
510
  } catch (e) {
511
511
  return y.value.pms = !1, f("show:toast", {
512
512
  show: !0,
513
- message: c("HC_FAILED_TO_LOAD_PMS_DATA"),
513
+ message: u("HC_FAILED_TO_LOAD_PMS_DATA"),
514
514
  variant: "error",
515
515
  icon: "exclamation-circle"
516
516
  }), e;
@@ -528,7 +528,7 @@ const Pt = 996, Zt = It({
528
528
  } catch (e) {
529
529
  console.error("Error getting room notices:", e), Y.value = [], f("show:toast", {
530
530
  show: !0,
531
- message: c("HC_FAILED_TO_LOAD_ROOM_NOTICES"),
531
+ message: u("HC_FAILED_TO_LOAD_ROOM_NOTICES"),
532
532
  variant: "error",
533
533
  icon: "exclamation-circle"
534
534
  });
@@ -548,22 +548,22 @@ const Pt = 996, Zt = It({
548
548
  body: e
549
549
  })
550
550
  ]), o = await t.json(), n = await a.json();
551
- if (o.departments && (o.departments.forEach((r) => {
552
- r.label = r.display_name;
553
- }), N.value = o.departments), n.users) {
554
- const r = [];
555
- let u = {
551
+ if (o.departments && (o.departments.forEach((l) => {
552
+ l.label = l.display_name;
553
+ }), C.value = o.departments), n.users) {
554
+ const l = [];
555
+ let c = {
556
556
  group: "",
557
557
  options: []
558
558
  };
559
559
  n.users.forEach((m) => {
560
- m.translated_department !== u.group && (u.group && r.push({ ...u }), u.group = m.translated_department, u.options = []), u.options.push(m);
561
- }), u.group && r.push({ ...u }), Oe.value = r;
560
+ m.translated_department !== c.group && (c.group && l.push({ ...c }), c.group = m.translated_department, c.options = []), c.options.push(m);
561
+ }), c.group && l.push({ ...c }), Oe.value = l;
562
562
  }
563
563
  } catch (e) {
564
564
  console.error("Error getting shared data:", e), f("show:toast", {
565
565
  show: !0,
566
- message: c("HC_FAILED_TO_LOAD_SHARED_DATA"),
566
+ message: u("HC_FAILED_TO_LOAD_SHARED_DATA"),
567
567
  variant: "error",
568
568
  icon: "exclamation-circle"
569
569
  });
@@ -571,7 +571,7 @@ const Pt = 996, Zt = It({
571
571
  }, Se = async () => {
572
572
  try {
573
573
  const t = await (await fetch(
574
- `/api/client/connect/getStayDetails.php?tokenId=${l.value.tokenId}`,
574
+ `/api/client/connect/getStayDetails.php?tokenId=${r.value.tokenId}`,
575
575
  {
576
576
  method: "GET",
577
577
  credentials: "include"
@@ -587,7 +587,7 @@ const Pt = 996, Zt = It({
587
587
  } catch (e) {
588
588
  console.error("getStayDetails error:", e), f("show:toast", {
589
589
  show: !0,
590
- message: c("HC_FAILED_TO_LOAD_STAY_DETAILS"),
590
+ message: u("HC_FAILED_TO_LOAD_STAY_DETAILS"),
591
591
  variant: "error",
592
592
  icon: "exclamation-circle"
593
593
  });
@@ -631,7 +631,7 @@ const Pt = 996, Zt = It({
631
631
  } catch (e) {
632
632
  console.error("Error getting tickets:", e), A.value = [], f("show:toast", {
633
633
  show: !0,
634
- message: c("HC_FAILED_TO_LOAD_TICKETS"),
634
+ message: u("HC_FAILED_TO_LOAD_TICKETS"),
635
635
  variant: "error",
636
636
  icon: "exclamation-circle"
637
637
  });
@@ -642,7 +642,7 @@ const Pt = 996, Zt = It({
642
642
  if (s.showActivity)
643
643
  try {
644
644
  y.value.activity = !0;
645
- const e = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room?.id, t = await fetch(
645
+ const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = await fetch(
646
646
  "/api/client/common/getCleaningsInspections.php?propertyId=" + s.propertyId + "&areaId=" + e
647
647
  );
648
648
  if (!t.ok)
@@ -652,7 +652,7 @@ const Pt = 996, Zt = It({
652
652
  } catch (e) {
653
653
  console.error("Error getting activity:", e), pe.value = [], f("show:toast", {
654
654
  show: !0,
655
- message: c("HC_FAILED_TO_LOAD_ACTIVITY"),
655
+ message: u("HC_FAILED_TO_LOAD_ACTIVITY"),
656
656
  variant: "error",
657
657
  icon: "exclamation-circle"
658
658
  });
@@ -671,7 +671,7 @@ const Pt = 996, Zt = It({
671
671
  }, nt = (e) => {
672
672
  const t = document.querySelectorAll(".pulse");
673
673
  if (t && t.length) {
674
- const a = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room?.id, o = document.getElementById("room-" + a), n = o?.classList;
674
+ const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = document.getElementById("room-" + a), n = o?.classList;
675
675
  switch (e) {
676
676
  case "room_notice":
677
677
  (n?.contains("roombox_unsel") || n?.contains("roombox_unsel_active")) && (o?.classList.remove(), o?.classList.add("roomnoticeroombox_sel"));
@@ -686,12 +686,12 @@ const Pt = 996, Zt = It({
686
686
  !n?.contains("smsroombox_sel") && !n?.contains("callbackroombox_sel") && !n?.contains("complaintsroombox_sel") && !n?.contains("guestrequestroombox_sel") && (o?.classList.remove(), o?.classList.add("workordersroombox_sel"));
687
687
  break;
688
688
  }
689
- const r = setTimeout(() => {
690
- t.forEach((u) => {
691
- u.classList.remove("pulse");
689
+ const l = setTimeout(() => {
690
+ t.forEach((c) => {
691
+ c.classList.remove("pulse");
692
692
  });
693
693
  }, 4500);
694
- L.value.push(r);
694
+ L.value.push(l);
695
695
  }
696
696
  }, rt = () => {
697
697
  window.open("/guest/overview.php", "_blank");
@@ -721,7 +721,7 @@ const Pt = 996, Zt = It({
721
721
  e.link && window.open(e.link, "_blank");
722
722
  }, ut = async () => {
723
723
  ve.value = !0;
724
- const e = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room?.id, t = l.value?.qv2Rooms?.qRoomName || l.value?.name || s.room?.name, a = {
724
+ const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = r.value?.qv2Rooms?.qRoomName || r.value?.name || s.room?.name, a = {
725
725
  type: E.value?.id,
726
726
  propertyId: s.propertyId,
727
727
  userId: P.value,
@@ -730,7 +730,7 @@ const Pt = 996, Zt = It({
730
730
  };
731
731
  switch (E.value?.id) {
732
732
  case "complaint":
733
- a.tokenId = l.value.tokenId, a.problemId = p.value.problem.id, a.guestName = p.value.guestName, a.guestPhone = p.value.guestPhone, a.guestEmail = p.value.guestEmail, a.guestLoyalty = p.value.guestLoyalty, a.guestMood = p.value.guestMood.id, a.checkInDate = I.fromJSDate(p.value.checkInDate).toFormat(
733
+ a.tokenId = r.value.tokenId, a.problemId = p.value.problem.id, a.guestName = p.value.guestName, a.guestPhone = p.value.guestPhone, a.guestEmail = p.value.guestEmail, a.guestLoyalty = p.value.guestLoyalty, a.guestMood = p.value.guestMood.id, a.checkInDate = I.fromJSDate(p.value.checkInDate).toFormat(
734
734
  "yyyy-MM-dd"
735
735
  ), a.checkOutDate = I.fromJSDate(p.value.checkOutDate).toFormat(
736
736
  "yyyy-MM-dd"
@@ -749,33 +749,33 @@ const Pt = 996, Zt = It({
749
749
  }, ct = (e) => {
750
750
  we(), Ie(), s.hover && f("toggle", e);
751
751
  }, dt = (e) => {
752
- Ne(), b.value = e;
752
+ Ce(), b.value = e;
753
753
  }, mt = async (e) => {
754
754
  if (E.value = e, O.value = [], g.value.issue = null, p.value.problem = null, v.value.item = null, v.value.issue = null, d.value.item = null, !E.value) {
755
755
  y.value.actionItems = !1;
756
756
  return;
757
757
  }
758
758
  y.value.actionItems = !0;
759
- const t = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room?.id, a = new FormData();
759
+ const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, a = new FormData();
760
760
  switch (a.append("property_id", s.propertyId), a.append("area_id", t), e.id) {
761
761
  case "complaint":
762
762
  try {
763
- l.value.tokenId && await Se();
763
+ r.value.tokenId && await Se();
764
764
  const n = await (await fetch("/api/client/common/getComplaintProblemsByPropertyId.php", {
765
765
  method: "POST",
766
766
  body: a
767
767
  })).json();
768
768
  n.items && (O.value = n.items);
769
- const r = await X.post(
769
+ const l = await X.post(
770
770
  "/api/client/common/getComplaintMoods.php"
771
771
  );
772
- r.data.items.forEach((u) => {
773
- u.label = u.display_name;
774
- }), ce.value = r.data.items;
772
+ l.data.items.forEach((c) => {
773
+ c.label = c.display_name;
774
+ }), ce.value = l.data.items;
775
775
  } catch (o) {
776
776
  console.error("Error loading complaint options:", o), f("show:toast", {
777
777
  show: !0,
778
- message: c("HC_FAILED_TO_LOAD_COMPLAINT_OPTIONS"),
778
+ message: u("HC_FAILED_TO_LOAD_COMPLAINT_OPTIONS"),
779
779
  variant: "error",
780
780
  icon: "exclamation-circle"
781
781
  });
@@ -793,7 +793,7 @@ const Pt = 996, Zt = It({
793
793
  } catch (o) {
794
794
  console.error("Error loading room notice options:", o), f("show:toast", {
795
795
  show: !0,
796
- message: c("HC_FAILED_TO_LOAD_ROOM_NOTICE_OPTIONS"),
796
+ message: u("HC_FAILED_TO_LOAD_ROOM_NOTICE_OPTIONS"),
797
797
  variant: "error",
798
798
  icon: "exclamation-circle"
799
799
  });
@@ -808,17 +808,17 @@ const Pt = 996, Zt = It({
808
808
  method: "POST",
809
809
  body: a
810
810
  })).json();
811
- if (n.items && (O.value = n.items), await ge(), d.value.department = N.value.find(
812
- (r) => parseInt(r.id) === 4
811
+ if (n.items && (O.value = n.items), await ge(), d.value.department = C.value.find(
812
+ (l) => parseInt(l.id) === 4
813
813
  ), s.allowWhenWhere)
814
814
  try {
815
- const r = new FormData();
816
- r.append("property_id", s.propertyId);
815
+ const l = new FormData();
816
+ l.append("property_id", s.propertyId);
817
817
  const m = await (await fetch(
818
818
  "/api/client/common/getWhenWhereOptions.php",
819
819
  {
820
820
  method: "POST",
821
- body: r
821
+ body: l
822
822
  }
823
823
  )).json();
824
824
  m.when && Array.isArray(m.when) ? q.value = m.when.map((h) => ({
@@ -830,10 +830,10 @@ const Pt = 996, Zt = It({
830
830
  label: h.name,
831
831
  value: h.id
832
832
  })) : x.value = [];
833
- } catch (r) {
834
- console.error("Error loading When/Where options:", r), q.value = [], x.value = [], f("show:toast", {
833
+ } catch (l) {
834
+ console.error("Error loading When/Where options:", l), q.value = [], x.value = [], f("show:toast", {
835
835
  show: !0,
836
- message: c("HC_FAILED_TO_LOAD_WHEN_WHERE_OPTIONS"),
836
+ message: u("HC_FAILED_TO_LOAD_WHEN_WHERE_OPTIONS"),
837
837
  variant: "error",
838
838
  icon: "exclamation-circle"
839
839
  });
@@ -841,7 +841,7 @@ const Pt = 996, Zt = It({
841
841
  } catch (o) {
842
842
  console.error("Error loading request options:", o), f("show:toast", {
843
843
  show: !0,
844
- message: c("HC_FAILED_TO_LOAD_REQUEST_OPTIONS"),
844
+ message: u("HC_FAILED_TO_LOAD_REQUEST_OPTIONS"),
845
845
  variant: "error",
846
846
  icon: "exclamation-circle"
847
847
  });
@@ -855,14 +855,14 @@ const Pt = 996, Zt = It({
855
855
  const n = await (await fetch("/api/client/common/getItemsByRoomId.php", {
856
856
  method: "POST",
857
857
  body: a
858
- })).json(), r = [];
859
- let u = {
858
+ })).json(), l = [];
859
+ let c = {
860
860
  group: "",
861
861
  options: []
862
862
  };
863
863
  n.items && (n.items.forEach((m) => {
864
- m.section_name !== u.group && (u.group && r.push({ ...u }), u.group = m.section_name, u.options = []), m.label && u.options.push(m);
865
- }), u.group && r.push({ ...u })), O.value = r, await Promise.all([
864
+ m.section_name !== c.group && (c.group && l.push({ ...c }), c.group = m.section_name, c.options = []), m.label && c.options.push(m);
865
+ }), c.group && l.push({ ...c })), O.value = l, await Promise.all([
866
866
  X.post(
867
867
  "/api/client/common/getWorkOrderIssues.php"
868
868
  ),
@@ -872,13 +872,13 @@ const Pt = 996, Zt = It({
872
872
  h.data.issues.forEach((w) => {
873
873
  w.label = w.display_name;
874
874
  }), fe.value = h.data.issues;
875
- }), v.value.department = N.value.find(
875
+ }), v.value.department = C.value.find(
876
876
  (m) => parseInt(m.id) === 2
877
877
  );
878
878
  } catch (o) {
879
879
  console.error("Error loading work order options:", o), f("show:toast", {
880
880
  show: !0,
881
- message: c("HC_FAILED_TO_LOAD_WORK_ORDER_OPTIONS"),
881
+ message: u("HC_FAILED_TO_LOAD_WORK_ORDER_OPTIONS"),
882
882
  variant: "error",
883
883
  icon: "exclamation-circle"
884
884
  });
@@ -892,7 +892,7 @@ const Pt = 996, Zt = It({
892
892
  }
893
893
  }, vt = () => {
894
894
  oe.value = !oe.value, ie.value = !1;
895
- }, Me = () => {
895
+ }, Ne = () => {
896
896
  const e = document.getElementById("comment-field"), t = document.getElementById("hidden-text");
897
897
  e.style.height = t?.offsetHeight + "px";
898
898
  }, K = () => {
@@ -902,11 +902,11 @@ const Pt = 996, Zt = It({
902
902
  behavior: "smooth"
903
903
  });
904
904
  }, pt = async (e) => {
905
- if (e && e.type === "keydown" && e.preventDefault(), l.value.tokenId && b.value && !H.value) {
905
+ if (e && e.type === "keydown" && e.preventDefault(), r.value.tokenId && b.value && !H.value) {
906
906
  y.value.sendingMessage = !0;
907
907
  try {
908
908
  const t = new FormData();
909
- t.append("tokenId", l.value.tokenId), t.append("content", b.value), t.append("senderId", P.value || "");
909
+ t.append("tokenId", r.value.tokenId), t.append("content", b.value), t.append("senderId", P.value || "");
910
910
  const a = await X.post(
911
911
  "/api/client/connect/sendMessage.php",
912
912
  t
@@ -914,7 +914,7 @@ const Pt = 996, Zt = It({
914
914
  if (a.data.status === "error") {
915
915
  f("show:toast", {
916
916
  show: !0,
917
- message: c("HC_FAILED_TO_SEND_MESSAGE"),
917
+ message: u("HC_FAILED_TO_SEND_MESSAGE"),
918
918
  variant: "error",
919
919
  icon: "exclamation-circle"
920
920
  });
@@ -924,7 +924,7 @@ const Pt = 996, Zt = It({
924
924
  } catch (t) {
925
925
  console.error("sendChatMessage error:", t), f("show:toast", {
926
926
  show: !0,
927
- message: c("HC_FAILED_TO_SEND_MESSAGE"),
927
+ message: u("HC_FAILED_TO_SEND_MESSAGE"),
928
928
  variant: "error",
929
929
  icon: "exclamation-circle"
930
930
  });
@@ -933,16 +933,16 @@ const Pt = 996, Zt = It({
933
933
  }
934
934
  }
935
935
  }, ft = async () => {
936
- if (!(!l.value.tokenId || !P.value)) {
936
+ if (!(!r.value.tokenId || !P.value)) {
937
937
  y.value.conversationToggle = !0;
938
938
  try {
939
939
  const e = S.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php", t = new FormData();
940
- t.append("tokenId", l.value.tokenId), t.append("userId", P.value), S.value && k.value !== null && t.append("lastMsgId", k.value.toString());
940
+ t.append("tokenId", r.value.tokenId), t.append("userId", P.value), S.value && k.value !== null && t.append("lastMsgId", k.value.toString());
941
941
  const a = await X.post(e, t);
942
942
  if (a.data.status === "error") {
943
943
  f("show:toast", {
944
944
  show: !0,
945
- message: c("HC_FAILED_TO_UPDATE_CONVERSATION"),
945
+ message: u("HC_FAILED_TO_UPDATE_CONVERSATION"),
946
946
  variant: "error",
947
947
  icon: "exclamation-circle"
948
948
  });
@@ -950,14 +950,14 @@ const Pt = 996, Zt = It({
950
950
  }
951
951
  S.value = !a.data.closed, a.data.messages && (F(a.data.messages), a.data.messages.length > 0 && (k.value = a.data.messages[a.data.messages.length - 1].id)), f("show:toast", {
952
952
  show: !0,
953
- message: S.value ? c("HC_CONVERSATION_REOPENED") : c("HC_CONVERSATION_CLOSED"),
953
+ message: S.value ? u("HC_CONVERSATION_REOPENED") : u("HC_CONVERSATION_CLOSED"),
954
954
  variant: "success",
955
955
  icon: "check-circle"
956
956
  });
957
957
  } catch (e) {
958
958
  console.error("toggleMarkOpenClose error:", e), f("show:toast", {
959
959
  show: !0,
960
- message: c("HC_FAILED_TO_UPDATE_CONVERSATION"),
960
+ message: u("HC_FAILED_TO_UPDATE_CONVERSATION"),
961
961
  variant: "error",
962
962
  icon: "exclamation-circle"
963
963
  });
@@ -966,11 +966,11 @@ const Pt = 996, Zt = It({
966
966
  }
967
967
  }
968
968
  }, ht = async () => {
969
- if (s.isTestEnvironment && !(!l.value?.tokenId || !j.value.trim())) {
969
+ if (s.isTestEnvironment && !(!r.value?.tokenId || !j.value.trim())) {
970
970
  me.value = !0;
971
971
  try {
972
972
  const e = new FormData();
973
- e.append("tokenId", l.value.tokenId), e.append("content", j.value.trim());
973
+ e.append("tokenId", r.value.tokenId), e.append("content", j.value.trim());
974
974
  const t = await X.post(
975
975
  "/api/client/connect/simulateInbound.php",
976
976
  e
@@ -978,7 +978,7 @@ const Pt = 996, Zt = It({
978
978
  if (t.data.status === "error") {
979
979
  f("show:toast", {
980
980
  show: !0,
981
- message: c("HC_FAILED_TO_SIMULATE_MESSAGE"),
981
+ message: u("HC_FAILED_TO_SIMULATE_MESSAGE"),
982
982
  variant: "error",
983
983
  icon: "exclamation-circle"
984
984
  });
@@ -986,14 +986,14 @@ const Pt = 996, Zt = It({
986
986
  }
987
987
  t.data.messages && (F(t.data.messages), S.value = !t.data.closed, t.data.messages.length > 0 && (k.value = t.data.messages[t.data.messages.length - 1].id)), j.value = "", W.value = !1, K(), f("show:toast", {
988
988
  show: !0,
989
- message: c("HC_SIMULATED_GUEST_REPLY"),
989
+ message: u("HC_SIMULATED_GUEST_REPLY"),
990
990
  variant: "success",
991
991
  icon: "check-circle"
992
992
  });
993
993
  } catch (e) {
994
994
  console.error("simulateGuestReply error:", e), f("show:toast", {
995
995
  show: !0,
996
- message: c("HC_FAILED_TO_SIMULATE_MESSAGE"),
996
+ message: u("HC_FAILED_TO_SIMULATE_MESSAGE"),
997
997
  variant: "error",
998
998
  icon: "exclamation-circle"
999
999
  });
@@ -1025,55 +1025,55 @@ const Pt = 996, Zt = It({
1025
1025
  const e = V.value?.getBoundingClientRect().left, t = window.innerWidth;
1026
1026
  de.value = t - e < U.value ? "left" : "right";
1027
1027
  }
1028
- }, Ne = () => {
1029
- H.value = !H.value, H.value ? (b.value = "", C.value.info = te.value, C.value.tickets = ae.value, C.value.comments = ee.value, te.value = !1, ae.value = !1, document.getElementById("comment-field")?.focus()) : (te.value = C.value.info, ae.value = C.value.tickets, ee.value = C.value.comments);
1028
+ }, Ce = () => {
1029
+ H.value = !H.value, H.value ? (b.value = "", M.value.info = te.value, M.value.tickets = ae.value, M.value.comments = ee.value, te.value = !1, ae.value = !1, document.getElementById("comment-field")?.focus()) : (te.value = M.value.info, ae.value = M.value.tickets, ee.value = M.value.comments);
1030
1030
  }, _t = async (e, t) => {
1031
- const a = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room?.id, o = new FormData();
1031
+ const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = new FormData();
1032
1032
  if (o.append("property_id", s.propertyId), o.append("room_ids", JSON.stringify([a])), await J(), A.value) {
1033
1033
  const n = [];
1034
- A.value.forEach((r) => {
1035
- r.id === e && r.type === t ? n.unshift({
1036
- ...r,
1034
+ A.value.forEach((l) => {
1035
+ l.id === e && l.type === t ? n.unshift({
1036
+ ...l,
1037
1037
  isNew: !0
1038
1038
  }) : n.push({
1039
- ...r,
1039
+ ...l,
1040
1040
  isNew: !1
1041
1041
  });
1042
- }), n.sort((r, u) => r.id === e ? -1 : u.id === e ? 1 : 0), A.value = [...n];
1042
+ }), n.sort((l, c) => l.id === e ? -1 : c.id === e ? 1 : 0), A.value = [...n];
1043
1043
  }
1044
1044
  };
1045
1045
  B(() => s.open, () => {
1046
- if (s.open && s.showComments && M.value.length) {
1046
+ if (s.open && s.showComments && N.value.length) {
1047
1047
  const e = setTimeout(K, 500);
1048
1048
  L.value.push(e);
1049
1049
  }
1050
- s.open || (Ae(), _e(), k.value = null, M.value = [], S.value = !1);
1050
+ s.open || (Ae(), _e(), k.value = null, N.value = [], S.value = !1);
1051
1051
  }), B(
1052
- () => [s.open, s.showComments, ee.value, l.value?.tokenId],
1052
+ () => [s.open, s.showComments, ee.value, r.value?.tokenId],
1053
1053
  ([e, t, a, o]) => {
1054
1054
  e && t && a && o ? gt() : _e();
1055
1055
  }
1056
1056
  ), B(b, () => {
1057
- const e = setTimeout(Me, 100);
1057
+ const e = setTimeout(Ne, 100);
1058
1058
  L.value.push(e);
1059
1059
  }), B(() => s.allowWhenWhere, (e, t) => {
1060
1060
  t === !0 && e === !1 && (d.value.when = null, d.value.where = null, q.value = [], x.value = []);
1061
1061
  });
1062
- const Ce = () => !!(s.room.reservations || s.room.cleaning || s.room.occupancy || s.room.hkTaskTypeId != null), wt = () => Array.isArray(s.room.roomNoticeIssues) && s.room.roomNoticeIssues.length > 0, Re = () => {
1062
+ const Me = () => !!(s.room.reservations || s.room.cleaning || s.room.occupancy || s.room.hkTaskTypeId != null), wt = () => Array.isArray(s.room.roomNoticeIssues) && s.room.roomNoticeIssues.length > 0, Re = () => {
1063
1063
  wt() ? Y.value = s.room.roomNoticeIssues : ye();
1064
1064
  };
1065
1065
  return B(() => s.open, async (e, t) => {
1066
- e && !t && (Ce() ? (l.value = s.room, R.value = [s.room]) : s.showGuestDetails && !R.value ? await se() : l.value || (l.value = s.room), J(), Re(), ne(), s.showComments && he());
1066
+ e && !t && (Me() ? (r.value = s.room, R.value = [s.room]) : s.showGuestDetails && !R.value ? await se() : r.value || (r.value = s.room), J(), Re(), ne(), s.showComments && he());
1067
1067
  }), B(
1068
1068
  () => s.room.id,
1069
1069
  (e, t) => {
1070
- e !== t && (l.value = s.room, R.value = null, s.open && (Ce() ? R.value = [s.room] : s.showGuestDetails && se(), J(), Re(), ne()));
1070
+ e !== t && (r.value = s.room, R.value = null, s.open && (Me() ? R.value = [s.room] : s.showGuestDetails && se(), J(), Re(), ne()));
1071
1071
  }
1072
1072
  ), Tt(async () => {
1073
1073
  const e = JSON.parse(
1074
1074
  window.localStorage.getItem("authenticated")
1075
1075
  );
1076
- P.value = e?.user?.id || window.userId || "", l.value = s.room, s.size === "sm" && (G.value = 140, U.value = 160), s.size === "lg" && (G.value = 250, U.value = 440), we(), Ie();
1076
+ P.value = e?.user?.id || window.userId || "", r.value = s.room, s.size === "sm" && (G.value = 140, U.value = 160), s.size === "lg" && (G.value = 250, U.value = 440), we(), Ie();
1077
1077
  }), Dt(() => {
1078
1078
  L.value.forEach((e) => {
1079
1079
  clearTimeout(e);
@@ -1089,17 +1089,17 @@ const Pt = 996, Zt = It({
1089
1089
  complaint: p,
1090
1090
  componentHeight: G,
1091
1091
  componentWidth: U,
1092
- departments: N,
1092
+ departments: C,
1093
1093
  departmentUsers: Oe,
1094
1094
  expandActivity: Pe,
1095
1095
  expandComments: ee,
1096
1096
  expandGuestInfo: te,
1097
- expandedStates: C,
1097
+ expandedStates: M,
1098
1098
  expandTickets: ae,
1099
1099
  guestDetailsData: He,
1100
1100
  itemOptions: O,
1101
1101
  loading: y,
1102
- messages: M,
1102
+ messages: N,
1103
1103
  moodOptions: ce,
1104
1104
  pmsData: R,
1105
1105
  positioning: de,
@@ -1108,7 +1108,7 @@ const Pt = 996, Zt = It({
1108
1108
  requestedByOptions: Q,
1109
1109
  requestLoading: ve,
1110
1110
  requestType: E,
1111
- roomDetailsData: l,
1111
+ roomDetailsData: r,
1112
1112
  roomNotice: g,
1113
1113
  roomNotices: Y,
1114
1114
  showCreateRequest: oe,
@@ -1170,13 +1170,13 @@ const Pt = 996, Zt = It({
1170
1170
  onSelectToDo: mt,
1171
1171
  openRequest: vt,
1172
1172
  refreshPMSData: at,
1173
- resizeTextarea: Me,
1173
+ resizeTextarea: Ne,
1174
1174
  scrollToConnectBottom: K,
1175
1175
  sendChatMessage: pt,
1176
1176
  setAlignment: we,
1177
1177
  setPositioning: Ie,
1178
1178
  toggleMarkOpenClose: ft,
1179
- toggleQuickReply: Ne,
1179
+ toggleQuickReply: Ce,
1180
1180
  updateTickets: _t,
1181
1181
  // Simulate Guest Reply methods (test environments only)
1182
1182
  simulateGuestReply: ht,