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