@konnectio/core 4.0.13 → 4.0.15
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/{ActionField-74fc14cf.cjs → ActionField-bcecb3ad.cjs} +1 -1
- package/dist/{ActionField-54349124.js → ActionField-d82454ed.js} +3 -3
- package/dist/ActionField-d82454ed.js.br +0 -0
- package/dist/AvailabilitySkeleton-120dbd72.cjs +1 -0
- package/dist/{AvailabilitySkeleton-f7c1b363.js → AvailabilitySkeleton-9e34fdd6.js} +7 -6
- package/dist/AvailabilitySkeleton-9e34fdd6.js.br +0 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-6f00c90f.cjs +5 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-a494ebda.js +10010 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-a494ebda.js.br +0 -0
- package/dist/{Field-c8c55b91.cjs → Field-11498556.cjs} +1 -1
- package/dist/{Field-0b82e3dc.js → Field-2fb37b34.js} +2 -2
- package/dist/Field-2fb37b34.js.br +0 -0
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-001ceb59.js → NumberField.vue_vue_type_script_setup_true_lang-21318607.js} +8 -8
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-21318607.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-e92e7311.cjs +1 -0
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-b92d158e.cjs → SelectField.vue_vue_type_style_index_0_lang-354a8ba7.cjs} +23 -23
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-ba987c3e.js → SelectField.vue_vue_type_style_index_0_lang-a75b8f32.js} +3401 -3401
- package/dist/SelectField.vue_vue_type_style_index_0_lang-a75b8f32.js.br +0 -0
- package/dist/{TextField-cbed3348.js → TextField-46d88ef6.js} +1 -1
- package/dist/TextField-46d88ef6.js.br +0 -0
- package/dist/{TextField-52bc45b8.cjs → TextField-afd7af9b.cjs} +1 -1
- package/dist/{ThankYou-a6b0d51e.js → ThankYou-a44a3589.js} +213 -212
- package/dist/ThankYou-a44a3589.js.br +0 -0
- package/dist/{ThankYou-d4fae82e.cjs → ThankYou-e988ffbe.cjs} +6 -6
- package/dist/{_-f5fc7dd6.cjs → _-0e8547fb.cjs} +1 -1
- package/dist/{_-66cf2aa1.js → _-6e32ea4d.js} +14 -14
- package/dist/_-6e32ea4d.js.br +0 -0
- package/dist/availability.cjs +2 -2
- package/dist/availability.js +61 -61
- package/dist/availability.js.br +0 -0
- package/dist/components/Clickable.vue.d.ts +1 -1
- package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
- package/dist/components/listings/Base.vue.d.ts +1 -1
- package/dist/components/skeletons/_.vue.d.ts +1 -1
- package/dist/event-a09daadc.js +330 -0
- package/dist/event-a09daadc.js.br +0 -0
- package/dist/event-d85117b3.cjs +1 -0
- package/dist/event.cjs +1 -1
- package/dist/event.js +9 -9
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.cjs +1 -1
- package/dist/gift-card-validation.js +4 -4
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.cjs +1 -1
- package/dist/gift-card.js +71 -71
- package/dist/gift-card.js.br +0 -0
- package/dist/hotel.cjs +5 -5
- package/dist/hotel.js +1258 -1250
- package/dist/hotel.js.br +0 -0
- package/dist/{index-2018df9e.cjs → index-3a59acc2.cjs} +1 -1
- package/dist/{index-b69ec10e.js → index-84c4adc0.js} +2 -2
- package/dist/index-84c4adc0.js.br +0 -0
- package/dist/layouts/Hotel.vue.d.ts +0 -1
- package/dist/polyfill.cjs +1 -1
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.js.br +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +13 -13
- package/dist/ActionField-54349124.js.br +0 -0
- package/dist/AvailabilitySkeleton-34890eb5.cjs +0 -1
- package/dist/AvailabilitySkeleton-f7c1b363.js.br +0 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-41b83959.cjs +0 -5
- package/dist/DateField.vue_vue_type_style_index_0_lang-c5873e66.js +0 -8411
- package/dist/DateField.vue_vue_type_style_index_0_lang-c5873e66.js.br +0 -0
- package/dist/Field-0b82e3dc.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-001ceb59.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-8525b2cd.cjs +0 -1
- package/dist/SelectField.vue_vue_type_style_index_0_lang-ba987c3e.js.br +0 -0
- package/dist/TextField-cbed3348.js.br +0 -0
- package/dist/ThankYou-a6b0d51e.js.br +0 -0
- package/dist/_-66cf2aa1.js.br +0 -0
- package/dist/event-f2a6108f.cjs +0 -1
- package/dist/event-f820ba4b.js +0 -330
- package/dist/event-f820ba4b.js.br +0 -0
- package/dist/index-b69ec10e.js.br +0 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import { d as Ge, s as oe, u as Ve, a as Le, r as s, E as v, b as U, c as a, O as le, S as _, g as Ue, e as C, f as F, i as D } from "./SelectField.vue_vue_type_style_index_0_lang-a75b8f32.js";
|
|
2
|
+
import { u as _e } from "./_-6e32ea4d.js";
|
|
3
|
+
import { u as qe } from "./NumberField.vue_vue_type_script_setup_true_lang-21318607.js";
|
|
4
|
+
const Qe = Ge("event", () => {
|
|
5
|
+
const se = _e(), { voucher: re } = oe(qe()), { display: h } = Ve(), { bearerToken: I } = oe(Le()), p = s({}), y = s({}), t = s(void 0), l = s(!0), i = s(v.InitialState), q = s(/* @__PURE__ */ new Date()), N = s(NaN), T = s(1), S = s(NaN), K = s(NaN), E = s(""), $ = U("konnectio_name", "", void 0, { serializer: _.string }), O = U("konnectio_phone", "", void 0, { serializer: _.string }), R = U("konnectio_email", "", void 0, { serializer: _.string }), x = s(""), P = s({}), g = s({}), z = s("");
|
|
6
|
+
function o(e) {
|
|
7
|
+
return e.templateID !== void 0;
|
|
8
|
+
}
|
|
9
|
+
const ue = a(() => p.value.currency), ie = a(() => p.value.maxNumberPerBooking), ve = a(() => p.value.title), ce = a(() => p.value.subtitle), de = a(() => p.value.slideshow), A = a(() => q.value.toISOString()), pe = a(() => o(t.value)), M = a(() => o(t.value) ? t.value.numberOfDays : T.value), ge = a(() => o(t.value) ? t.value.packageCount : 0), me = a(() => o(t.value) ? t.value.fromDate : ""), b = a(() => y.value.events.find((e) => e.id === S.value)), fe = a(() => b.value ? b.value.length : void 0), j = a(() => o(t.value) ? t.value.templateID : 0), he = a(() => y.value.events), ye = a(() => y.value.templates), be = a(() => y.value.events.length > 0), ke = a(() => y.value.templates.length > 0), Q = a(() => b.value && b.value.eventRateType ? b.value.eventRateType : le.None), B = a(() => {
|
|
10
|
+
if (!o(t.value))
|
|
11
|
+
return t.value;
|
|
12
|
+
}), H = a(() => {
|
|
13
|
+
if (B.value !== void 0) {
|
|
14
|
+
const e = B.value.find(
|
|
15
|
+
(n) => n.time === E.value
|
|
16
|
+
);
|
|
17
|
+
if (e && e.price)
|
|
18
|
+
return e.price;
|
|
19
|
+
}
|
|
20
|
+
return 0;
|
|
21
|
+
}), J = a(() => {
|
|
22
|
+
if (o(t.value))
|
|
23
|
+
return t.value.templateCounts;
|
|
24
|
+
}), De = a(() => (e) => p.value.eventImages.filter((n) => n.eventID === e));
|
|
25
|
+
function G(e, n, r) {
|
|
26
|
+
let c = 0;
|
|
27
|
+
if (o(t.value)) {
|
|
28
|
+
const u = t.value.templateCounts[r];
|
|
29
|
+
if (u) {
|
|
30
|
+
const k = u.addons, m = P.value[`${n}.${e}.${r}`] || 0;
|
|
31
|
+
if (m > 0) {
|
|
32
|
+
const f = k?.find((w) => w.addonID === e), d = typeof m == "boolean" ? 1 : m;
|
|
33
|
+
c += Ue(f?.price, f?.quantityStrategy, M.value, u.adultPerRoom) * d;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
} else {
|
|
37
|
+
const u = g.value[e] || 0;
|
|
38
|
+
if (u > 0) {
|
|
39
|
+
const k = b.value?.products?.find((m) => m.productID === e);
|
|
40
|
+
k && (c += k.price * u);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return c;
|
|
44
|
+
}
|
|
45
|
+
function V(e, n) {
|
|
46
|
+
let r = 0;
|
|
47
|
+
if (o(t.value))
|
|
48
|
+
for (const c in P.value) {
|
|
49
|
+
const u = c.split(".");
|
|
50
|
+
parseInt(u[0]) === e && parseInt(u[2]) === n && (r += G(parseInt(u[1]), e, n));
|
|
51
|
+
}
|
|
52
|
+
else
|
|
53
|
+
for (const c in g.value)
|
|
54
|
+
r += G(parseInt(c)) * T.value;
|
|
55
|
+
return r;
|
|
56
|
+
}
|
|
57
|
+
const W = a(() => o(t.value) && t.value.totalPrice || 0), Ie = a(() => {
|
|
58
|
+
if (o(t.value))
|
|
59
|
+
return t.value.templateCounts === void 0 ? NaN : t.value.templateCounts.flatMap((e) => e.roomGroupID).reduce(
|
|
60
|
+
(e, n, r) => e + V(n, r),
|
|
61
|
+
W.value
|
|
62
|
+
) || 0;
|
|
63
|
+
{
|
|
64
|
+
let e = V();
|
|
65
|
+
return e += H.value, e;
|
|
66
|
+
}
|
|
67
|
+
}), Se = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.weekendFee).reduce((e, n) => e + n, 0) || 0), Pe = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.roomUpgrade).reduce((e, n) => e + n, 0) || 0), Ae = a(() => {
|
|
68
|
+
const e = g.value;
|
|
69
|
+
let n = 0;
|
|
70
|
+
for (const r in e)
|
|
71
|
+
n += Number.isNaN(e[r]) ? 0 : e[r];
|
|
72
|
+
return n > 0;
|
|
73
|
+
}), X = a(() => o(t.value) ? !1 : Object.keys(g.value).length > 0), we = a(() => !!($.value !== "" && R.value !== "" && O.value.length >= 5 && (!X.value || Ae.value) && (!(!o(t.value) && Q.value !== le.FullDayEvent) || E.value !== "")));
|
|
74
|
+
function Ce(e) {
|
|
75
|
+
return i.value === v.ReservationState && S.value === e && l.value;
|
|
76
|
+
}
|
|
77
|
+
const Ee = a(() => !(i.value === v.InitialState && l.value)), Fe = a(() => !(i.value === v.AvailabilityState && l.value)), Ne = a(() => t.value !== void 0), Te = a(() => i.value === v.PaymentState && l.value);
|
|
78
|
+
async function Y() {
|
|
79
|
+
try {
|
|
80
|
+
const e = (await C.get("https://stage.hotel-service.konnectio.dk/api/event/metadata", {
|
|
81
|
+
params: {
|
|
82
|
+
language: F()
|
|
83
|
+
},
|
|
84
|
+
headers: {
|
|
85
|
+
Authorization: I.value,
|
|
86
|
+
"Fresh-Booking-Ver": "4.0.15"
|
|
87
|
+
}
|
|
88
|
+
})).data;
|
|
89
|
+
p.value = e, Z();
|
|
90
|
+
} catch {
|
|
91
|
+
h({
|
|
92
|
+
message: D.t("alert.error.couldntFetchMetadata"),
|
|
93
|
+
type: "warning"
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async function Z() {
|
|
98
|
+
i.value = v.AvailabilityState, l.value = !0;
|
|
99
|
+
try {
|
|
100
|
+
const e = (await C.get("https://stage.hotel-service.konnectio.dk/api/event/restaurant-events", {
|
|
101
|
+
params: {
|
|
102
|
+
language: F(),
|
|
103
|
+
date: A.value
|
|
104
|
+
},
|
|
105
|
+
headers: {
|
|
106
|
+
Authorization: I.value,
|
|
107
|
+
"Fresh-Booking-Ver": "4.0.15"
|
|
108
|
+
}
|
|
109
|
+
})).data;
|
|
110
|
+
y.value = e, l.value = !1;
|
|
111
|
+
} catch {
|
|
112
|
+
h({
|
|
113
|
+
message: D.t("alert.error.couldntFetchListings"),
|
|
114
|
+
type: "warning"
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async function $e(e) {
|
|
119
|
+
i.value = v.ReservationState, l.value = !0;
|
|
120
|
+
try {
|
|
121
|
+
const n = (await C.get("https://stage.hotel-service.konnectio.dk/api/v3/event/get-availability", {
|
|
122
|
+
params: {
|
|
123
|
+
language: F(),
|
|
124
|
+
date: A.value,
|
|
125
|
+
templateId: S.value,
|
|
126
|
+
numberOfPeople: N.value
|
|
127
|
+
},
|
|
128
|
+
headers: {
|
|
129
|
+
Authorization: I.value,
|
|
130
|
+
"Fresh-Booking-Ver": "4.0.15"
|
|
131
|
+
}
|
|
132
|
+
})).data;
|
|
133
|
+
n.templateCounts.length === 0 ? h({
|
|
134
|
+
message: D.t("alert.error.eventNotAvailable"),
|
|
135
|
+
type: "warning"
|
|
136
|
+
}) : (t.value = n, e()), l.value = !1;
|
|
137
|
+
} catch {
|
|
138
|
+
l.value = !1, i.value = v.AvailabilityState, h({
|
|
139
|
+
message: D.t("alert.error.couldntFetchEvent"),
|
|
140
|
+
type: "warning"
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async function Oe(e) {
|
|
145
|
+
i.value = v.ReservationState, l.value = !0;
|
|
146
|
+
try {
|
|
147
|
+
const n = (await C.get("https://stage.hotel-service.konnectio.dk/api/v3/event/get-table-availability", {
|
|
148
|
+
params: {
|
|
149
|
+
language: F(),
|
|
150
|
+
date: A.value,
|
|
151
|
+
numberOfPeople: N.value,
|
|
152
|
+
eventId: S.value,
|
|
153
|
+
tableGroupId: K.value
|
|
154
|
+
},
|
|
155
|
+
headers: {
|
|
156
|
+
Authorization: I.value,
|
|
157
|
+
"Fresh-Booking-Ver": "4.0.15"
|
|
158
|
+
}
|
|
159
|
+
})).data;
|
|
160
|
+
t.value = n, l.value = !1, e();
|
|
161
|
+
} catch {
|
|
162
|
+
l.value = !1, i.value = v.AvailabilityState, h({
|
|
163
|
+
message: D.t("alert.error.couldntFetchEvent"),
|
|
164
|
+
type: "warning"
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async function Re() {
|
|
169
|
+
try {
|
|
170
|
+
const e = (await C.get("https://stage.hotel-service.konnectio.dk/api/v3/event/validate-discount-code", {
|
|
171
|
+
params: {
|
|
172
|
+
language: F(),
|
|
173
|
+
date: A.value,
|
|
174
|
+
discountCode: z.value
|
|
175
|
+
},
|
|
176
|
+
headers: {
|
|
177
|
+
Authorization: I.value,
|
|
178
|
+
"Fresh-Booking-Ver": "4.0.15"
|
|
179
|
+
}
|
|
180
|
+
})).data;
|
|
181
|
+
console.log(e);
|
|
182
|
+
} catch (e) {
|
|
183
|
+
console.log(e), h({
|
|
184
|
+
message: D.t("alert.error.discountCodeValidation"),
|
|
185
|
+
type: "warning"
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
async function ze(e) {
|
|
190
|
+
i.value = v.PaymentState, l.value = !0;
|
|
191
|
+
const n = () => {
|
|
192
|
+
l.value = !1, i.value = v.ReservationState, h({
|
|
193
|
+
message: D.t("booking.other.errorMessage"),
|
|
194
|
+
type: "warning"
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
let r, c, u;
|
|
198
|
+
const k = [];
|
|
199
|
+
if (o(t.value))
|
|
200
|
+
J.value?.forEach((d, w) => {
|
|
201
|
+
const ee = [];
|
|
202
|
+
let te = 0;
|
|
203
|
+
for (const ae in P.value) {
|
|
204
|
+
const L = ae.split("."), ne = P.value[ae];
|
|
205
|
+
parseInt(L[0]) === d.roomGroupID && parseInt(L[2]) === w && ne > 0 && (ee.push({
|
|
206
|
+
id: te,
|
|
207
|
+
addonID: parseInt(L[1]),
|
|
208
|
+
quantity: ne
|
|
209
|
+
}), te++);
|
|
210
|
+
}
|
|
211
|
+
k.push({
|
|
212
|
+
adultPerRoom: d.adultPerRoom,
|
|
213
|
+
count: d.count,
|
|
214
|
+
roomGroupID: d.roomGroupID,
|
|
215
|
+
addons: ee
|
|
216
|
+
});
|
|
217
|
+
}), r = {
|
|
218
|
+
templateID: j.value,
|
|
219
|
+
numberOfDays: T.value,
|
|
220
|
+
templateCounts: k
|
|
221
|
+
};
|
|
222
|
+
else {
|
|
223
|
+
c = [], u = E.value;
|
|
224
|
+
for (const d in g.value) {
|
|
225
|
+
const w = g.value[parseInt(d)];
|
|
226
|
+
w > 0 && c.push({
|
|
227
|
+
id: parseInt(d),
|
|
228
|
+
quantity: w
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
let m = "https://stage.hotel-service.konnectio.dk/api/v3/event/template-book";
|
|
233
|
+
const f = {
|
|
234
|
+
date: A.value,
|
|
235
|
+
name: $.value,
|
|
236
|
+
email: R.value,
|
|
237
|
+
phone: O.value,
|
|
238
|
+
remark: x.value,
|
|
239
|
+
numberOfPeople: N.value,
|
|
240
|
+
days: M.value,
|
|
241
|
+
discountCode: z.value,
|
|
242
|
+
giftCardCode: re.value,
|
|
243
|
+
checkoutUrl: window.location.origin,
|
|
244
|
+
privacyUrl: window.location.origin
|
|
245
|
+
};
|
|
246
|
+
o(t.value) ? f.templateGroup = r : (f.time = u, f.eventId = S.value, f.products = c, m = "https://stage.hotel-service.konnectio.dk/api/v3/event/event-book"), await C.post(m, f, {
|
|
247
|
+
headers: {
|
|
248
|
+
Authorization: I.value,
|
|
249
|
+
"Fresh-Booking-Ver": "4.0.15"
|
|
250
|
+
}
|
|
251
|
+
}).then((d) => {
|
|
252
|
+
l.value = !1, se.pay({
|
|
253
|
+
callback: e,
|
|
254
|
+
response: d.data
|
|
255
|
+
});
|
|
256
|
+
}).catch(() => n());
|
|
257
|
+
}
|
|
258
|
+
function Me(e) {
|
|
259
|
+
P.value = {}, g.value = {}, E.value = "", e();
|
|
260
|
+
}
|
|
261
|
+
function Be() {
|
|
262
|
+
Y();
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
metaData: p,
|
|
266
|
+
listingData: y,
|
|
267
|
+
tableBasePrice: H,
|
|
268
|
+
availabilityData: t,
|
|
269
|
+
isLoading: l,
|
|
270
|
+
moduleState: i,
|
|
271
|
+
searchDate: q,
|
|
272
|
+
numberOfPeople: N,
|
|
273
|
+
numberOfDays: T,
|
|
274
|
+
eventId: S,
|
|
275
|
+
tableGroupId: K,
|
|
276
|
+
arrivalTime: E,
|
|
277
|
+
addons: P,
|
|
278
|
+
products: g,
|
|
279
|
+
discountCode: z,
|
|
280
|
+
name: $,
|
|
281
|
+
phone: O,
|
|
282
|
+
email: R,
|
|
283
|
+
remark: x,
|
|
284
|
+
isTemplateEvent: pe,
|
|
285
|
+
currency: ue,
|
|
286
|
+
maxNumberOfPeople: ie,
|
|
287
|
+
title: ve,
|
|
288
|
+
subtitle: ce,
|
|
289
|
+
slideshow: de,
|
|
290
|
+
date: A,
|
|
291
|
+
numberOfTotalDays: M,
|
|
292
|
+
numberOfRooms: ge,
|
|
293
|
+
fromDate: me,
|
|
294
|
+
getEventData: b,
|
|
295
|
+
length: fe,
|
|
296
|
+
templateId: j,
|
|
297
|
+
getEvents: he,
|
|
298
|
+
getTemplates: ye,
|
|
299
|
+
hasEvents: be,
|
|
300
|
+
hasTemplates: ke,
|
|
301
|
+
basePrice: W,
|
|
302
|
+
totalPrice: Ie,
|
|
303
|
+
getTemplateData: J,
|
|
304
|
+
getEventTableData: B,
|
|
305
|
+
roomUpgrade: Pe,
|
|
306
|
+
weekendFee: Se,
|
|
307
|
+
hasProducts: X,
|
|
308
|
+
eventRateType: Q,
|
|
309
|
+
isReservationFormFilled: we,
|
|
310
|
+
isMetaDataAvailable: Ee,
|
|
311
|
+
areListingsAvailable: Fe,
|
|
312
|
+
isAvailabilityDataAvailable: Ne,
|
|
313
|
+
isPaymentLoading: Te,
|
|
314
|
+
getEventImages: De,
|
|
315
|
+
isEventListingLoading: Ce,
|
|
316
|
+
fetchMetaData: Y,
|
|
317
|
+
fetchListings: Z,
|
|
318
|
+
getTemplateAvailability: $e,
|
|
319
|
+
getEventAvailability: Oe,
|
|
320
|
+
validateDiscountCode: Re,
|
|
321
|
+
localAddonPrice: G,
|
|
322
|
+
totalAddonPrice: V,
|
|
323
|
+
createBooking: ze,
|
|
324
|
+
reset: Me,
|
|
325
|
+
initialize: Be
|
|
326
|
+
};
|
|
327
|
+
});
|
|
328
|
+
export {
|
|
329
|
+
Qe as u
|
|
330
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-354a8ba7.cjs"),_e=require("./_-0e8547fb.cjs"),Ce=require("./NumberField.vue_vue_type_script_setup_true_lang-e92e7311.cjs"),Fe=e.defineStore("event",()=>{const X=_e.usePaymentStore(),{voucher:Y}=e.storeToRefs(Ce.useApplyGiftCardStore()),{display:g}=e.useAlertStore(),{bearerToken:S}=e.storeToRefs(e.useUtilityStore()),c=e.ref({}),f=e.ref({}),a=e.ref(void 0),u=e.ref(!0),s=e.ref(e.EventModuleState.InitialState),O=e.ref(new Date),P=e.ref(NaN),A=e.ref(1),b=e.ref(NaN),z=e.ref(NaN),E=e.ref(""),w=e.useStorage("konnectio_name","",void 0,{serializer:e.StorageSerializers.string}),M=e.useStorage("konnectio_phone","",void 0,{serializer:e.StorageSerializers.string}),_=e.useStorage("konnectio_email","",void 0,{serializer:e.StorageSerializers.string}),L=e.ref(""),k=e.ref({}),d=e.ref({}),C=e.ref("");function n(t){return t.templateID!==void 0}const Z=e.computed(()=>c.value.currency),ee=e.computed(()=>c.value.maxNumberPerBooking),te=e.computed(()=>c.value.title),ae=e.computed(()=>c.value.subtitle),oe=e.computed(()=>c.value.slideshow),D=e.computed(()=>O.value.toISOString()),ne=e.computed(()=>n(a.value)),F=e.computed(()=>n(a.value)?a.value.numberOfDays:A.value),ue=e.computed(()=>n(a.value)?a.value.packageCount:0),le=e.computed(()=>n(a.value)?a.value.fromDate:""),h=e.computed(()=>f.value.events.find(t=>t.id===b.value)),re=e.computed(()=>h.value?h.value.length:void 0),U=e.computed(()=>n(a.value)?a.value.templateID:0),se=e.computed(()=>f.value.events),ie=e.computed(()=>f.value.templates),ve=e.computed(()=>f.value.events.length>0),ce=e.computed(()=>f.value.templates.length>0),B=e.computed(()=>h.value&&h.value.eventRateType?h.value.eventRateType:e.OctopusEventRateType.None),T=e.computed(()=>{if(!n(a.value))return a.value}),G=e.computed(()=>{if(T.value!==void 0){const t=T.value.find(o=>o.time===E.value);if(t&&t.price)return t.price}return 0}),V=e.computed(()=>{if(n(a.value))return a.value.templateCounts}),de=e.computed(()=>t=>c.value.eventImages.filter(o=>o.eventID===t));function N(t,o,l){let i=0;if(n(a.value)){const r=a.value.templateCounts[l];if(r){const y=r.addons,p=k.value[`${o}.${t}.${l}`]||0;if(p>0){const m=y?.find(I=>I.addonID===t),v=typeof p=="boolean"?1:p;i+=e.getQuantityStrategyPrice(m?.price,m?.quantityStrategy,F.value,r.adultPerRoom)*v}}}else{const r=d.value[t]||0;if(r>0){const y=h.value?.products?.find(p=>p.productID===t);y&&(i+=y.price*r)}}return i}function R(t,o){let l=0;if(n(a.value))for(const i in k.value){const r=i.split(".");parseInt(r[0])===t&&parseInt(r[2])===o&&(l+=N(parseInt(r[1]),t,o))}else for(const i in d.value)l+=N(parseInt(i))*A.value;return l}const q=e.computed(()=>n(a.value)&&a.value.totalPrice||0),pe=e.computed(()=>{if(n(a.value))return a.value.templateCounts===void 0?NaN:a.value.templateCounts.flatMap(t=>t.roomGroupID).reduce((t,o,l)=>t+R(o,l),q.value)||0;{let t=R();return t+=G.value,t}}),me=e.computed(()=>n(a.value)&&a.value.templateCounts!==void 0&&a.value.templateCounts.flatMap(t=>t.weekendFee).reduce((t,o)=>t+o,0)||0),ge=e.computed(()=>n(a.value)&&a.value.templateCounts!==void 0&&a.value.templateCounts.flatMap(t=>t.roomUpgrade).reduce((t,o)=>t+o,0)||0),fe=e.computed(()=>{const t=d.value;let o=0;for(const l in t)o+=Number.isNaN(t[l])?0:t[l];return o>0}),x=e.computed(()=>n(a.value)?!1:Object.keys(d.value).length>0),he=e.computed(()=>!!(w.value!==""&&_.value!==""&&M.value.length>=5&&(!x.value||fe.value)&&(!(!n(a.value)&&B.value!==e.OctopusEventRateType.FullDayEvent)||E.value!=="")));function ye(t){return s.value===e.EventModuleState.ReservationState&&b.value===t&&u.value}const Se=e.computed(()=>!(s.value===e.EventModuleState.InitialState&&u.value)),be=e.computed(()=>!(s.value===e.EventModuleState.AvailabilityState&&u.value)),ke=e.computed(()=>a.value!==void 0),De=e.computed(()=>s.value===e.EventModuleState.PaymentState&&u.value);async function K(){try{const t=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/event/metadata",{params:{language:e.getUserLanguage()},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.15"}})).data;c.value=t,j()}catch{g({message:e.i18n.t("alert.error.couldntFetchMetadata"),type:"warning"})}}async function j(){s.value=e.EventModuleState.AvailabilityState,u.value=!0;try{const t=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/event/restaurant-events",{params:{language:e.getUserLanguage(),date:D.value},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.15"}})).data;f.value=t,u.value=!1}catch{g({message:e.i18n.t("alert.error.couldntFetchListings"),type:"warning"})}}async function Ie(t){s.value=e.EventModuleState.ReservationState,u.value=!0;try{const o=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/v3/event/get-availability",{params:{language:e.getUserLanguage(),date:D.value,templateId:b.value,numberOfPeople:P.value},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.15"}})).data;o.templateCounts.length===0?g({message:e.i18n.t("alert.error.eventNotAvailable"),type:"warning"}):(a.value=o,t()),u.value=!1}catch{u.value=!1,s.value=e.EventModuleState.AvailabilityState,g({message:e.i18n.t("alert.error.couldntFetchEvent"),type:"warning"})}}async function Ee(t){s.value=e.EventModuleState.ReservationState,u.value=!0;try{const o=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/v3/event/get-table-availability",{params:{language:e.getUserLanguage(),date:D.value,numberOfPeople:P.value,eventId:b.value,tableGroupId:z.value},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.15"}})).data;a.value=o,u.value=!1,t()}catch{u.value=!1,s.value=e.EventModuleState.AvailabilityState,g({message:e.i18n.t("alert.error.couldntFetchEvent"),type:"warning"})}}async function Pe(){try{const t=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/v3/event/validate-discount-code",{params:{language:e.getUserLanguage(),date:D.value,discountCode:C.value},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.15"}})).data;console.log(t)}catch(t){console.log(t),g({message:e.i18n.t("alert.error.discountCodeValidation"),type:"warning"})}}async function Ae(t){s.value=e.EventModuleState.PaymentState,u.value=!0;const o=()=>{u.value=!1,s.value=e.EventModuleState.ReservationState,g({message:e.i18n.t("booking.other.errorMessage"),type:"warning"})};let l,i,r;const y=[];if(n(a.value))V.value?.forEach((v,I)=>{const Q=[];let H=0;for(const J in k.value){const $=J.split("."),W=k.value[J];parseInt($[0])===v.roomGroupID&&parseInt($[2])===I&&W>0&&(Q.push({id:H,addonID:parseInt($[1]),quantity:W}),H++)}y.push({adultPerRoom:v.adultPerRoom,count:v.count,roomGroupID:v.roomGroupID,addons:Q})}),l={templateID:U.value,numberOfDays:A.value,templateCounts:y};else{i=[],r=E.value;for(const v in d.value){const I=d.value[parseInt(v)];I>0&&i.push({id:parseInt(v),quantity:I})}}let p="https://stage.hotel-service.konnectio.dk/api/v3/event/template-book";const m={date:D.value,name:w.value,email:_.value,phone:M.value,remark:L.value,numberOfPeople:P.value,days:F.value,discountCode:C.value,giftCardCode:Y.value,checkoutUrl:window.location.origin,privacyUrl:window.location.origin};n(a.value)?m.templateGroup=l:(m.time=r,m.eventId=b.value,m.products=i,p="https://stage.hotel-service.konnectio.dk/api/v3/event/event-book"),await e.axios.post(p,m,{headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.15"}}).then(v=>{u.value=!1,X.pay({callback:t,response:v.data})}).catch(()=>o())}function we(t){k.value={},d.value={},E.value="",t()}function Me(){K()}return{metaData:c,listingData:f,tableBasePrice:G,availabilityData:a,isLoading:u,moduleState:s,searchDate:O,numberOfPeople:P,numberOfDays:A,eventId:b,tableGroupId:z,arrivalTime:E,addons:k,products:d,discountCode:C,name:w,phone:M,email:_,remark:L,isTemplateEvent:ne,currency:Z,maxNumberOfPeople:ee,title:te,subtitle:ae,slideshow:oe,date:D,numberOfTotalDays:F,numberOfRooms:ue,fromDate:le,getEventData:h,length:re,templateId:U,getEvents:se,getTemplates:ie,hasEvents:ve,hasTemplates:ce,basePrice:q,totalPrice:pe,getTemplateData:V,getEventTableData:T,roomUpgrade:ge,weekendFee:me,hasProducts:x,eventRateType:B,isReservationFormFilled:he,isMetaDataAvailable:Se,areListingsAvailable:be,isAvailabilityDataAvailable:ke,isPaymentLoading:De,getEventImages:de,isEventListingLoading:ye,fetchMetaData:K,fetchListings:j,getTemplateAvailability:Ie,getEventAvailability:Ee,validateDiscountCode:Pe,localAddonPrice:N,totalAddonPrice:R,createBooking:Ae,reset:we,initialize:Me}});exports.useEventStore=Fe;
|
package/dist/event.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-b92d158e.cjs"),b=require("./index-2018df9e.cjs"),w=require("./ThankYou-d4fae82e.cjs"),x=require("./event-f2a6108f.cjs"),ye=require("./ActionField-74fc14cf.cjs"),H=require("./TextField-52bc45b8.cjs"),Be=require("./DateField.vue_vue_type_style_index_0_lang-41b83959.cjs"),A=require("./NumberField.vue_vue_type_script_setup_true_lang-8525b2cd.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./_-f5fc7dd6.cjs");const _e={class:"fresh-booking-event-listing-information"},Ve={key:0},be={key:1},Ne=e.defineComponent({__name:"Event",props:{name:{},type:{},description:{},fromDate:{},toDate:{},listingId:{},tableGroupId:{},days:{},timeFrom:{},timeTo:{},maxOnlineReservationLimit:{},minimumPersonCount:{},fromPrice:{},gallery:{},soldOut:{type:Boolean,default:!1},layout:{},trackingEnabled:{type:Boolean},callback:{}},setup(y){const{t}=e.useI18n(),i=y,{display:k}=e.useAlertStore(),{currency:F}=e.storeToRefs(e.useUtilityStore()),{maxNumberOfPeople:B,numberOfPeople:L,eventId:_,tableGroupId:h}=e.storeToRefs(x.useEventStore()),{getTemplateAvailability:S,getEventAvailability:D,isEventListingLoading:g}=x.useEventStore(),m=e.ref(0),T=e.computed(()=>g(i.listingId)),O=()=>{m.value>0?(_.value=i.listingId,L.value=m.value,S(i.callback)):k({type:"error",message:t("alert.error.selectPeople")})},u=()=>{m.value>0?(_.value=i.listingId,h.value=i.tableGroupId,L.value=m.value,D(i.callback)):k({type:"error",message:t("alert.error.selectPeople")})};return(o,c)=>(e.openBlock(),e.createBlock(w.Base,{"listing-id":o.listingId,gallery:o.gallery,name:o.name,description:o.description,layout:e.unref(e.BookingLayout).Event},e.createSlots({action:e.withCtx(()=>[e.createVNode(ye.ActionField,{modelValue:m.value,"onUpdate:modelValue":c[0]||(c[0]=V=>m.value=V),type:"number",label:e.unref(t)("event.numberOfGuests"),buttonLabel:o.soldOut?e.unref(t)("event.soldOut"):e.unref(t)("event.bookNowButton"),buttonDisabled:o.soldOut,"min-value":o.type==="event"?1:o.minimumPersonCount,"max-value":o.type==="event"?o.maxOnlineReservationLimit||1/0:e.unref(B),"is-loading":T.value,"onUpdate:isLoading":c[1]||(c[1]=V=>T.value=V),onAction:c[2]||(c[2]=V=>o.type==="event"?u():O())},null,8,["modelValue","label","buttonLabel","buttonDisabled","min-value","max-value","is-loading"])]),_:2},[o.type==="event"?{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",_e,[e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-range",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDay)(o.days)),1)]),e.unref(e.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",Ve,[e.createVNode(e.Icon,{icon:"calendar-days",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDates)(o.fromDate,o.toDate)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-clock",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showTimes)(o.timeFrom,o.timeTo)),1)]),o.maxOnlineReservationLimit?(e.openBlock(),e.createElementBlock("li",be,[e.createVNode(e.Icon,{icon:"user-alt",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`1 - ${o.maxOnlineReservationLimit} ${e.unref(t)("general.people")}`),1)])):e.createCommentVNode("",!0)])]),key:"0"}:{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",{class:"fresh-booking-event-listing-information"},[e.unref(e.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",{key:0},[e.createVNode(e.Icon,{icon:"calendar-days",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDates)(o.fromDate,o.toDate,!0)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"user-alt",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`${o.minimumPersonCount} - ${e.unref(B)} ${e.unref(t)("general.people")}`),1)]),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"money-bill",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`${e.unref(t)("general.pricesFrom")} ${e.unref(e.showPrice)(o.fromPrice,e.unref(F))}`),1)])])]),key:"1"}]),1032,["listing-id","gallery","name","description","layout"]))}});const J=e._export_sfc(Ne,[["__scopeId","data-v-4a459a74"]]),N=y=>(e.pushScopeId("data-v-b2eee97d"),y=y(),e.popScopeId(),y),he={class:"fresh-booking-panel"},Se={key:0,id:"fresh-booking-event-overview"},De={class:"fresh-booking-event-listings"},Ee={class:"fresh-booking-event-listings"},Ce={key:2,id:"fresh-booking-event-addons"},we={class:"fresh-booking-table"},Fe=N(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Te={class:"fresh-booking-event-addons-price"},Pe=N(()=>e.createBaseVNode("br",null,null,-1)),$e={class:"fresh-booking-event-addons-input"},xe={class:"fresh-booking-event-addons-price"},Le=N(()=>e.createBaseVNode("td",{colspan:"2"},null,-1)),Oe={class:"fresh-booking-event-addons-price"},Re={key:3},Ue={class:"fresh-booking-label required"},qe={id:"fresh-booking-event-table"},Ae={key:4},Ie={class:"fresh-booking-label required"},Me={class:"fresh-booking-table"},ze=N(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Ye={class:"fresh-booking-event-addons-price"},Qe=N(()=>e.createBaseVNode("br",null,null,-1)),We=N(()=>e.createBaseVNode("br",null,null,-1)),je={class:"fresh-booking-event-addons-input"},He={class:"fresh-booking-event-addons-price"},Je={key:0},Ke={key:1},Xe={key:2},Ze={key:3},Ge={key:4},et={key:5},tt={key:6},nt=e.defineComponent({name:"EventLayout",__name:"Event",props:{accessToken:{},styling:{}},setup(y){const{t}=e.useI18n(),{searchDate:i,addons:k,products:F,numberOfDays:B,discountCode:L,name:_,phone:h,email:S,remark:D,arrivalTime:g,title:m,subtitle:T,slideshow:O,currency:u,numberOfPeople:o,numberOfTotalDays:c,numberOfRooms:V,basePrice:K,totalPrice:X,isPaymentLoading:Z,hasEvents:G,hasTemplates:ee,getEvents:te,getTemplates:ne,getEventData:oe,getTemplateData:P,getEventTableData:le,length:I,roomUpgrade:ae,weekendFee:re,fromDate:M,hasProducts:se,eventRateType:z,isMetaDataAvailable:ie,areListingsAvailable:ue,isReservationFormFilled:ce,isAvailabilityDataAvailable:de,isTemplateEvent:f,tableBasePrice:Y}=e.storeToRefs(x.useEventStore()),{initialize:pe,validateDiscountCode:rt,fetchListings:me,createBooking:fe,localAddonPrice:Q,totalAddonPrice:W,reset:ve}=x.useEventStore(),{hideEvents:ke,hideEventTemplates:ge}=e.storeToRefs(e.useUtilityStore());return e.onMounted(()=>pe()),e.watch(i,()=>me()),(j,l)=>(e.openBlock(),e.createBlock(e._sfc_main$1,{id:"fresh-booking-event-module",class:"fresh-booking-app",type:"event","access-token":j.accessToken,styling:j.styling},{default:e.withCtx(()=>[e.unref(ie)?(e.openBlock(),e.createBlock(w.MultiStepForm,{key:0,slideshow:e.unref(O),title:e.unref(m),subtitle:e.unref(T)},{availability:e.withCtx(({next:$})=>[e.createBaseVNode("div",he,[e.createVNode(Be._sfc_main,{modelValue:e.unref(i),"onUpdate:modelValue":l[0]||(l[0]=d=>e.isRef(i)?i.value=d:null),label:e.unref(t)("event.selectDate"),"min-date":new Date},null,8,["modelValue","label","min-date"])]),e.unref(ue)?(e.openBlock(),e.createElementBlock("div",Se,[e.unref(G)&&!e.unref(ke)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"clock-seven",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.eventsTitle")),1)]),e.createBaseVNode("ul",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),({id:d,days:n,name:r,timeFrom:p,timeTo:a,fromDate:s,toDate:E,tableGroupID:R,description:U,soldOut:q,maxOnlineReservationLimit:C})=>(e.openBlock(),e.createBlock(J,{key:d,type:"event","listing-id":d,"table-group-id":R,description:U,name:r,days:n,"from-date":s,"to-date":E,"max-online-reservation-limit":C,"time-from":p,"time-to":a,"sold-out":q,callback:$},null,8,["listing-id","table-group-id","description","name","days","from-date","to-date","max-online-reservation-limit","time-from","time-to","sold-out","callback"]))),128))])],64)):e.createCommentVNode("",!0),e.unref(ee)&&!e.unref(ge)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"stars",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.stayTitle")),1)]),e.createBaseVNode("ul",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ne),({id:d,name:n,fromDate:r,toDate:p,minimumPersonCount:a,fromPrice:s,description:E})=>(e.openBlock(),e.createBlock(J,{key:d,type:"template","listing-id":d,name:n,description:E,"from-date":r,"to-date":p,"minimum-person-count":a,fromPrice:s,callback:$},null,8,["listing-id","name","description","from-date","to-date","minimum-person-count","fromPrice","callback"]))),128))])],64)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),reservation:e.withCtx(({next:$,prev:d})=>[e.unref(de)?(e.openBlock(),e.createBlock(w.ReservationForm,{key:0,remark:e.unref(D),"onUpdate:remark":l[8]||(l[8]=n=>e.isRef(D)?D.value=n:null),"is-filled":e.unref(ce),"is-loading":e.unref(Z),"base-price":e.unref(K),"total-price":e.unref(X),"weekend-fee":e.unref(re),"room-upgrade":e.unref(ae),onPrev:n=>e.unref(ve)(d),onNext:n=>e.unref(fe)($)},{form:e.withCtx(()=>[e.unref(z)===e.unref(e.OctopusEventRateType).FullDayEvent?(e.openBlock(),e.createBlock(A._sfc_main,{key:0,modelValue:e.unref(B),"onUpdate:modelValue":l[1]||(l[1]=n=>e.isRef(B)?B.value=n:null),label:e.unref(t)("event.numberOfDays"),"min-value":1,required:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0),e.createVNode(H.TextField,{modelValue:e.unref(_),"onUpdate:modelValue":l[2]||(l[2]=n=>e.isRef(_)?_.value=n:null),type:"text",label:e.unref(t)("booking.reservation.name"),icon:"user-alt",placeholder:e.unref(t)("booking.reservation.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(H.TextField,{modelValue:e.unref(S),"onUpdate:modelValue":l[3]||(l[3]=n=>e.isRef(S)?S.value=n:null),label:e.unref(t)("booking.reservation.email"),type:"email",name:"email",autocomplete:"email",icon:"at",placeholder:e.unref(t)("booking.reservation.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(b.PhoneField,{modelValue:e.unref(h),"onUpdate:modelValue":l[4]||(l[4]=n=>e.isRef(h)?h.value=n:null),label:e.unref(t)("booking.reservation.phone"),icon:"phone-office",placeholder:e.unref(t)("booking.reservation.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createCommentVNode("",!0),e.unref(P)&&e.unref(P).length>0?(e.openBlock(),e.createElementBlock("ul",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(P),({roomGroupID:n,addons:r,adultPerRoom:p},a)=>(e.openBlock(),e.createElementBlock("li",{key:n},[e.createBaseVNode("h5",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.room"))+" #"+e.toDisplayString(a+1),1),e.createTextVNode(" ("),e.createVNode(e.Icon,{icon:"male",type:"fas",color:"header"}),e.createTextVNode(" "+e.toDisplayString(p)+") ",1)]),e.createBaseVNode("table",we,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1)]),Fe,e.createBaseVNode("th",Te,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,({addonID:s,cardinality:E,name:R,price:U,quantityStrategy:q})=>(e.openBlock(),e.createElementBlock("tr",{key:s},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,e.toDisplayString(R),1),Pe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(U,e.unref(u)))+" "+e.toDisplayString(e.unref(e.getPriceQuantityLabel)(q)),1)]),e.createBaseVNode("td",$e,[E===3?(e.openBlock(),e.createBlock(A._sfc_main,{key:0,modelValue:e.unref(k)[`${n}.${s}.${a}`],"onUpdate:modelValue":C=>e.unref(k)[`${n}.${s}.${a}`]=C,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(b.Checkbox,{key:1,modelValue:e.unref(k)[`${n}.${s}.${a}`],"onUpdate:modelValue":C=>e.unref(k)[`${n}.${s}.${a}`]=C,numeric:!0},null,8,["modelValue","onUpdate:modelValue"]))]),e.createBaseVNode("td",xe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Q)(s,n,a),e.unref(u))),1)])]))),128))]),e.createBaseVNode("tfoot",null,[e.createBaseVNode("tr",null,[Le,e.createBaseVNode("td",Oe,[e.createBaseVNode("u",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(W)(n,a),e.unref(u))),1)])])])])])]))),128))])):e.createCommentVNode("",!0),e.unref(z)!==e.unref(e.OctopusEventRateType).FullDayEvent&&!e.unref(f)?(e.openBlock(),e.createElementBlock("div",Re,[e.createBaseVNode("label",Ue,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.selectArrivalTime")),1)]),e.createBaseVNode("ul",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(le),(n,r)=>(e.openBlock(),e.createElementBlock("li",{key:r},[e.createVNode(b.Checkbox,{modelValue:e.unref(g),"onUpdate:modelValue":l[7]||(l[7]=p=>e.isRef(g)?g.value=p:null),type:"radio",name:"eventTimeTable",val:n.time,label:e.unref(e.showTime)(n.time)},null,8,["modelValue","val","label"])]))),128))])])):e.createCommentVNode("",!0),e.unref(se)?(e.openBlock(),e.createElementBlock("div",Ae,[e.createBaseVNode("label",Ie,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.selectProducts")),1)]),e.createBaseVNode("table",Me,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1)]),ze,e.createBaseVNode("th",Ye,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(oe).products,({productID:n,productName:r,price:p,description:a})=>(e.openBlock(),e.createElementBlock("tr",{key:n},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,[e.createBaseVNode("span",null,e.toDisplayString(r),1)]),Qe,e.createBaseVNode("span",null,e.toDisplayString(a),1),We,e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(p,e.unref(u))),1)]),e.createBaseVNode("td",je,[e.createVNode(A._sfc_main,{modelValue:e.unref(F)[n],"onUpdate:modelValue":s=>e.unref(F)[n]=s,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])]),e.createBaseVNode("td",He,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Q)(n),e.unref(u))),1)])]))),128))])])])):e.createCommentVNode("",!0)]),resume:e.withCtx(()=>[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfGuests")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(o)),1)]),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Je,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfRooms")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(V)),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Ke,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfDays")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(c)),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Xe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.arrival")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showDate)(e.unref(M))),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Ze,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.departure")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showDate)(e.unref(M),e.unref(c))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(g)?(e.openBlock(),e.createElementBlock("li",Ge,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.startOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showTime)(e.unref(g))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(I)?(e.openBlock(),e.createElementBlock("li",et,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.lengthOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showTime)(e.unref(I))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(Y)>0?(e.openBlock(),e.createElementBlock("li",tt,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.basePrice")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Y),e.unref(u))),1)])):e.createCommentVNode("",!0)]),expenses:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(P),({roomGroupID:n},r)=>(e.openBlock(),e.createElementBlock("li",{key:n},[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons"))+" - "+e.toDisplayString(e.unref(t)("booking.reservation.room"))+" #"+e.toDisplayString(r+1),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(W)(n,r),e.unref(u))),1)]))),128))]),_:2},1032,["remark","is-filled","is-loading","base-price","total-price","weekend-fee","room-upgrade","onPrev","onNext"])):e.createCommentVNode("",!0)]),payment:e.withCtx(()=>[e.createVNode(b.CheckoutWindow)]),confirmation:e.withCtx(()=>[e.createVNode(w.ThankYou,{message:e.unref(t)("event.confirmationMessage")},null,8,["message"])]),_:1},8,["slideshow","title","subtitle"])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","styling"]))}});const ot=e._export_sfc(nt,[["__scopeId","data-v-b2eee97d"]]),lt=e.createPinia(),at=e.zo(),v=e.createApp({components:{Event:ot}});v.use(lt);v.use(at);v.use(b.StickyPlugin);v.use(e.instance);v.use(w.xt);v.use(b.install,{bootstrap:!1});v.mount("#konnectio-event-app");module.exports=v;
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-354a8ba7.cjs"),b=require("./index-3a59acc2.cjs"),w=require("./ThankYou-e988ffbe.cjs"),x=require("./event-d85117b3.cjs"),ye=require("./ActionField-bcecb3ad.cjs"),H=require("./TextField-afd7af9b.cjs"),Be=require("./DateField.vue_vue_type_style_index_0_lang-6f00c90f.cjs"),A=require("./NumberField.vue_vue_type_script_setup_true_lang-e92e7311.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./_-0e8547fb.cjs");const _e={class:"fresh-booking-event-listing-information"},Ve={key:0},be={key:1},Ne=e.defineComponent({__name:"Event",props:{name:{},type:{},description:{},fromDate:{},toDate:{},listingId:{},tableGroupId:{},days:{},timeFrom:{},timeTo:{},maxOnlineReservationLimit:{},minimumPersonCount:{},fromPrice:{},gallery:{},soldOut:{type:Boolean,default:!1},layout:{},trackingEnabled:{type:Boolean},callback:{}},setup(y){const{t}=e.useI18n(),i=y,{display:k}=e.useAlertStore(),{currency:F}=e.storeToRefs(e.useUtilityStore()),{maxNumberOfPeople:B,numberOfPeople:L,eventId:_,tableGroupId:h}=e.storeToRefs(x.useEventStore()),{getTemplateAvailability:S,getEventAvailability:D,isEventListingLoading:g}=x.useEventStore(),m=e.ref(0),T=e.computed(()=>g(i.listingId)),O=()=>{m.value>0?(_.value=i.listingId,L.value=m.value,S(i.callback)):k({type:"error",message:t("alert.error.selectPeople")})},u=()=>{m.value>0?(_.value=i.listingId,h.value=i.tableGroupId,L.value=m.value,D(i.callback)):k({type:"error",message:t("alert.error.selectPeople")})};return(o,c)=>(e.openBlock(),e.createBlock(w.Base,{"listing-id":o.listingId,gallery:o.gallery,name:o.name,description:o.description,layout:e.unref(e.BookingLayout).Event},e.createSlots({action:e.withCtx(()=>[e.createVNode(ye.ActionField,{modelValue:m.value,"onUpdate:modelValue":c[0]||(c[0]=V=>m.value=V),type:"number",label:e.unref(t)("event.numberOfGuests"),buttonLabel:o.soldOut?e.unref(t)("event.soldOut"):e.unref(t)("event.bookNowButton"),buttonDisabled:o.soldOut,"min-value":o.type==="event"?1:o.minimumPersonCount,"max-value":o.type==="event"?o.maxOnlineReservationLimit||1/0:e.unref(B),"is-loading":T.value,"onUpdate:isLoading":c[1]||(c[1]=V=>T.value=V),onAction:c[2]||(c[2]=V=>o.type==="event"?u():O())},null,8,["modelValue","label","buttonLabel","buttonDisabled","min-value","max-value","is-loading"])]),_:2},[o.type==="event"?{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",_e,[e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-range",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDay)(o.days)),1)]),e.unref(e.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",Ve,[e.createVNode(e.Icon,{icon:"calendar-days",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDates)(o.fromDate,o.toDate)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-clock",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showTimes)(o.timeFrom,o.timeTo)),1)]),o.maxOnlineReservationLimit?(e.openBlock(),e.createElementBlock("li",be,[e.createVNode(e.Icon,{icon:"user-alt",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`1 - ${o.maxOnlineReservationLimit} ${e.unref(t)("general.people")}`),1)])):e.createCommentVNode("",!0)])]),key:"0"}:{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",{class:"fresh-booking-event-listing-information"},[e.unref(e.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",{key:0},[e.createVNode(e.Icon,{icon:"calendar-days",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDates)(o.fromDate,o.toDate,!0)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"user-alt",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`${o.minimumPersonCount} - ${e.unref(B)} ${e.unref(t)("general.people")}`),1)]),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"money-bill",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`${e.unref(t)("general.pricesFrom")} ${e.unref(e.showPrice)(o.fromPrice,e.unref(F))}`),1)])])]),key:"1"}]),1032,["listing-id","gallery","name","description","layout"]))}});const J=e._export_sfc(Ne,[["__scopeId","data-v-4a459a74"]]),N=y=>(e.pushScopeId("data-v-b2eee97d"),y=y(),e.popScopeId(),y),he={class:"fresh-booking-panel"},Se={key:0,id:"fresh-booking-event-overview"},De={class:"fresh-booking-event-listings"},Ee={class:"fresh-booking-event-listings"},Ce={key:2,id:"fresh-booking-event-addons"},we={class:"fresh-booking-table"},Fe=N(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Te={class:"fresh-booking-event-addons-price"},Pe=N(()=>e.createBaseVNode("br",null,null,-1)),$e={class:"fresh-booking-event-addons-input"},xe={class:"fresh-booking-event-addons-price"},Le=N(()=>e.createBaseVNode("td",{colspan:"2"},null,-1)),Oe={class:"fresh-booking-event-addons-price"},Re={key:3},Ue={class:"fresh-booking-label required"},qe={id:"fresh-booking-event-table"},Ae={key:4},Ie={class:"fresh-booking-label required"},Me={class:"fresh-booking-table"},ze=N(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Ye={class:"fresh-booking-event-addons-price"},Qe=N(()=>e.createBaseVNode("br",null,null,-1)),We=N(()=>e.createBaseVNode("br",null,null,-1)),je={class:"fresh-booking-event-addons-input"},He={class:"fresh-booking-event-addons-price"},Je={key:0},Ke={key:1},Xe={key:2},Ze={key:3},Ge={key:4},et={key:5},tt={key:6},nt=e.defineComponent({name:"EventLayout",__name:"Event",props:{accessToken:{},styling:{}},setup(y){const{t}=e.useI18n(),{searchDate:i,addons:k,products:F,numberOfDays:B,discountCode:L,name:_,phone:h,email:S,remark:D,arrivalTime:g,title:m,subtitle:T,slideshow:O,currency:u,numberOfPeople:o,numberOfTotalDays:c,numberOfRooms:V,basePrice:K,totalPrice:X,isPaymentLoading:Z,hasEvents:G,hasTemplates:ee,getEvents:te,getTemplates:ne,getEventData:oe,getTemplateData:P,getEventTableData:le,length:I,roomUpgrade:ae,weekendFee:re,fromDate:M,hasProducts:se,eventRateType:z,isMetaDataAvailable:ie,areListingsAvailable:ue,isReservationFormFilled:ce,isAvailabilityDataAvailable:de,isTemplateEvent:f,tableBasePrice:Y}=e.storeToRefs(x.useEventStore()),{initialize:pe,validateDiscountCode:rt,fetchListings:me,createBooking:fe,localAddonPrice:Q,totalAddonPrice:W,reset:ve}=x.useEventStore(),{hideEvents:ke,hideEventTemplates:ge}=e.storeToRefs(e.useUtilityStore());return e.onMounted(()=>pe()),e.watch(i,()=>me()),(j,l)=>(e.openBlock(),e.createBlock(e._sfc_main$1,{id:"fresh-booking-event-module",class:"fresh-booking-app",type:"event","access-token":j.accessToken,styling:j.styling},{default:e.withCtx(()=>[e.unref(ie)?(e.openBlock(),e.createBlock(w.MultiStepForm,{key:0,slideshow:e.unref(O),title:e.unref(m),subtitle:e.unref(T)},{availability:e.withCtx(({next:$})=>[e.createBaseVNode("div",he,[e.createVNode(Be._sfc_main,{modelValue:e.unref(i),"onUpdate:modelValue":l[0]||(l[0]=d=>e.isRef(i)?i.value=d:null),label:e.unref(t)("event.selectDate"),"min-date":new Date},null,8,["modelValue","label","min-date"])]),e.unref(ue)?(e.openBlock(),e.createElementBlock("div",Se,[e.unref(G)&&!e.unref(ke)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"clock-seven",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.eventsTitle")),1)]),e.createBaseVNode("ul",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),({id:d,days:n,name:r,timeFrom:p,timeTo:a,fromDate:s,toDate:E,tableGroupID:R,description:U,soldOut:q,maxOnlineReservationLimit:C})=>(e.openBlock(),e.createBlock(J,{key:d,type:"event","listing-id":d,"table-group-id":R,description:U,name:r,days:n,"from-date":s,"to-date":E,"max-online-reservation-limit":C,"time-from":p,"time-to":a,"sold-out":q,callback:$},null,8,["listing-id","table-group-id","description","name","days","from-date","to-date","max-online-reservation-limit","time-from","time-to","sold-out","callback"]))),128))])],64)):e.createCommentVNode("",!0),e.unref(ee)&&!e.unref(ge)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"stars",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.stayTitle")),1)]),e.createBaseVNode("ul",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ne),({id:d,name:n,fromDate:r,toDate:p,minimumPersonCount:a,fromPrice:s,description:E})=>(e.openBlock(),e.createBlock(J,{key:d,type:"template","listing-id":d,name:n,description:E,"from-date":r,"to-date":p,"minimum-person-count":a,fromPrice:s,callback:$},null,8,["listing-id","name","description","from-date","to-date","minimum-person-count","fromPrice","callback"]))),128))])],64)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),reservation:e.withCtx(({next:$,prev:d})=>[e.unref(de)?(e.openBlock(),e.createBlock(w.ReservationForm,{key:0,remark:e.unref(D),"onUpdate:remark":l[8]||(l[8]=n=>e.isRef(D)?D.value=n:null),"is-filled":e.unref(ce),"is-loading":e.unref(Z),"base-price":e.unref(K),"total-price":e.unref(X),"weekend-fee":e.unref(re),"room-upgrade":e.unref(ae),onPrev:n=>e.unref(ve)(d),onNext:n=>e.unref(fe)($)},{form:e.withCtx(()=>[e.unref(z)===e.unref(e.OctopusEventRateType).FullDayEvent?(e.openBlock(),e.createBlock(A._sfc_main,{key:0,modelValue:e.unref(B),"onUpdate:modelValue":l[1]||(l[1]=n=>e.isRef(B)?B.value=n:null),label:e.unref(t)("event.numberOfDays"),"min-value":1,required:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0),e.createVNode(H.TextField,{modelValue:e.unref(_),"onUpdate:modelValue":l[2]||(l[2]=n=>e.isRef(_)?_.value=n:null),type:"text",label:e.unref(t)("booking.reservation.name"),icon:"user-alt",placeholder:e.unref(t)("booking.reservation.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(H.TextField,{modelValue:e.unref(S),"onUpdate:modelValue":l[3]||(l[3]=n=>e.isRef(S)?S.value=n:null),label:e.unref(t)("booking.reservation.email"),type:"email",name:"email",autocomplete:"email",icon:"at",placeholder:e.unref(t)("booking.reservation.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(b.PhoneField,{modelValue:e.unref(h),"onUpdate:modelValue":l[4]||(l[4]=n=>e.isRef(h)?h.value=n:null),label:e.unref(t)("booking.reservation.phone"),icon:"phone-office",placeholder:e.unref(t)("booking.reservation.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createCommentVNode("",!0),e.unref(P)&&e.unref(P).length>0?(e.openBlock(),e.createElementBlock("ul",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(P),({roomGroupID:n,addons:r,adultPerRoom:p},a)=>(e.openBlock(),e.createElementBlock("li",{key:n},[e.createBaseVNode("h5",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.room"))+" #"+e.toDisplayString(a+1),1),e.createTextVNode(" ("),e.createVNode(e.Icon,{icon:"male",type:"fas",color:"header"}),e.createTextVNode(" "+e.toDisplayString(p)+") ",1)]),e.createBaseVNode("table",we,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1)]),Fe,e.createBaseVNode("th",Te,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,({addonID:s,cardinality:E,name:R,price:U,quantityStrategy:q})=>(e.openBlock(),e.createElementBlock("tr",{key:s},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,e.toDisplayString(R),1),Pe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(U,e.unref(u)))+" "+e.toDisplayString(e.unref(e.getPriceQuantityLabel)(q)),1)]),e.createBaseVNode("td",$e,[E===3?(e.openBlock(),e.createBlock(A._sfc_main,{key:0,modelValue:e.unref(k)[`${n}.${s}.${a}`],"onUpdate:modelValue":C=>e.unref(k)[`${n}.${s}.${a}`]=C,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(b.Checkbox,{key:1,modelValue:e.unref(k)[`${n}.${s}.${a}`],"onUpdate:modelValue":C=>e.unref(k)[`${n}.${s}.${a}`]=C,numeric:!0},null,8,["modelValue","onUpdate:modelValue"]))]),e.createBaseVNode("td",xe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Q)(s,n,a),e.unref(u))),1)])]))),128))]),e.createBaseVNode("tfoot",null,[e.createBaseVNode("tr",null,[Le,e.createBaseVNode("td",Oe,[e.createBaseVNode("u",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(W)(n,a),e.unref(u))),1)])])])])])]))),128))])):e.createCommentVNode("",!0),e.unref(z)!==e.unref(e.OctopusEventRateType).FullDayEvent&&!e.unref(f)?(e.openBlock(),e.createElementBlock("div",Re,[e.createBaseVNode("label",Ue,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.selectArrivalTime")),1)]),e.createBaseVNode("ul",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(le),(n,r)=>(e.openBlock(),e.createElementBlock("li",{key:r},[e.createVNode(b.Checkbox,{modelValue:e.unref(g),"onUpdate:modelValue":l[7]||(l[7]=p=>e.isRef(g)?g.value=p:null),type:"radio",name:"eventTimeTable",val:n.time,label:e.unref(e.showTime)(n.time)},null,8,["modelValue","val","label"])]))),128))])])):e.createCommentVNode("",!0),e.unref(se)?(e.openBlock(),e.createElementBlock("div",Ae,[e.createBaseVNode("label",Ie,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.selectProducts")),1)]),e.createBaseVNode("table",Me,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1)]),ze,e.createBaseVNode("th",Ye,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(oe).products,({productID:n,productName:r,price:p,description:a})=>(e.openBlock(),e.createElementBlock("tr",{key:n},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,[e.createBaseVNode("span",null,e.toDisplayString(r),1)]),Qe,e.createBaseVNode("span",null,e.toDisplayString(a),1),We,e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(p,e.unref(u))),1)]),e.createBaseVNode("td",je,[e.createVNode(A._sfc_main,{modelValue:e.unref(F)[n],"onUpdate:modelValue":s=>e.unref(F)[n]=s,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])]),e.createBaseVNode("td",He,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Q)(n),e.unref(u))),1)])]))),128))])])])):e.createCommentVNode("",!0)]),resume:e.withCtx(()=>[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfGuests")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(o)),1)]),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Je,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfRooms")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(V)),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Ke,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfDays")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(c)),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Xe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.arrival")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showDate)(e.unref(M))),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Ze,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.departure")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showDate)(e.unref(M),e.unref(c))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(g)?(e.openBlock(),e.createElementBlock("li",Ge,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.startOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showTime)(e.unref(g))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(I)?(e.openBlock(),e.createElementBlock("li",et,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.lengthOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showTime)(e.unref(I))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(Y)>0?(e.openBlock(),e.createElementBlock("li",tt,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.basePrice")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Y),e.unref(u))),1)])):e.createCommentVNode("",!0)]),expenses:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(P),({roomGroupID:n},r)=>(e.openBlock(),e.createElementBlock("li",{key:n},[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons"))+" - "+e.toDisplayString(e.unref(t)("booking.reservation.room"))+" #"+e.toDisplayString(r+1),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(W)(n,r),e.unref(u))),1)]))),128))]),_:2},1032,["remark","is-filled","is-loading","base-price","total-price","weekend-fee","room-upgrade","onPrev","onNext"])):e.createCommentVNode("",!0)]),payment:e.withCtx(()=>[e.createVNode(b.CheckoutWindow)]),confirmation:e.withCtx(()=>[e.createVNode(w.ThankYou,{message:e.unref(t)("event.confirmationMessage")},null,8,["message"])]),_:1},8,["slideshow","title","subtitle"])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","styling"]))}});const ot=e._export_sfc(nt,[["__scopeId","data-v-b2eee97d"]]),lt=e.createPinia(),at=e.zo(),v=e.createApp({components:{Event:ot}});v.use(lt);v.use(at);v.use(b.StickyPlugin);v.use(e.instance);v.use(w.xt);v.use(b.install,{bootstrap:!1});v.mount("#konnectio-event-app");module.exports=v;
|
package/dist/event.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { h as ge, z as he, u as Ie, s as Y, a as ke, r as Qe, c as We, k as t, l as b, V as Ye, w as g, x as l, m as r, D as h, A as n, n as e, W as Je, X as ie, q as i, Y as re, t as u, Z as Xe, F as $, $ as Ze, _ as fe, o as je, a0 as He, B as D, a1 as V, a2 as w, a3 as ue, O as de, a4 as me, a5 as Ke, a6 as G, G as ce, J as Ge, L as xe, M as el, P as ll, a7 as nl, N as tl, Q as al } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { P as ol, C as pe, a as sl, S as il, i as rl } from "./index-
|
|
3
|
-
import { B as ul, M as dl, R as ml, T as cl, x as pl } from "./ThankYou-
|
|
4
|
-
import { u as J } from "./event-
|
|
5
|
-
import { A as vl } from "./ActionField-
|
|
6
|
-
import { T as ve } from "./TextField-
|
|
7
|
-
import { _ as bl } from "./DateField.vue_vue_type_style_index_0_lang-
|
|
8
|
-
import { _ as x } from "./NumberField.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { h as ge, z as he, u as Ie, s as Y, a as ke, r as Qe, c as We, k as t, l as b, V as Ye, w as g, x as l, m as r, D as h, A as n, n as e, W as Je, X as ie, q as i, Y as re, t as u, Z as Xe, F as $, $ as Ze, _ as fe, o as je, a0 as He, B as D, a1 as V, a2 as w, a3 as ue, O as de, a4 as me, a5 as Ke, a6 as G, G as ce, J as Ge, L as xe, M as el, P as ll, a7 as nl, N as tl, Q as al } from "./SelectField.vue_vue_type_style_index_0_lang-a75b8f32.js";
|
|
2
|
+
import { P as ol, C as pe, a as sl, S as il, i as rl } from "./index-84c4adc0.js";
|
|
3
|
+
import { B as ul, M as dl, R as ml, T as cl, x as pl } from "./ThankYou-a44a3589.js";
|
|
4
|
+
import { u as J } from "./event-a09daadc.js";
|
|
5
|
+
import { A as vl } from "./ActionField-d82454ed.js";
|
|
6
|
+
import { T as ve } from "./TextField-46d88ef6.js";
|
|
7
|
+
import { _ as bl } from "./DateField.vue_vue_type_style_index_0_lang-a494ebda.js";
|
|
8
|
+
import { _ as x } from "./NumberField.vue_vue_type_script_setup_true_lang-21318607.js";
|
|
9
9
|
import "./_commonjsHelpers-c5d32002.js";
|
|
10
|
-
import "./_-
|
|
10
|
+
import "./_-6e32ea4d.js";
|
|
11
11
|
const gl = { class: "fresh-booking-event-listing-information" }, hl = { key: 0 }, kl = { key: 1 }, fl = /* @__PURE__ */ ge({
|
|
12
12
|
__name: "Event",
|
|
13
13
|
props: {
|
package/dist/event.js.br
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-354a8ba7.cjs"),c=require("./NumberField.vue_vue_type_script_setup_true_lang-e92e7311.cjs"),_=require("./ActionField-bcecb3ad.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./TextField-afd7af9b.cjs");const y=o=>(e.pushScopeId("data-v-5d5827dc"),o=o(),e.popScopeId(),o),N=["innerHTML"],B={key:0,id:"fresh-booking-gift-card-validation-resume",class:"fresh-booking-panel"},m=y(()=>e.createBaseVNode("span",null,"Loading...",-1)),C=e.defineComponent({name:"GiftCardValidationLayout",__name:"GiftCardValidation",props:{accessToken:{},styling:{}},setup(o){const{t:a}=e.useI18n(),{voucher:l,isValid:u,amount:p,expirationDate:f,productName:V,isLoading:i}=e.storeToRefs(c.useApplyGiftCardStore()),{currency:g}=e.storeToRefs(e.useUtilityStore()),{apply:s}=c.useApplyGiftCardStore();return(d,t)=>(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"fresh-booking-gift-card-validation-module","access-token":d.accessToken,type:"gift-card",styling:d.styling},{default:e.withCtx(()=>[e.createBaseVNode("form",{onSubmit:t[3]||(t[3]=e.withModifiers(n=>e.unref(s)(),["prevent"]))},[e.createBaseVNode("h4",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.title")),1)]),e.createBaseVNode("p",{innerHTML:e.unref(a)("giftCardValidation.description")},null,8,N),e.createVNode(_.ActionField,{modelValue:e.unref(l),"onUpdate:modelValue":t[0]||(t[0]=n=>e.isRef(l)?l.value=n:null),icon:"gift-card",label:e.unref(a)("booking.reservation.giftCardCode"),buttonLabel:e.unref(a)("giftCardValidation.submitButton"),placeholder:"XXXXXXXX","is-loading":e.unref(i),"onUpdate:isLoading":t[1]||(t[1]=n=>e.isRef(i)?i.value=n:null),onAction:t[2]||(t[2]=n=>e.unref(s)())},null,8,["modelValue","label","buttonLabel","is-loading"]),!e.unref(i)&&e.unref(u)?(e.openBlock(),e.createElementBlock("table",B,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.giftCard")),1),e.createVNode(e.Icon,{icon:"gift-card",type:"fas",color:"header"})]),e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.balance")),1),e.createVNode(e.Icon,{icon:"money-bill",type:"fas",color:"header"})]),e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.expirationDate")),1),e.createVNode(e.Icon,{icon:"timer",type:"fas",color:"header"})])])]),e.createBaseVNode("tbody",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(V)),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(p),e.unref(g))),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDate)(e.unref(f))),1)])])])])):e.createCommentVNode("",!0)],32)]),_:1},8,["access-token","styling"])]),fallback:e.withCtx(()=>[m]),_:1}))}});const b=e._export_sfc(C,[["__scopeId","data-v-5d5827dc"]]),r=e.createApp({components:{GiftCardValidation:b}}),v=e.createPinia();r.use(v);r.use(e.instance);r.mount("#konnectio-gift-card-validation-app");module.exports=r;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as L, z as S, s as g, a as X, k as _, l as w, w as u, m as l, x as a, A as o, n as t, B as y, q as x, D as p, F as A, G as B, t as G, H as I, J as D, K as N, L as T, M, _ as H, N as P, P as U, Q as $ } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { u as b } from "./NumberField.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { A as F } from "./ActionField-
|
|
1
|
+
import { h as L, z as S, s as g, a as X, k as _, l as w, w as u, m as l, x as a, A as o, n as t, B as y, q as x, D as p, F as A, G as B, t as G, H as I, J as D, K as N, L as T, M, _ as H, N as P, P as U, Q as $ } from "./SelectField.vue_vue_type_style_index_0_lang-a75b8f32.js";
|
|
2
|
+
import { u as b } from "./NumberField.vue_vue_type_script_setup_true_lang-21318607.js";
|
|
3
|
+
import { A as F } from "./ActionField-d82454ed.js";
|
|
4
4
|
import "./_commonjsHelpers-c5d32002.js";
|
|
5
|
-
import "./TextField-
|
|
5
|
+
import "./TextField-46d88ef6.js";
|
|
6
6
|
const R = (s) => (T("data-v-5d5827dc"), s = s(), M(), s), q = ["innerHTML"], z = {
|
|
7
7
|
key: 0,
|
|
8
8
|
id: "fresh-booking-gift-card-validation-resume",
|
|
Binary file
|
package/dist/gift-card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-b92d158e.cjs"),V=require("./index-2018df9e.cjs"),$=require("./_-f5fc7dd6.cjs"),z=require("./TextField-52bc45b8.cjs"),x=require("./Field-c8c55b91.cjs");require("./_commonjsHelpers-6763f629.cjs");const U=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:k}=$.usePaymentStore(),{bearerToken:a,metaData:o}=e.storeToRefs(e.useUtilityStore()),t=e.ref(e.GiftCardModuleState.InitialState),p=e.useStorage("freshBookingName","",void 0,{serializer:e.StorageSerializers.string}),g=e.useStorage("freshBookingEmail","",void 0,{serializer:e.StorageSerializers.string}),s=e.useStorage("freshBookingPhone","",void 0,{serializer:e.StorageSerializers.string}),f=e.ref(""),C=e.ref(1),w=e.ref(!0),v=e.ref(""),u=e.ref({base64:"",type:"",name:""}),y=e.ref(void 0),n=e.ref(0),i=e.ref(!1),d=e.ref(0),B=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),N=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),m=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),h=e.computed(()=>{const c={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},l=o.value.places;return l&&l.forEach(_=>{c[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(c).filter(([,_])=>_.data.length>0))}),R=e.computed(()=>d.value!==0),b=e.computed(()=>{let c;if(R.value)c=h.value[d.value].data[0];else if(n.value!==0){const l=y.value,_=h.value[n.value].data;_.length===1?c=_[0]:l!==void 0&&_.forEach(P=>{String(P.id)===String(l)&&(c=P)})}return c}),E=e.computed(()=>!(!p.value||!g.value||!(s.value.length>=5)||!f.value||b.value===void 0)),q=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&i.value)),T=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&i.value));async function S(){t.value=e.GiftCardModuleState.WaitingForResponse,i.value=!0,await e.axios.post("http://localhost:91/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:o.value.currency.id,language:e.getUserLanguage(),amount:f.value,quantity:C.value,freeText:v.value,showPrice:w.value,contactName:p.value,contactEmail:g.value,contactPhone:s.value,imageBase64:e.b2a(u.value.base64),imageName:u.value.name,imageFormat:u.value.type,placeType:b.value?b.value.placeType:void 0,placeID:b.value?b.value.id:void 0},{headers:{Authorization:a.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.13"}}).then(c=>{t.value=e.GiftCardModuleState.ReadyToPay,i.value=!1,k({callback:()=>console.log("Callback!"),response:c.data})})}function r(c){c&&(d.value=c)}return{moduleState:t,name:p,email:g,phone:s,value:f,remark:v,showValue:w,quantity:C,media:u,placeId:y,placeType:n,showFormPage:B,showPaymentPage:N,showConfirmationPage:m,places:h,hasFilledForm:E,hasForcedPlaceType:R,isWaitingForResponse:T,isMetaDataAvailable:q,orderGiftCard:S,initialize:r}}),M={class:"media-selector"},D=["accept"],I={class:"media-selector-wrapper"},L={class:"media-selector-tools"},A={key:0},W={key:1},j={key:2},H=["src"],O=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(k,{emit:a}){const o=a,t=k,{t:p}=e.useI18n(),{display:g}=e.useAlertStore(),s=e.ref(),f=e.computed(()=>t.modelValue.base64!=="");function C(n){o("update:modelValue",n)}function w(){C({base64:"",name:"",type:""}),s.value&&(s.value.value="")}function v(){s.value&&s.value.click()}function u(n,i){const[d,B]=[n.name,n.type],N=new FileReader;N.onload=function(m){if(m.target){const h=m.target.result;i({base64:h,name:d,type:B})}else g({message:p("imageUploadError"),type:"error"})},N.readAsDataURL(n)}async function y(){let n;(n=s.value.files)instanceof FileList&&u(n[0],C)}return(n,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",M,[e.createBaseVNode("input",{ref_key:"fileInput",ref:s,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=d=>y())},null,40,D),e.createBaseVNode("div",I,[e.createBaseVNode("ul",L,[f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(p)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=d=>v())},null,8,["label","icon-color"])])),f.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(p)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=d=>v())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(p)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=d=>w())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:f.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,H)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function G(k){const a=k;a.__i18n=a.__i18n||[],a.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload billede"])},removeFile:o=>{const{normalize:t}=o;return t(["Fjern billede"])},replaceFile:o=>{const{normalize:t}=o;return t(["Ersat billede"])},imageUploadError:o=>{const{normalize:t}=o;return t(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload image"])},removeFile:o=>{const{normalize:t}=o;return t(["Remove image"])},replaceFile:o=>{const{normalize:t}=o;return t(["Replace image"])},imageUploadError:o=>{const{normalize:t}=o;return t(["An error occurred under image upload!"])}}}})}typeof G=="function"&&G(O);const K={class:"gift-card-skeleton"},Y={class:"gift-card-skeleton-form"},J=e.defineComponent({__name:"GiftCardSkeleton",setup(k){return(a,o)=>(e.openBlock(),e.createElementBlock("div",K,[e.createBaseVNode("div",Y,[e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field,{"is-text-area":""}),e.createVNode($.Element,{height:"44px"})])]))}});const Q=e._export_sfc(J,[["__scopeId","data-v-2600a731"]]),X={key:0,id:"fresh-booking-gift-card-wrapper"},Z={id:"fresh-booking-gift-card-title"},ee={id:"fresh-booking-gift-card-content"},te={id:"fresh-booking-gift-card-payment"},le=["innerHTML"],ae={key:0},oe={key:0,id:"fresh-booking-select-place-type"},ne={class:e.normalizeClass(["fresh-booking-label","required"])},re={id:"fresh-booking-select-place-type-input"},ie=["innerHTML"],de={key:0,id:"fresh-booking-gift-card-order"},se={class:"fresh-booking-panel"},ue={key:1,id:"fresh-booking-gift-card-remarks"},ce={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},fe={id:"fresh-booking-gift-card-recaptcha"},pe=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(k){const{t:a}=e.useI18n(),{name:o,email:t,phone:p,value:g,remark:s,showValue:f,quantity:C,media:w,placeId:v,placeType:u,showFormPage:y,showPaymentPage:n,showConfirmationPage:i,places:d,hasFilledForm:B,hasForcedPlaceType:N,isWaitingForResponse:m,isMetaDataAvailable:h}=e.storeToRefs(U()),{initialize:R,orderGiftCard:b}=U(),{isRecaptchaEnabled:E,currency:q}=e.storeToRefs(e.useUtilityStore());async function T(){await b()}return e.watch(u,()=>{v.value=void 0}),e.onMounted(()=>{R()}),(S,r)=>{const c=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":S.accessToken,"data-layout":S.layout,styling:S.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",X,[e.createBaseVNode("h4",Z,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.title")),1)]),e.createBaseVNode("div",ee,[e.withDirectives(e.createBaseVNode("div",te,[e.createVNode(V.CheckoutWindow)],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(a)("giftCard.description")},null,8,le),e.createBaseVNode("form",null,[e.createVNode(z.TextField,{modelValue:e.unref(o),"onUpdate:modelValue":r[0]||(r[0]=l=>e.isRef(o)?o.value=l:null),type:"text",name:"name",autocomplete:"name",label:e.unref(a)("giftCard.name"),icon:"user-alt",placeholder:e.unref(a)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(z.TextField,{modelValue:e.unref(t),"onUpdate:modelValue":r[1]||(r[1]=l=>e.isRef(t)?t.value=l:null),type:"email",name:"email",autocomplete:"email",label:e.unref(a)("giftCard.email"),icon:"at",placeholder:e.unref(a)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(V.PhoneField,{modelValue:e.unref(p),"onUpdate:modelValue":r[2]||(r[2]=l=>e.isRef(p)?p.value=l:null),icon:"phone-office",label:e.unref(a)("giftCard.phone"),placeholder:e.unref(a)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(N)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ae,[e.unref(d)?(e.openBlock(),e.createElementBlock("div",oe,[e.createBaseVNode("label",ne,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.selectType")),1)]),e.createBaseVNode("div",re,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(l,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(u),"onUpdate:modelValue":r[3]||(r[3]=P=>e.isRef(u)?u.value=P:null),type:"radio",name:"placeType",val:_,label:l.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(d)[e.unref(u)]&&e.unref(d)[e.unref(u)].data.length>1?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(v),"onUpdate:modelValue":r[4]||(r[4]=l=>e.isRef(v)?v.value=l:null),placeholder:e.unref(a)("giftCard.selectPlacePlaceholder"),options:e.unref(d)[e.unref(u)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))])),e.createVNode(z.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":r[5]||(r[5]=l=>e.isRef(g)?g.value=l:null),type:"number",name:"value",label:e.unref(a)("giftCard.value"),icon:"money-bill",placeholder:e.unref(a)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=l=>e.isRef(f)?f.value=l:null),type:"checkbox",name:"showValue",label:e.unref(a)("giftCard.showValue"),checked:e.unref(f)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(y)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(a)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(i)]])]),S.layout!=="minimal"&&e.unref(y)?(e.openBlock(),e.createElementBlock("div",de,[e.createBaseVNode("div",se,[e.createVNode(e.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"is-loading":e.unref(m),"onUpdate:isLoading":r[9]||(r[9]=l=>e.isRef(m)?m.value=l:null),onClickEvent:T},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(y)?(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(z.TextField,{modelValue:e.unref(s),"onUpdate:modelValue":r[10]||(r[10]=l=>e.isRef(s)?s.value=l:null),type:"textarea",name:"remark",label:e.unref(a)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(a)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(y)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"data-test":"orderGiftCard","is-loading":e.unref(m),"onUpdate:isLoading":r[11]||(r[11]=l=>e.isRef(m)?m.value=l:null),onClickEvent:T},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",fe,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(E)]])])),[[c]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Q)]),_:1})}}});const me=e._export_sfc(pe,[["__scopeId","data-v-e4aa1e4c"]]),_e=e.createPinia(),ve=e.zo(),F=e.createApp({components:{GiftCard:me}});F.use(_e);F.use(e.instance);F.use(ve);F.use(V.StickyPlugin);F.use(V.install,{bootstrap:!1});F.mount("#konnectio-gift-card-app");
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-354a8ba7.cjs"),V=require("./index-3a59acc2.cjs"),$=require("./_-0e8547fb.cjs"),P=require("./TextField-afd7af9b.cjs"),x=require("./Field-11498556.cjs");require("./_commonjsHelpers-6763f629.cjs");const U=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:y}=$.usePaymentStore(),{bearerToken:l,metaData:o}=e.storeToRefs(e.useUtilityStore()),t=e.ref(e.GiftCardModuleState.InitialState),p=e.useStorage("konnectio_name","",void 0,{serializer:e.StorageSerializers.string}),g=e.useStorage("konnectio_email","",void 0,{serializer:e.StorageSerializers.string}),c=e.useStorage("konnectio_phone","",void 0,{serializer:e.StorageSerializers.string}),f=e.ref(""),C=e.ref(1),w=e.ref(!0),v=e.ref(""),s=e.ref({base64:"",type:"",name:""}),k=e.ref(void 0),n=e.ref(0),i=e.ref(!1),d=e.ref(0),B=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),S=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),m=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),h=e.computed(()=>{const u={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},a=o.value.places;return a&&a.forEach(_=>{u[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(u).filter(([,_])=>_.data.length>0))}),R=e.computed(()=>d.value!==0),b=e.computed(()=>{let u;if(R.value)u=h.value[d.value].data[0];else if(n.value!==0){const a=k.value,_=h.value[n.value].data;_.length===1?u=_[0]:a!==void 0&&_.forEach(z=>{String(z.id)===String(a)&&(u=z)})}return u}),E=e.computed(()=>!(!p.value||!g.value||!(c.value.length>=5)||!f.value||b.value===void 0)),q=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&i.value)),T=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&i.value));async function N(){t.value=e.GiftCardModuleState.WaitingForResponse,i.value=!0,await e.axios.post("https://stage.hotel-service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:o.value.currency.id,language:e.getUserLanguage(),amount:f.value,quantity:C.value,freeText:v.value,showPrice:w.value,contactName:p.value,contactEmail:g.value,contactPhone:c.value,imageBase64:e.b2a(s.value.base64),imageName:s.value.name,imageFormat:s.value.type,placeType:b.value?b.value.placeType:void 0,placeID:b.value?b.value.id:void 0},{headers:{Authorization:l.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.15"}}).then(u=>{t.value=e.GiftCardModuleState.ReadyToPay,i.value=!1,y({callback:()=>console.log("Callback!"),response:u.data})})}function r(u){u&&(d.value=u)}return{moduleState:t,name:p,email:g,phone:c,value:f,remark:v,showValue:w,quantity:C,media:s,placeId:k,placeType:n,showFormPage:B,showPaymentPage:S,showConfirmationPage:m,places:h,hasFilledForm:E,hasForcedPlaceType:R,isWaitingForResponse:T,isMetaDataAvailable:q,orderGiftCard:N,initialize:r}}),M={class:"media-selector"},D=["accept"],I={class:"media-selector-wrapper"},L={class:"media-selector-tools"},A={key:0},W={key:1},j={key:2},H=["src"],O=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{emit:l}){const o=l,t=y,{t:p}=e.useI18n(),{display:g}=e.useAlertStore(),c=e.ref(),f=e.computed(()=>t.modelValue.base64!=="");function C(n){o("update:modelValue",n)}function w(){C({base64:"",name:"",type:""}),c.value&&(c.value.value="")}function v(){c.value&&c.value.click()}function s(n,i){const[d,B]=[n.name,n.type],S=new FileReader;S.onload=function(m){if(m.target){const h=m.target.result;i({base64:h,name:d,type:B})}else g({message:p("imageUploadError"),type:"error"})},S.readAsDataURL(n)}async function k(){let n;(n=c.value.files)instanceof FileList&&s(n[0],C)}return(n,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",M,[e.createBaseVNode("input",{ref_key:"fileInput",ref:c,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=d=>k())},null,40,D),e.createBaseVNode("div",I,[e.createBaseVNode("ul",L,[f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(p)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=d=>v())},null,8,["label","icon-color"])])),f.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(p)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=d=>v())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(p)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=d=>w())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:f.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,H)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function G(y){const l=y;l.__i18n=l.__i18n||[],l.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload billede"])},removeFile:o=>{const{normalize:t}=o;return t(["Fjern billede"])},replaceFile:o=>{const{normalize:t}=o;return t(["Ersat billede"])},imageUploadError:o=>{const{normalize:t}=o;return t(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload image"])},removeFile:o=>{const{normalize:t}=o;return t(["Remove image"])},replaceFile:o=>{const{normalize:t}=o;return t(["Replace image"])},imageUploadError:o=>{const{normalize:t}=o;return t(["An error occurred under image upload!"])}}}})}typeof G=="function"&&G(O);const K={class:"gift-card-skeleton"},Y={class:"gift-card-skeleton-form"},J=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(l,o)=>(e.openBlock(),e.createElementBlock("div",K,[e.createBaseVNode("div",Y,[e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field,{"is-text-area":""}),e.createVNode($.Element,{height:"44px"})])]))}});const Q=e._export_sfc(J,[["__scopeId","data-v-2600a731"]]),X={key:0,id:"fresh-booking-gift-card-wrapper"},Z={id:"fresh-booking-gift-card-title"},ee={id:"fresh-booking-gift-card-content"},te={id:"fresh-booking-gift-card-payment"},ae=["innerHTML"],le={key:0},oe={key:0,id:"fresh-booking-select-place-type"},ne={class:e.normalizeClass(["fresh-booking-label","required"])},re={id:"fresh-booking-select-place-type-input"},ie=["innerHTML"],de={key:0,id:"fresh-booking-gift-card-order"},ce={class:"fresh-booking-panel"},se={key:1,id:"fresh-booking-gift-card-remarks"},ue={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},fe={id:"fresh-booking-gift-card-recaptcha"},pe=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(y){const{t:l}=e.useI18n(),{name:o,email:t,phone:p,value:g,remark:c,showValue:f,quantity:C,media:w,placeId:v,placeType:s,showFormPage:k,showPaymentPage:n,showConfirmationPage:i,places:d,hasFilledForm:B,hasForcedPlaceType:S,isWaitingForResponse:m,isMetaDataAvailable:h}=e.storeToRefs(U()),{initialize:R,orderGiftCard:b}=U(),{isRecaptchaEnabled:E,currency:q}=e.storeToRefs(e.useUtilityStore());async function T(){await b()}return e.watch(s,()=>{v.value=void 0}),e.onMounted(()=>{R()}),(N,r)=>{const u=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":N.accessToken,"data-layout":N.layout,styling:N.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",X,[e.createBaseVNode("h4",Z,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.title")),1)]),e.createBaseVNode("div",ee,[e.withDirectives(e.createBaseVNode("div",te,[e.createVNode(V.CheckoutWindow)],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(l)("giftCard.description")},null,8,ae),e.createBaseVNode("form",null,[e.createVNode(P.TextField,{modelValue:e.unref(o),"onUpdate:modelValue":r[0]||(r[0]=a=>e.isRef(o)?o.value=a:null),type:"text",name:"name",autocomplete:"name",label:e.unref(l)("giftCard.name"),icon:"user-alt",placeholder:e.unref(l)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(P.TextField,{modelValue:e.unref(t),"onUpdate:modelValue":r[1]||(r[1]=a=>e.isRef(t)?t.value=a:null),type:"email",name:"email",autocomplete:"email",label:e.unref(l)("giftCard.email"),icon:"at",placeholder:e.unref(l)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(V.PhoneField,{modelValue:e.unref(p),"onUpdate:modelValue":r[2]||(r[2]=a=>e.isRef(p)?p.value=a:null),icon:"phone-office",label:e.unref(l)("giftCard.phone"),placeholder:e.unref(l)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(S)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,[e.unref(d)?(e.openBlock(),e.createElementBlock("div",oe,[e.createBaseVNode("label",ne,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.selectType")),1)]),e.createBaseVNode("div",re,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(a,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(s),"onUpdate:modelValue":r[3]||(r[3]=z=>e.isRef(s)?s.value=z:null),type:"radio",name:"placeType",val:_,label:a.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(d)[e.unref(s)]&&e.unref(d)[e.unref(s)].data.length>1?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(v),"onUpdate:modelValue":r[4]||(r[4]=a=>e.isRef(v)?v.value=a:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(d)[e.unref(s)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))])),e.createVNode(P.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":r[5]||(r[5]=a=>e.isRef(g)?g.value=a:null),type:"number",name:"value",label:e.unref(l)("giftCard.value"),icon:"money-bill",placeholder:e.unref(l)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=a=>e.isRef(f)?f.value=a:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(f)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(k)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(l)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(i)]])]),N.layout!=="minimal"&&e.unref(k)?(e.openBlock(),e.createElementBlock("div",de,[e.createBaseVNode("div",ce,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"is-loading":e.unref(m),"onUpdate:isLoading":r[9]||(r[9]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(P.TextField,{modelValue:e.unref(c),"onUpdate:modelValue":r[10]||(r[10]=a=>e.isRef(c)?c.value=a:null),type:"textarea",name:"remark",label:e.unref(l)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(l)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(k)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"data-test":"orderGiftCard","is-loading":e.unref(m),"onUpdate:isLoading":r[11]||(r[11]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",fe,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(E)]])])),[[u]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Q)]),_:1})}}});const me=e._export_sfc(pe,[["__scopeId","data-v-e4aa1e4c"]]),_e=e.createPinia(),ve=e.zo(),F=e.createApp({components:{GiftCard:me}});F.use(_e);F.use(e.instance);F.use(ve);F.use(V.StickyPlugin);F.use(V.install,{bootstrap:!1});F.mount("#konnectio-gift-card-app");
|