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