@quoreadmin/ui 1.10.33 → 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} +379 -399
- 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 +231 -81
- package/dist/index214.js +291 -387
- package/dist/index215.js +296 -21
- package/dist/index219.js +2 -2
- package/dist/index22.js +2 -2
- package/dist/index220.js +1 -1
- package/dist/index222.js +4 -4
- package/dist/index224.js +1 -1
- package/dist/index225.js +1 -1
- package/dist/index226.js +1 -1
- package/dist/index227.js +4 -4
- package/dist/index229.js +1 -1
- package/dist/index23.js +2 -2
- package/dist/index230.js +84 -157
- package/dist/index231.js +384 -205
- package/dist/index232.js +22 -37
- package/dist/index233.js +127 -10
- package/dist/index234.js +25 -148
- package/dist/index235.js +80 -20
- package/dist/index236.js +1 -1
- package/dist/index237.js +13 -15
- package/dist/index238.js +19 -198
- package/dist/index239.js +18 -68
- package/dist/index24.js +2 -2
- package/dist/index240.js +20 -34
- package/dist/index241.js +143 -22
- package/dist/index242.js +11 -13
- package/dist/index243.js +12 -12
- package/dist/index244.js +198 -19
- package/dist/index245.js +48 -814
- package/dist/index246.js +34 -702
- package/dist/index247.js +39 -175
- package/dist/index248.js +253 -20
- package/dist/index249.js +8 -20
- package/dist/index250.js +138 -22
- package/dist/index251.js +83 -20
- package/dist/index252.js +160 -19
- package/dist/index253.js +228 -3
- package/dist/index254.js +31 -181
- package/dist/index255.js +10 -133
- package/dist/index256.js +22 -1223
- package/dist/index257.js +21 -126
- package/dist/index258.js +12 -12
- package/dist/index259.js +836 -22
- package/dist/index26.js +2 -2
- package/dist/index260.js +701 -21
- package/dist/index261.js +174 -36
- package/dist/index262.js +15 -22
- package/dist/index263.js +7 -7
- package/dist/index264.js +13 -13
- package/dist/index265.js +2 -1
- package/dist/index266.js +187 -2
- package/dist/index267.js +131 -78
- package/dist/index268.js +1223 -20
- package/dist/index269.js +11 -11
- package/dist/index27.js +2 -2
- package/dist/index270.js +22 -253
- package/dist/index271.js +21 -7
- package/dist/index272.js +29 -138
- package/dist/index273.js +20 -83
- 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 +10 -53
- package/dist/index291.js +694 -68
- package/dist/index292.js +820 -26
- package/dist/index293.js +2 -22
- package/dist/index294.js +78 -21
- package/dist/index295.js +52 -14
- package/dist/index296.js +26 -17
- package/dist/index297.js +22 -23
- package/dist/index298.js +22 -3
- package/dist/index299.js +16 -27
- package/dist/index3.js +2 -2
- package/dist/index30.js +2 -2
- package/dist/index300.js +17 -2
- package/dist/index301.js +21 -77
- package/dist/index302.js +78 -21
- package/dist/index303.js +22 -935
- package/dist/index304.js +935 -22
- package/dist/index305.js +15 -13
- package/dist/index306.js +5 -5
- package/dist/index307.js +19 -68
- package/dist/index308.js +68 -18
- package/dist/index309.js +14 -14
- package/dist/index31.js +3 -3
- package/dist/index310.js +19 -22
- package/dist/index311.js +14 -14
- package/dist/index312.js +21 -62
- package/dist/index313.js +63 -1534
- package/dist/index314.js +79 -381
- package/dist/index315.js +3 -2731
- package/dist/index316.js +24 -83
- package/dist/index317.js +1294 -3558
- package/dist/index318.js +379 -53
- package/dist/index319.js +2730 -14
- package/dist/index32.js +2 -2
- package/dist/index320.js +82 -80
- package/dist/index321.js +3749 -153
- package/dist/index322.js +54 -240
- package/dist/index323.js +15 -37
- package/dist/index324.js +75 -226
- package/dist/index325.js +200 -4
- package/dist/index326.js +236 -124
- package/dist/index327.js +36 -67
- package/dist/index328.js +124 -81
- package/dist/index329.js +397 -26
- package/dist/index33.js +2 -2
- package/dist/index330.js +235 -9
- package/dist/index331.js +5 -74
- package/dist/index332.js +133 -3
- package/dist/index333.js +68 -2
- package/dist/index334.js +83 -79
- package/dist/index335.js +27 -52
- package/dist/index336.js +8 -5
- package/dist/index337.js +74 -4
- package/dist/index338.js +3 -178
- package/dist/index339.js +2 -63
- package/dist/index34.js +2 -2
- package/dist/index340.js +82 -74
- package/dist/index341.js +53 -8
- package/dist/index342.js +5 -12
- package/dist/index343.js +4 -54
- package/dist/index344.js +176 -9
- package/dist/index345.js +61 -12
- package/dist/index346.js +75 -58
- package/dist/index347.js +19 -51
- package/dist/index348.js +19 -30
- package/dist/index349.js +64 -2
- package/dist/index35.js +2 -2
- package/dist/index350.js +37 -5
- package/dist/index351.js +9 -2
- package/dist/index352.js +13 -23
- package/dist/index353.js +52 -38
- package/dist/index354.js +12 -2
- package/dist/index355.js +14 -11
- package/dist/index356.js +54 -16
- package/dist/index357.js +52 -10
- package/dist/index358.js +31 -10
- package/dist/index359.js +2 -17
- package/dist/index36.js +2 -2
- package/dist/index360.js +5 -2
- package/dist/index361.js +2 -9
- package/dist/index362.js +23 -10
- package/dist/index363.js +39 -12
- package/dist/index364.js +2 -20
- package/dist/index365.js +11 -20
- package/dist/index366.js +18 -62
- package/dist/index367.js +10 -37
- package/dist/index368.js +10 -21
- package/dist/index369.js +16 -55
- package/dist/index37.js +2 -2
- package/dist/index370.js +2 -29
- package/dist/index371.js +9 -7
- package/dist/index372.js +9 -51
- package/dist/index373.js +13 -5
- package/dist/index374.js +19 -10
- package/dist/index375.js +56 -7
- package/dist/index376.js +29 -28
- package/dist/index377.js +7 -2
- package/dist/index378.js +50 -68
- package/dist/index379.js +5 -166
- package/dist/index38.js +2 -2
- package/dist/index380.js +12 -17
- package/dist/index381.js +6 -100
- package/dist/index382.js +28 -91
- package/dist/index383.js +2 -98
- package/dist/index384.js +69 -12
- package/dist/index385.js +167 -7
- package/dist/index386.js +131 -28
- package/dist/index387.js +17 -11
- package/dist/index388.js +98 -1
- package/dist/index389.js +90 -3
- package/dist/index39.js +2 -2
- package/dist/index390.js +98 -12
- package/dist/index391.js +30 -4
- package/dist/index392.js +11 -33
- package/dist/index393.js +4 -31
- package/dist/index394.js +4 -28
- package/dist/index395.js +12 -60
- 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 -1391
- 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/{index98.js → index99.js} +4 -4
- 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 -588
- 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/src/components/room-details-popover/room-details-popover.d.ts +0 -2167
- /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,14 +173,14 @@ const qt = 996, ea = Tt({
|
|
|
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 `${
|
|
178
|
-
},
|
|
179
|
-
const e =
|
|
180
|
-
return new Date(
|
|
181
|
-
},
|
|
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([
|
|
182
184
|
{
|
|
183
185
|
id: 1,
|
|
184
186
|
label: u("HC_DEPARTMENT")
|
|
@@ -191,7 +193,7 @@ const qt = 996, ea = Tt({
|
|
|
191
193
|
id: 0,
|
|
192
194
|
label: u("HC_ANYONE")
|
|
193
195
|
}
|
|
194
|
-
]),
|
|
196
|
+
]), N = i(""), f = i({
|
|
195
197
|
checkInDate: /* @__PURE__ */ new Date(),
|
|
196
198
|
checkOutDate: /* @__PURE__ */ new Date(),
|
|
197
199
|
guestEmail: "",
|
|
@@ -203,11 +205,11 @@ const qt = 996, ea = Tt({
|
|
|
203
205
|
problem: null,
|
|
204
206
|
notes: "",
|
|
205
207
|
tokenId: r.value?.tokenId
|
|
206
|
-
}),
|
|
208
|
+
}), M = i([]), ge = i([]), Z = i(!0), X = i(!0), C = i({
|
|
207
209
|
info: !0,
|
|
208
210
|
tickets: !0,
|
|
209
211
|
comments: !0
|
|
210
|
-
}),
|
|
212
|
+
}), ee = i(!0), Se = i(s.guestDetails), O = i([]), y = i({
|
|
211
213
|
actionItems: !1,
|
|
212
214
|
activity: !1,
|
|
213
215
|
conversationToggle: !1,
|
|
@@ -216,7 +218,7 @@ const qt = 996, ea = Tt({
|
|
|
216
218
|
roomNotices: !1,
|
|
217
219
|
sendingMessage: !1,
|
|
218
220
|
tickets: !1
|
|
219
|
-
}),
|
|
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({
|
|
220
222
|
assignType: null,
|
|
221
223
|
department: null,
|
|
222
224
|
due: /* @__PURE__ */ new Date(),
|
|
@@ -226,7 +228,7 @@ const qt = 996, ea = Tt({
|
|
|
226
228
|
requestedBy: null,
|
|
227
229
|
when: null,
|
|
228
230
|
where: null
|
|
229
|
-
}),
|
|
231
|
+
}), $ = i([
|
|
230
232
|
{
|
|
231
233
|
id: 0,
|
|
232
234
|
label: u("HC_STAFF_MEMBER")
|
|
@@ -235,14 +237,14 @@ const qt = 996, ea = Tt({
|
|
|
235
237
|
id: 1,
|
|
236
238
|
label: u("HC_HOTEL_GUEST")
|
|
237
239
|
}
|
|
238
|
-
]),
|
|
239
|
-
endDate:
|
|
240
|
+
]), ue = i(!1), E = i(null), w = i({
|
|
241
|
+
endDate: K(),
|
|
240
242
|
issue: null,
|
|
241
243
|
notes: "",
|
|
242
|
-
startDate:
|
|
243
|
-
startTime:
|
|
244
|
-
endTime:
|
|
245
|
-
}),
|
|
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([
|
|
246
248
|
{
|
|
247
249
|
label: u("HC_COMPLAINT"),
|
|
248
250
|
id: "complaint"
|
|
@@ -259,7 +261,7 @@ const qt = 996, ea = Tt({
|
|
|
259
261
|
label: u("HC_WORK_ORDER"),
|
|
260
262
|
id: "work_order"
|
|
261
263
|
}
|
|
262
|
-
]),
|
|
264
|
+
]), H = i(null), v = i({
|
|
263
265
|
assignType: null,
|
|
264
266
|
department: null,
|
|
265
267
|
due: /* @__PURE__ */ new Date(),
|
|
@@ -268,7 +270,7 @@ const qt = 996, ea = Tt({
|
|
|
268
270
|
notes: "",
|
|
269
271
|
person: null,
|
|
270
272
|
requestedBy: null
|
|
271
|
-
}),
|
|
273
|
+
}), de = i([]), q = i([]), F = i([]), Ce = g(() => {
|
|
272
274
|
switch (r.value.cleaning?.name) {
|
|
273
275
|
case "CLEAN":
|
|
274
276
|
case "INSPECTED":
|
|
@@ -281,95 +283,95 @@ const qt = 996, ea = Tt({
|
|
|
281
283
|
default:
|
|
282
284
|
return "";
|
|
283
285
|
}
|
|
284
|
-
}),
|
|
286
|
+
}), Re = g(() => {
|
|
285
287
|
const e = r.value?.hkTaskTypeId || s.room?.hkTaskTypeId;
|
|
286
|
-
return Number(e) ===
|
|
287
|
-
}),
|
|
288
|
-
const e =
|
|
289
|
-
return s.quickReplies.filter((
|
|
290
|
-
}),
|
|
291
|
-
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 [];
|
|
292
294
|
const e = [];
|
|
293
|
-
let
|
|
294
|
-
return
|
|
295
|
-
const o =
|
|
296
|
-
|
|
295
|
+
let a = null;
|
|
296
|
+
return b.value.forEach((t) => {
|
|
297
|
+
const o = _.fromFormat(
|
|
298
|
+
t.dateUtc,
|
|
297
299
|
"yyyy-MM-dd HH:mm:ss",
|
|
298
300
|
{ zone: "utc" }
|
|
299
301
|
).setZone(s.propertyTimeZone), n = o.toFormat("yyyy-MM-dd-HH");
|
|
300
|
-
n !==
|
|
302
|
+
n !== a && (e.push({
|
|
301
303
|
type: "separator",
|
|
302
304
|
label: o.toFormat("ccc, LLL d 'at' h:mma").replace("AM", "am").replace("PM", "pm"),
|
|
303
305
|
hourKey: n
|
|
304
|
-
}),
|
|
306
|
+
}), a = n), e.push({
|
|
305
307
|
type: "message",
|
|
306
|
-
...
|
|
308
|
+
...t,
|
|
307
309
|
formattedTime: o.toFormat("h:mma").replace("AM", "am").replace("PM", "pm")
|
|
308
310
|
});
|
|
309
311
|
}), e;
|
|
310
|
-
}),
|
|
311
|
-
(
|
|
312
|
-
) : !1),
|
|
313
|
-
(
|
|
314
|
-
) : !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(() => {
|
|
315
317
|
let e = [];
|
|
316
|
-
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) => {
|
|
317
319
|
e.push({
|
|
318
|
-
id: parseInt(
|
|
319
|
-
label:
|
|
320
|
+
id: parseInt(a.id),
|
|
321
|
+
label: a.display_name
|
|
320
322
|
});
|
|
321
323
|
}) : e = O.value, e;
|
|
322
|
-
}),
|
|
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(() => {
|
|
323
325
|
switch (E.value?.id) {
|
|
324
326
|
case "request":
|
|
325
327
|
case "work_order":
|
|
326
|
-
return
|
|
328
|
+
return z.value[0];
|
|
327
329
|
default:
|
|
328
330
|
return null;
|
|
329
331
|
}
|
|
330
|
-
}),
|
|
331
|
-
if (
|
|
332
|
+
}), je = g(() => {
|
|
333
|
+
if (M.value)
|
|
332
334
|
switch (E.value?.id) {
|
|
333
335
|
case "request":
|
|
334
|
-
return
|
|
336
|
+
return M.value.find((e) => parseInt(e.id) === 4);
|
|
335
337
|
case "work_order":
|
|
336
|
-
return
|
|
338
|
+
return M.value.find((e) => parseInt(e.id) === 2);
|
|
337
339
|
default:
|
|
338
340
|
return null;
|
|
339
341
|
}
|
|
340
342
|
return null;
|
|
341
|
-
}),
|
|
343
|
+
}), $e = g(() => {
|
|
342
344
|
switch (E.value?.id) {
|
|
343
345
|
case "request":
|
|
344
|
-
return
|
|
346
|
+
return $.value[1];
|
|
345
347
|
case "work_order":
|
|
346
|
-
return
|
|
348
|
+
return $.value[0];
|
|
347
349
|
default:
|
|
348
350
|
return null;
|
|
349
351
|
}
|
|
350
|
-
}),
|
|
352
|
+
}), We = g(() => {
|
|
351
353
|
let e = "";
|
|
352
354
|
if (r.value && r.value.reservations[0]) {
|
|
353
|
-
const
|
|
355
|
+
const a = _.fromISO(
|
|
354
356
|
r.value.reservations[0].arrivalDate
|
|
355
|
-
),
|
|
357
|
+
), t = a.toFormat("MMM"), o = a.day, n = a.year, l = _.fromISO(
|
|
356
358
|
r.value.reservations[0].departureDate
|
|
357
359
|
), c = l.toFormat("MMM"), m = l.day, h = l.year;
|
|
358
|
-
e +=
|
|
360
|
+
e += t + " " + o, n !== h && (e += ", " + n), t === c ? e += "-" + m : e += " - " + c + " " + m, e += ", " + h;
|
|
359
361
|
}
|
|
360
362
|
return e;
|
|
361
|
-
}),
|
|
362
|
-
let e =
|
|
363
|
+
}), Qe = g(() => {
|
|
364
|
+
let e = W.value;
|
|
363
365
|
return e = [...new Set(e)], e;
|
|
364
|
-
}),
|
|
366
|
+
}), Ve = g(() => {
|
|
365
367
|
const e = E.value?.id;
|
|
366
368
|
if (!e)
|
|
367
369
|
return !1;
|
|
368
370
|
switch (e) {
|
|
369
371
|
case "room_notice":
|
|
370
|
-
return
|
|
372
|
+
return w.value.issue && w.value.startDate && w.value.endDate;
|
|
371
373
|
case "complaint":
|
|
372
|
-
return
|
|
374
|
+
return f.value.problem && f.value.guestName && f.value.guestMood;
|
|
373
375
|
case "work_order":
|
|
374
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);
|
|
375
377
|
case "request":
|
|
@@ -377,20 +379,20 @@ const qt = 996, ea = Tt({
|
|
|
377
379
|
default:
|
|
378
380
|
return !1;
|
|
379
381
|
}
|
|
380
|
-
}),
|
|
381
|
-
|
|
382
|
-
},
|
|
383
|
-
|
|
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);
|
|
384
386
|
}, x = (e) => {
|
|
385
|
-
const
|
|
387
|
+
const a = [];
|
|
386
388
|
(Array.isArray(e) ? e : Object.values(e)).forEach((o) => {
|
|
387
|
-
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] || "",
|
|
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";
|
|
388
390
|
let D = {
|
|
389
391
|
id: o.id,
|
|
390
392
|
isPropertyEmployee: n === "user",
|
|
391
393
|
isSent: !!o.sent,
|
|
392
394
|
isSystemMessage: n === "system",
|
|
393
|
-
isStaffMessage:
|
|
395
|
+
isStaffMessage: ne,
|
|
394
396
|
isGuestMessage: T,
|
|
395
397
|
comment: o.content,
|
|
396
398
|
dateUtc: o.sent || o.created,
|
|
@@ -399,66 +401,66 @@ const qt = 996, ea = Tt({
|
|
|
399
401
|
icon: "",
|
|
400
402
|
id: c || "system-message",
|
|
401
403
|
initials: "",
|
|
402
|
-
lastName:
|
|
403
|
-
name:
|
|
404
|
+
lastName: Y || "",
|
|
405
|
+
name: se,
|
|
404
406
|
src: m || ""
|
|
405
407
|
}
|
|
406
408
|
};
|
|
407
|
-
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]),
|
|
408
|
-
}),
|
|
409
|
-
},
|
|
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) => {
|
|
410
412
|
if (!e || e.length === 0) return;
|
|
411
|
-
(Array.isArray(e) ? e : Object.values(e)).forEach((
|
|
412
|
-
if (
|
|
413
|
+
(Array.isArray(e) ? e : Object.values(e)).forEach((t) => {
|
|
414
|
+
if (b.value.some((D) => D.id === t.id))
|
|
413
415
|
return;
|
|
414
|
-
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";
|
|
415
417
|
let T = {
|
|
416
|
-
id:
|
|
418
|
+
id: t.id,
|
|
417
419
|
isPropertyEmployee: o === "user",
|
|
418
|
-
isSent: !!
|
|
420
|
+
isSent: !!t.sent,
|
|
419
421
|
isSystemMessage: o === "system",
|
|
420
|
-
isStaffMessage:
|
|
421
|
-
isGuestMessage:
|
|
422
|
-
comment:
|
|
423
|
-
dateUtc:
|
|
422
|
+
isStaffMessage: se,
|
|
423
|
+
isGuestMessage: ne,
|
|
424
|
+
comment: t.content,
|
|
425
|
+
dateUtc: t.sent || t.created,
|
|
424
426
|
user: {
|
|
425
427
|
firstName: h || "Auto-Reply",
|
|
426
428
|
icon: "",
|
|
427
429
|
id: l || "system-message",
|
|
428
430
|
initials: "",
|
|
429
431
|
lastName: I || "",
|
|
430
|
-
name:
|
|
432
|
+
name: Y,
|
|
431
433
|
src: c || ""
|
|
432
434
|
}
|
|
433
435
|
};
|
|
434
|
-
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);
|
|
435
437
|
});
|
|
436
|
-
},
|
|
438
|
+
}, me = async (e = !1) => {
|
|
437
439
|
if (s.showComments && r.value.tokenId) {
|
|
438
440
|
e || (y.value.messages = !0);
|
|
439
441
|
try {
|
|
440
|
-
let
|
|
441
|
-
e && k.value !== null && (
|
|
442
|
-
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, {
|
|
443
445
|
method: "GET",
|
|
444
446
|
credentials: "include"
|
|
445
447
|
})).json();
|
|
446
448
|
if (o.status === "error")
|
|
447
449
|
throw new Error(o.message || "Failed to get messages");
|
|
448
450
|
if (S.value = !o.closed, o.messages && o.messages.length > 0) {
|
|
449
|
-
k.value = o.messages[o.messages.length - 1].id, e ?
|
|
450
|
-
const n = setTimeout(
|
|
451
|
-
|
|
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);
|
|
452
454
|
} else e || x(o.messages || []);
|
|
453
|
-
} catch (
|
|
454
|
-
console.error("getChatMessages error:",
|
|
455
|
+
} catch (a) {
|
|
456
|
+
console.error("getChatMessages error:", a);
|
|
455
457
|
} finally {
|
|
456
458
|
e || (y.value.messages = !1);
|
|
457
459
|
}
|
|
458
460
|
}
|
|
459
|
-
},
|
|
460
|
-
const
|
|
461
|
-
|
|
461
|
+
}, Ke = (e) => {
|
|
462
|
+
const a = _.utc(), t = _.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = a.diff(
|
|
463
|
+
t,
|
|
462
464
|
[
|
|
463
465
|
"years",
|
|
464
466
|
"months",
|
|
@@ -479,15 +481,15 @@ const qt = 996, ea = Tt({
|
|
|
479
481
|
return h === 1 ? u("HC_ONE_MINUTE_AGO") : u("HC_X_MINUTES_AGO", { minutes: h });
|
|
480
482
|
if (h === 0)
|
|
481
483
|
return u("HC_A_MOMENT_AGO");
|
|
482
|
-
},
|
|
483
|
-
s.showGuestDetails &&
|
|
484
|
-
},
|
|
484
|
+
}, ze = async () => {
|
|
485
|
+
s.showGuestDetails && ae(), ve(), Q(), oe(), p("refresh:pms", r.value);
|
|
486
|
+
}, ae = async () => {
|
|
485
487
|
try {
|
|
486
488
|
y.value.pms = !0;
|
|
487
|
-
const e = new AbortController(),
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
if (!
|
|
489
|
+
const e = new AbortController(), a = setTimeout(() => e.abort(), 45e3);
|
|
490
|
+
P.value.push(a);
|
|
491
|
+
const t = s.pmsBaseUrl;
|
|
492
|
+
if (!t)
|
|
491
493
|
throw new Error("PMS base URL is required");
|
|
492
494
|
const o = {
|
|
493
495
|
Authorization: "Bearer " + (() => {
|
|
@@ -496,7 +498,7 @@ const qt = 996, ea = Tt({
|
|
|
496
498
|
})(),
|
|
497
499
|
"Content-Type": "application/json"
|
|
498
500
|
}, n = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room.id, l = await fetch(
|
|
499
|
-
`${
|
|
501
|
+
`${t}/vendors/properties/statuses/${s.propertyId}/rooms`,
|
|
500
502
|
{
|
|
501
503
|
method: "POST",
|
|
502
504
|
headers: o,
|
|
@@ -504,21 +506,21 @@ const qt = 996, ea = Tt({
|
|
|
504
506
|
body: JSON.stringify({ roomsIds: [n] })
|
|
505
507
|
}
|
|
506
508
|
);
|
|
507
|
-
clearTimeout(
|
|
509
|
+
clearTimeout(a), l.ok || De(l);
|
|
508
510
|
const c = await l.json(), m = c.data?.pmsRooms || c.data?.rooms || c.rooms || [];
|
|
509
511
|
R.value = m, m.length > 0 ? r.value = {
|
|
510
512
|
...m[0],
|
|
511
513
|
tokenId: m[0].tokenId || s.room.tokenId
|
|
512
514
|
} : r.value = s.room, y.value.pms = !1;
|
|
513
515
|
} catch (e) {
|
|
514
|
-
return y.value.pms = !1,
|
|
516
|
+
return y.value.pms = !1, p("show:toast", {
|
|
515
517
|
show: !0,
|
|
516
518
|
message: u("HC_FAILED_TO_LOAD_PMS_DATA"),
|
|
517
519
|
variant: "error",
|
|
518
520
|
icon: "exclamation-circle"
|
|
519
521
|
}), e;
|
|
520
522
|
}
|
|
521
|
-
},
|
|
523
|
+
}, ve = async () => {
|
|
522
524
|
try {
|
|
523
525
|
y.value.roomNotices = !0;
|
|
524
526
|
const e = await fetch(
|
|
@@ -526,10 +528,10 @@ const qt = 996, ea = Tt({
|
|
|
526
528
|
);
|
|
527
529
|
if (!e.ok)
|
|
528
530
|
throw new Error(`HTTP error! status: ${e.status}`);
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
+
const a = await e.json();
|
|
532
|
+
W.value = a.notices;
|
|
531
533
|
} catch (e) {
|
|
532
|
-
console.error("Error getting room notices:", e),
|
|
534
|
+
console.error("Error getting room notices:", e), W.value = [], p("show:toast", {
|
|
533
535
|
show: !0,
|
|
534
536
|
message: u("HC_FAILED_TO_LOAD_ROOM_NOTICES"),
|
|
535
537
|
variant: "error",
|
|
@@ -538,11 +540,11 @@ const qt = 996, ea = Tt({
|
|
|
538
540
|
} finally {
|
|
539
541
|
y.value.roomNotices = !1;
|
|
540
542
|
}
|
|
541
|
-
},
|
|
543
|
+
}, fe = async () => {
|
|
542
544
|
try {
|
|
543
545
|
const e = new FormData();
|
|
544
546
|
e.append("property_id", s.propertyId), e.append("filter", "tasks_new");
|
|
545
|
-
const [
|
|
547
|
+
const [a, t] = await Promise.all([
|
|
546
548
|
fetch("/api/client/common/getDepartments.php", {
|
|
547
549
|
method: "POST"
|
|
548
550
|
}),
|
|
@@ -550,10 +552,10 @@ const qt = 996, ea = Tt({
|
|
|
550
552
|
method: "POST",
|
|
551
553
|
body: e
|
|
552
554
|
})
|
|
553
|
-
]), o = await
|
|
555
|
+
]), o = await a.json(), n = await t.json();
|
|
554
556
|
if (o.departments && (o.departments.forEach((l) => {
|
|
555
557
|
l.label = l.display_name;
|
|
556
|
-
}),
|
|
558
|
+
}), M.value = o.departments), n.users) {
|
|
557
559
|
const l = [];
|
|
558
560
|
let c = {
|
|
559
561
|
group: "",
|
|
@@ -561,41 +563,41 @@ const qt = 996, ea = Tt({
|
|
|
561
563
|
};
|
|
562
564
|
n.users.forEach((m) => {
|
|
563
565
|
m.translated_department !== c.group && (c.group && l.push({ ...c }), c.group = m.translated_department, c.options = []), c.options.push(m);
|
|
564
|
-
}), c.group && l.push({ ...c }),
|
|
566
|
+
}), c.group && l.push({ ...c }), ge.value = l;
|
|
565
567
|
}
|
|
566
568
|
} catch (e) {
|
|
567
|
-
console.error("Error getting shared data:", e),
|
|
569
|
+
console.error("Error getting shared data:", e), p("show:toast", {
|
|
568
570
|
show: !0,
|
|
569
571
|
message: u("HC_FAILED_TO_LOAD_SHARED_DATA"),
|
|
570
572
|
variant: "error",
|
|
571
573
|
icon: "exclamation-circle"
|
|
572
574
|
});
|
|
573
575
|
}
|
|
574
|
-
},
|
|
576
|
+
}, Te = async () => {
|
|
575
577
|
try {
|
|
576
|
-
const
|
|
578
|
+
const a = await (await fetch(
|
|
577
579
|
`/api/client/connect/getStayDetails.php?tokenId=${r.value.tokenId}`,
|
|
578
580
|
{
|
|
579
581
|
method: "GET",
|
|
580
582
|
credentials: "include"
|
|
581
583
|
}
|
|
582
584
|
)).json();
|
|
583
|
-
if (
|
|
584
|
-
throw new Error(
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
).toJSDate()),
|
|
588
|
-
|
|
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
|
|
589
591
|
).toJSDate());
|
|
590
592
|
} catch (e) {
|
|
591
|
-
console.error("getStayDetails error:", e),
|
|
593
|
+
console.error("getStayDetails error:", e), p("show:toast", {
|
|
592
594
|
show: !0,
|
|
593
595
|
message: u("HC_FAILED_TO_LOAD_STAY_DETAILS"),
|
|
594
596
|
variant: "error",
|
|
595
597
|
icon: "exclamation-circle"
|
|
596
598
|
});
|
|
597
599
|
}
|
|
598
|
-
},
|
|
600
|
+
}, Ze = (e) => {
|
|
599
601
|
switch (e) {
|
|
600
602
|
case "complaint":
|
|
601
603
|
return "red-30";
|
|
@@ -608,7 +610,7 @@ const qt = 996, ea = Tt({
|
|
|
608
610
|
case "task":
|
|
609
611
|
return "green-20";
|
|
610
612
|
}
|
|
611
|
-
},
|
|
613
|
+
}, Xe = (e) => {
|
|
612
614
|
switch (e) {
|
|
613
615
|
case "complaint":
|
|
614
616
|
return "face-frown";
|
|
@@ -621,7 +623,7 @@ const qt = 996, ea = Tt({
|
|
|
621
623
|
case "task":
|
|
622
624
|
return "check";
|
|
623
625
|
}
|
|
624
|
-
},
|
|
626
|
+
}, Q = async () => {
|
|
625
627
|
try {
|
|
626
628
|
y.value.tickets = !0;
|
|
627
629
|
const e = await fetch(
|
|
@@ -629,10 +631,10 @@ const qt = 996, ea = Tt({
|
|
|
629
631
|
);
|
|
630
632
|
if (!e.ok)
|
|
631
633
|
throw new Error(`HTTP error! status: ${e.status}`);
|
|
632
|
-
const
|
|
633
|
-
A.value =
|
|
634
|
+
const a = await e.json();
|
|
635
|
+
A.value = a.tickets;
|
|
634
636
|
} catch (e) {
|
|
635
|
-
console.error("Error getting tickets:", e), A.value = [],
|
|
637
|
+
console.error("Error getting tickets:", e), A.value = [], p("show:toast", {
|
|
636
638
|
show: !0,
|
|
637
639
|
message: u("HC_FAILED_TO_LOAD_TICKETS"),
|
|
638
640
|
variant: "error",
|
|
@@ -641,19 +643,19 @@ const qt = 996, ea = Tt({
|
|
|
641
643
|
} finally {
|
|
642
644
|
y.value.tickets = !1;
|
|
643
645
|
}
|
|
644
|
-
},
|
|
646
|
+
}, oe = async () => {
|
|
645
647
|
if (s.showActivity)
|
|
646
648
|
try {
|
|
647
649
|
y.value.activity = !0;
|
|
648
|
-
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(
|
|
649
651
|
"/api/client/common/getCleaningsInspections.php?propertyId=" + s.propertyId + "&areaId=" + e
|
|
650
652
|
);
|
|
651
|
-
if (!
|
|
652
|
-
throw new Error(`HTTP error! status: ${
|
|
653
|
-
const
|
|
654
|
-
|
|
653
|
+
if (!a.ok)
|
|
654
|
+
throw new Error(`HTTP error! status: ${a.status}`);
|
|
655
|
+
const t = await a.json();
|
|
656
|
+
ce.value = t.inspections || [];
|
|
655
657
|
} catch (e) {
|
|
656
|
-
console.error("Error getting activity:", e),
|
|
658
|
+
console.error("Error getting activity:", e), ce.value = [], p("show:toast", {
|
|
657
659
|
show: !0,
|
|
658
660
|
message: u("HC_FAILED_TO_LOAD_ACTIVITY"),
|
|
659
661
|
variant: "error",
|
|
@@ -662,19 +664,19 @@ const qt = 996, ea = Tt({
|
|
|
662
664
|
} finally {
|
|
663
665
|
y.value.activity = !1;
|
|
664
666
|
}
|
|
665
|
-
},
|
|
666
|
-
const
|
|
667
|
-
let
|
|
667
|
+
}, De = async (e) => {
|
|
668
|
+
const a = await e.text();
|
|
669
|
+
let t;
|
|
668
670
|
try {
|
|
669
|
-
|
|
671
|
+
t = JSON.parse(a).response;
|
|
670
672
|
} catch {
|
|
671
|
-
|
|
673
|
+
t = { code: e.status, message: a };
|
|
672
674
|
}
|
|
673
|
-
return
|
|
674
|
-
},
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
677
|
-
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;
|
|
678
680
|
switch (e) {
|
|
679
681
|
case "room_notice":
|
|
680
682
|
(n?.contains("roombox_unsel") || n?.contains("roombox_unsel_active")) && (o?.classList.remove(), o?.classList.add("roomnoticeroombox_sel"));
|
|
@@ -690,93 +692,93 @@ const qt = 996, ea = Tt({
|
|
|
690
692
|
break;
|
|
691
693
|
}
|
|
692
694
|
const l = setTimeout(() => {
|
|
693
|
-
|
|
695
|
+
a.forEach((c) => {
|
|
694
696
|
c.classList.remove("pulse");
|
|
695
697
|
});
|
|
696
698
|
}, 4500);
|
|
697
|
-
|
|
699
|
+
P.value.push(l);
|
|
698
700
|
}
|
|
699
|
-
},
|
|
701
|
+
}, tt = () => {
|
|
700
702
|
window.open("/guest/overview.php", "_blank");
|
|
701
|
-
},
|
|
702
|
-
let
|
|
703
|
+
}, at = (e) => {
|
|
704
|
+
let a = "";
|
|
703
705
|
switch (e.type) {
|
|
704
706
|
case "complaint":
|
|
705
|
-
|
|
707
|
+
a = `/complaints/complaints_view.php?id=${e.id}`;
|
|
706
708
|
break;
|
|
707
709
|
case "request":
|
|
708
|
-
|
|
710
|
+
a = `/tasks/hk_request.php?id=${e.id}`;
|
|
709
711
|
break;
|
|
710
712
|
case "satisfaction-call":
|
|
711
|
-
|
|
713
|
+
a = `/tasks/task_callback.php?id=${e.id}`;
|
|
712
714
|
break;
|
|
713
715
|
case "work-order":
|
|
714
|
-
|
|
716
|
+
a = `/tasks/workorder.php?id=${e.id}`;
|
|
715
717
|
break;
|
|
716
718
|
case "task":
|
|
717
|
-
|
|
719
|
+
a = `/tasks/task.php?id=${e.id}`;
|
|
718
720
|
break;
|
|
719
721
|
default:
|
|
720
722
|
return "#";
|
|
721
723
|
}
|
|
722
|
-
window.open(
|
|
723
|
-
},
|
|
724
|
+
window.open(a, "_blank");
|
|
725
|
+
}, ot = (e) => {
|
|
724
726
|
e.link && window.open(e.link, "_blank");
|
|
725
|
-
},
|
|
726
|
-
|
|
727
|
-
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 = {
|
|
728
730
|
type: E.value?.id,
|
|
729
731
|
propertyId: s.propertyId,
|
|
730
|
-
userId:
|
|
732
|
+
userId: H.value,
|
|
731
733
|
areaId: e,
|
|
732
|
-
areaName:
|
|
734
|
+
areaName: a
|
|
733
735
|
};
|
|
734
736
|
switch (E.value?.id) {
|
|
735
737
|
case "complaint":
|
|
736
|
-
|
|
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(
|
|
737
739
|
"yyyy-MM-dd"
|
|
738
|
-
),
|
|
740
|
+
), t.checkOutDate = _.fromJSDate(f.value.checkOutDate).toFormat(
|
|
739
741
|
"yyyy-MM-dd"
|
|
740
|
-
),
|
|
742
|
+
), t.notes = f.value.notes, t.inHouse = 2, t.source = "dashboard", p("create:todo", t);
|
|
741
743
|
break;
|
|
742
744
|
case "request":
|
|
743
|
-
|
|
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);
|
|
744
746
|
break;
|
|
745
747
|
case "room_notice":
|
|
746
|
-
|
|
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);
|
|
747
749
|
break;
|
|
748
750
|
case "work_order":
|
|
749
|
-
|
|
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);
|
|
750
752
|
break;
|
|
751
753
|
}
|
|
752
|
-
},
|
|
753
|
-
|
|
754
|
-
},
|
|
755
|
-
|
|
756
|
-
},
|
|
757
|
-
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) {
|
|
758
760
|
y.value.actionItems = !1;
|
|
759
761
|
return;
|
|
760
762
|
}
|
|
761
763
|
y.value.actionItems = !0;
|
|
762
|
-
const
|
|
763
|
-
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) {
|
|
764
766
|
case "complaint":
|
|
765
767
|
try {
|
|
766
|
-
r.value.tokenId && await
|
|
768
|
+
r.value.tokenId && await Te();
|
|
767
769
|
const n = await (await fetch("/api/client/common/getComplaintProblemsByPropertyId.php", {
|
|
768
770
|
method: "POST",
|
|
769
|
-
body:
|
|
771
|
+
body: t
|
|
770
772
|
})).json();
|
|
771
773
|
n.items && (O.value = n.items);
|
|
772
|
-
const l = await
|
|
774
|
+
const l = await J.post(
|
|
773
775
|
"/api/client/common/getComplaintMoods.php"
|
|
774
776
|
);
|
|
775
777
|
l.data.items.forEach((c) => {
|
|
776
778
|
c.label = c.display_name;
|
|
777
|
-
}),
|
|
779
|
+
}), le.value = l.data.items;
|
|
778
780
|
} catch (o) {
|
|
779
|
-
console.error("Error loading complaint options:", o),
|
|
781
|
+
console.error("Error loading complaint options:", o), p("show:toast", {
|
|
780
782
|
show: !0,
|
|
781
783
|
message: u("HC_FAILED_TO_LOAD_COMPLAINT_OPTIONS"),
|
|
782
784
|
variant: "error",
|
|
@@ -790,11 +792,11 @@ const qt = 996, ea = Tt({
|
|
|
790
792
|
try {
|
|
791
793
|
const n = await (await fetch("/api/client/common/getRoomNoticeIssuesByPropertyId.php", {
|
|
792
794
|
method: "POST",
|
|
793
|
-
body:
|
|
795
|
+
body: t
|
|
794
796
|
})).json();
|
|
795
797
|
n.items && (O.value = n.items);
|
|
796
798
|
} catch (o) {
|
|
797
|
-
console.error("Error loading room notice options:", o),
|
|
799
|
+
console.error("Error loading room notice options:", o), p("show:toast", {
|
|
798
800
|
show: !0,
|
|
799
801
|
message: u("HC_FAILED_TO_LOAD_ROOM_NOTICE_OPTIONS"),
|
|
800
802
|
variant: "error",
|
|
@@ -806,12 +808,12 @@ const qt = 996, ea = Tt({
|
|
|
806
808
|
break;
|
|
807
809
|
case "request":
|
|
808
810
|
try {
|
|
809
|
-
d.value.requestedBy =
|
|
811
|
+
d.value.requestedBy = $.value[1], d.value.assignType = z.value[0];
|
|
810
812
|
const n = await (await fetch("/api/client/common/getHousekeepingItemsByPropertyId.php", {
|
|
811
813
|
method: "POST",
|
|
812
|
-
body:
|
|
814
|
+
body: t
|
|
813
815
|
})).json();
|
|
814
|
-
if (n.items && (O.value = n.items), await
|
|
816
|
+
if (n.items && (O.value = n.items), await fe(), d.value.department = M.value.find(
|
|
815
817
|
(l) => parseInt(l.id) === 4
|
|
816
818
|
), s.allowWhenWhere)
|
|
817
819
|
try {
|
|
@@ -834,7 +836,7 @@ const qt = 996, ea = Tt({
|
|
|
834
836
|
value: h.id
|
|
835
837
|
})) : F.value = [];
|
|
836
838
|
} catch (l) {
|
|
837
|
-
console.error("Error loading When/Where options:", l), q.value = [], F.value = [],
|
|
839
|
+
console.error("Error loading When/Where options:", l), q.value = [], F.value = [], p("show:toast", {
|
|
838
840
|
show: !0,
|
|
839
841
|
message: u("HC_FAILED_TO_LOAD_WHEN_WHERE_OPTIONS"),
|
|
840
842
|
variant: "error",
|
|
@@ -842,7 +844,7 @@ const qt = 996, ea = Tt({
|
|
|
842
844
|
});
|
|
843
845
|
}
|
|
844
846
|
} catch (o) {
|
|
845
|
-
console.error("Error loading request options:", o),
|
|
847
|
+
console.error("Error loading request options:", o), p("show:toast", {
|
|
846
848
|
show: !0,
|
|
847
849
|
message: u("HC_FAILED_TO_LOAD_REQUEST_OPTIONS"),
|
|
848
850
|
variant: "error",
|
|
@@ -854,10 +856,10 @@ const qt = 996, ea = Tt({
|
|
|
854
856
|
break;
|
|
855
857
|
case "work_order":
|
|
856
858
|
try {
|
|
857
|
-
v.value.requestedBy =
|
|
859
|
+
v.value.requestedBy = $.value[0], v.value.assignType = z.value[0];
|
|
858
860
|
const n = await (await fetch("/api/client/common/getItemsByRoomId.php", {
|
|
859
861
|
method: "POST",
|
|
860
|
-
body:
|
|
862
|
+
body: t
|
|
861
863
|
})).json(), l = [];
|
|
862
864
|
let c = {
|
|
863
865
|
group: "",
|
|
@@ -866,20 +868,20 @@ const qt = 996, ea = Tt({
|
|
|
866
868
|
n.items && (n.items.forEach((m) => {
|
|
867
869
|
m.section_name !== c.group && (c.group && l.push({ ...c }), c.group = m.section_name, c.options = []), m.label && c.options.push(m);
|
|
868
870
|
}), c.group && l.push({ ...c })), O.value = l, await Promise.all([
|
|
869
|
-
|
|
871
|
+
J.post(
|
|
870
872
|
"/api/client/common/getWorkOrderIssues.php"
|
|
871
873
|
),
|
|
872
|
-
|
|
874
|
+
fe()
|
|
873
875
|
]).then((m) => {
|
|
874
876
|
const h = m[0];
|
|
875
877
|
h.data.issues.forEach((I) => {
|
|
876
878
|
I.label = I.display_name;
|
|
877
|
-
}),
|
|
878
|
-
}), v.value.department =
|
|
879
|
+
}), de.value = h.data.issues;
|
|
880
|
+
}), v.value.department = M.value.find(
|
|
879
881
|
(m) => parseInt(m.id) === 2
|
|
880
882
|
);
|
|
881
883
|
} catch (o) {
|
|
882
|
-
console.error("Error loading work order options:", o),
|
|
884
|
+
console.error("Error loading work order options:", o), p("show:toast", {
|
|
883
885
|
show: !0,
|
|
884
886
|
message: u("HC_FAILED_TO_LOAD_WORK_ORDER_OPTIONS"),
|
|
885
887
|
variant: "error",
|
|
@@ -893,29 +895,29 @@ const qt = 996, ea = Tt({
|
|
|
893
895
|
y.value.actionItems = !1;
|
|
894
896
|
return;
|
|
895
897
|
}
|
|
896
|
-
},
|
|
897
|
-
|
|
898
|
-
},
|
|
899
|
-
const e = document.getElementById("comment-field"),
|
|
900
|
-
e.style.height =
|
|
901
|
-
},
|
|
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 = () => {
|
|
902
904
|
const e = document.getElementById("comments-container");
|
|
903
905
|
e?.scroll({
|
|
904
906
|
top: e.scrollHeight,
|
|
905
907
|
behavior: "smooth"
|
|
906
908
|
});
|
|
907
|
-
},
|
|
908
|
-
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) {
|
|
909
911
|
y.value.sendingMessage = !0;
|
|
910
912
|
try {
|
|
911
|
-
const
|
|
912
|
-
|
|
913
|
-
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(
|
|
914
916
|
"/api/client/connect/sendMessage.php",
|
|
915
|
-
|
|
917
|
+
a
|
|
916
918
|
);
|
|
917
|
-
if (
|
|
918
|
-
|
|
919
|
+
if (t.data.status === "error") {
|
|
920
|
+
p("show:toast", {
|
|
919
921
|
show: !0,
|
|
920
922
|
message: u("HC_FAILED_TO_SEND_MESSAGE"),
|
|
921
923
|
variant: "error",
|
|
@@ -923,9 +925,9 @@ const qt = 996, ea = Tt({
|
|
|
923
925
|
});
|
|
924
926
|
return;
|
|
925
927
|
}
|
|
926
|
-
|
|
927
|
-
} catch (
|
|
928
|
-
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", {
|
|
929
931
|
show: !0,
|
|
930
932
|
message: u("HC_FAILED_TO_SEND_MESSAGE"),
|
|
931
933
|
variant: "error",
|
|
@@ -935,15 +937,15 @@ const qt = 996, ea = Tt({
|
|
|
935
937
|
y.value.sendingMessage = !1;
|
|
936
938
|
}
|
|
937
939
|
}
|
|
938
|
-
},
|
|
939
|
-
if (!(!r.value.tokenId || !
|
|
940
|
+
}, ct = async () => {
|
|
941
|
+
if (!(!r.value.tokenId || !H.value)) {
|
|
940
942
|
y.value.conversationToggle = !0;
|
|
941
943
|
try {
|
|
942
|
-
const e = S.value ? "/api/client/connect/closeConversation.php" : "/api/client/connect/openConversation.php",
|
|
943
|
-
|
|
944
|
-
const
|
|
945
|
-
if (
|
|
946
|
-
|
|
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", {
|
|
947
949
|
show: !0,
|
|
948
950
|
message: u("HC_FAILED_TO_UPDATE_CONVERSATION"),
|
|
949
951
|
variant: "error",
|
|
@@ -951,14 +953,14 @@ const qt = 996, ea = Tt({
|
|
|
951
953
|
});
|
|
952
954
|
return;
|
|
953
955
|
}
|
|
954
|
-
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", {
|
|
955
957
|
show: !0,
|
|
956
958
|
message: S.value ? u("HC_CONVERSATION_REOPENED") : u("HC_CONVERSATION_CLOSED"),
|
|
957
959
|
variant: "success",
|
|
958
960
|
icon: "check-circle"
|
|
959
961
|
});
|
|
960
962
|
} catch (e) {
|
|
961
|
-
console.error("toggleMarkOpenClose error:", e),
|
|
963
|
+
console.error("toggleMarkOpenClose error:", e), p("show:toast", {
|
|
962
964
|
show: !0,
|
|
963
965
|
message: u("HC_FAILED_TO_UPDATE_CONVERSATION"),
|
|
964
966
|
variant: "error",
|
|
@@ -968,18 +970,18 @@ const qt = 996, ea = Tt({
|
|
|
968
970
|
y.value.conversationToggle = !1;
|
|
969
971
|
}
|
|
970
972
|
}
|
|
971
|
-
},
|
|
972
|
-
if (s.isTestEnvironment && !(!r.value?.tokenId || !
|
|
973
|
-
|
|
973
|
+
}, dt = async () => {
|
|
974
|
+
if (s.isTestEnvironment && !(!r.value?.tokenId || !U.value.trim())) {
|
|
975
|
+
ie.value = !0;
|
|
974
976
|
try {
|
|
975
977
|
const e = new FormData();
|
|
976
|
-
e.append("tokenId", r.value.tokenId), e.append("content",
|
|
977
|
-
const
|
|
978
|
+
e.append("tokenId", r.value.tokenId), e.append("content", U.value.trim());
|
|
979
|
+
const a = await J.post(
|
|
978
980
|
"/api/client/connect/simulateInbound.php",
|
|
979
981
|
e
|
|
980
982
|
);
|
|
981
|
-
if (
|
|
982
|
-
|
|
983
|
+
if (a.data.status === "error") {
|
|
984
|
+
p("show:toast", {
|
|
983
985
|
show: !0,
|
|
984
986
|
message: u("HC_FAILED_TO_SIMULATE_MESSAGE"),
|
|
985
987
|
variant: "error",
|
|
@@ -987,55 +989,39 @@ const qt = 996, ea = Tt({
|
|
|
987
989
|
});
|
|
988
990
|
return;
|
|
989
991
|
}
|
|
990
|
-
|
|
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", {
|
|
991
993
|
show: !0,
|
|
992
994
|
message: u("HC_SIMULATED_GUEST_REPLY"),
|
|
993
995
|
variant: "success",
|
|
994
996
|
icon: "check-circle"
|
|
995
997
|
});
|
|
996
998
|
} catch (e) {
|
|
997
|
-
console.error("simulateGuestReply error:", e),
|
|
999
|
+
console.error("simulateGuestReply error:", e), p("show:toast", {
|
|
998
1000
|
show: !0,
|
|
999
1001
|
message: u("HC_FAILED_TO_SIMULATE_MESSAGE"),
|
|
1000
1002
|
variant: "error",
|
|
1001
1003
|
icon: "exclamation-circle"
|
|
1002
1004
|
});
|
|
1003
1005
|
} finally {
|
|
1004
|
-
|
|
1006
|
+
ie.value = !1;
|
|
1005
1007
|
}
|
|
1006
1008
|
}
|
|
1007
|
-
},
|
|
1008
|
-
|
|
1009
|
-
},
|
|
1010
|
-
|
|
1011
|
-
document.visibilityState === "visible" &&
|
|
1012
|
-
},
|
|
1013
|
-
},
|
|
1014
|
-
|
|
1015
|
-
},
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
const e = Y.value?.getBoundingClientRect().top, t = window.innerHeight;
|
|
1021
|
-
ce.value = t - e < G.value ? "bottom" : "top";
|
|
1022
|
-
}
|
|
1023
|
-
}, Te = () => {
|
|
1024
|
-
if (s.position === "top" || s.position === "bottom") {
|
|
1025
|
-
const e = Y.value?.getBoundingClientRect().top, t = window.innerHeight;
|
|
1026
|
-
me.value = t - e < G.value ? "top" : "bottom";
|
|
1027
|
-
} else {
|
|
1028
|
-
const e = Y.value?.getBoundingClientRect().left, t = window.innerWidth;
|
|
1029
|
-
me.value = t - e < U.value ? "left" : "right";
|
|
1030
|
-
}
|
|
1031
|
-
}, Me = () => {
|
|
1032
|
-
H.value = !H.value, H.value ? (b.value = "", M.value.info = ae.value, M.value.tickets = oe.value, M.value.comments = te.value, ae.value = !1, oe.value = !1, document.getElementById("comment-field")?.focus()) : (ae.value = M.value.info, oe.value = M.value.tickets, te.value = M.value.comments);
|
|
1033
|
-
}, wt = async (e, t) => {
|
|
1034
|
-
const a = r.value?.qv2Rooms?.qRoomId || r.value?.id || s.room?.id, o = new FormData();
|
|
1035
|
-
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) {
|
|
1036
1022
|
const n = [];
|
|
1037
1023
|
A.value.forEach((l) => {
|
|
1038
|
-
l.id === e && l.type ===
|
|
1024
|
+
l.id === e && l.type === a ? n.unshift({
|
|
1039
1025
|
...l,
|
|
1040
1026
|
isNew: !0
|
|
1041
1027
|
}) : n.push({
|
|
@@ -1046,147 +1032,141 @@ const qt = 996, ea = Tt({
|
|
|
1046
1032
|
}
|
|
1047
1033
|
};
|
|
1048
1034
|
B(() => s.open, () => {
|
|
1049
|
-
if (s.open && s.showComments &&
|
|
1050
|
-
const e = setTimeout(
|
|
1051
|
-
|
|
1035
|
+
if (s.open && s.showComments && b.value.length) {
|
|
1036
|
+
const e = setTimeout(V, 500);
|
|
1037
|
+
P.value.push(e);
|
|
1052
1038
|
}
|
|
1053
|
-
s.open || (
|
|
1039
|
+
s.open || (Ie(), pe(), k.value = null, b.value = [], S.value = !1);
|
|
1054
1040
|
}), B(
|
|
1055
|
-
() => [s.open, s.showComments,
|
|
1056
|
-
([e,
|
|
1057
|
-
e &&
|
|
1041
|
+
() => [s.open, s.showComments, Z.value, r.value?.tokenId],
|
|
1042
|
+
([e, a, t, o]) => {
|
|
1043
|
+
e && a && t && o ? vt() : pe();
|
|
1058
1044
|
}
|
|
1059
|
-
), B(
|
|
1060
|
-
const e = setTimeout(
|
|
1061
|
-
|
|
1062
|
-
}), B(() => s.allowWhenWhere, (e,
|
|
1063
|
-
|
|
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 = []);
|
|
1064
1050
|
});
|
|
1065
|
-
const
|
|
1066
|
-
|
|
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();
|
|
1067
1053
|
};
|
|
1068
|
-
return B(() => s.open, async (e,
|
|
1069
|
-
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());
|
|
1070
1056
|
}), B(
|
|
1071
1057
|
() => s.room.id,
|
|
1072
|
-
(e,
|
|
1073
|
-
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()));
|
|
1074
1060
|
}
|
|
1075
|
-
),
|
|
1061
|
+
), yt(async () => {
|
|
1076
1062
|
const e = JSON.parse(
|
|
1077
1063
|
window.localStorage.getItem("authenticated")
|
|
1078
1064
|
);
|
|
1079
|
-
|
|
1080
|
-
}),
|
|
1081
|
-
|
|
1065
|
+
H.value = e?.user?.id || window.userId || "", r.value = s.room;
|
|
1066
|
+
}), gt(() => {
|
|
1067
|
+
P.value.forEach((e) => {
|
|
1082
1068
|
clearTimeout(e);
|
|
1083
|
-
}),
|
|
1069
|
+
}), pe();
|
|
1084
1070
|
}), {
|
|
1085
|
-
DateTime:
|
|
1071
|
+
DateTime: _,
|
|
1086
1072
|
// Refs
|
|
1087
|
-
activityList:
|
|
1088
|
-
actionMenuOpen:
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
expandedStates: M,
|
|
1101
|
-
expandTickets: oe,
|
|
1102
|
-
guestDetailsData: Le,
|
|
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,
|
|
1103
1086
|
itemOptions: O,
|
|
1104
1087
|
loading: y,
|
|
1105
|
-
messages:
|
|
1106
|
-
moodOptions:
|
|
1088
|
+
messages: b,
|
|
1089
|
+
moodOptions: le,
|
|
1107
1090
|
pmsData: R,
|
|
1108
|
-
|
|
1109
|
-
quickReplyOpen:
|
|
1091
|
+
preferredPlacement: He,
|
|
1092
|
+
quickReplyOpen: L,
|
|
1110
1093
|
request: d,
|
|
1111
|
-
requestedByOptions:
|
|
1112
|
-
requestLoading:
|
|
1094
|
+
requestedByOptions: $,
|
|
1095
|
+
requestLoading: ue,
|
|
1113
1096
|
requestType: E,
|
|
1114
1097
|
roomDetailsData: r,
|
|
1115
|
-
roomNotice:
|
|
1116
|
-
roomNotices:
|
|
1117
|
-
showCreateRequest:
|
|
1098
|
+
roomNotice: w,
|
|
1099
|
+
roomNotices: W,
|
|
1100
|
+
showCreateRequest: te,
|
|
1118
1101
|
ticketsList: A,
|
|
1119
|
-
todoOptions:
|
|
1120
|
-
|
|
1121
|
-
userId: P,
|
|
1102
|
+
todoOptions: Me,
|
|
1103
|
+
userId: H,
|
|
1122
1104
|
workOrder: v,
|
|
1123
|
-
workOrderIssues:
|
|
1105
|
+
workOrderIssues: de,
|
|
1124
1106
|
whenOptions: q,
|
|
1125
1107
|
whereOptions: F,
|
|
1126
1108
|
// Guest Connect state
|
|
1127
1109
|
isConversationOpen: S,
|
|
1128
1110
|
lastMessageId: k,
|
|
1129
1111
|
// Simulate Guest Reply state (test environments only)
|
|
1130
|
-
simulateOpen:
|
|
1131
|
-
simulateContent:
|
|
1132
|
-
simulateLoading:
|
|
1112
|
+
simulateOpen: G,
|
|
1113
|
+
simulateContent: U,
|
|
1114
|
+
simulateLoading: ie,
|
|
1133
1115
|
// Computed
|
|
1134
|
-
cleanliness:
|
|
1135
|
-
greenerStayIconUrl:
|
|
1136
|
-
greenerStayTooltipContent:
|
|
1137
|
-
isGreenerStay:
|
|
1138
|
-
filteredReplies:
|
|
1139
|
-
groupedMessages:
|
|
1140
|
-
hasGuestCallback:
|
|
1141
|
-
hasComplaint:
|
|
1142
|
-
itemOptionsList:
|
|
1143
|
-
occupied:
|
|
1144
|
-
occupancyTooltipContent:
|
|
1145
|
-
selectedAssignType:
|
|
1146
|
-
selectedDepartment:
|
|
1147
|
-
selectedRequestedBy:
|
|
1148
|
-
stayDetails:
|
|
1149
|
-
tagsList:
|
|
1150
|
-
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,
|
|
1151
1133
|
// Methods
|
|
1152
|
-
closeRequest:
|
|
1153
|
-
createCallback:
|
|
1154
|
-
getActivity:
|
|
1134
|
+
closeRequest: Ie,
|
|
1135
|
+
createCallback: Ye,
|
|
1136
|
+
getActivity: oe,
|
|
1155
1137
|
createMessageList: x,
|
|
1156
|
-
getChatMessages:
|
|
1157
|
-
getHowLongAgo:
|
|
1158
|
-
getPMSData:
|
|
1159
|
-
getRoomNotices:
|
|
1160
|
-
getSharedData:
|
|
1161
|
-
getStayDetails:
|
|
1162
|
-
getTicketColor:
|
|
1163
|
-
getTicketIcon:
|
|
1164
|
-
getTickets:
|
|
1165
|
-
handleFailedResponse:
|
|
1166
|
-
handlePulse:
|
|
1167
|
-
onClickActivity:
|
|
1168
|
-
onClickEditConnectGuest:
|
|
1169
|
-
onClickTicket:
|
|
1170
|
-
onCreateRequestSubmit:
|
|
1171
|
-
onHoverToggle:
|
|
1172
|
-
onSelectQuickReply:
|
|
1173
|
-
onSelectToDo:
|
|
1174
|
-
openRequest:
|
|
1175
|
-
refreshPMSData:
|
|
1176
|
-
resizeTextarea:
|
|
1177
|
-
scrollToConnectBottom:
|
|
1178
|
-
sendChatMessage:
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
toggleQuickReply: Me,
|
|
1183
|
-
updateTickets: wt,
|
|
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,
|
|
1184
1164
|
// Simulate Guest Reply methods (test environments only)
|
|
1185
|
-
simulateGuestReply:
|
|
1186
|
-
toggleSimulateOpen:
|
|
1165
|
+
simulateGuestReply: dt,
|
|
1166
|
+
toggleSimulateOpen: mt
|
|
1187
1167
|
};
|
|
1188
1168
|
}
|
|
1189
1169
|
});
|
|
1190
1170
|
export {
|
|
1191
|
-
|
|
1171
|
+
Kt as default
|
|
1192
1172
|
};
|