@quoreadmin/ui 1.6.8 → 1.6.9

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 (195) hide show
  1. package/dist/index140.js +109 -108
  2. package/dist/index142.js +1 -1
  3. package/dist/index175.js +4 -4
  4. package/dist/index186.js +1190 -36
  5. package/dist/index188.js +36 -1190
  6. package/dist/{index187.js → index189.js} +17 -17
  7. package/dist/index190.js +19 -19
  8. package/dist/index191.js +1 -1
  9. package/dist/index192.js +1 -1
  10. package/dist/index195.js +2 -2
  11. package/dist/index197.js +14 -14
  12. package/dist/index198.js +1 -1
  13. package/dist/index199.js +1 -1
  14. package/dist/index200.js +3 -3
  15. package/dist/index201.js +6 -6
  16. package/dist/index202.js +2 -2
  17. package/dist/index203.js +2 -2
  18. package/dist/index204.js +1 -1
  19. package/dist/index208.js +2 -2
  20. package/dist/index209.js +1 -1
  21. package/dist/index210.js +1 -1
  22. package/dist/index211.js +1 -1
  23. package/dist/index212.js +1 -1
  24. package/dist/index213.js +4 -4
  25. package/dist/index215.js +4 -4
  26. package/dist/index218.js +1 -1
  27. package/dist/index219.js +2 -2
  28. package/dist/index221.js +1 -1
  29. package/dist/index222.js +1 -1
  30. package/dist/index223.js +1 -1
  31. package/dist/index224.js +1 -1
  32. package/dist/index225.js +1 -1
  33. package/dist/index226.js +1 -1
  34. package/dist/index227.js +2 -2
  35. package/dist/index228.js +1 -1
  36. package/dist/index229.js +1 -1
  37. package/dist/index230.js +5 -5
  38. package/dist/index231.js +1 -1
  39. package/dist/index232.js +1 -1
  40. package/dist/index233.js +1 -1
  41. package/dist/index234.js +3632 -22
  42. package/dist/index235.js +55 -22
  43. package/dist/index236.js +77 -20
  44. package/dist/index237.js +39 -823
  45. package/dist/index238.js +198 -685
  46. package/dist/index239.js +9 -175
  47. package/dist/index240.js +57 -22
  48. package/dist/index241.js +61 -20
  49. package/dist/index242.js +54 -20
  50. package/dist/index243.js +75 -3
  51. package/dist/index244.js +707 -171
  52. package/dist/index245.js +34 -128
  53. package/dist/index246.js +55 -1214
  54. package/dist/index247.js +11 -20
  55. package/dist/index248.js +705 -22
  56. package/dist/index249.js +820 -22
  57. package/dist/index250.js +160 -28
  58. package/dist/index251.js +228 -20
  59. package/dist/index252.js +36 -19
  60. package/dist/index253.js +10 -2
  61. package/dist/index254.js +22 -2
  62. package/dist/index255.js +22 -3632
  63. package/dist/index256.js +20 -55
  64. package/dist/index257.js +823 -64
  65. package/dist/index258.js +693 -43
  66. package/dist/index259.js +165 -204
  67. package/dist/index260.js +22 -10
  68. package/dist/index261.js +20 -57
  69. package/dist/index262.js +20 -61
  70. package/dist/index263.js +3 -54
  71. package/dist/index264.js +181 -69
  72. package/dist/index265.js +120 -710
  73. package/dist/index266.js +1217 -33
  74. package/dist/index267.js +20 -64
  75. package/dist/index268.js +22 -11
  76. package/dist/index269.js +22 -705
  77. package/dist/index270.js +29 -820
  78. package/dist/index271.js +19 -160
  79. package/dist/index272.js +20 -228
  80. package/dist/index273.js +2 -37
  81. package/dist/index274.js +2 -10
  82. package/dist/index275.js +221 -239
  83. package/dist/index276.js +6 -8
  84. package/dist/index277.js +124 -128
  85. package/dist/index278.js +63 -78
  86. package/dist/index279.js +87 -2
  87. package/dist/index280.js +24 -74
  88. package/dist/index281.js +9 -3
  89. package/dist/index282.js +73 -25
  90. package/dist/index283.js +3 -53
  91. package/dist/index284.js +2 -26
  92. package/dist/index285.js +82 -21
  93. package/dist/index286.js +53 -21
  94. package/dist/index287.js +6 -16
  95. package/dist/index288.js +4 -16
  96. package/dist/index289.js +178 -22
  97. package/dist/index290.js +54 -1509
  98. package/dist/index291.js +74 -385
  99. package/dist/index292.js +235 -2713
  100. package/dist/index293.js +2 -86
  101. package/dist/index294.js +122 -3754
  102. package/dist/index295.js +79 -56
  103. package/dist/index296.js +71 -71
  104. package/dist/index297.js +8 -22
  105. package/dist/index298.js +49 -930
  106. package/dist/index299.js +17 -13
  107. package/dist/index300.js +13 -11
  108. package/dist/index301.js +15 -13
  109. package/dist/index302.js +14 -67
  110. package/dist/index303.js +14 -16
  111. package/dist/index304.js +21 -17
  112. package/dist/index305.js +1518 -22
  113. package/dist/index306.js +386 -22
  114. package/dist/index307.js +2731 -63
  115. package/dist/index308.js +86 -15
  116. package/dist/index309.js +3746 -60
  117. package/dist/index310.js +55 -197
  118. package/dist/index311.js +15 -246
  119. package/dist/index312.js +75 -226
  120. package/dist/index313.js +200 -4
  121. package/dist/index314.js +236 -124
  122. package/dist/index315.js +3 -68
  123. package/dist/index316.js +25 -85
  124. package/dist/index317.js +75 -25
  125. package/dist/index318.js +21 -8
  126. package/dist/index319.js +926 -66
  127. package/dist/index320.js +21 -3
  128. package/dist/index321.js +20 -2
  129. package/dist/index322.js +19 -82
  130. package/dist/index323.js +66 -51
  131. package/dist/index324.js +19 -6
  132. package/dist/index325.js +19 -5
  133. package/dist/index326.js +21 -178
  134. package/dist/index327.js +21 -62
  135. package/dist/index328.js +62 -74
  136. package/dist/index329.js +19 -35
  137. package/dist/index330.js +55 -8
  138. package/dist/index331.js +28 -12
  139. package/dist/index332.js +6 -54
  140. package/dist/index333.js +51 -11
  141. package/dist/index334.js +6 -14
  142. package/dist/index335.js +10 -56
  143. package/dist/index336.js +7 -52
  144. package/dist/index337.js +28 -31
  145. package/dist/index338.js +2 -2
  146. package/dist/index339.js +69 -4
  147. package/dist/index340.js +167 -2
  148. package/dist/index341.js +37 -23
  149. package/dist/index342.js +8 -40
  150. package/dist/index343.js +13 -2
  151. package/dist/index344.js +55 -11
  152. package/dist/index345.js +10 -18
  153. package/dist/index346.js +12 -15
  154. package/dist/index347.js +58 -10
  155. package/dist/index348.js +52 -10
  156. package/dist/index349.js +31 -2
  157. package/dist/index350.js +2 -9
  158. package/dist/index351.js +5 -10
  159. package/dist/index352.js +2 -14
  160. package/dist/index353.js +23 -20
  161. package/dist/index354.js +40 -19
  162. package/dist/index355.js +2 -64
  163. package/dist/index356.js +10 -36
  164. package/dist/index357.js +17 -18
  165. package/dist/index358.js +16 -55
  166. package/dist/index359.js +10 -29
  167. package/dist/index360.js +10 -7
  168. package/dist/index361.js +2 -52
  169. package/dist/index362.js +8 -5
  170. package/dist/index363.js +9 -11
  171. package/dist/index364.js +13 -6
  172. package/dist/index365.js +20 -28
  173. package/dist/index366.js +20 -2
  174. package/dist/index367.js +61 -67
  175. package/dist/index368.js +36 -166
  176. package/dist/index369.js +28 -98
  177. package/dist/index370.js +10 -90
  178. package/dist/index371.js +4 -17
  179. package/dist/index372.js +4 -98
  180. package/dist/index373.js +12 -30
  181. package/dist/index374.js +7 -11
  182. package/dist/index375.js +11 -3
  183. package/dist/index376.js +4 -3
  184. package/dist/index377.js +33 -13
  185. package/dist/index378.js +31 -7
  186. package/dist/index379.js +28 -12
  187. package/dist/index380.js +61 -5
  188. package/dist/index381.js +101 -33
  189. package/dist/index382.js +91 -31
  190. package/dist/index383.js +97 -27
  191. package/dist/index384.js +16 -60
  192. package/dist/index385.js +1 -1
  193. package/dist/index390.js +1 -1
  194. package/dist/index391.js +2 -2
  195. package/package.json +1 -1
package/dist/index140.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as Ke, ref as i, computed as h, watch as F, onMounted as Ve, onUnmounted as Ze } from "vue";
2
2
  import { useI18n as et } from "vue-i18n";
3
- import { DateTime as y } from "./index163.js";
4
- import "./index186.js";
3
+ import { DateTime as g } from "./index163.js";
4
+ import "./index188.js";
5
5
  import tt from "./index2.js";
6
6
  import at from "./index3.js";
7
7
  import ot from "./index13.js";
@@ -12,7 +12,7 @@ import rt from "./index20.js";
12
12
  import ut from "./index46.js";
13
13
  import it from "./index47.js";
14
14
  import ct from "./index49.js";
15
- import G from "./index187.js";
15
+ import X from "./index189.js";
16
16
  const Ot = Ke({
17
17
  name: "QRoomDetailsPopover",
18
18
  components: {
@@ -140,8 +140,8 @@ const Ot = Ke({
140
140
  }
141
141
  },
142
142
  emits: ["create:callback", "create:todo", "refresh:pms", "toggle"],
143
- setup(s, { emit: I }) {
144
- const { t: v } = et(), r = i(null), K = i(!1), V = i("left"), j = i([
143
+ setup(s, { emit: D }) {
144
+ const { t: v } = et(), r = i(null), K = i(!1), V = i("left"), G = i([
145
145
  {
146
146
  id: 1,
147
147
  label: v("HC_DEPARTMENT")
@@ -169,11 +169,11 @@ const Ot = Ke({
169
169
  problem: null,
170
170
  notes: "",
171
171
  tokenId: r.value?.tokenId
172
- }), H = i(250), B = i(290), C = i([]), ce = i([]), Z = i(!0), U = i(!0), E = i({
172
+ }), H = i(250), P = i(290), C = i([]), ce = i([]), Z = i(!0), j = i(!0), E = i({
173
173
  info: !0,
174
174
  tickets: !0,
175
175
  comments: !0
176
- }), Q = i(!0), we = i(s.guestDetails), w = i([]), b = i({
176
+ }), U = i(!0), we = i(s.guestDetails), w = i([]), b = i({
177
177
  pms: !1,
178
178
  roomNotices: !1,
179
179
  tickets: !1
@@ -187,7 +187,7 @@ const Ot = Ke({
187
187
  requestedBy: null,
188
188
  when: null,
189
189
  where: null
190
- }), P = i([
190
+ }), B = i([
191
191
  {
192
192
  id: 0,
193
193
  label: v("HC_STAFF_MEMBER")
@@ -198,12 +198,12 @@ const Ot = Ke({
198
198
  label: v("HC_HOTEL_GUEST")
199
199
  // need to localize
200
200
  }
201
- ]), _e = i(!1), k = i(null), g = i({
201
+ ]), ke = i(!1), _ = i(null), y = i({
202
202
  endDate: /* @__PURE__ */ new Date(),
203
203
  issue: null,
204
204
  notes: "",
205
205
  startDate: /* @__PURE__ */ new Date()
206
- }), $ = i([]), J = i(!1), D = i([]), L = i([]), ke = i([
206
+ }), Q = i([]), $ = i(!1), I = i([]), L = i([]), _e = i([
207
207
  {
208
208
  label: v("HC_COMPLAINT"),
209
209
  id: "complaint"
@@ -242,12 +242,12 @@ const Ot = Ke({
242
242
  default:
243
243
  return "";
244
244
  }
245
- }), De = h(() => se.value === "CLEAN" ? "blue-10" : se.value === "DIRTY" ? "red-10" : "gray-30"), Ie = h(() => v(`HC_${r.value.cleaning?.name}`) || ""), Te = h(() => {
245
+ }), Ie = h(() => se.value === "CLEAN" ? "blue-10" : se.value === "DIRTY" ? "red-10" : "gray-30"), De = h(() => v(`HC_${r.value.cleaning?.name}`) || ""), Te = h(() => {
246
246
  const e = T.value.toLowerCase();
247
247
  return s.quickReplies.filter((a) => a.toLowerCase().match(e));
248
- }), de = h(() => D.value.length ? !!D.value.find(
248
+ }), de = h(() => I.value.length ? !!I.value.find(
249
249
  (a) => a.type === "complaint"
250
- ) : !1), be = h(() => D.value.length ? !!D.value.find(
250
+ ) : !1), be = h(() => I.value.length ? !!I.value.find(
251
251
  (a) => a.type === "callback"
252
252
  ) : !1), Oe = h(() => {
253
253
  let e = [];
@@ -258,16 +258,16 @@ const Ot = Ke({
258
258
  });
259
259
  }) : e = w.value, e;
260
260
  }), me = h(() => r.value.occupancy?.name === "OCCUPIED"), Ce = h(() => me.value && de.value ? "HK_ROOM_STATUS_Occupied_Complaint" : "HK_ROOM_STATUS_Occupied"), Ee = h(() => {
261
- switch (k.value?.id) {
261
+ switch (_.value?.id) {
262
262
  case "request":
263
263
  case "work_order":
264
- return j.value[0];
264
+ return G.value[0];
265
265
  default:
266
266
  return null;
267
267
  }
268
268
  }), Me = h(() => {
269
269
  if (C.value)
270
- switch (k.value?.id) {
270
+ switch (_.value?.id) {
271
271
  case "request":
272
272
  return C.value.find((e) => parseInt(e.id) === 4);
273
273
  case "work_order":
@@ -277,35 +277,35 @@ const Ot = Ke({
277
277
  }
278
278
  return null;
279
279
  }), Re = h(() => {
280
- switch (k.value?.id) {
280
+ switch (_.value?.id) {
281
281
  case "request":
282
- return P.value[1];
282
+ return B.value[1];
283
283
  case "work_order":
284
- return P.value[0];
284
+ return B.value[0];
285
285
  default:
286
286
  return null;
287
287
  }
288
288
  }), Se = h(() => {
289
289
  let e = "";
290
290
  if (r.value && r.value.reservations[0]) {
291
- const a = y.fromISO(
291
+ const a = g.fromISO(
292
292
  r.value.reservations[0].arrivalDate
293
- ), t = a.toFormat("MMM"), o = a.day, n = a.year, l = y.fromISO(
293
+ ), t = a.toFormat("MMM"), o = a.day, n = a.year, l = g.fromISO(
294
294
  r.value.reservations[0].departureDate
295
295
  ), c = l.toFormat("MMM"), m = l.day, f = l.year;
296
296
  e += t + " " + o, n !== f && (e += ", " + n), t === c ? e += "-" + m : e += " - " + c + " " + m, e += ", " + f;
297
297
  }
298
298
  return e;
299
299
  }), Ne = h(() => {
300
- let e = $.value;
300
+ let e = Q.value;
301
301
  return e = [...new Set(e)], e;
302
302
  }), qe = h(() => {
303
- const e = k.value?.id;
303
+ const e = _.value?.id;
304
304
  if (!e)
305
305
  return !1;
306
306
  switch (e) {
307
307
  case "room_notice":
308
- return g.value.issue && g.value.startDate && g.value.endDate;
308
+ return y.value.issue && y.value.startDate && y.value.endDate;
309
309
  case "complaint":
310
310
  return p.value.problem && p.value.guestName && p.value.guestMood;
311
311
  case "work_order":
@@ -318,14 +318,14 @@ const Ot = Ke({
318
318
  return !1;
319
319
  }
320
320
  }), pe = () => {
321
- J.value = !1, S.value = !1, K.value = !1, w.value = [], te.value = [], oe.value = [], q.value = [], A.value = [], k.value = null, g.value.issue = null, g.value.startDate = /* @__PURE__ */ new Date(), g.value.endDate = /* @__PURE__ */ new Date(), 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 = "", d.value.assignType = null, d.value.department = null, d.value.person = null, d.value.due = /* @__PURE__ */ new Date(), d.value.item = null, d.value.issue = null, d.value.notes = "", u.value.assignType = null, u.value.department = null, u.value.person = null, u.value.due = /* @__PURE__ */ new Date(), u.value.item = null, u.value.notes = "", u.value.when = null, u.value.where = null;
321
+ $.value = !1, S.value = !1, K.value = !1, w.value = [], te.value = [], oe.value = [], q.value = [], A.value = [], _.value = null, y.value.issue = null, y.value.startDate = /* @__PURE__ */ new Date(), y.value.endDate = /* @__PURE__ */ new Date(), y.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 = "", d.value.assignType = null, d.value.department = null, d.value.person = null, d.value.due = /* @__PURE__ */ new Date(), d.value.item = null, d.value.issue = null, d.value.notes = "", u.value.assignType = null, u.value.department = null, u.value.person = null, u.value.due = /* @__PURE__ */ new Date(), u.value.item = null, u.value.notes = "", u.value.when = null, u.value.where = null;
322
322
  }, Ae = async () => {
323
- I("create:callback", r.value), I("toggle", !1);
324
- }, Y = (e) => {
323
+ D("create:callback", r.value), D("toggle", !1);
324
+ }, J = (e) => {
325
325
  const a = [];
326
326
  (Array.isArray(e) ? e : Object.values(e)).forEach((o) => {
327
- const n = o.senderType || o.sender_type, l = o.senderName || "", c = o.senderId || o.sender_id, m = o.profileImg || o.profile_img, f = l ? l.split(" ") : ["", ""], X = o.user_first_name || o.guest_first_name || f[0] || "", Xe = o.user_last_name || o.guest_last_name || f.slice(1).join(" ") || "";
328
- let _ = {
327
+ const n = o.senderType || o.sender_type, l = o.senderName || "", c = o.senderId || o.sender_id, m = o.profileImg || o.profile_img, f = l ? l.split(" ") : ["", ""], z = o.user_first_name || o.guest_first_name || f[0] || "", Xe = o.user_last_name || o.guest_last_name || f.slice(1).join(" ") || "";
328
+ let k = {
329
329
  id: o.id,
330
330
  isPropertyEmployee: n === "user",
331
331
  isSent: !!o.sent,
@@ -333,7 +333,7 @@ const Ot = Ke({
333
333
  message: o.content,
334
334
  timestamp: o.sent || o.created,
335
335
  user: {
336
- firstName: X || "Auto-Reply",
336
+ firstName: z || "Auto-Reply",
337
337
  icon: "",
338
338
  id: c || "system-message",
339
339
  initials: "",
@@ -341,7 +341,7 @@ const Ot = Ke({
341
341
  src: m || ""
342
342
  }
343
343
  };
344
- _.user.firstName && _.user.lastName ? _.user.initials = _.user.firstName[0] + _.user.lastName[0] : _.user.firstName && (_.user.initials = _.user.firstName[0]), _.isSystemMessage && (_.user.icon = "property-fill"), a.push(_);
344
+ k.user.firstName && k.user.lastName ? k.user.initials = k.user.firstName[0] + k.user.lastName[0] : k.user.firstName && (k.user.initials = k.user.firstName[0]), k.isSystemMessage && (k.user.icon = "property-fill"), a.push(k);
345
345
  }), ee.value = a;
346
346
  }, ve = async () => {
347
347
  if (s.showComments && r.value.tokenId)
@@ -354,12 +354,12 @@ const Ot = Ke({
354
354
  })).json();
355
355
  if (t.status === "error")
356
356
  throw new Error(t.message || "Failed to get messages");
357
- N.value = !t.closed, t.messages && t.messages.length > 0 && (O.value = t.messages[t.messages.length - 1].id), Y(t.messages || []);
357
+ N.value = !t.closed, t.messages && t.messages.length > 0 && (O.value = t.messages[t.messages.length - 1].id), J(t.messages || []);
358
358
  } catch (e) {
359
359
  console.error("getChatMessages error:", e);
360
360
  }
361
361
  }, He = (e) => {
362
- const a = y.utc(), t = y.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = a.diff(
362
+ const a = g.utc(), t = g.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = a.diff(
363
363
  t,
364
364
  [
365
365
  "years",
@@ -381,8 +381,8 @@ const Ot = Ke({
381
381
  return f === 1 ? v("HC_ONE_MINUTE_AGO") : v("HC_X_MINUTES_AGO", { minutes: f });
382
382
  if (f === 0)
383
383
  return v("HC_A_MOMENT_AGO");
384
- }, Be = async () => {
385
- s.showGuestDetails && ne(), z(), W(), I("refresh:pms", r.value);
384
+ }, Pe = async () => {
385
+ s.showGuestDetails && ne(), Y(), W(), D("refresh:pms", r.value);
386
386
  }, ne = async () => {
387
387
  try {
388
388
  b.value.pms = !0;
@@ -413,7 +413,7 @@ const Ot = Ke({
413
413
  } catch (e) {
414
414
  return b.value.pms = !1, e;
415
415
  }
416
- }, z = async () => {
416
+ }, Y = async () => {
417
417
  try {
418
418
  b.value.roomNotices = !0;
419
419
  const e = await fetch(
@@ -422,9 +422,9 @@ const Ot = Ke({
422
422
  if (!e.ok)
423
423
  throw new Error(`HTTP error! status: ${e.status}`);
424
424
  const a = await e.json();
425
- $.value = a.notices;
425
+ Q.value = a.notices;
426
426
  } catch (e) {
427
- console.error("Error getting room notices:", e), $.value = [];
427
+ console.error("Error getting room notices:", e), Q.value = [];
428
428
  } finally {
429
429
  b.value.roomNotices = !1;
430
430
  }
@@ -454,23 +454,24 @@ const Ot = Ke({
454
454
  }
455
455
  }, fe = async () => {
456
456
  try {
457
- const e = new FormData();
458
- e.append("funcname", "get_stay_details"), e.append("token_id", r.value.tokenId);
459
- const t = (await G.post(
460
- "/includes/chat_api.php",
461
- e
462
- )).data.result;
463
- if (t !== void 0 && t.error_message)
464
- throw new Error(t.error_message);
465
- t && t.user_name && (p.value.guestName = t.user_name), t && t.cell_phone && (p.value.guestPhone = t.cell_phone), t && t.email && (p.value.guestEmail = t.email), t && t.check_in && (p.value.checkInDate = y.fromISO(
466
- t.check_in
467
- ).toJSDate()), t && t.check_out && (p.value.checkOutDate = y.fromISO(
468
- t.check_out
457
+ const a = await (await fetch(
458
+ `/api/client/connect/getStayDetails.php?tokenId=${r.value.tokenId}`,
459
+ {
460
+ method: "GET",
461
+ credentials: "include"
462
+ }
463
+ )).json();
464
+ if (a.status === "error")
465
+ throw new Error(a.message || "Failed to get stay details");
466
+ a.userName && (p.value.guestName = a.userName), a.cellPhone && (p.value.guestPhone = a.cellPhone), a.email && (p.value.guestEmail = a.email), a.checkIn && (p.value.checkInDate = g.fromISO(
467
+ a.checkIn
468
+ ).toJSDate()), a.checkOut && (p.value.checkOutDate = g.fromISO(
469
+ a.checkOut
469
470
  ).toJSDate());
470
471
  } catch (e) {
471
- console.log(e);
472
+ console.error("getStayDetails error:", e);
472
473
  }
473
- }, Pe = (e) => {
474
+ }, Be = (e) => {
474
475
  switch (e) {
475
476
  case "complaint":
476
477
  return "red-30";
@@ -505,9 +506,9 @@ const Ot = Ke({
505
506
  if (!e.ok)
506
507
  throw new Error(`HTTP error! status: ${e.status}`);
507
508
  const a = await e.json();
508
- D.value = a.tickets;
509
+ I.value = a.tickets;
509
510
  } catch (e) {
510
- console.error("Error getting tickets:", e), D.value = [];
511
+ console.error("Error getting tickets:", e), I.value = [];
511
512
  } finally {
512
513
  b.value.tickets = !1;
513
514
  }
@@ -571,34 +572,34 @@ const Ot = Ke({
571
572
  window.open(a, "_blank");
572
573
  }, Ge = async () => {
573
574
  const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, a = r.value?.qv2Rooms?.qRoomName || r.value?.name || s.room?.name, t = {
574
- type: k.value?.id,
575
+ type: _.value?.id,
575
576
  propertyId: s.propertyId,
576
577
  userId: M.value,
577
578
  areaId: e,
578
579
  areaName: a
579
580
  };
580
- switch (k.value?.id) {
581
+ switch (_.value?.id) {
581
582
  case "complaint":
582
- t.tokenId = r.value.tokenId, t.problemId = p.value.problem.id, t.guestName = p.value.guestName, t.guestPhone = p.value.guestPhone, t.guestEmail = p.value.guestEmail, t.guestLoyalty = p.value.guestLoyalty, t.guestMood = p.value.guestMood.id, t.checkInDate = y.fromJSDate(p.value.checkInDate).toFormat(
583
+ t.tokenId = r.value.tokenId, t.problemId = p.value.problem.id, t.guestName = p.value.guestName, t.guestPhone = p.value.guestPhone, t.guestEmail = p.value.guestEmail, t.guestLoyalty = p.value.guestLoyalty, t.guestMood = p.value.guestMood.id, t.checkInDate = g.fromJSDate(p.value.checkInDate).toFormat(
583
584
  "yyyy-MM-dd"
584
- ), t.notes = p.value.notes, t.inHouse = "2", t.source = "dashboard", I("create:todo", t);
585
+ ), t.notes = p.value.notes, t.inHouse = "2", t.source = "dashboard", D("create:todo", t);
585
586
  break;
586
587
  case "request":
587
- t.itemId = u.value.item.id, t.assignType = u.value.assignType.id, t.occupied = u.value.requestedBy.id, t.notes = u.value.notes, t.dueDate = y.fromJSDate(u.value.due).toFormat("yyyy-MM-dd"), u.value.assignType.id === 1 && (t.department = u.value.department.id), u.value.assignType.id === 2 && (t.person = u.value.person.id), s.allowWhenWhere && (t.requestWhen = u.value.when ? u.value.when.id : "", t.requestWhere = u.value.where ? u.value.where.id : ""), I("create:todo", t);
588
+ t.itemId = u.value.item.id, t.assignType = u.value.assignType.id, t.occupied = u.value.requestedBy.id, t.notes = u.value.notes, t.dueDate = g.fromJSDate(u.value.due).toFormat("yyyy-MM-dd"), u.value.assignType.id === 1 && (t.department = u.value.department.id), u.value.assignType.id === 2 && (t.person = u.value.person.id), s.allowWhenWhere && (t.requestWhen = u.value.when ? u.value.when.id : "", t.requestWhere = u.value.where ? u.value.where.id : ""), D("create:todo", t);
588
589
  break;
589
590
  case "room_notice":
590
- t.issueId = g.value.issue.id, t.startDate = y.fromJSDate(g.value.startDate).toFormat("yyyy-MM-dd"), t.endDate = y.fromJSDate(g.value.endDate).toFormat("yyyy-MM-dd"), t.notes = g.value.notes, t.sendPush = "1", I("create:todo", t);
591
+ t.issueId = y.value.issue.id, t.startDate = g.fromJSDate(y.value.startDate).toFormat("yyyy-MM-dd"), t.endDate = g.fromJSDate(y.value.endDate).toFormat("yyyy-MM-dd"), t.notes = y.value.notes, t.sendPush = "1", D("create:todo", t);
591
592
  break;
592
593
  case "work_order":
593
- t.itemId = d.value.item.id, t.issueId = d.value.issue.id, t.assignType = d.value.assignType.id, t.occupied = d.value.requestedBy.id, t.notes = d.value.notes, t.dueDate = y.fromJSDate(d.value.due).toFormat("yyyy-MM-dd"), d.value.assignType.id === 1 && (t.department = d.value.department.id), d.value.assignType.id === 2 && (t.person = d.value.person.id), I("create:todo", t);
594
+ t.itemId = d.value.item.id, t.issueId = d.value.issue.id, t.assignType = d.value.assignType.id, t.occupied = d.value.requestedBy.id, t.notes = d.value.notes, t.dueDate = g.fromJSDate(d.value.due).toFormat("yyyy-MM-dd"), d.value.assignType.id === 1 && (t.department = d.value.department.id), d.value.assignType.id === 2 && (t.person = d.value.person.id), D("create:todo", t);
594
595
  break;
595
596
  }
596
597
  }, je = (e) => {
597
- ue(), ie(), s.hover && I("toggle", e);
598
+ ue(), ie(), s.hover && D("toggle", e);
598
599
  }, Ue = (e) => {
599
- ye(), T.value = e;
600
+ ge(), T.value = e;
600
601
  }, Qe = async (e) => {
601
- if (console.log("selected:", e), k.value = e, w.value = [], g.value.issue = null, p.value.problem = null, d.value.item = null, d.value.issue = null, u.value.item = null, !k.value)
602
+ if (console.log("selected:", e), _.value = e, w.value = [], y.value.issue = null, p.value.problem = null, d.value.item = null, d.value.issue = null, u.value.item = null, !_.value)
602
603
  return;
603
604
  const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = new FormData();
604
605
  switch (t.append("property_id", s.propertyId), t.append("area_id", a), e.id) {
@@ -610,7 +611,7 @@ const Ot = Ke({
610
611
  body: t
611
612
  })).json();
612
613
  n.items && (w.value = n.items);
613
- const l = await G.post(
614
+ const l = await X.post(
614
615
  "/api/client/common/getComplaintMoods.php"
615
616
  );
616
617
  l.data.items.forEach((c) => {
@@ -633,7 +634,7 @@ const Ot = Ke({
633
634
  break;
634
635
  case "request":
635
636
  try {
636
- u.value.requestedBy = P.value[1], u.value.assignType = j.value[0];
637
+ u.value.requestedBy = B.value[1], u.value.assignType = G.value[0];
637
638
  const n = await (await fetch("/api/client/common/getHousekeepingItemsByPropertyId.php", {
638
639
  method: "POST",
639
640
  body: t
@@ -669,7 +670,7 @@ const Ot = Ke({
669
670
  break;
670
671
  case "work_order":
671
672
  try {
672
- d.value.requestedBy = P.value[0], d.value.assignType = j.value[0];
673
+ d.value.requestedBy = B.value[0], d.value.assignType = G.value[0];
673
674
  const n = await (await fetch("/api/client/common/getItemsByRoomId.php", {
674
675
  method: "POST",
675
676
  body: t
@@ -681,14 +682,14 @@ const Ot = Ke({
681
682
  n.items && (n.items.forEach((m) => {
682
683
  m.section_name !== c.group && (c.group && l.push({ ...c }), c.group = m.section_name, c.options = []), m.label && c.options.push(m);
683
684
  }), c.group && l.push({ ...c })), w.value = l, await Promise.all([
684
- G.post(
685
+ X.post(
685
686
  "/api/client/common/getWorkOrderIssues.php"
686
687
  ),
687
688
  le()
688
689
  ]).then((m) => {
689
690
  const f = m[0];
690
- f.data.issues.forEach((X) => {
691
- X.label = X.display_name;
691
+ f.data.issues.forEach((z) => {
692
+ z.label = z.display_name;
692
693
  }), oe.value = f.data.issues;
693
694
  }), d.value.department = C.value.find(
694
695
  (m) => parseInt(m.id) === 2
@@ -701,8 +702,8 @@ const Ot = Ke({
701
702
  return;
702
703
  }
703
704
  }, $e = () => {
704
- J.value = !J.value, K.value = !1;
705
- }, ge = () => {
705
+ $.value = !$.value, K.value = !1;
706
+ }, ye = () => {
706
707
  const e = document.getElementById("comment-field"), a = document.getElementById("hidden-text");
707
708
  e.style.height = a?.offsetHeight + "px";
708
709
  }, re = () => {
@@ -716,13 +717,13 @@ const Ot = Ke({
716
717
  try {
717
718
  const a = new FormData();
718
719
  a.append("tokenId", r.value.tokenId), a.append("content", T.value), a.append("senderId", M.value || "");
719
- const t = await G.post(
720
+ const t = await X.post(
720
721
  "/api/client/connect/sendMessage.php",
721
722
  a
722
723
  );
723
724
  if (t.data.status === "error")
724
725
  throw new Error(t.data.message || "Failed to send message");
725
- T.value = "", N.value = !t.data.closed, t.data.messages && (Y(t.data.messages), t.data.messages.length > 0 && (O.value = t.data.messages[t.data.messages.length - 1].id)), re();
726
+ T.value = "", N.value = !t.data.closed, t.data.messages && (J(t.data.messages), t.data.messages.length > 0 && (O.value = t.data.messages[t.data.messages.length - 1].id)), re();
726
727
  } catch (a) {
727
728
  console.error("sendChatMessage error:", a);
728
729
  }
@@ -731,17 +732,17 @@ const Ot = Ke({
731
732
  try {
732
733
  const e = N.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php", a = new FormData();
733
734
  a.append("tokenId", r.value.tokenId), a.append("userId", M.value), N.value && O.value !== null && a.append("lastMsgId", O.value.toString());
734
- const t = await G.post(e, a);
735
+ const t = await X.post(e, a);
735
736
  if (t.data.status === "error")
736
737
  throw new Error(t.data.message || "Failed to update conversation status");
737
- N.value = !t.data.closed, t.data.messages && (Y(t.data.messages), t.data.messages.length > 0 && (O.value = t.data.messages[t.data.messages.length - 1].id));
738
+ N.value = !t.data.closed, t.data.messages && (J(t.data.messages), t.data.messages.length > 0 && (O.value = t.data.messages[t.data.messages.length - 1].id));
738
739
  } catch (e) {
739
740
  console.error("toggleMarkOpenClose error:", e);
740
741
  }
741
742
  }, ue = () => {
742
743
  if (s.align === "left" || s.align === "right") {
743
744
  const e = x.value?.getBoundingClientRect().left, a = window.innerWidth;
744
- V.value = a - e < B.value ? "right" : "left";
745
+ V.value = a - e < P.value ? "right" : "left";
745
746
  } else {
746
747
  const e = x.value?.getBoundingClientRect().top, a = window.innerHeight;
747
748
  V.value = a - e < H.value ? "bottom" : "top";
@@ -752,15 +753,15 @@ const Ot = Ke({
752
753
  ae.value = a - e < H.value ? "top" : "bottom";
753
754
  } else {
754
755
  const e = x.value?.getBoundingClientRect().left, a = window.innerWidth;
755
- ae.value = a - e < B.value ? "left" : "right";
756
+ ae.value = a - e < P.value ? "left" : "right";
756
757
  }
757
- }, ye = () => {
758
- S.value = !S.value, S.value ? (T.value = "", E.value.info = U.value, E.value.tickets = Q.value, E.value.comments = Z.value, U.value = !1, Q.value = !1, document.getElementById("comment-field")?.focus()) : (U.value = E.value.info, Q.value = E.value.tickets, Z.value = E.value.comments);
758
+ }, ge = () => {
759
+ S.value = !S.value, S.value ? (T.value = "", E.value.info = j.value, E.value.tickets = U.value, E.value.comments = Z.value, j.value = !1, U.value = !1, document.getElementById("comment-field")?.focus()) : (j.value = E.value.info, U.value = E.value.tickets, Z.value = E.value.comments);
759
760
  }, ze = async (e, a) => {
760
761
  const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = new FormData();
761
- if (o.append("property_id", s.propertyId), o.append("room_ids", JSON.stringify([t])), await W(), D.value) {
762
+ if (o.append("property_id", s.propertyId), o.append("room_ids", JSON.stringify([t])), await W(), I.value) {
762
763
  const n = [];
763
- D.value.forEach((l) => {
764
+ I.value.forEach((l) => {
764
765
  l.id === e && l.type === a ? n.unshift({
765
766
  ...l,
766
767
  isNew: !0
@@ -768,7 +769,7 @@ const Ot = Ke({
768
769
  ...l,
769
770
  isNew: !1
770
771
  });
771
- }), n.sort((l, c) => l.id === e ? -1 : c.id === e ? 1 : 0), D.value = [...n];
772
+ }), n.sort((l, c) => l.id === e ? -1 : c.id === e ? 1 : 0), I.value = [...n];
772
773
  }
773
774
  };
774
775
  return F(() => s.open, () => {
@@ -778,42 +779,42 @@ const Ot = Ke({
778
779
  }
779
780
  s.open || pe();
780
781
  }), F(T, () => {
781
- const e = setTimeout(ge, 100);
782
+ const e = setTimeout(ye, 100);
782
783
  L.value.push(e);
783
784
  }), F(() => s.allowWhenWhere, (e, a) => {
784
785
  a === !0 && e === !1 && (u.value.when = null, u.value.where = null, q.value = [], A.value = []);
785
786
  }), F(() => s.open, async (e, a) => {
786
- e && !a && (s.showGuestDetails && !R.value ? await ne() : r.value || (r.value = s.room), W(), z(), s.showComments && ve());
787
+ e && !a && (s.showGuestDetails && !R.value ? await ne() : r.value || (r.value = s.room), W(), Y(), s.showComments && ve());
787
788
  }), F(
788
789
  () => s.room.id,
789
790
  (e, a) => {
790
- e !== a && (R.value ? (r.value = R.value.find((t) => t.qv2Rooms.qRoomId === s.room.id), r.value || (r.value = s.room)) : r.value = s.room, s.open && (W(), z()));
791
+ e !== a && (R.value ? (r.value = R.value.find((t) => t.qv2Rooms.qRoomId === s.room.id), r.value || (r.value = s.room)) : r.value = s.room, s.open && (W(), Y()));
791
792
  }
792
793
  ), Ve(async () => {
793
794
  const e = JSON.parse(
794
795
  window.localStorage.getItem("authenticated")
795
796
  );
796
- M.value = e?.user?.id || "", console.log("userId:", M.value), r.value = s.room, s.size === "sm" && (H.value = 140, B.value = 160), s.size === "lg" && (H.value = 250, B.value = 440), ue(), ie();
797
+ M.value = e?.user?.id || "", console.log("userId:", M.value), r.value = s.room, s.size === "sm" && (H.value = 140, P.value = 160), s.size === "lg" && (H.value = 250, P.value = 440), ue(), ie();
797
798
  }), Ze(() => {
798
799
  L.value.forEach((e) => {
799
800
  clearTimeout(e);
800
801
  });
801
802
  }), {
802
- DateTime: y,
803
+ DateTime: g,
803
804
  // Refs
804
805
  actionMenuOpen: K,
805
806
  alignment: V,
806
- assignTypes: j,
807
+ assignTypes: G,
807
808
  comment: T,
808
809
  complaint: p,
809
810
  componentHeight: H,
810
- componentWidth: B,
811
+ componentWidth: P,
811
812
  departments: C,
812
813
  departmentUsers: ce,
813
814
  expandComments: Z,
814
- expandGuestInfo: U,
815
+ expandGuestInfo: j,
815
816
  expandedStates: E,
816
- expandTickets: Q,
817
+ expandTickets: U,
817
818
  guestDetailsData: we,
818
819
  itemOptions: w,
819
820
  loading: b,
@@ -823,15 +824,15 @@ const Ot = Ke({
823
824
  positioning: ae,
824
825
  quickReplyOpen: S,
825
826
  request: u,
826
- requestedByOptions: P,
827
- requestLoading: _e,
828
- requestType: k,
827
+ requestedByOptions: B,
828
+ requestLoading: ke,
829
+ requestType: _,
829
830
  roomDetailsData: r,
830
- roomNotice: g,
831
- roomNotices: $,
832
- showCreateRequest: J,
833
- ticketsList: D,
834
- todoOptions: ke,
831
+ roomNotice: y,
832
+ roomNotices: Q,
833
+ showCreateRequest: $,
834
+ ticketsList: I,
835
+ todoOptions: _e,
835
836
  trigger: x,
836
837
  userId: M,
837
838
  workOrder: d,
@@ -843,8 +844,8 @@ const Ot = Ke({
843
844
  lastMessageId: O,
844
845
  // Computed
845
846
  cleanliness: se,
846
- cleanlinessColor: De,
847
- cleanlinessTooltipContent: Ie,
847
+ cleanlinessColor: Ie,
848
+ cleanlinessTooltipContent: De,
848
849
  filteredReplies: Te,
849
850
  hasGuestCallback: be,
850
851
  hasComplaint: de,
@@ -860,14 +861,14 @@ const Ot = Ke({
860
861
  // Methods
861
862
  closeRequest: pe,
862
863
  createCallback: Ae,
863
- createMessageList: Y,
864
+ createMessageList: J,
864
865
  getChatMessages: ve,
865
866
  getHowLongAgo: He,
866
867
  getPMSData: ne,
867
- getRoomNotices: z,
868
+ getRoomNotices: Y,
868
869
  getSharedData: le,
869
870
  getStayDetails: fe,
870
- getTicketColor: Pe,
871
+ getTicketColor: Be,
871
872
  getTicketIcon: Le,
872
873
  getTickets: W,
873
874
  handleFailedResponse: he,
@@ -879,14 +880,14 @@ const Ot = Ke({
879
880
  onSelectQuickReply: Ue,
880
881
  onSelectToDo: Qe,
881
882
  openRequest: $e,
882
- refreshPMSData: Be,
883
- resizeTextarea: ge,
883
+ refreshPMSData: Pe,
884
+ resizeTextarea: ye,
884
885
  scrollToConnectBottom: re,
885
886
  sendChatMessage: Je,
886
887
  setAlignment: ue,
887
888
  setPositioning: ie,
888
889
  toggleMarkOpenClose: Ye,
889
- toggleQuickReply: ye,
890
+ toggleQuickReply: ge,
890
891
  updateTickets: ze
891
892
  };
892
893
  }
package/dist/index142.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as L, ref as n, computed as a, watch as g, nextTick as i } from "vue";
2
- import { Multiselect as x } from "./index188.js";
2
+ import { Multiselect as x } from "./index186.js";
3
3
  import { useI18n as P } from "vue-i18n";
4
4
  /* empty css */
5
5
  import H from "./index6.js";
package/dist/index175.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { createVNode as s, ref as k, watchEffect as Y, onMounted as me, watch as nt, computed as A, toRef as at, inject as ge, shallowRef as lt, defineComponent as ot, provide as ye, onUnmounted as rt, isVNode as st, Teleport as it, Transition as ut, createElementBlock as be, openBlock as we, createElementVNode as Z, h as Ye } from "vue";
2
- import { format as Ce } from "./index271.js";
3
- import { parse as ct } from "./index272.js";
4
- import { getWeek as Ie } from "./index273.js";
5
- import dt from "./index274.js";
2
+ import { format as Ce } from "./index250.js";
3
+ import { parse as ct } from "./index251.js";
4
+ import { getWeek as Ie } from "./index252.js";
5
+ import dt from "./index253.js";
6
6
  var ft = Object.defineProperty, pt = Object.defineProperties, vt = Object.getOwnPropertyDescriptors, le = Object.getOwnPropertySymbols, Ue = Object.prototype.hasOwnProperty, Fe = Object.prototype.propertyIsEnumerable, Se = (t, e, n) => e in t ? ft(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, M = (t, e) => {
7
7
  for (var n in e || (e = {}))
8
8
  Ue.call(e, n) && Se(t, n, e[n]);