@quoreadmin/ui 1.6.7 → 1.6.8

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 (290) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index102.js +2 -2
  3. package/dist/index109.js +1 -1
  4. package/dist/index113.js +2 -2
  5. package/dist/index117.js +3 -3
  6. package/dist/index129.js +1 -1
  7. package/dist/index131.js +116 -59
  8. package/dist/{index139.js → index140.js} +217 -208
  9. package/dist/{index141.js → index142.js} +1 -1
  10. package/dist/{index143.js → index144.js} +6 -6
  11. package/dist/{index151.js → index152.js} +1 -1
  12. package/dist/{index153.js → index154.js} +1 -1
  13. package/dist/{index157.js → index158.js} +9 -9
  14. package/dist/index161.js +111 -492
  15. package/dist/index162.js +471 -5498
  16. package/dist/index163.js +5511 -80
  17. package/dist/index164.js +86 -856
  18. package/dist/index165.js +844 -21
  19. package/dist/index166.js +23 -265
  20. package/dist/index167.js +256 -126
  21. package/dist/index168.js +146 -1195
  22. package/dist/index169.js +1139 -712
  23. package/dist/index170.js +704 -1240
  24. package/dist/index171.js +1280 -248
  25. package/dist/index172.js +266 -96
  26. package/dist/index173.js +106 -2
  27. package/dist/index174.js +2 -1376
  28. package/dist/index175.js +1378 -0
  29. package/dist/index177.js +12 -12
  30. package/dist/index178.js +10 -10
  31. package/dist/index179.js +12 -12
  32. package/dist/index180.js +14 -21
  33. package/dist/index181.js +23 -757
  34. package/dist/index182.js +759 -1100
  35. package/dist/index183.js +1117 -1234
  36. package/dist/index184.js +1205 -11248
  37. package/dist/index185.js +11277 -36
  38. package/dist/index186.js +36 -44
  39. package/dist/index187.js +42 -1188
  40. package/dist/index188.js +1192 -0
  41. package/dist/index190.js +5830 -99
  42. package/dist/index191.js +188 -16
  43. package/dist/index192.js +25 -8
  44. package/dist/index193.js +16 -76
  45. package/dist/index194.js +74 -249
  46. package/dist/index195.js +229 -13660
  47. package/dist/index196.js +13684 -27
  48. package/dist/index197.js +26 -62
  49. package/dist/index198.js +40 -215
  50. package/dist/index199.js +206 -276
  51. package/dist/index200.js +278 -258
  52. package/dist/index201.js +287 -32
  53. package/dist/index202.js +81 -109
  54. package/dist/index203.js +404 -33
  55. package/dist/index204.js +22 -26
  56. package/dist/index205.js +30 -33
  57. package/dist/index206.js +116 -9
  58. package/dist/index207.js +35 -18
  59. package/dist/index208.js +26 -10
  60. package/dist/index209.js +36 -10
  61. package/dist/index210.js +9 -51
  62. package/dist/index211.js +18 -42
  63. package/dist/index212.js +10 -4
  64. package/dist/index213.js +10 -39
  65. package/dist/index214.js +51 -21
  66. package/dist/index215.js +40 -85
  67. package/dist/index216.js +3 -406
  68. package/dist/index217.js +39 -22
  69. package/dist/index218.js +21 -161
  70. package/dist/index219.js +126 -19
  71. package/dist/index220.js +37 -19
  72. package/dist/index221.js +80 -22
  73. package/dist/index222.js +19 -198
  74. package/dist/index223.js +18 -68
  75. package/dist/index224.js +20 -34
  76. package/dist/index225.js +19 -39
  77. package/dist/index226.js +12 -14
  78. package/dist/index227.js +160 -21
  79. package/dist/index228.js +9 -9
  80. package/dist/index229.js +22 -836
  81. package/dist/index230.js +158 -661
  82. package/dist/index231.js +67 -173
  83. package/dist/index232.js +34 -20
  84. package/dist/index233.js +39 -19
  85. package/dist/index234.js +6 -6
  86. package/dist/index235.js +14 -12
  87. package/dist/index236.js +10 -10
  88. package/dist/index237.js +836 -3
  89. package/dist/index238.js +640 -125
  90. package/dist/index239.js +172 -129
  91. package/dist/index240.js +22 -1223
  92. package/dist/index241.js +19 -126
  93. package/dist/index242.js +9 -9
  94. package/dist/index243.js +3 -22
  95. package/dist/index244.js +186 -21
  96. package/dist/index245.js +118 -23
  97. package/dist/index246.js +1223 -29
  98. package/dist/index247.js +12 -12
  99. package/dist/index248.js +15 -13
  100. package/dist/index249.js +22 -2
  101. package/dist/index250.js +29 -2
  102. package/dist/index251.js +20 -3632
  103. package/dist/index252.js +20 -55
  104. package/dist/index253.js +2 -77
  105. package/dist/index254.js +2 -52
  106. package/dist/index255.js +3599 -182
  107. package/dist/index256.js +53 -8
  108. package/dist/index257.js +60 -40
  109. package/dist/index258.js +35 -44
  110. package/dist/index259.js +193 -32
  111. package/dist/index260.js +9 -74
  112. package/dist/index261.js +38 -704
  113. package/dist/index262.js +44 -22
  114. package/dist/index263.js +36 -46
  115. package/dist/index264.js +74 -10
  116. package/dist/index265.js +698 -680
  117. package/dist/index266.js +37 -818
  118. package/dist/index267.js +63 -160
  119. package/dist/index268.js +10 -227
  120. package/dist/index269.js +704 -36
  121. package/dist/index270.js +819 -9
  122. package/dist/index271.js +161 -80
  123. package/dist/index272.js +228 -20
  124. package/dist/index273.js +36 -19
  125. package/dist/index274.js +9 -252
  126. package/dist/index275.js +253 -8
  127. package/dist/index276.js +8 -138
  128. package/dist/index277.js +123 -68
  129. package/dist/index278.js +79 -50
  130. package/dist/index279.js +2 -79
  131. package/dist/index280.js +78 -25
  132. package/dist/index281.js +3 -22
  133. package/dist/index282.js +26 -21
  134. package/dist/index283.js +52 -14
  135. package/dist/index284.js +26 -17
  136. package/dist/index285.js +22 -23
  137. package/dist/index286.js +22 -1518
  138. package/dist/index287.js +16 -386
  139. package/dist/index288.js +17 -2731
  140. package/dist/index289.js +22 -85
  141. package/dist/index290.js +1276 -3528
  142. package/dist/index291.js +379 -53
  143. package/dist/index292.js +2730 -14
  144. package/dist/index293.js +82 -80
  145. package/dist/index294.js +3722 -154
  146. package/dist/index295.js +54 -240
  147. package/dist/index296.js +1 -1
  148. package/dist/index297.js +1 -1
  149. package/dist/index298.js +7 -7
  150. package/dist/index299.js +1 -1
  151. package/dist/index300.js +1 -1
  152. package/dist/index301.js +1 -1
  153. package/dist/index302.js +1 -1
  154. package/dist/index303.js +1 -1
  155. package/dist/index304.js +1 -1
  156. package/dist/index305.js +1 -1
  157. package/dist/index306.js +1 -1
  158. package/dist/index307.js +1 -1
  159. package/dist/index308.js +15 -2
  160. package/dist/index309.js +84 -3
  161. package/dist/index310.js +197 -22
  162. package/dist/index311.js +230 -219
  163. package/dist/index312.js +233 -4
  164. package/dist/index313.js +5 -133
  165. package/dist/index314.js +129 -63
  166. package/dist/index315.js +67 -86
  167. package/dist/index316.js +85 -27
  168. package/dist/index317.js +28 -8
  169. package/dist/index318.js +8 -74
  170. package/dist/index319.js +74 -3
  171. package/dist/index320.js +4 -2
  172. package/dist/index321.js +2 -83
  173. package/dist/index322.js +81 -52
  174. package/dist/index323.js +53 -5
  175. package/dist/index324.js +5 -4
  176. package/dist/index325.js +4 -178
  177. package/dist/index326.js +174 -58
  178. package/dist/index327.js +61 -73
  179. package/dist/index328.js +74 -36
  180. package/dist/index329.js +36 -19
  181. package/dist/index330.js +8 -19
  182. package/dist/index331.js +12 -63
  183. package/dist/index332.js +54 -36
  184. package/dist/index333.js +11 -8
  185. package/dist/index334.js +13 -12
  186. package/dist/index335.js +52 -49
  187. package/dist/index336.js +49 -9
  188. package/dist/index337.js +27 -10
  189. package/dist/index338.js +2 -58
  190. package/dist/index339.js +5 -52
  191. package/dist/index340.js +2 -31
  192. package/dist/index341.js +23 -2
  193. package/dist/index342.js +40 -4
  194. package/dist/index343.js +2 -2
  195. package/dist/index344.js +10 -22
  196. package/dist/index345.js +17 -38
  197. package/dist/index346.js +17 -2
  198. package/dist/index347.js +9 -10
  199. package/dist/index348.js +10 -20
  200. package/dist/index349.js +2 -17
  201. package/dist/index350.js +8 -9
  202. package/dist/index351.js +10 -10
  203. package/dist/index352.js +14 -2
  204. package/dist/index353.js +20 -9
  205. package/dist/index354.js +19 -9
  206. package/dist/index355.js +64 -14
  207. package/dist/index356.js +36 -20
  208. package/dist/index357.js +19 -54
  209. package/dist/index358.js +55 -28
  210. package/dist/index359.js +27 -5
  211. package/dist/index360.js +6 -51
  212. package/dist/index361.js +51 -5
  213. package/dist/index362.js +6 -12
  214. package/dist/index363.js +12 -7
  215. package/dist/index364.js +6 -27
  216. package/dist/index365.js +28 -2
  217. package/dist/index366.js +2 -70
  218. package/dist/index367.js +67 -164
  219. package/dist/index368.js +165 -99
  220. package/dist/index369.js +100 -90
  221. package/dist/index370.js +91 -98
  222. package/dist/index371.js +1 -1
  223. package/dist/index372.js +97 -30
  224. package/dist/index373.js +30 -10
  225. package/dist/index374.js +10 -3
  226. package/dist/index375.js +3 -3
  227. package/dist/index376.js +4 -13
  228. package/dist/index377.js +13 -7
  229. package/dist/index378.js +7 -12
  230. package/dist/index379.js +11 -4
  231. package/dist/index380.js +5 -33
  232. package/dist/index381.js +33 -31
  233. package/dist/index382.js +29 -26
  234. package/dist/index383.js +26 -59
  235. package/dist/index384.js +61 -3
  236. package/dist/index385.js +3 -2
  237. package/dist/index386.js +2 -2
  238. package/dist/index387.js +2 -17
  239. package/dist/index388.js +15 -11
  240. package/dist/index389.js +13 -6
  241. package/dist/index39.js +44 -14
  242. package/dist/index390.js +6 -32
  243. package/dist/index391.js +34 -0
  244. package/dist/index40.js +1 -1
  245. package/dist/index41.js +1 -1
  246. package/dist/index42.js +1 -1
  247. package/dist/index43.js +72 -49
  248. package/dist/index44.js +1 -1
  249. package/dist/index45.js +1 -1
  250. package/dist/index46.js +1 -1
  251. package/dist/index47.js +2 -2
  252. package/dist/index48.js +2 -2
  253. package/dist/index49.js +1 -1
  254. package/dist/index50.js +1 -1
  255. package/dist/index51.js +1 -1
  256. package/dist/index52.js +1 -1
  257. package/dist/index54.js +2 -2
  258. package/dist/index56.js +1 -1
  259. package/dist/index58.js +5 -5
  260. package/dist/index59.js +1 -1
  261. package/dist/index71.js +2 -2
  262. package/dist/index75.js +1 -1
  263. package/dist/index80.js +1 -1
  264. package/dist/index85.js +1 -1
  265. package/dist/index87.js +3 -3
  266. package/dist/index89.js +2 -2
  267. package/dist/index95.js +2 -2
  268. package/dist/src/components/comment/comment.d.ts +32 -0
  269. package/dist/src/components/comment/comment.stories.d.ts +32 -0
  270. package/dist/src/components/comment-section/comment-section.d.ts +32 -0
  271. package/dist/src/components/comment-section/comment-section.stories.d.ts +32 -0
  272. package/dist/src/components/data-filter/data-filter.d.ts +32 -0
  273. package/dist/src/components/data-list/data-list.d.ts +32 -0
  274. package/dist/src/components/grid/grid.stories.d.ts +64 -0
  275. package/dist/src/components/popover/popover.d.ts +36 -0
  276. package/dist/src/components/popover/popover.stories.d.ts +128 -0
  277. package/dist/src/components/room-details-popover/room-details-popover.d.ts +106 -4
  278. package/dist/src/views/lists.vue.d.ts +64 -0
  279. package/dist/src/views/tables.vue.d.ts +32 -0
  280. package/package.json +1 -1
  281. package/dist/index160.js +0 -116
  282. package/dist/index176.js +0 -20
  283. package/dist/index189.js +0 -5940
  284. /package/dist/{index133.js → index134.js} +0 -0
  285. /package/dist/{index135.js → index136.js} +0 -0
  286. /package/dist/{index137.js → index138.js} +0 -0
  287. /package/dist/{index145.js → index146.js} +0 -0
  288. /package/dist/{index147.js → index148.js} +0 -0
  289. /package/dist/{index149.js → index150.js} +0 -0
  290. /package/dist/{index155.js → index156.js} +0 -0
@@ -1,31 +1,31 @@
1
- import { defineComponent as Ve, ref as i, computed as h, watch as F, onMounted as Ze, onUnmounted as et } from "vue";
2
- import { useI18n as tt } from "vue-i18n";
3
- import { DateTime as y } from "./index162.js";
4
- import "./index185.js";
5
- import at from "./index2.js";
6
- import ot from "./index3.js";
7
- import st from "./index13.js";
8
- import nt from "./index21.js";
9
- import rt from "./index28.js";
1
+ import { defineComponent as Ke, ref as i, computed as h, watch as F, onMounted as Ve, onUnmounted as Ze } from "vue";
2
+ import { useI18n as et } from "vue-i18n";
3
+ import { DateTime as y } from "./index163.js";
4
+ import "./index186.js";
5
+ import tt from "./index2.js";
6
+ import at from "./index3.js";
7
+ import ot from "./index13.js";
8
+ import st from "./index21.js";
9
+ import nt from "./index28.js";
10
10
  import lt from "./index39.js";
11
- import ut from "./index20.js";
12
- import it from "./index46.js";
13
- import ct from "./index47.js";
14
- import dt from "./index49.js";
15
- import G from "./index186.js";
16
- const Ct = Ve({
11
+ import rt from "./index20.js";
12
+ import ut from "./index46.js";
13
+ import it from "./index47.js";
14
+ import ct from "./index49.js";
15
+ import G from "./index187.js";
16
+ const Ot = Ke({
17
17
  name: "QRoomDetailsPopover",
18
18
  components: {
19
- QAccordion: at,
20
- QActivityItem: ot,
21
- QCommentSection: st,
22
- QDatePicker: ut,
23
- QDivider: nt,
24
- QIcon: rt,
19
+ QAccordion: tt,
20
+ QActivityItem: at,
21
+ QCommentSection: ot,
22
+ QDatePicker: rt,
23
+ QDivider: st,
24
+ QIcon: nt,
25
25
  QPopover: lt,
26
- QTag: it,
27
- QTextarea: ct,
28
- QTooltip: dt
26
+ QTag: ut,
27
+ QTextarea: it,
28
+ QTooltip: ct
29
29
  },
30
30
  props: {
31
31
  id: {
@@ -123,11 +123,25 @@ const Ct = Ve({
123
123
  allowWhenWhere: {
124
124
  type: Boolean,
125
125
  default: !1
126
+ },
127
+ quickReplies: {
128
+ type: Array,
129
+ default: () => []
130
+ },
131
+ /** Set if the popover is teleported to the body (escapes overflow clipping) */
132
+ teleport: {
133
+ type: Boolean,
134
+ default: !1
135
+ },
136
+ /** Target element for teleport */
137
+ teleportTo: {
138
+ type: String,
139
+ default: "body"
126
140
  }
127
141
  },
128
142
  emits: ["create:callback", "create:todo", "refresh:pms", "toggle"],
129
143
  setup(s, { emit: I }) {
130
- const { t: v } = tt(), l = i(null), K = i(!1), V = i("left"), j = i([
144
+ const { t: v } = et(), r = i(null), K = i(!1), V = i("left"), j = i([
131
145
  {
132
146
  id: 1,
133
147
  label: v("HC_DEPARTMENT")
@@ -151,19 +165,19 @@ const Ct = Ve({
151
165
  guestMood: null,
152
166
  guestName: "",
153
167
  guestPhone: "",
154
- inHouse: !!l.value?.tokenId || !1,
168
+ inHouse: !!r.value?.tokenId || !1,
155
169
  problem: null,
156
170
  notes: "",
157
- tokenId: l.value?.tokenId
158
- }), H = i(250), P = i(290), C = i([]), de = i([]), Z = i(!0), U = i(!0), E = i({
171
+ tokenId: r.value?.tokenId
172
+ }), H = i(250), B = i(290), C = i([]), ce = i([]), Z = i(!0), U = i(!0), E = i({
159
173
  info: !0,
160
174
  tickets: !0,
161
175
  comments: !0
162
- }), Q = i(!0), _e = i(s.guestDetails), w = i([]), b = i({
176
+ }), Q = i(!0), we = i(s.guestDetails), w = i([]), b = i({
163
177
  pms: !1,
164
178
  roomNotices: !1,
165
179
  tickets: !1
166
- }), ee = i([]), te = i([]), ae = i("bottom"), M = i(null), oe = i([]), R = i(!1), S = i(!1), O = i(null), u = i({
180
+ }), ee = i([]), te = i([]), ae = i("bottom"), R = i(null), S = i(!1), N = i(!1), O = i(null), u = i({
167
181
  assignType: null,
168
182
  department: null,
169
183
  due: /* @__PURE__ */ new Date(),
@@ -173,7 +187,7 @@ const Ct = Ve({
173
187
  requestedBy: null,
174
188
  when: null,
175
189
  where: null
176
- }), B = i([
190
+ }), P = i([
177
191
  {
178
192
  id: 0,
179
193
  label: v("HC_STAFF_MEMBER")
@@ -184,12 +198,12 @@ const Ct = Ve({
184
198
  label: v("HC_HOTEL_GUEST")
185
199
  // need to localize
186
200
  }
187
- ]), ke = i(!1), k = i(null), g = i({
201
+ ]), _e = i(!1), k = i(null), g = i({
188
202
  endDate: /* @__PURE__ */ new Date(),
189
203
  issue: null,
190
204
  notes: "",
191
205
  startDate: /* @__PURE__ */ new Date()
192
- }), $ = i([]), J = i(!1), D = i([]), L = i([]), De = i([
206
+ }), $ = i([]), J = i(!1), D = i([]), L = i([]), ke = i([
193
207
  {
194
208
  label: v("HC_COMPLAINT"),
195
209
  id: "complaint"
@@ -206,7 +220,7 @@ const Ct = Ve({
206
220
  label: v("HC_WORK_ORDER"),
207
221
  id: "work_order"
208
222
  }
209
- ]), x = i(), N = i(null), d = i({
223
+ ]), x = i(), M = i(null), d = i({
210
224
  assignType: null,
211
225
  department: null,
212
226
  due: /* @__PURE__ */ new Date(),
@@ -215,8 +229,8 @@ const Ct = Ve({
215
229
  notes: "",
216
230
  person: null,
217
231
  requestedBy: null
218
- }), se = i([]), q = i([]), A = i([]), ne = h(() => {
219
- switch (l.value.cleaning?.name) {
232
+ }), oe = i([]), q = i([]), A = i([]), se = h(() => {
233
+ switch (r.value.cleaning?.name) {
220
234
  case "CLEAN":
221
235
  case "INSPECTED":
222
236
  return "CLEAN";
@@ -228,14 +242,14 @@ const Ct = Ve({
228
242
  default:
229
243
  return "";
230
244
  }
231
- }), Ie = h(() => ne.value === "CLEAN" ? "blue-10" : ne.value === "DIRTY" ? "red-10" : "gray-30"), Te = h(() => v(`HC_${l.value.cleaning?.name}`) || ""), be = h(() => {
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(() => {
232
246
  const e = T.value.toLowerCase();
233
- return oe.value.filter((a) => a.toLowerCase().match(e));
234
- }), me = h(() => D.value.length ? !!D.value.find(
247
+ return s.quickReplies.filter((a) => a.toLowerCase().match(e));
248
+ }), de = h(() => D.value.length ? !!D.value.find(
235
249
  (a) => a.type === "complaint"
236
- ) : !1), Oe = h(() => D.value.length ? !!D.value.find(
250
+ ) : !1), be = h(() => D.value.length ? !!D.value.find(
237
251
  (a) => a.type === "callback"
238
- ) : !1), Ce = h(() => {
252
+ ) : !1), Oe = h(() => {
239
253
  let e = [];
240
254
  return w.value[0] && w.value[0].options === void 0 ? w.value.forEach((a) => {
241
255
  e.push({
@@ -243,7 +257,7 @@ const Ct = Ve({
243
257
  label: a.display_name
244
258
  });
245
259
  }) : e = w.value, e;
246
- }), pe = h(() => l.value.occupancy?.name === "OCCUPIED"), Ee = h(() => pe.value && me.value ? "HK_ROOM_STATUS_Occupied_Complaint" : "HK_ROOM_STATUS_Occupied"), Me = h(() => {
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(() => {
247
261
  switch (k.value?.id) {
248
262
  case "request":
249
263
  case "work_order":
@@ -251,7 +265,7 @@ const Ct = Ve({
251
265
  default:
252
266
  return null;
253
267
  }
254
- }), Re = h(() => {
268
+ }), Me = h(() => {
255
269
  if (C.value)
256
270
  switch (k.value?.id) {
257
271
  case "request":
@@ -262,30 +276,30 @@ const Ct = Ve({
262
276
  return null;
263
277
  }
264
278
  return null;
265
- }), Se = h(() => {
279
+ }), Re = h(() => {
266
280
  switch (k.value?.id) {
267
281
  case "request":
268
- return B.value[1];
282
+ return P.value[1];
269
283
  case "work_order":
270
- return B.value[0];
284
+ return P.value[0];
271
285
  default:
272
286
  return null;
273
287
  }
274
- }), Ne = h(() => {
288
+ }), Se = h(() => {
275
289
  let e = "";
276
- if (l.value && l.value.reservations[0]) {
290
+ if (r.value && r.value.reservations[0]) {
277
291
  const a = y.fromISO(
278
- l.value.reservations[0].arrivalDate
279
- ), t = a.toFormat("MMM"), o = a.day, n = a.year, r = y.fromISO(
280
- l.value.reservations[0].departureDate
281
- ), c = r.toFormat("MMM"), m = r.day, f = r.year;
292
+ r.value.reservations[0].arrivalDate
293
+ ), t = a.toFormat("MMM"), o = a.day, n = a.year, l = y.fromISO(
294
+ r.value.reservations[0].departureDate
295
+ ), c = l.toFormat("MMM"), m = l.day, f = l.year;
282
296
  e += t + " " + o, n !== f && (e += ", " + n), t === c ? e += "-" + m : e += " - " + c + " " + m, e += ", " + f;
283
297
  }
284
298
  return e;
285
- }), qe = h(() => {
299
+ }), Ne = h(() => {
286
300
  let e = $.value;
287
301
  return e = [...new Set(e)], e;
288
- }), Ae = h(() => {
302
+ }), qe = h(() => {
289
303
  const e = k.value?.id;
290
304
  if (!e)
291
305
  return !1;
@@ -303,14 +317,14 @@ const Ct = Ve({
303
317
  default:
304
318
  return !1;
305
319
  }
306
- }), ve = () => {
307
- J.value = !1, R.value = !1, K.value = !1, w.value = [], te.value = [], se.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;
308
- }, He = async () => {
309
- I("create:callback", l.value), I("toggle", !1);
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;
322
+ }, Ae = async () => {
323
+ I("create:callback", r.value), I("toggle", !1);
310
324
  }, Y = (e) => {
311
325
  const a = [];
312
326
  (Array.isArray(e) ? e : Object.values(e)).forEach((o) => {
313
- const n = o.senderType || o.sender_type, r = o.senderName || "", c = o.senderId || o.sender_id, m = o.profileImg || o.profile_img, f = r ? r.split(" ") : ["", ""], X = o.user_first_name || o.guest_first_name || f[0] || "", Ke = o.user_last_name || o.guest_last_name || f.slice(1).join(" ") || "";
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(" ") || "";
314
328
  let _ = {
315
329
  id: o.id,
316
330
  isPropertyEmployee: n === "user",
@@ -323,16 +337,16 @@ const Ct = Ve({
323
337
  icon: "",
324
338
  id: c || "system-message",
325
339
  initials: "",
326
- lastName: Ke || "",
340
+ lastName: Xe || "",
327
341
  src: m || ""
328
342
  }
329
343
  };
330
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(_);
331
345
  }), ee.value = a;
332
- }, fe = async () => {
333
- if (s.showComments && l.value.tokenId)
346
+ }, ve = async () => {
347
+ if (s.showComments && r.value.tokenId)
334
348
  try {
335
- let e = `/api/client/connect/getMessages.php?tokenId=${l.value.tokenId}`;
349
+ let e = `/api/client/connect/getMessages.php?tokenId=${r.value.tokenId}`;
336
350
  O.value !== null && (e += `&lastMsgId=${O.value}`);
337
351
  const t = await (await fetch(e, {
338
352
  method: "GET",
@@ -340,11 +354,11 @@ const Ct = Ve({
340
354
  })).json();
341
355
  if (t.status === "error")
342
356
  throw new Error(t.message || "Failed to get messages");
343
- S.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), Y(t.messages || []);
344
358
  } catch (e) {
345
359
  console.error("getChatMessages error:", e);
346
360
  }
347
- }, Pe = (e) => {
361
+ }, He = (e) => {
348
362
  const a = y.utc(), t = y.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = a.diff(
349
363
  t,
350
364
  [
@@ -354,11 +368,11 @@ const Ct = Ve({
354
368
  "hours",
355
369
  "minutes"
356
370
  ]
357
- ), n = Math.floor(o.years), r = Math.floor(o.months), c = Math.floor(o.days), m = Math.floor(o.hours), f = Math.floor(o.minutes);
371
+ ), n = Math.floor(o.years), l = Math.floor(o.months), c = Math.floor(o.days), m = Math.floor(o.hours), f = Math.floor(o.minutes);
358
372
  if (n)
359
373
  return n === 1 ? v("HC_ONE_YEAR_AGO") : v("HC_X_YEARS_AGO", { years: n });
360
- if (r)
361
- return r === 1 ? v("HC_ONE_MONTH_AGO") : v("HC_X_MONTHS_AGO", { months: r });
374
+ if (l)
375
+ return l === 1 ? v("HC_ONE_MONTH_AGO") : v("HC_X_MONTHS_AGO", { months: l });
362
376
  if (c)
363
377
  return c === 1 ? v("HC_ONE_DAY_AGO") : v("HC_X_DAYS_AGO", { days: c });
364
378
  if (m)
@@ -368,8 +382,8 @@ const Ct = Ve({
368
382
  if (f === 0)
369
383
  return v("HC_A_MOMENT_AGO");
370
384
  }, Be = async () => {
371
- s.showGuestDetails && re(), z(), W(), I("refresh:pms", l.value);
372
- }, re = async () => {
385
+ s.showGuestDetails && ne(), z(), W(), I("refresh:pms", r.value);
386
+ }, ne = async () => {
373
387
  try {
374
388
  b.value.pms = !0;
375
389
  const e = new AbortController(), a = setTimeout(() => e.abort(), 45e3);
@@ -391,11 +405,11 @@ const Ct = Ve({
391
405
  signal: e.signal
392
406
  }
393
407
  );
394
- clearTimeout(a), n.ok || ge(n);
395
- const r = await n.json();
396
- M.value = r.data.pmsRooms, l.value = M.value.find(
408
+ clearTimeout(a), n.ok || he(n);
409
+ const l = await n.json();
410
+ R.value = l.data.pmsRooms, r.value = R.value.find(
397
411
  (c) => c.qv2Rooms.qRoomId === s.room.id
398
- ), l.value || (l.value = s.room), b.value.pms = !1;
412
+ ), r.value || (r.value = s.room), b.value.pms = !1;
399
413
  } catch (e) {
400
414
  return b.value.pms = !1, e;
401
415
  }
@@ -426,22 +440,22 @@ const Ct = Ve({
426
440
  body: e
427
441
  })
428
442
  ]), o = await a.json(), n = await t.json();
429
- if (o.departments && (o.departments.forEach((r) => {
430
- r.label = r.display_name;
443
+ if (o.departments && (o.departments.forEach((l) => {
444
+ l.label = l.display_name;
431
445
  }), C.value = o.departments), n.users) {
432
- const r = [];
446
+ const l = [];
433
447
  let c = {
434
448
  group: "",
435
449
  options: []
436
450
  };
437
451
  n.users.forEach((m) => {
438
- m.translated_department !== c.group && (c.group && r.push({ ...c }), c.group = m.translated_department, c.options = []), c.options.push(m);
439
- }), c.group && r.push({ ...c }), de.value = r;
452
+ m.translated_department !== c.group && (c.group && l.push({ ...c }), c.group = m.translated_department, c.options = []), c.options.push(m);
453
+ }), c.group && l.push({ ...c }), ce.value = l;
440
454
  }
441
- }, he = async () => {
455
+ }, fe = async () => {
442
456
  try {
443
457
  const e = new FormData();
444
- e.append("funcname", "get_stay_details"), e.append("token_id", l.value.tokenId);
458
+ e.append("funcname", "get_stay_details"), e.append("token_id", r.value.tokenId);
445
459
  const t = (await G.post(
446
460
  "/includes/chat_api.php",
447
461
  e
@@ -456,7 +470,7 @@ const Ct = Ve({
456
470
  } catch (e) {
457
471
  console.log(e);
458
472
  }
459
- }, Le = (e) => {
473
+ }, Pe = (e) => {
460
474
  switch (e) {
461
475
  case "complaint":
462
476
  return "red-30";
@@ -469,7 +483,7 @@ const Ct = Ve({
469
483
  case "task":
470
484
  return "green-20";
471
485
  }
472
- }, xe = (e) => {
486
+ }, Le = (e) => {
473
487
  switch (e) {
474
488
  case "complaint":
475
489
  return "face-frown";
@@ -497,7 +511,7 @@ const Ct = Ve({
497
511
  } finally {
498
512
  b.value.tickets = !1;
499
513
  }
500
- }, ge = async (e) => {
514
+ }, he = async (e) => {
501
515
  const a = await e.text();
502
516
  let t;
503
517
  try {
@@ -506,10 +520,10 @@ const Ct = Ve({
506
520
  t = { code: e.status, message: a };
507
521
  }
508
522
  return t.code === 401 ? (window.location.href = "/logout.php?unauthorized=1", { error: t }) : t;
509
- }, We = (e) => {
523
+ }, xe = (e) => {
510
524
  const a = document.querySelectorAll(".pulse");
511
525
  if (a && a.length) {
512
- const t = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room?.id, o = document.getElementById("room-" + t), n = o?.classList;
526
+ const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = document.getElementById("room-" + t), n = o?.classList;
513
527
  switch (e) {
514
528
  case "room_notice":
515
529
  (n?.contains("roombox_unsel") || n?.contains("roombox_unsel_active")) && (o?.classList.remove(), o?.classList.add("roomnoticeroombox_sel"));
@@ -524,16 +538,16 @@ const Ct = Ve({
524
538
  !n?.contains("smsroombox_sel") && !n?.contains("callbackroombox_sel") && !n?.contains("complaintsroombox_sel") && !n?.contains("guestrequestroombox_sel") && (o?.classList.remove(), o?.classList.add("workordersroombox_sel"));
525
539
  break;
526
540
  }
527
- const r = setTimeout(() => {
541
+ const l = setTimeout(() => {
528
542
  a.forEach((c) => {
529
543
  c.classList.remove("pulse");
530
544
  });
531
545
  }, 4500);
532
- L.value.push(r);
546
+ L.value.push(l);
533
547
  }
534
- }, Fe = () => {
535
- window.location.href = "/guest/overview.php";
536
- }, Ge = (e) => {
548
+ }, We = () => {
549
+ window.open("/guest/overview.php", "_blank");
550
+ }, Fe = (e) => {
537
551
  let a = "";
538
552
  switch (e.type) {
539
553
  case "complaint":
@@ -554,18 +568,18 @@ const Ct = Ve({
554
568
  default:
555
569
  return "#";
556
570
  }
557
- window.open(a);
558
- }, je = async () => {
559
- const e = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room?.id, a = l.value?.qv2Rooms?.qRoomName || l.value?.name || s.room?.name, t = {
571
+ window.open(a, "_blank");
572
+ }, Ge = async () => {
573
+ const e = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, a = r.value?.qv2Rooms?.qRoomName || r.value?.name || s.room?.name, t = {
560
574
  type: k.value?.id,
561
575
  propertyId: s.propertyId,
562
- userId: N.value,
576
+ userId: M.value,
563
577
  areaId: e,
564
578
  areaName: a
565
579
  };
566
580
  switch (k.value?.id) {
567
581
  case "complaint":
568
- t.tokenId = l.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(
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(
569
583
  "yyyy-MM-dd"
570
584
  ), t.notes = p.value.notes, t.inHouse = "2", t.source = "dashboard", I("create:todo", t);
571
585
  break;
@@ -579,29 +593,29 @@ const Ct = Ve({
579
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);
580
594
  break;
581
595
  }
596
+ }, je = (e) => {
597
+ ue(), ie(), s.hover && I("toggle", e);
582
598
  }, Ue = (e) => {
583
- ie(), ce(), s.hover && I("toggle", e);
584
- }, Qe = (e) => {
585
- we(), T.value = e;
586
- }, $e = async (e) => {
599
+ ye(), T.value = e;
600
+ }, Qe = async (e) => {
587
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)
588
602
  return;
589
- const a = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room?.id, t = new FormData();
603
+ const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, t = new FormData();
590
604
  switch (t.append("property_id", s.propertyId), t.append("area_id", a), e.id) {
591
605
  case "complaint":
592
606
  try {
593
- l.value.tokenId && await he();
607
+ r.value.tokenId && await fe();
594
608
  const n = await (await fetch("/api/client/common/getComplaintProblemsByPropertyId.php", {
595
609
  method: "POST",
596
610
  body: t
597
611
  })).json();
598
612
  n.items && (w.value = n.items);
599
- const r = await G.post(
613
+ const l = await G.post(
600
614
  "/api/client/common/getComplaintMoods.php"
601
615
  );
602
- r.data.items.forEach((c) => {
616
+ l.data.items.forEach((c) => {
603
617
  c.label = c.display_name;
604
- }), te.value = r.data.items;
618
+ }), te.value = l.data.items;
605
619
  } catch (o) {
606
620
  console.log(o);
607
621
  }
@@ -619,22 +633,22 @@ const Ct = Ve({
619
633
  break;
620
634
  case "request":
621
635
  try {
622
- u.value.requestedBy = B.value[1], u.value.assignType = j.value[0];
636
+ u.value.requestedBy = P.value[1], u.value.assignType = j.value[0];
623
637
  const n = await (await fetch("/api/client/common/getHousekeepingItemsByPropertyId.php", {
624
638
  method: "POST",
625
639
  body: t
626
640
  })).json();
627
641
  if (n.items && (w.value = n.items), await le(), u.value.department = C.value.find(
628
- (r) => parseInt(r.id) === 4
642
+ (l) => parseInt(l.id) === 4
629
643
  ), s.allowWhenWhere)
630
644
  try {
631
- const r = new FormData();
632
- r.append("property_id", s.propertyId);
645
+ const l = new FormData();
646
+ l.append("property_id", s.propertyId);
633
647
  const m = await (await fetch(
634
648
  "/api/client/common/getWhenWhereOptions.php",
635
649
  {
636
650
  method: "POST",
637
- body: r
651
+ body: l
638
652
  }
639
653
  )).json();
640
654
  m.when && Array.isArray(m.when) ? q.value = m.when.map((f) => ({
@@ -646,8 +660,8 @@ const Ct = Ve({
646
660
  label: f.name,
647
661
  value: f.id
648
662
  })) : A.value = [];
649
- } catch (r) {
650
- console.log("Error loading When/Where options:", r), q.value = [], A.value = [];
663
+ } catch (l) {
664
+ console.log("Error loading When/Where options:", l), q.value = [], A.value = [];
651
665
  }
652
666
  } catch (o) {
653
667
  console.log(o);
@@ -655,18 +669,18 @@ const Ct = Ve({
655
669
  break;
656
670
  case "work_order":
657
671
  try {
658
- d.value.requestedBy = B.value[0], d.value.assignType = j.value[0];
672
+ d.value.requestedBy = P.value[0], d.value.assignType = j.value[0];
659
673
  const n = await (await fetch("/api/client/common/getItemsByRoomId.php", {
660
674
  method: "POST",
661
675
  body: t
662
- })).json(), r = [];
676
+ })).json(), l = [];
663
677
  let c = {
664
678
  group: "",
665
679
  options: []
666
680
  };
667
681
  n.items && (n.items.forEach((m) => {
668
- m.section_name !== c.group && (c.group && r.push({ ...c }), c.group = m.section_name, c.options = []), m.label && c.options.push(m);
669
- }), c.group && r.push({ ...c })), w.value = r, await Promise.all([
682
+ m.section_name !== c.group && (c.group && l.push({ ...c }), c.group = m.section_name, c.options = []), m.label && c.options.push(m);
683
+ }), c.group && l.push({ ...c })), w.value = l, await Promise.all([
670
684
  G.post(
671
685
  "/api/client/common/getWorkOrderIssues.php"
672
686
  ),
@@ -675,7 +689,7 @@ const Ct = Ve({
675
689
  const f = m[0];
676
690
  f.data.issues.forEach((X) => {
677
691
  X.label = X.display_name;
678
- }), se.value = f.data.issues;
692
+ }), oe.value = f.data.issues;
679
693
  }), d.value.department = C.value.find(
680
694
  (m) => parseInt(m.id) === 2
681
695
  );
@@ -686,105 +700,101 @@ const Ct = Ve({
686
700
  default:
687
701
  return;
688
702
  }
689
- }, Je = () => {
703
+ }, $e = () => {
690
704
  J.value = !J.value, K.value = !1;
691
- }, ye = () => {
705
+ }, ge = () => {
692
706
  const e = document.getElementById("comment-field"), a = document.getElementById("hidden-text");
693
707
  e.style.height = a?.offsetHeight + "px";
694
- }, ue = () => {
708
+ }, re = () => {
695
709
  const e = document.getElementById("comments-container");
696
710
  e?.scroll({
697
711
  top: e.scrollHeight,
698
712
  behavior: "smooth"
699
713
  });
700
- }, Ye = async (e) => {
701
- if (e && e.type === "keydown" && e.preventDefault(), l.value.tokenId && T.value && !R.value)
714
+ }, Je = async (e) => {
715
+ if (e && e.type === "keydown" && e.preventDefault(), r.value.tokenId && T.value && !S.value)
702
716
  try {
703
717
  const a = new FormData();
704
- a.append("tokenId", l.value.tokenId), a.append("content", T.value), a.append("senderId", N.value || "");
718
+ a.append("tokenId", r.value.tokenId), a.append("content", T.value), a.append("senderId", M.value || "");
705
719
  const t = await G.post(
706
720
  "/api/client/connect/sendMessage.php",
707
721
  a
708
722
  );
709
723
  if (t.data.status === "error")
710
724
  throw new Error(t.data.message || "Failed to send message");
711
- T.value = "", S.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)), ue();
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();
712
726
  } catch (a) {
713
727
  console.error("sendChatMessage error:", a);
714
728
  }
715
- }, ze = async () => {
716
- if (!(!l.value.tokenId || !N.value))
729
+ }, Ye = async () => {
730
+ if (!(!r.value.tokenId || !M.value))
717
731
  try {
718
- const e = S.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php", a = new FormData();
719
- a.append("tokenId", l.value.tokenId), a.append("userId", N.value), S.value && O.value !== null && a.append("lastMsgId", O.value.toString());
732
+ const e = N.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php", a = new FormData();
733
+ a.append("tokenId", r.value.tokenId), a.append("userId", M.value), N.value && O.value !== null && a.append("lastMsgId", O.value.toString());
720
734
  const t = await G.post(e, a);
721
735
  if (t.data.status === "error")
722
736
  throw new Error(t.data.message || "Failed to update conversation status");
723
- S.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));
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));
724
738
  } catch (e) {
725
739
  console.error("toggleMarkOpenClose error:", e);
726
740
  }
727
- }, ie = () => {
741
+ }, ue = () => {
728
742
  if (s.align === "left" || s.align === "right") {
729
743
  const e = x.value?.getBoundingClientRect().left, a = window.innerWidth;
730
- V.value = a - e < P.value ? "right" : "left";
744
+ V.value = a - e < B.value ? "right" : "left";
731
745
  } else {
732
746
  const e = x.value?.getBoundingClientRect().top, a = window.innerHeight;
733
747
  V.value = a - e < H.value ? "bottom" : "top";
734
748
  }
735
- }, ce = () => {
749
+ }, ie = () => {
736
750
  if (s.position === "top" || s.position === "bottom") {
737
751
  const e = x.value?.getBoundingClientRect().top, a = window.innerHeight;
738
752
  ae.value = a - e < H.value ? "top" : "bottom";
739
753
  } else {
740
754
  const e = x.value?.getBoundingClientRect().left, a = window.innerWidth;
741
- ae.value = a - e < P.value ? "left" : "right";
755
+ ae.value = a - e < B.value ? "left" : "right";
742
756
  }
743
- }, we = () => {
744
- R.value = !R.value, R.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);
745
- }, Xe = async (e, a) => {
746
- const t = l.value?.qv2Rooms?.qRoomId || l.value?.id || s.room?.id, o = new FormData();
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);
759
+ }, ze = async (e, a) => {
760
+ const t = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = new FormData();
747
761
  if (o.append("property_id", s.propertyId), o.append("room_ids", JSON.stringify([t])), await W(), D.value) {
748
762
  const n = [];
749
- D.value.forEach((r) => {
750
- r.id === e && r.type === a ? n.unshift({
751
- ...r,
763
+ D.value.forEach((l) => {
764
+ l.id === e && l.type === a ? n.unshift({
765
+ ...l,
752
766
  isNew: !0
753
767
  }) : n.push({
754
- ...r,
768
+ ...l,
755
769
  isNew: !1
756
770
  });
757
- }), n.sort((r, c) => r.id === e ? -1 : c.id === e ? 1 : 0), D.value = [...n];
771
+ }), n.sort((l, c) => l.id === e ? -1 : c.id === e ? 1 : 0), D.value = [...n];
758
772
  }
759
773
  };
760
774
  return F(() => s.open, () => {
761
775
  if (s.open && s.showComments && ee.value.length) {
762
- const e = setTimeout(ue, 500);
776
+ const e = setTimeout(re, 500);
763
777
  L.value.push(e);
764
778
  }
765
- s.open || ve();
779
+ s.open || pe();
766
780
  }), F(T, () => {
767
- const e = setTimeout(ye, 100);
781
+ const e = setTimeout(ge, 100);
768
782
  L.value.push(e);
769
783
  }), F(() => s.allowWhenWhere, (e, a) => {
770
784
  a === !0 && e === !1 && (u.value.when = null, u.value.where = null, q.value = [], A.value = []);
771
785
  }), F(() => s.open, async (e, a) => {
772
- e && !a && (s.showGuestDetails && !M.value ? await re() : l.value || (l.value = s.room), W(), z(), s.showComments && fe());
786
+ e && !a && (s.showGuestDetails && !R.value ? await ne() : r.value || (r.value = s.room), W(), z(), s.showComments && ve());
773
787
  }), F(
774
788
  () => s.room.id,
775
789
  (e, a) => {
776
- e !== a && (M.value ? (l.value = M.value.find((t) => t.qv2Rooms.qRoomId === s.room.id), l.value || (l.value = s.room)) : l.value = s.room, s.open && (W(), z()));
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()));
777
791
  }
778
- ), Ze(async () => {
792
+ ), Ve(async () => {
779
793
  const e = JSON.parse(
780
794
  window.localStorage.getItem("authenticated")
781
795
  );
782
- N.value = e?.user?.id || "", l.value = s.room, s.size === "sm" && (H.value = 140, P.value = 160), s.size === "lg" && (H.value = 250, P.value = 440), ie(), ce();
783
- const a = [], t = window.localStorage.getItem("quick-replies");
784
- t && JSON.parse(t).forEach((o) => {
785
- a.push(o.message);
786
- }), oe.value = a;
787
- }), et(() => {
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
+ }), Ze(() => {
788
798
  L.value.forEach((e) => {
789
799
  clearTimeout(e);
790
800
  });
@@ -797,91 +807,90 @@ const Ct = Ve({
797
807
  comment: T,
798
808
  complaint: p,
799
809
  componentHeight: H,
800
- componentWidth: P,
810
+ componentWidth: B,
801
811
  departments: C,
802
- departmentUsers: de,
812
+ departmentUsers: ce,
803
813
  expandComments: Z,
804
814
  expandGuestInfo: U,
805
815
  expandedStates: E,
806
816
  expandTickets: Q,
807
- guestDetailsData: _e,
817
+ guestDetailsData: we,
808
818
  itemOptions: w,
809
819
  loading: b,
810
820
  messages: ee,
811
821
  moodOptions: te,
812
- pmsData: M,
822
+ pmsData: R,
813
823
  positioning: ae,
814
- quickReplies: oe,
815
- quickReplyOpen: R,
824
+ quickReplyOpen: S,
816
825
  request: u,
817
- requestedByOptions: B,
818
- requestLoading: ke,
826
+ requestedByOptions: P,
827
+ requestLoading: _e,
819
828
  requestType: k,
820
- roomDetailsData: l,
829
+ roomDetailsData: r,
821
830
  roomNotice: g,
822
831
  roomNotices: $,
823
832
  showCreateRequest: J,
824
833
  ticketsList: D,
825
- todoOptions: De,
834
+ todoOptions: ke,
826
835
  trigger: x,
827
- userId: N,
836
+ userId: M,
828
837
  workOrder: d,
829
- workOrderIssues: se,
838
+ workOrderIssues: oe,
830
839
  whenOptions: q,
831
840
  whereOptions: A,
832
841
  // Guest Connect state
833
- isConversationOpen: S,
842
+ isConversationOpen: N,
834
843
  lastMessageId: O,
835
844
  // Computed
836
- cleanliness: ne,
837
- cleanlinessColor: Ie,
838
- cleanlinessTooltipContent: Te,
839
- filteredReplies: be,
840
- hasGuestCallback: Oe,
841
- hasComplaint: me,
842
- itemOptionsList: Ce,
843
- occupied: pe,
844
- occupancyTooltipContent: Ee,
845
- selectedAssignType: Me,
846
- selectedDepartment: Re,
847
- selectedRequestedBy: Se,
848
- stayDetails: Ne,
849
- tagsList: qe,
850
- validateToDo: Ae,
845
+ cleanliness: se,
846
+ cleanlinessColor: De,
847
+ cleanlinessTooltipContent: Ie,
848
+ filteredReplies: Te,
849
+ hasGuestCallback: be,
850
+ hasComplaint: de,
851
+ itemOptionsList: Oe,
852
+ occupied: me,
853
+ occupancyTooltipContent: Ce,
854
+ selectedAssignType: Ee,
855
+ selectedDepartment: Me,
856
+ selectedRequestedBy: Re,
857
+ stayDetails: Se,
858
+ tagsList: Ne,
859
+ validateToDo: qe,
851
860
  // Methods
852
- closeRequest: ve,
853
- createCallback: He,
861
+ closeRequest: pe,
862
+ createCallback: Ae,
854
863
  createMessageList: Y,
855
- getChatMessages: fe,
856
- getHowLongAgo: Pe,
857
- getPMSData: re,
864
+ getChatMessages: ve,
865
+ getHowLongAgo: He,
866
+ getPMSData: ne,
858
867
  getRoomNotices: z,
859
868
  getSharedData: le,
860
- getStayDetails: he,
861
- getTicketColor: Le,
862
- getTicketIcon: xe,
869
+ getStayDetails: fe,
870
+ getTicketColor: Pe,
871
+ getTicketIcon: Le,
863
872
  getTickets: W,
864
- handleFailedResponse: ge,
865
- handlePulse: We,
866
- onClickEditConnectGuest: Fe,
867
- onClickTicket: Ge,
868
- onCreateRequestSubmit: je,
869
- onHoverToggle: Ue,
870
- onSelectQuickReply: Qe,
871
- onSelectToDo: $e,
872
- openRequest: Je,
873
+ handleFailedResponse: he,
874
+ handlePulse: xe,
875
+ onClickEditConnectGuest: We,
876
+ onClickTicket: Fe,
877
+ onCreateRequestSubmit: Ge,
878
+ onHoverToggle: je,
879
+ onSelectQuickReply: Ue,
880
+ onSelectToDo: Qe,
881
+ openRequest: $e,
873
882
  refreshPMSData: Be,
874
- resizeTextarea: ye,
875
- scrollToConnectBottom: ue,
876
- sendChatMessage: Ye,
877
- setAlignment: ie,
878
- setPositioning: ce,
879
- toggleMarkOpenClose: ze,
880
- toggleQuickReply: we,
881
- updateTickets: Xe
883
+ resizeTextarea: ge,
884
+ scrollToConnectBottom: re,
885
+ sendChatMessage: Je,
886
+ setAlignment: ue,
887
+ setPositioning: ie,
888
+ toggleMarkOpenClose: Ye,
889
+ toggleQuickReply: ye,
890
+ updateTickets: ze
882
891
  };
883
892
  }
884
893
  });
885
894
  export {
886
- Ct as default
895
+ Ot as default
887
896
  };