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