@quoreadmin/ui 1.5.0 → 1.5.1
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/index10.js +24 -24
- package/dist/index136.js +104 -103
- package/dist/index138.js +1 -1
- package/dist/index140.js +4 -4
- package/dist/index167.js +14 -14
- package/dist/index168.js +3 -3
- package/dist/index171.js +4 -4
- package/dist/index178.js +10 -10
- package/dist/index180.js +10 -10
- package/dist/index184.js +17 -17
- package/dist/index185.js +5826 -1078
- package/dist/index186.js +209 -0
- package/dist/index187.js +19 -5922
- package/dist/index188.js +10 -199
- package/dist/index189.js +1180 -25
- package/dist/index192.js +2 -2
- package/dist/index194.js +14 -14
- package/dist/index195.js +1 -1
- package/dist/index196.js +1 -1
- package/dist/index197.js +3 -3
- package/dist/index198.js +6 -6
- package/dist/index199.js +84 -29
- package/dist/index200.js +400 -109
- package/dist/index201.js +22 -36
- package/dist/index202.js +33 -26
- package/dist/index203.js +111 -31
- package/dist/index204.js +36 -9
- package/dist/index205.js +26 -19
- package/dist/index206.js +36 -10
- package/dist/index207.js +9 -10
- package/dist/index208.js +18 -50
- package/dist/index209.js +10 -43
- package/dist/index210.js +10 -4
- package/dist/index211.js +48 -36
- package/dist/index212.js +43 -21
- package/dist/index213.js +3 -87
- package/dist/index214.js +35 -403
- package/dist/index215.js +21 -22
- package/dist/index216.js +152 -3623
- package/dist/index217.js +226 -53
- package/dist/index218.js +37 -77
- package/dist/index219.js +10 -52
- package/dist/index220.js +119 -207
- package/dist/index221.js +38 -10
- package/dist/index222.js +79 -56
- package/dist/index223.js +20 -61
- package/dist/index224.js +20 -54
- package/dist/index225.js +20 -75
- package/dist/index226.js +19 -722
- package/dist/index227.js +20 -39
- package/dist/index228.js +22 -64
- package/dist/index229.js +22 -11
- package/dist/index230.js +20 -705
- package/dist/index231.js +792 -776
- package/dist/index232.js +701 -21
- package/dist/index233.js +176 -22
- package/dist/index234.js +15 -13
- package/dist/index235.js +20 -836
- package/dist/index236.js +19 -701
- package/dist/index237.js +3 -176
- package/dist/index238.js +186 -19
- package/dist/index239.js +131 -18
- package/dist/index240.js +160 -21
- package/dist/index241.js +1223 -20
- package/dist/index242.js +9 -9
- package/dist/index243.js +15 -13
- package/dist/index244.js +20 -3
- package/dist/index245.js +21 -186
- package/dist/index246.js +28 -132
- package/dist/index247.js +19 -160
- package/dist/index248.js +20 -1223
- package/dist/index249.js +2 -127
- package/dist/index250.js +2 -20
- package/dist/index251.js +3632 -22
- package/dist/index252.js +55 -20
- package/dist/index253.js +77 -22
- package/dist/index254.js +46 -32
- package/dist/index255.js +215 -29
- package/dist/index256.js +10 -20
- package/dist/index257.js +57 -20
- package/dist/index258.js +61 -2
- package/dist/index259.js +54 -2
- package/dist/index260.js +74 -160
- package/dist/index261.js +707 -212
- package/dist/index262.js +39 -37
- package/dist/index263.js +64 -10
- package/dist/index264.js +11 -22
- package/dist/index265.js +689 -183
- package/dist/index266.js +813 -63
- package/dist/index267.js +21 -33
- package/dist/index268.js +184 -25
- package/dist/index269.js +69 -79
- package/dist/index270.js +34 -20
- package/dist/index271.js +39 -19
- package/dist/index278.js +2 -235
- package/dist/index279.js +78 -5
- package/dist/index280.js +76 -131
- package/dist/index281.js +21 -67
- package/dist/index282.js +926 -78
- package/dist/index283.js +21 -28
- package/dist/index284.js +18 -7
- package/dist/index285.js +19 -74
- package/dist/index286.js +68 -3
- package/dist/index287.js +19 -2
- package/dist/index288.js +18 -82
- package/dist/index289.js +51 -51
- package/dist/index290.js +21 -5
- package/dist/index291.js +21 -4
- package/dist/index292.js +62 -178
- package/dist/index293.js +229 -57
- package/dist/index294.js +6 -75
- package/dist/index295.js +123 -1507
- package/dist/index296.js +61 -379
- package/dist/index297.js +81 -2725
- package/dist/index298.js +26 -83
- package/dist/index299.js +9 -3770
- package/dist/index300.js +72 -57
- package/dist/index301.js +4 -15
- package/dist/index302.js +2 -84
- package/dist/index303.js +74 -193
- package/dist/index304.js +54 -246
- package/dist/index305.js +5 -78
- package/dist/index306.js +4 -78
- package/dist/index307.js +178 -21
- package/dist/index308.js +56 -928
- package/dist/index309.js +75 -22
- package/dist/index310.js +1518 -20
- package/dist/index311.js +386 -20
- package/dist/index312.js +2731 -69
- package/dist/index313.js +86 -19
- package/dist/index314.js +3770 -19
- package/dist/index315.js +56 -50
- package/dist/index316.js +15 -22
- package/dist/index317.js +83 -21
- package/dist/index318.js +201 -62
- package/dist/index319.js +246 -2
- package/dist/index320.js +1 -1
- package/dist/index321.js +1 -1
- package/dist/index322.js +1 -1
- package/dist/index328.js +1 -1
- package/dist/index333.js +1 -1
- package/dist/index338.js +2 -2
- package/dist/index343.js +1 -1
- package/dist/index344.js +2 -2
- package/dist/index349.js +35 -19
- package/dist/index350.js +19 -55
- package/dist/index351.js +19 -28
- package/dist/index352.js +63 -6
- package/dist/index353.js +36 -51
- package/dist/index354.js +21 -6
- package/dist/index355.js +55 -11
- package/dist/index356.js +29 -7
- package/dist/index357.js +6 -27
- package/dist/index358.js +52 -2
- package/dist/index359.js +5 -69
- package/dist/index360.js +11 -166
- package/dist/index361.js +7 -37
- package/dist/index362.js +28 -20
- package/dist/index363.js +2 -20
- package/dist/index364.js +67 -61
- package/dist/index365.js +166 -36
- package/dist/index366.js +17 -13
- package/dist/index367.js +31 -7
- package/dist/index368.js +10 -30
- package/dist/index369.js +3 -10
- package/dist/index370.js +3 -3
- package/dist/index371.js +13 -4
- package/dist/index372.js +7 -12
- package/dist/index373.js +11 -4
- package/dist/index374.js +5 -33
- package/dist/index375.js +33 -31
- package/dist/index376.js +29 -26
- package/dist/index377.js +26 -59
- package/dist/index378.js +59 -96
- package/dist/index381.js +97 -16
- package/dist/index382.js +1 -1
- package/dist/index387.js +1 -1
- package/dist/index388.js +2 -2
- package/dist/index75.js +185 -182
- package/dist/src/components/calendar/calendar.d.ts +65 -37
- package/dist/src/components/calendar/calendar.stories.d.ts +13 -6
- package/dist/src/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/index190.js +0 -20
package/dist/index10.js
CHANGED
|
@@ -2,10 +2,10 @@ import w from "./index75.js";
|
|
|
2
2
|
import { resolveComponent as g, createElementBlock as o, openBlock as s, createCommentVNode as i, createElementVNode as c, renderSlot as t, createVNode as p, normalizeClass as h, createBlock as C, toDisplayString as r, Fragment as d, renderList as u, createTextVNode as k } from "vue";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import $ from "./index61.js";
|
|
5
|
-
const
|
|
5
|
+
const M = { class: "q-calendar" }, V = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "calendar-header"
|
|
8
|
-
},
|
|
8
|
+
}, f = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "nav-spacer"
|
|
11
11
|
}, N = ["disabled"], D = {
|
|
@@ -14,24 +14,24 @@ const f = { class: "q-calendar" }, M = {
|
|
|
14
14
|
}, R = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "header-text"
|
|
17
|
-
},
|
|
17
|
+
}, S = {
|
|
18
18
|
key: 2,
|
|
19
19
|
class: "header-text"
|
|
20
|
-
},
|
|
20
|
+
}, b = {
|
|
21
21
|
key: 3,
|
|
22
22
|
class: "nav-spacer"
|
|
23
|
-
},
|
|
23
|
+
}, T = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "calendar-body"
|
|
26
|
-
},
|
|
26
|
+
}, I = {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "month-label"
|
|
29
|
-
},
|
|
29
|
+
}, H = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "calendar-weekdays"
|
|
32
|
-
},
|
|
32
|
+
}, L = { class: "calendar-grid" }, Y = ["onClick", "onMouseenter"], z = { class: "day-number" }, E = {
|
|
33
33
|
key: 0,
|
|
34
|
-
class: "
|
|
34
|
+
class: "today-indicator"
|
|
35
35
|
}, W = {
|
|
36
36
|
key: 2,
|
|
37
37
|
class: "calendar-body calendar-body-continuous"
|
|
@@ -40,7 +40,7 @@ const f = { class: "q-calendar" }, M = {
|
|
|
40
40
|
class: "calendar-weekdays"
|
|
41
41
|
}, F = { class: "calendar-grid calendar-grid-continuous" }, P = ["onClick", "onMouseenter"], Q = { class: "day-number" }, A = {
|
|
42
42
|
key: 0,
|
|
43
|
-
class: "
|
|
43
|
+
class: "today-indicator"
|
|
44
44
|
}, G = {
|
|
45
45
|
key: 3,
|
|
46
46
|
class: "calendar-months-view"
|
|
@@ -53,8 +53,8 @@ const f = { class: "q-calendar" }, M = {
|
|
|
53
53
|
};
|
|
54
54
|
function Z(e, l, _, O, j, x) {
|
|
55
55
|
const v = g("q-icon");
|
|
56
|
-
return s(), o("div",
|
|
57
|
-
e.showHeader ? (s(), o("div",
|
|
56
|
+
return s(), o("div", M, [
|
|
57
|
+
e.showHeader ? (s(), o("div", V, [
|
|
58
58
|
e.showNavigation ? (s(), o("button", {
|
|
59
59
|
key: 0,
|
|
60
60
|
type: "button",
|
|
@@ -70,7 +70,7 @@ function Z(e, l, _, O, j, x) {
|
|
|
70
70
|
color: "inkwell-20"
|
|
71
71
|
})
|
|
72
72
|
], !0)
|
|
73
|
-
])) : (s(), o("span",
|
|
73
|
+
])) : (s(), o("span", f)),
|
|
74
74
|
c("button", {
|
|
75
75
|
type: "button",
|
|
76
76
|
class: h([
|
|
@@ -84,9 +84,9 @@ function Z(e, l, _, O, j, x) {
|
|
|
84
84
|
title: e.headerTitle,
|
|
85
85
|
view: e.currentView
|
|
86
86
|
}, () => [
|
|
87
|
-
e.currentView === "days" ? (s(), o("span", D, r(e.headerTitle), 1)) : e.currentView === "months" ? (s(), o("span", R, r(e.viewDate.getFullYear()), 1)) : (s(), o("span",
|
|
87
|
+
e.currentView === "days" ? (s(), o("span", D, r(e.headerTitle), 1)) : e.currentView === "months" ? (s(), o("span", R, r(e.viewDate.getFullYear()), 1)) : (s(), o("span", S, r(e.yearRangeStart) + " - " + r(e.yearRangeStart + 11), 1))
|
|
88
88
|
], !0),
|
|
89
|
-
e.headerClickable && e.
|
|
89
|
+
e.headerClickable && e.isMultiMonth ? (s(), C(v, {
|
|
90
90
|
key: 0,
|
|
91
91
|
icon: "chevron-down",
|
|
92
92
|
type: "line",
|
|
@@ -110,14 +110,14 @@ function Z(e, l, _, O, j, x) {
|
|
|
110
110
|
color: "inkwell-20"
|
|
111
111
|
})
|
|
112
112
|
], !0)
|
|
113
|
-
])) : (s(), o("span",
|
|
113
|
+
])) : (s(), o("span", b))
|
|
114
114
|
])) : i("", !0),
|
|
115
|
-
e.currentView === "days" && !e.continuous ? (s(), o("div",
|
|
115
|
+
e.currentView === "days" && !e.continuous ? (s(), o("div", T, [
|
|
116
116
|
(s(!0), o(d, null, u(e.displayedMonths, (n) => (s(), o("div", {
|
|
117
117
|
key: `${n.year}-${n.month}`,
|
|
118
|
-
class: h(["calendar-month", { "calendar-month-multi": e.
|
|
118
|
+
class: h(["calendar-month", { "calendar-month-multi": e.isMultiMonth }])
|
|
119
119
|
}, [
|
|
120
|
-
e.
|
|
120
|
+
e.isMultiMonth ? (s(), o("div", I, [
|
|
121
121
|
t(e.$slots, "month-label", {
|
|
122
122
|
month: n.month,
|
|
123
123
|
year: n.year
|
|
@@ -125,7 +125,7 @@ function Z(e, l, _, O, j, x) {
|
|
|
125
125
|
k(r(e.monthNamesShort[n.month]) + " " + r(n.year), 1)
|
|
126
126
|
], !0)
|
|
127
127
|
])) : i("", !0),
|
|
128
|
-
e.showWeekDays ? (s(), o("div",
|
|
128
|
+
e.showWeekDays ? (s(), o("div", H, [
|
|
129
129
|
(s(!0), o(d, null, u(e.daysOfWeek, (a) => (s(), o("div", {
|
|
130
130
|
key: a,
|
|
131
131
|
class: "weekday"
|
|
@@ -135,7 +135,7 @@ function Z(e, l, _, O, j, x) {
|
|
|
135
135
|
], !0)
|
|
136
136
|
]))), 128))
|
|
137
137
|
])) : i("", !0),
|
|
138
|
-
c("div",
|
|
138
|
+
c("div", L, [
|
|
139
139
|
(s(!0), o(d, null, u(n.dates, (a, y) => (s(), o("div", {
|
|
140
140
|
key: y,
|
|
141
141
|
class: h([
|
|
@@ -157,7 +157,7 @@ function Z(e, l, _, O, j, x) {
|
|
|
157
157
|
}, [
|
|
158
158
|
t(e.$slots, "day", { date: a }, () => [
|
|
159
159
|
c("span", z, r(a.day), 1),
|
|
160
|
-
a.
|
|
160
|
+
a.isToday ? (s(), o("span", E)) : i("", !0)
|
|
161
161
|
], !0)
|
|
162
162
|
], 42, Y))), 128))
|
|
163
163
|
])
|
|
@@ -196,7 +196,7 @@ function Z(e, l, _, O, j, x) {
|
|
|
196
196
|
}, [
|
|
197
197
|
t(e.$slots, "day", { date: n }, () => [
|
|
198
198
|
c("span", Q, r(n.day), 1),
|
|
199
|
-
n.
|
|
199
|
+
n.isToday ? (s(), o("span", A)) : i("", !0)
|
|
200
200
|
], !0)
|
|
201
201
|
], 42, P))), 128))
|
|
202
202
|
])
|
|
@@ -238,7 +238,7 @@ function Z(e, l, _, O, j, x) {
|
|
|
238
238
|
])) : i("", !0)
|
|
239
239
|
]);
|
|
240
240
|
}
|
|
241
|
-
const ae = /* @__PURE__ */ $(w, [["render", Z], ["__scopeId", "data-v-
|
|
241
|
+
const ae = /* @__PURE__ */ $(w, [["render", Z], ["__scopeId", "data-v-5508e564"]]);
|
|
242
242
|
export {
|
|
243
243
|
ae as default
|
|
244
244
|
};
|
package/dist/index136.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Fe, ref as s, computed as p, watch as
|
|
1
|
+
import { defineComponent as Fe, ref as s, computed as p, watch as G, onMounted as je, onUnmounted as $e } from "vue";
|
|
2
2
|
import { useI18n as ze } from "vue-i18n";
|
|
3
3
|
import { DateTime as h } from "./index159.js";
|
|
4
4
|
import "./index182.js";
|
|
@@ -11,7 +11,7 @@ import Ze from "./index38.js";
|
|
|
11
11
|
import et from "./index183.js";
|
|
12
12
|
import tt from "./index45.js";
|
|
13
13
|
import at from "./index48.js";
|
|
14
|
-
import
|
|
14
|
+
import Q from "./index184.js";
|
|
15
15
|
const ht = Fe({
|
|
16
16
|
name: "QRoomDetailsPopover",
|
|
17
17
|
components: {
|
|
@@ -120,8 +120,8 @@ const ht = Fe({
|
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
emits: ["create:callback", "create:todo", "refresh:pms", "toggle"],
|
|
123
|
-
setup(
|
|
124
|
-
const { t: d } = ze(), r = s(null),
|
|
123
|
+
setup(n, { emit: w }) {
|
|
124
|
+
const { t: d } = ze(), r = s(null), F = s(!1), j = s("left"), A = s([
|
|
125
125
|
{
|
|
126
126
|
id: 1,
|
|
127
127
|
label: d("HC_DEPARTMENT")
|
|
@@ -149,15 +149,15 @@ const ht = Fe({
|
|
|
149
149
|
problem: null,
|
|
150
150
|
notes: "",
|
|
151
151
|
tokenId: r.value?.tokenId
|
|
152
|
-
}),
|
|
152
|
+
}), E = s(250), M = s(290), O = s([]), me = s([]), $ = s(!0), B = s(!0), b = s({
|
|
153
153
|
info: !0,
|
|
154
154
|
tickets: !0,
|
|
155
155
|
comments: !0
|
|
156
|
-
}),
|
|
156
|
+
}), P = s(!0), pe = s(n.guestDetails), D = s([]), T = s({
|
|
157
157
|
pms: !1,
|
|
158
158
|
roomNotices: !1,
|
|
159
159
|
tickets: !1
|
|
160
|
-
}), oe = s([]),
|
|
160
|
+
}), oe = s([]), z = s([]), W = s("bottom"), C = s(null), X = s([]), R = s(!1), u = s({
|
|
161
161
|
assignType: null,
|
|
162
162
|
department: null,
|
|
163
163
|
due: /* @__PURE__ */ new Date(),
|
|
@@ -181,7 +181,7 @@ const ht = Fe({
|
|
|
181
181
|
issue: null,
|
|
182
182
|
notes: "",
|
|
183
183
|
startDate: /* @__PURE__ */ new Date()
|
|
184
|
-
}),
|
|
184
|
+
}), L = s([]), x = s(!1), _ = s([]), S = s([]), fe = s([
|
|
185
185
|
{
|
|
186
186
|
label: d("HC_COMPLAINT"),
|
|
187
187
|
id: "complaint"
|
|
@@ -198,7 +198,7 @@ const ht = Fe({
|
|
|
198
198
|
label: d("HC_WORK_ORDER"),
|
|
199
199
|
id: "work_order"
|
|
200
200
|
}
|
|
201
|
-
]), q = s(),
|
|
201
|
+
]), q = s(), Y = s(null), l = s({
|
|
202
202
|
assignType: null,
|
|
203
203
|
department: null,
|
|
204
204
|
due: /* @__PURE__ */ new Date(),
|
|
@@ -207,7 +207,7 @@ const ht = Fe({
|
|
|
207
207
|
notes: "",
|
|
208
208
|
person: null,
|
|
209
209
|
requestedBy: null
|
|
210
|
-
}),
|
|
210
|
+
}), J = s([]), K = p(() => {
|
|
211
211
|
switch (r.value.cleaning?.name) {
|
|
212
212
|
case "CLEAN":
|
|
213
213
|
case "INSPECTED":
|
|
@@ -220,9 +220,9 @@ const ht = Fe({
|
|
|
220
220
|
default:
|
|
221
221
|
return "";
|
|
222
222
|
}
|
|
223
|
-
}), ye = p(() =>
|
|
223
|
+
}), ye = p(() => K.value === "CLEAN" ? "blue-10" : K.value === "DIRTY" ? "red-10" : "gray-30"), he = p(() => d(`HC_${r.value.cleaning?.name}`) || ""), ge = p(() => {
|
|
224
224
|
const e = k.value.toLowerCase();
|
|
225
|
-
return
|
|
225
|
+
return X.value.filter((a) => a.toLowerCase().match(e));
|
|
226
226
|
}), se = p(() => _.value.length ? !!_.value.find(
|
|
227
227
|
(a) => a.type === "complaint"
|
|
228
228
|
) : !1), _e = p(() => _.value.length ? !!_.value.find(
|
|
@@ -239,7 +239,7 @@ const ht = Fe({
|
|
|
239
239
|
switch (g.value?.id) {
|
|
240
240
|
case "request":
|
|
241
241
|
case "work_order":
|
|
242
|
-
return
|
|
242
|
+
return A.value[0];
|
|
243
243
|
default:
|
|
244
244
|
return null;
|
|
245
245
|
}
|
|
@@ -275,7 +275,7 @@ const ht = Fe({
|
|
|
275
275
|
}
|
|
276
276
|
return e;
|
|
277
277
|
}), Oe = p(() => {
|
|
278
|
-
let e =
|
|
278
|
+
let e = L.value;
|
|
279
279
|
return e = [...new Set(e)], e;
|
|
280
280
|
}), Ce = p(() => {
|
|
281
281
|
const e = g.value?.id;
|
|
@@ -287,14 +287,14 @@ const ht = Fe({
|
|
|
287
287
|
case "complaint":
|
|
288
288
|
return i.value.problem && i.value.guestName && i.value.guestMood;
|
|
289
289
|
case "work_order":
|
|
290
|
-
return
|
|
290
|
+
return l.value.item && l.value.issue && l.value.requestedBy && l.value.due && (l.value.assignType && l.value.assignType.id === 0 || l.value.assignType && l.value.assignType.id === 1 && l.value.department || l.value.assignType && l.value.assignType.id === 2 && l.value.person);
|
|
291
291
|
case "request":
|
|
292
292
|
return u.value.item && u.value.requestedBy && u.value.due && (u.value.assignType && u.value.assignType.id === 0 || u.value.assignType && u.value.assignType.id === 1 && u.value.department || u.value.assignType && u.value.assignType.id === 2 && u.value.person);
|
|
293
293
|
default:
|
|
294
294
|
return !1;
|
|
295
295
|
}
|
|
296
296
|
}), le = () => {
|
|
297
|
-
|
|
297
|
+
x.value = !1, R.value = !1, F.value = !1, D.value = [], z.value = [], J.value = [], g.value = null, v.value.issue = null, v.value.startDate = /* @__PURE__ */ new Date(), v.value.endDate = /* @__PURE__ */ new Date(), v.value.notes = "", i.value.guestName = "", i.value.guestEmail = "", i.value.guestPhone = "", i.value.guestMood = null, i.value.guestLoyalty = "", i.value.problem = null, i.value.checkInDate = /* @__PURE__ */ new Date(), i.value.checkOutDate = /* @__PURE__ */ new Date(), i.value.notes = "", l.value.assignType = null, l.value.department = null, l.value.person = null, l.value.due = /* @__PURE__ */ new Date(), l.value.item = null, l.value.issue = null, l.value.notes = "", u.value.assignType = null, u.value.department = null, u.value.person = null, u.value.due = /* @__PURE__ */ new Date(), u.value.item = null, u.value.notes = "";
|
|
298
298
|
}, Re = async () => {
|
|
299
299
|
w("create:callback", r.value), w("toggle", !1);
|
|
300
300
|
}, Ee = (e) => {
|
|
@@ -319,7 +319,7 @@ const ht = Fe({
|
|
|
319
319
|
t.sender_type === "user" && (o.user.firstName = t.user_first_name, o.user.lastName = t.user_last_name, o.user.initials = o.user.firstName[0] + o.user.lastName[0]), t.sender_type === "guest" && (o.user.firstName = t.guest_first_name, o.user.lastName = t.guest_last_name), o.user.initials = o.user.firstName[0] + o.user.lastName[0], o.user.src = "", o.isSystemMessage && (o.user.icon = "property-fill"), t.sender_id && (o.user.id = t.sender_id), a.push(o);
|
|
320
320
|
}), e.value = a;
|
|
321
321
|
}, re = async () => {
|
|
322
|
-
|
|
322
|
+
n.showComments && r.value.tokenId;
|
|
323
323
|
}, Me = (e) => {
|
|
324
324
|
const a = h.utc(), t = h.fromFormat(e, "yyyy-MM-dd HH:mm:ss", { zone: "utc" }), o = a.diff(
|
|
325
325
|
t,
|
|
@@ -344,13 +344,13 @@ const ht = Fe({
|
|
|
344
344
|
if (I === 0)
|
|
345
345
|
return d("HC_A_MOMENT_AGO");
|
|
346
346
|
}, Ne = async () => {
|
|
347
|
-
|
|
348
|
-
},
|
|
347
|
+
n.showGuestDetails && V(), U(), H(), w("refresh:pms", r.value);
|
|
348
|
+
}, V = async () => {
|
|
349
349
|
try {
|
|
350
350
|
T.value.pms = !0;
|
|
351
351
|
const e = new AbortController(), a = setTimeout(() => e.abort(), 45e3);
|
|
352
352
|
S.value.push(a);
|
|
353
|
-
const t =
|
|
353
|
+
const t = n.pmsBaseUrl;
|
|
354
354
|
if (!t)
|
|
355
355
|
throw new Error("PMS base URL is required");
|
|
356
356
|
const o = {
|
|
@@ -360,7 +360,7 @@ const ht = Fe({
|
|
|
360
360
|
})(),
|
|
361
361
|
"Content-Type": "application/json"
|
|
362
362
|
}, c = await fetch(
|
|
363
|
-
`${t}/vendors/properties/statuses/${
|
|
363
|
+
`${t}/vendors/properties/statuses/${n.propertyId}/rooms`,
|
|
364
364
|
{
|
|
365
365
|
method: "GET",
|
|
366
366
|
headers: o,
|
|
@@ -369,30 +369,30 @@ const ht = Fe({
|
|
|
369
369
|
);
|
|
370
370
|
clearTimeout(a), c.ok || ie(c);
|
|
371
371
|
const m = await c.json();
|
|
372
|
-
|
|
373
|
-
(f) => f.qv2Rooms.qRoomId ===
|
|
374
|
-
), r.value || (r.value =
|
|
372
|
+
C.value = m.data.pmsRooms, r.value = C.value.find(
|
|
373
|
+
(f) => f.qv2Rooms.qRoomId === n.room.id
|
|
374
|
+
), r.value || (r.value = n.room), T.value.pms = !1;
|
|
375
375
|
} catch (e) {
|
|
376
376
|
return T.value.pms = !1, e;
|
|
377
377
|
}
|
|
378
|
-
},
|
|
378
|
+
}, U = async () => {
|
|
379
379
|
try {
|
|
380
380
|
T.value.roomNotices = !0;
|
|
381
381
|
const e = await fetch(
|
|
382
|
-
"/api/client/common/getRoomNotices.php?propertyId=" +
|
|
382
|
+
"/api/client/common/getRoomNotices.php?propertyId=" + n.propertyId + "&roomIds=[" + n.room.id + "]"
|
|
383
383
|
);
|
|
384
384
|
if (!e.ok)
|
|
385
385
|
throw new Error(`HTTP error! status: ${e.status}`);
|
|
386
386
|
const a = await e.json();
|
|
387
|
-
|
|
387
|
+
L.value = a.notices;
|
|
388
388
|
} catch (e) {
|
|
389
|
-
console.error("Error getting room notices:", e),
|
|
389
|
+
console.error("Error getting room notices:", e), L.value = [];
|
|
390
390
|
} finally {
|
|
391
391
|
T.value.roomNotices = !1;
|
|
392
392
|
}
|
|
393
|
-
},
|
|
393
|
+
}, Z = async () => {
|
|
394
394
|
const e = new FormData();
|
|
395
|
-
e.append("property_id",
|
|
395
|
+
e.append("property_id", n.propertyId), e.append("filter", "tasks_new"), await Promise.all([
|
|
396
396
|
fetch("/api/client/common/getDepartments.php", {
|
|
397
397
|
method: "POST"
|
|
398
398
|
}),
|
|
@@ -408,7 +408,7 @@ const ht = Fe({
|
|
|
408
408
|
try {
|
|
409
409
|
const e = new FormData();
|
|
410
410
|
e.append("funcname", "get_stay_details"), e.append("token_id", r.value.tokenId);
|
|
411
|
-
const t = (await
|
|
411
|
+
const t = (await Q.post(
|
|
412
412
|
"/includes/chat_api.php",
|
|
413
413
|
e
|
|
414
414
|
)).data.result;
|
|
@@ -448,11 +448,11 @@ const ht = Fe({
|
|
|
448
448
|
case "task":
|
|
449
449
|
return "check";
|
|
450
450
|
}
|
|
451
|
-
},
|
|
451
|
+
}, H = async () => {
|
|
452
452
|
try {
|
|
453
453
|
T.value.tickets = !0;
|
|
454
454
|
const e = await fetch(
|
|
455
|
-
"/api/client/common/getAllToDos.php?propertyId=" +
|
|
455
|
+
"/api/client/common/getAllToDos.php?propertyId=" + n.propertyId + "&roomIds=[" + n.room.id + "]"
|
|
456
456
|
);
|
|
457
457
|
if (!e.ok)
|
|
458
458
|
throw new Error(`HTTP error! status: ${e.status}`);
|
|
@@ -526,8 +526,8 @@ const ht = Fe({
|
|
|
526
526
|
}, Pe = async () => {
|
|
527
527
|
const e = {
|
|
528
528
|
type: g.value?.id,
|
|
529
|
-
propertyId:
|
|
530
|
-
userId:
|
|
529
|
+
propertyId: n.propertyId,
|
|
530
|
+
userId: Y.value,
|
|
531
531
|
areaId: r.value.qv2Rooms.qRoomId,
|
|
532
532
|
areaName: r.value.qv2Rooms.qRoomName
|
|
533
533
|
};
|
|
@@ -544,18 +544,18 @@ const ht = Fe({
|
|
|
544
544
|
e.issue = v.value.issue.id, e.startDate = h(v.value.startDate).format("YYYY-MM-DD"), e.endDate = h(v.value.endDate).format("YYYY-MM-DD"), e.notes = v.value.notes, e.sendPush = "1", w("create:todo", e);
|
|
545
545
|
break;
|
|
546
546
|
case "work_order":
|
|
547
|
-
e.itemId =
|
|
547
|
+
e.itemId = l.value.item.id, e.issueId = l.value.issue.id, e.assignType = l.value.assignType.id, e.occupied = l.value.requestedBy.id, e.notes = l.value.notes, e.dueDate = h(l.value.due).format("YYYY-MM-DD"), l.value.assignType.id === 1 && (e.department = l.value.department.id), l.value.assignType.id === 2 && (e.person = l.value.person.id), w("create:todo", e);
|
|
548
548
|
break;
|
|
549
549
|
}
|
|
550
550
|
}, Le = (e) => {
|
|
551
|
-
|
|
551
|
+
te(), ae(), n.hover && w("toggle", e);
|
|
552
552
|
}, xe = (e) => {
|
|
553
553
|
de(), k.value = e;
|
|
554
554
|
}, Ye = async (e) => {
|
|
555
|
-
if (console.log("selected:", e), g.value = e, D.value = [], v.value.issue = null, i.value.problem = null,
|
|
555
|
+
if (console.log("selected:", e), g.value = e, D.value = [], v.value.issue = null, i.value.problem = null, l.value.item = null, l.value.issue = null, u.value.item = null, !g.value)
|
|
556
556
|
return;
|
|
557
557
|
const a = new FormData();
|
|
558
|
-
switch (a.append("property_id",
|
|
558
|
+
switch (a.append("property_id", n.propertyId), a.append("area_id", r.value.qv2Rooms.qRoomId), e.id) {
|
|
559
559
|
case "complaint":
|
|
560
560
|
try {
|
|
561
561
|
r.value.tokenId && await ue();
|
|
@@ -564,12 +564,12 @@ const ht = Fe({
|
|
|
564
564
|
body: a
|
|
565
565
|
});
|
|
566
566
|
console.log("complaints:", t);
|
|
567
|
-
const o = await
|
|
567
|
+
const o = await Q.post(
|
|
568
568
|
"/api/client/common/getComplaintMoods.php"
|
|
569
569
|
);
|
|
570
570
|
o.data.items.forEach((c) => {
|
|
571
571
|
c.label = c.display_name;
|
|
572
|
-
}),
|
|
572
|
+
}), z.value = o.data.items;
|
|
573
573
|
} catch (t) {
|
|
574
574
|
console.log(t);
|
|
575
575
|
}
|
|
@@ -587,12 +587,12 @@ const ht = Fe({
|
|
|
587
587
|
break;
|
|
588
588
|
case "request":
|
|
589
589
|
try {
|
|
590
|
-
u.value.requestedBy = N.value[1], u.value.assignType =
|
|
590
|
+
u.value.requestedBy = N.value[1], u.value.assignType = A.value[0];
|
|
591
591
|
const t = await fetch("/api/client/common/getHousekeepingItemsByPropertyId.php", {
|
|
592
592
|
method: "POST",
|
|
593
593
|
body: a
|
|
594
594
|
});
|
|
595
|
-
console.log("requests:", t), await
|
|
595
|
+
console.log("requests:", t), await Z(), u.value.department = O.value.find(
|
|
596
596
|
(o) => parseInt(o.id) === 4
|
|
597
597
|
);
|
|
598
598
|
} catch (t) {
|
|
@@ -601,7 +601,7 @@ const ht = Fe({
|
|
|
601
601
|
break;
|
|
602
602
|
case "work_order":
|
|
603
603
|
try {
|
|
604
|
-
|
|
604
|
+
l.value.requestedBy = N.value[0], l.value.assignType = A.value[0];
|
|
605
605
|
const t = await fetch("/api/client/common/getItemsByRoomId.php", {
|
|
606
606
|
method: "POST",
|
|
607
607
|
body: a
|
|
@@ -613,16 +613,16 @@ const ht = Fe({
|
|
|
613
613
|
options: []
|
|
614
614
|
};
|
|
615
615
|
o.push({ ...c }), D.value = o, await Promise.all([
|
|
616
|
-
|
|
616
|
+
Q.post(
|
|
617
617
|
"/api/client/common/getWorkOrderIssues.php"
|
|
618
618
|
),
|
|
619
|
-
|
|
619
|
+
Z()
|
|
620
620
|
]).then((m) => {
|
|
621
621
|
const f = m[0];
|
|
622
622
|
f.data.issues.forEach((y) => {
|
|
623
623
|
y.label = y.display_name;
|
|
624
|
-
}),
|
|
625
|
-
}),
|
|
624
|
+
}), J.value = f.data.issues;
|
|
625
|
+
}), l.value.department = O.value.find(
|
|
626
626
|
(m) => parseInt(m.id) === 2
|
|
627
627
|
);
|
|
628
628
|
} catch (t) {
|
|
@@ -633,55 +633,55 @@ const ht = Fe({
|
|
|
633
633
|
return;
|
|
634
634
|
}
|
|
635
635
|
}, Ue = () => {
|
|
636
|
-
|
|
636
|
+
x.value = !x.value, F.value = !1;
|
|
637
637
|
}, ce = () => {
|
|
638
638
|
const e = document.getElementById("comment-field"), a = document.getElementById("hidden-text");
|
|
639
639
|
e.style.height = a?.offsetHeight + "px";
|
|
640
|
-
},
|
|
640
|
+
}, ee = () => {
|
|
641
641
|
const e = document.getElementById("comments-container");
|
|
642
642
|
e?.scroll({
|
|
643
643
|
top: e.scrollHeight,
|
|
644
644
|
behavior: "smooth"
|
|
645
645
|
});
|
|
646
646
|
}, Ge = async (e) => {
|
|
647
|
-
if (e && e.type === "keydown" && e.preventDefault(), r.value.tokenId && k.value && !
|
|
647
|
+
if (e && e.type === "keydown" && e.preventDefault(), r.value.tokenId && k.value && !R.value)
|
|
648
648
|
try {
|
|
649
649
|
const a = new FormData();
|
|
650
|
-
a.append("funcname", "send_message_to_guest"), a.append("stay_id", r.value.tokenId), a.append("content", k.value), a.append("sender_id",
|
|
651
|
-
const t = await
|
|
650
|
+
a.append("funcname", "send_message_to_guest"), a.append("stay_id", r.value.tokenId), a.append("content", k.value), a.append("sender_id", Y.value || "");
|
|
651
|
+
const t = await Q.post(
|
|
652
652
|
"/includes/chat_api.php",
|
|
653
653
|
a
|
|
654
654
|
);
|
|
655
655
|
if (t.data.result.error_message)
|
|
656
656
|
throw new Error(t.data.result.error_message);
|
|
657
|
-
k.value = "", await re(),
|
|
657
|
+
k.value = "", await re(), ee();
|
|
658
658
|
} catch (a) {
|
|
659
659
|
console.log(a);
|
|
660
660
|
}
|
|
661
|
-
},
|
|
662
|
-
if (
|
|
661
|
+
}, te = () => {
|
|
662
|
+
if (n.align === "left" || n.align === "right") {
|
|
663
663
|
const e = q.value?.getBoundingClientRect().left, a = window.innerWidth;
|
|
664
|
-
|
|
664
|
+
j.value = a - e < M.value ? "right" : "left";
|
|
665
665
|
} else {
|
|
666
666
|
const e = q.value?.getBoundingClientRect().top, a = window.innerHeight;
|
|
667
|
-
|
|
667
|
+
j.value = a - e < E.value ? "bottom" : "top";
|
|
668
668
|
}
|
|
669
|
-
},
|
|
670
|
-
if (
|
|
669
|
+
}, ae = () => {
|
|
670
|
+
if (n.position === "top" || n.position === "bottom") {
|
|
671
671
|
const e = q.value?.getBoundingClientRect().top, a = window.innerHeight;
|
|
672
|
-
|
|
672
|
+
W.value = a - e < E.value ? "top" : "bottom";
|
|
673
673
|
} else {
|
|
674
674
|
const e = q.value?.getBoundingClientRect().left, a = window.innerWidth;
|
|
675
|
-
|
|
675
|
+
W.value = a - e < M.value ? "left" : "right";
|
|
676
676
|
}
|
|
677
677
|
}, de = () => {
|
|
678
|
-
|
|
678
|
+
R.value = !R.value, R.value ? (k.value = "", b.value.info = B.value, b.value.tickets = P.value, b.value.comments = $.value, B.value = !1, P.value = !1, document.getElementById("comment-field")?.focus()) : (B.value = b.value.info, P.value = b.value.tickets, $.value = b.value.comments);
|
|
679
679
|
}, Qe = async (e, a) => {
|
|
680
680
|
const t = new FormData();
|
|
681
|
-
if (t.append("property_id",
|
|
681
|
+
if (t.append("property_id", n.propertyId), t.append(
|
|
682
682
|
"room_ids",
|
|
683
683
|
JSON.stringify([r.value.qv2Rooms.qRoomId])
|
|
684
|
-
), await
|
|
684
|
+
), await H(), _.value) {
|
|
685
685
|
const o = [];
|
|
686
686
|
_.value.forEach((c) => {
|
|
687
687
|
c.id === e && c.type === a ? o.unshift({
|
|
@@ -694,30 +694,31 @@ const ht = Fe({
|
|
|
694
694
|
}), o.sort((c, m) => c.id === e ? -1 : m.id === e ? 1 : 0), _.value = [...o];
|
|
695
695
|
}
|
|
696
696
|
};
|
|
697
|
-
return
|
|
698
|
-
if (
|
|
699
|
-
const e = setTimeout(
|
|
697
|
+
return G(() => n.open, () => {
|
|
698
|
+
if (n.open && n.showComments && oe.value.length) {
|
|
699
|
+
const e = setTimeout(ee, 500);
|
|
700
700
|
S.value.push(e);
|
|
701
701
|
}
|
|
702
|
-
|
|
703
|
-
}),
|
|
702
|
+
n.open || le();
|
|
703
|
+
}), G(k, () => {
|
|
704
704
|
const e = setTimeout(ce, 100);
|
|
705
705
|
S.value.push(e);
|
|
706
|
-
}),
|
|
707
|
-
()
|
|
706
|
+
}), G(() => n.open, async (e, a) => {
|
|
707
|
+
e && !a && (n.showGuestDetails && !C.value ? await V() : r.value || (r.value = n.room), H(), U());
|
|
708
|
+
}), G(
|
|
709
|
+
() => n.room.id,
|
|
708
710
|
(e, a) => {
|
|
709
|
-
e !== a && (
|
|
710
|
-
}
|
|
711
|
-
{ immediate: !0 }
|
|
711
|
+
e !== a && (C.value ? (r.value = C.value.find((t) => t.qv2Rooms.qRoomId === n.room.id), r.value || (r.value = n.room)) : r.value = n.room, n.open && (H(), U()));
|
|
712
|
+
}
|
|
712
713
|
), je(async () => {
|
|
713
714
|
const e = JSON.parse(
|
|
714
715
|
window.localStorage.getItem("authenticated")
|
|
715
716
|
);
|
|
716
|
-
|
|
717
|
+
Y.value = e?.user?.id || "", r.value = n.room, n.size === "sm" && (E.value = 140, M.value = 160), n.size === "lg" && (E.value = 250, M.value = 440), te(), ae();
|
|
717
718
|
const a = [], t = window.localStorage.getItem("quick-replies");
|
|
718
719
|
t && JSON.parse(t).forEach((o) => {
|
|
719
720
|
a.push(o.message);
|
|
720
|
-
}),
|
|
721
|
+
}), X.value = a;
|
|
721
722
|
}), $e(() => {
|
|
722
723
|
S.value.forEach((e) => {
|
|
723
724
|
clearTimeout(e);
|
|
@@ -725,44 +726,44 @@ const ht = Fe({
|
|
|
725
726
|
}), {
|
|
726
727
|
DateTime: h,
|
|
727
728
|
// Refs
|
|
728
|
-
actionMenuOpen:
|
|
729
|
-
alignment:
|
|
730
|
-
assignTypes:
|
|
729
|
+
actionMenuOpen: F,
|
|
730
|
+
alignment: j,
|
|
731
|
+
assignTypes: A,
|
|
731
732
|
comment: k,
|
|
732
733
|
complaint: i,
|
|
733
|
-
componentHeight:
|
|
734
|
-
componentWidth:
|
|
734
|
+
componentHeight: E,
|
|
735
|
+
componentWidth: M,
|
|
735
736
|
departments: O,
|
|
736
737
|
departmentUsers: me,
|
|
737
|
-
expandComments:
|
|
738
|
-
expandGuestInfo:
|
|
738
|
+
expandComments: $,
|
|
739
|
+
expandGuestInfo: B,
|
|
739
740
|
expandedStates: b,
|
|
740
|
-
expandTickets:
|
|
741
|
+
expandTickets: P,
|
|
741
742
|
guestDetailsData: pe,
|
|
742
743
|
itemOptions: D,
|
|
743
744
|
loading: T,
|
|
744
745
|
messages: oe,
|
|
745
|
-
moodOptions:
|
|
746
|
-
pmsData:
|
|
747
|
-
positioning:
|
|
748
|
-
quickReplies:
|
|
749
|
-
quickReplyOpen:
|
|
746
|
+
moodOptions: z,
|
|
747
|
+
pmsData: C,
|
|
748
|
+
positioning: W,
|
|
749
|
+
quickReplies: X,
|
|
750
|
+
quickReplyOpen: R,
|
|
750
751
|
request: u,
|
|
751
752
|
requestedByOptions: N,
|
|
752
753
|
requestLoading: ve,
|
|
753
754
|
requestType: g,
|
|
754
755
|
roomDetailsData: r,
|
|
755
756
|
roomNotice: v,
|
|
756
|
-
roomNotices:
|
|
757
|
-
showCreateRequest:
|
|
757
|
+
roomNotices: L,
|
|
758
|
+
showCreateRequest: x,
|
|
758
759
|
ticketsList: _,
|
|
759
760
|
todoOptions: fe,
|
|
760
761
|
trigger: q,
|
|
761
|
-
userId:
|
|
762
|
-
workOrder:
|
|
763
|
-
workOrderIssues:
|
|
762
|
+
userId: Y,
|
|
763
|
+
workOrder: l,
|
|
764
|
+
workOrderIssues: J,
|
|
764
765
|
// Computed
|
|
765
|
-
cleanliness:
|
|
766
|
+
cleanliness: K,
|
|
766
767
|
cleanlinessColor: ye,
|
|
767
768
|
cleanlinessTooltipContent: he,
|
|
768
769
|
filteredReplies: ge,
|
|
@@ -783,13 +784,13 @@ const ht = Fe({
|
|
|
783
784
|
createMessageList: Ee,
|
|
784
785
|
getChatMessages: re,
|
|
785
786
|
getHowLongAgo: Me,
|
|
786
|
-
getPMSData:
|
|
787
|
-
getRoomNotices:
|
|
788
|
-
getSharedData:
|
|
787
|
+
getPMSData: V,
|
|
788
|
+
getRoomNotices: U,
|
|
789
|
+
getSharedData: Z,
|
|
789
790
|
getStayDetails: ue,
|
|
790
791
|
getTicketColor: Se,
|
|
791
792
|
getTicketIcon: qe,
|
|
792
|
-
getTickets:
|
|
793
|
+
getTickets: H,
|
|
793
794
|
handleFailedResponse: ie,
|
|
794
795
|
handlePulse: He,
|
|
795
796
|
onClickEditConnectGuest: Ae,
|
|
@@ -801,10 +802,10 @@ const ht = Fe({
|
|
|
801
802
|
openRequest: Ue,
|
|
802
803
|
refreshPMSData: Ne,
|
|
803
804
|
resizeTextarea: ce,
|
|
804
|
-
scrollToConnectBottom:
|
|
805
|
+
scrollToConnectBottom: ee,
|
|
805
806
|
sendChatMessage: Ge,
|
|
806
|
-
setAlignment:
|
|
807
|
-
setPositioning:
|
|
807
|
+
setAlignment: te,
|
|
808
|
+
setPositioning: ae,
|
|
808
809
|
toggleQuickReply: de,
|
|
809
810
|
updateTickets: Qe
|
|
810
811
|
};
|