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