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