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