@quoreadmin/ui 1.7.17 → 1.7.18

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