@konnectio/core 4.0.56-rc51 → 4.0.56-rc52
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-CsHUzdDM.js → ActionField-DIdYUr4q.js} +2 -2
- package/dist/ActionField-DIdYUr4q.js.br +0 -0
- package/dist/{AvailabilitySkeleton-BpS3qH0r.js → AvailabilitySkeleton-ZjKDUWD5.js} +4 -4
- package/dist/AvailabilitySkeleton-ZjKDUWD5.js.br +0 -0
- package/dist/{AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-C_Eo6onw.js → AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Dv10C6pz.js} +2 -2
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Dv10C6pz.js.br +0 -0
- package/dist/{CheckoutWindow-DQUTHQEL.js → CheckoutWindow-DXyFRc3f.js} +2 -2
- package/dist/CheckoutWindow-DXyFRc3f.js.br +0 -0
- package/dist/{ErrorMessage-CWHVx0Pk.js → ErrorMessage-CzmACL-t.js} +2 -2
- package/dist/ErrorMessage-CzmACL-t.js.br +0 -0
- package/dist/EventAvailabilityForm-B6_lpxim.js +452 -0
- package/dist/EventAvailabilityForm-B6_lpxim.js.br +0 -0
- package/dist/{Field-CIQ61QX5.js → Field-CDhrfFEj.js} +2 -2
- package/dist/Field-CDhrfFEj.js.br +0 -0
- package/dist/{Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-2iMaQIEk.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BJlxJLmO.js} +430 -434
- package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BJlxJLmO.js.br +0 -0
- package/dist/{TermsOfService-BZzRUgUN.js → TermsOfService-CV3L_dLg.js} +3 -3
- package/dist/TermsOfService-CV3L_dLg.js.br +0 -0
- package/dist/{_-CRFAvFk8.js → _-DsHpGwqH.js} +2 -2
- package/dist/{_.vue_vue_type_style_index_0_lang-DF6d_VKc.js → _.vue_vue_type_style_index_0_lang-BdZjHOFy.js} +2 -2
- package/dist/_.vue_vue_type_style_index_0_lang-BdZjHOFy.js.br +0 -0
- package/dist/availability.js +5 -5
- package/dist/availability.js.br +0 -0
- package/dist/deep-link.js +2 -2
- package/dist/event.js +141 -137
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.js +6 -6
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.js +7 -7
- package/dist/gift-card.js.br +0 -0
- package/dist/{giftCard-iMEwS4uA.js → giftCard-C8PqkLNd.js} +4 -4
- package/dist/giftCard-C8PqkLNd.js.br +0 -0
- package/dist/hotel.js +97 -93
- package/dist/hotel.js.br +0 -0
- package/dist/{masonry.plugin-BSptmqjG.js → masonry.plugin-BZn5-UMi.js} +4 -4
- package/dist/masonry.plugin-BZn5-UMi.js.br +0 -0
- package/dist/polyfill.js +773 -772
- package/dist/polyfill.js.br +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +1 -1
- package/dist/ActionField-CsHUzdDM.js.br +0 -0
- package/dist/AvailabilitySkeleton-BpS3qH0r.js.br +0 -0
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-C_Eo6onw.js.br +0 -0
- package/dist/CheckoutWindow-DQUTHQEL.js.br +0 -0
- package/dist/ErrorMessage-CWHVx0Pk.js.br +0 -0
- package/dist/EventAvailabilityForm-Bk4wdYKU.js +0 -437
- package/dist/EventAvailabilityForm-Bk4wdYKU.js.br +0 -0
- package/dist/Field-CIQ61QX5.js.br +0 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-2iMaQIEk.js.br +0 -0
- package/dist/TermsOfService-BZzRUgUN.js.br +0 -0
- package/dist/_.vue_vue_type_style_index_0_lang-DF6d_VKc.js.br +0 -0
- package/dist/giftCard-iMEwS4uA.js.br +0 -0
- package/dist/masonry.plugin-BSptmqjG.js.br +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as c, c as y, o as i, b as u, w as V, g, u as s, f as v } from "./_commonjsHelpers-04Qj4xBt.js";
|
|
2
|
-
import { r as I, k, l as q, T as w, C as B, I as C, _ as D } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-
|
|
2
|
+
import { r as I, k, l as q, T as w, C as B, I as C, _ as D } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BJlxJLmO.js";
|
|
3
3
|
(function() {
|
|
4
4
|
try {
|
|
5
5
|
var o = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, n = new Error().stack;
|
|
@@ -104,4 +104,4 @@ const F = { class: "fresh-booking-action-field" }, h = /* @__PURE__ */ c({
|
|
|
104
104
|
export {
|
|
105
105
|
T as A
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=ActionField-
|
|
107
|
+
//# sourceMappingURL=ActionField-DIdYUr4q.js.map
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as ee, m as pe, r as D, c as s, q as K, h as De, o as n, a as d, f as u, w as ge, u as e, b as g, e as y, g as N, F as P, n as $, l as fe, i as ye } from "./_commonjsHelpers-04Qj4xBt.js";
|
|
2
|
-
import { h as ke, s as x, m as Q, y as W, b as he, T as L, k as we, l as X, C as Y, g as _e, _ as ae, E as Z } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-
|
|
3
|
-
import { _ as Ve } from "./AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-
|
|
4
|
-
import { F as f } from "./Field-
|
|
2
|
+
import { h as ke, s as x, m as Q, y as W, b as he, T as L, k as we, l as X, C as Y, g as _e, _ as ae, E as Z } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BJlxJLmO.js";
|
|
3
|
+
import { _ as Ve } from "./AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Dv10C6pz.js";
|
|
4
|
+
import { F as f } from "./Field-CDhrfFEj.js";
|
|
5
5
|
(function() {
|
|
6
6
|
try {
|
|
7
7
|
var r = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new Error().stack;
|
|
@@ -291,4 +291,4 @@ export {
|
|
|
291
291
|
ze as A,
|
|
292
292
|
qe as H
|
|
293
293
|
};
|
|
294
|
-
//# sourceMappingURL=AvailabilitySkeleton-
|
|
294
|
+
//# sourceMappingURL=AvailabilitySkeleton-ZjKDUWD5.js.map
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Z as da, r as K, d as qe, B as Vt, a7 as ia, h as Ze, K as dt, _ as Ma, q as Ct, c as L, o as A, a as F, f as at, C as Ke, A as $e, w as me, v as le, Q as Fe, R as Xe, u as y, L as Ue, x as Mn, b as _e, T as Ut, e as q, ai as xa, J as Yr, n as De, U as $r, al as xn, M as ce, g as ue, i as Ae, F as ke, I as rt, t as je, D as _t, am as Rr, y as ba, z as wa, a9 as Sr, aa as Nr } from "./_commonjsHelpers-04Qj4xBt.js";
|
|
2
|
-
import { r as Br, g as Ir, I as Vr } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-
|
|
2
|
+
import { r as Br, g as Ir, I as Vr } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BJlxJLmO.js";
|
|
3
3
|
(function() {
|
|
4
4
|
try {
|
|
5
5
|
var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, e = new Error().stack;
|
|
@@ -7811,4 +7811,4 @@ export {
|
|
|
7811
7811
|
Zs as m,
|
|
7812
7812
|
se as t
|
|
7813
7813
|
};
|
|
7814
|
-
//# sourceMappingURL=AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-
|
|
7814
|
+
//# sourceMappingURL=AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Dv10C6pz.js.map
|
package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Dv10C6pz.js.br
ADDED
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as C, o as u, a as m, r as c, h as j, E as ve, G as me, q as X, c as U, H as he, b as I, g as r, f as H, w as $, y as Z, z as Q, I as q, T as x, n as v, v as V, e as S, J as ge, K as be, t as b, u as y, B as we, L as Se, M as ke, D as W, p as Ce, j as $e } from "./_commonjsHelpers-04Qj4xBt.js";
|
|
2
|
-
import { z as Be, _ as z, r as ee, T as oe, I as ne, h as Ve, s as Pe, b as Te, P as Ie } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-
|
|
2
|
+
import { z as Be, _ as z, r as ee, T as oe, I as ne, h as Ve, s as Pe, b as Te, P as Ie } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BJlxJLmO.js";
|
|
3
3
|
(function() {
|
|
4
4
|
try {
|
|
5
5
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, o = new Error().stack;
|
|
@@ -665,4 +665,4 @@ export {
|
|
|
665
665
|
lo as _,
|
|
666
666
|
po as a
|
|
667
667
|
};
|
|
668
|
-
//# sourceMappingURL=CheckoutWindow-
|
|
668
|
+
//# sourceMappingURL=CheckoutWindow-DXyFRc3f.js.map
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as g, o as B, a as J, g as E, t as i, p as S, j as R } from "./_commonjsHelpers-04Qj4xBt.js";
|
|
2
|
-
import { _ as k } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-
|
|
2
|
+
import { _ as k } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BJlxJLmO.js";
|
|
3
3
|
(function() {
|
|
4
4
|
try {
|
|
5
5
|
var A = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, C = new Error().stack;
|
|
@@ -42,4 +42,4 @@ const o = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACCQAAAgkCAYAAABoLDe6AAA
|
|
|
42
42
|
export {
|
|
43
43
|
l as E
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=ErrorMessage-
|
|
45
|
+
//# sourceMappingURL=ErrorMessage-CzmACL-t.js.map
|
|
Binary file
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import { r as c, c as a, d as Ke, h as He, o as B, a as pe, f as X, w as Qe, u as _, F as Je, b as me, e as We, g as Xe, l as Ye, n as Ze, i as et } from "./_commonjsHelpers-04Qj4xBt.js";
|
|
2
|
+
import { d as tt, u as at, s as ee, t as nt, a as ot, b as fe, m as te, v as f, c as Y, O as ge, S as Z, w as lt, e as z, g as C, i as L, x as st, h as it, T as rt, k as ut, C as ct, _ as vt } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BJlxJLmO.js";
|
|
3
|
+
import "./deep-link.js";
|
|
4
|
+
import { _ as dt } from "./AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Dv10C6pz.js";
|
|
5
|
+
(function() {
|
|
6
|
+
try {
|
|
7
|
+
var D = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, l = new Error().stack;
|
|
8
|
+
l && (D._sentryDebugIds = D._sentryDebugIds || {}, D._sentryDebugIds[l] = "23053c4f-9e9b-4011-a830-60adaf9848d2", D._sentryDebugIdIdentifier = "sentry-dbid-23053c4f-9e9b-4011-a830-60adaf9848d2");
|
|
9
|
+
} catch {
|
|
10
|
+
}
|
|
11
|
+
})();
|
|
12
|
+
const pt = tt("event", () => {
|
|
13
|
+
const D = at(), { voucher: l } = ee(nt()), { display: m } = ot(), { bearerToken: k, metaData: $ } = ee(fe()), U = fe(), g = te(), y = c({}), q = a(() => Object.keys(y.value).length > 0), t = c(void 0), o = c(!0), s = c(f.InitialState), T = c(NaN), P = c(1), I = c(NaN), O = c(NaN), w = c(""), G = Y("konnectio_name", "", void 0, { serializer: Z.string }), V = Y("konnectio_phone", "", void 0, { serializer: Z.string }), x = Y("konnectio_email", "", void 0, { serializer: Z.string }), i = c(""), u = c({}), v = c({}), j = c("");
|
|
14
|
+
function r(e) {
|
|
15
|
+
return e ? e.templateId !== void 0 : !1;
|
|
16
|
+
}
|
|
17
|
+
const ye = a(() => U.metaData.hotels.findIndex((e) => e.id === g.eventLocation) || 0), F = a(() => U.metaData.hotels[ye.value]), be = a(() => F.value ? F.value.maxNumberPerBooking : 1 / 0), he = a(() => F.value.name ? F.value.name : ""), ke = a(() => F.value.subtitle ? F.value.subtitle : ""), M = a(() => g.searchDate.toISOString()), Ie = a(() => r(t.value)), K = a(() => r(t.value) ? t.value.numberOfDays : P.value), we = a(() => r(t.value) ? t.value.packageCount : 0), De = a(() => r(t.value) ? t.value.fromDate : ""), E = a(() => y.value.events !== void 0 ? y.value.events.find((e) => e.id === I.value) : void 0), Ae = a(() => E.value ? E.value.length : void 0), ae = a(() => r(t.value) ? t.value.templateId : 0), Se = a(() => y.value.events), Le = a(() => y.value.templates), Pe = a(() => y.value.events.length > 0), Ee = a(() => y.value.templates.length > 0), ne = a(() => E.value && E.value.eventRateType ? E.value.eventRateType : ge.None), H = a(() => {
|
|
18
|
+
if (!r(t.value))
|
|
19
|
+
return t.value;
|
|
20
|
+
}), oe = a(() => {
|
|
21
|
+
if (H.value !== void 0) {
|
|
22
|
+
const e = H.value.find(
|
|
23
|
+
(n) => n.time === w.value
|
|
24
|
+
);
|
|
25
|
+
if (e && e.price)
|
|
26
|
+
return e.price;
|
|
27
|
+
}
|
|
28
|
+
return 0;
|
|
29
|
+
}), le = a(() => {
|
|
30
|
+
if (r(t.value))
|
|
31
|
+
return t.value.rooms;
|
|
32
|
+
});
|
|
33
|
+
function Q(e, n, d) {
|
|
34
|
+
let b = 0;
|
|
35
|
+
if (r(t.value)) {
|
|
36
|
+
const p = t.value.rooms[d];
|
|
37
|
+
if (p) {
|
|
38
|
+
const N = p.addons, A = u.value[`${n}.${e}.${d}`] || 0;
|
|
39
|
+
if (A > 0) {
|
|
40
|
+
const S = N?.find((R) => R.id === e), h = typeof A == "boolean" ? 1 : A;
|
|
41
|
+
b += lt(S?.price, S?.quantityStrategy, K.value, p.adultPerRoom) * h;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
const p = v.value[e] || 0;
|
|
46
|
+
if (p > 0) {
|
|
47
|
+
const N = E.value?.products?.find((A) => A.productID === e);
|
|
48
|
+
N && (b += N.price * p);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return b;
|
|
52
|
+
}
|
|
53
|
+
function J(e, n) {
|
|
54
|
+
let d = 0;
|
|
55
|
+
if (r(t.value))
|
|
56
|
+
for (const b in u.value) {
|
|
57
|
+
const p = b.split(".");
|
|
58
|
+
parseInt(p[0]) === e && parseInt(p[2]) === n && (d += Q(parseInt(p[1]), e, n));
|
|
59
|
+
}
|
|
60
|
+
else
|
|
61
|
+
for (const b in v.value)
|
|
62
|
+
d += Q(parseInt(b)) * P.value;
|
|
63
|
+
return d;
|
|
64
|
+
}
|
|
65
|
+
const se = a(() => r(t.value) && t.value.totalPrice || 0), Ne = a(() => {
|
|
66
|
+
if (r(t.value))
|
|
67
|
+
return t.value.rooms === void 0 ? NaN : t.value.rooms.flatMap((e) => e.roomGroupId).reduce(
|
|
68
|
+
(e, n, d) => e + J(n, d),
|
|
69
|
+
se.value
|
|
70
|
+
) || 0;
|
|
71
|
+
{
|
|
72
|
+
let e = J();
|
|
73
|
+
return e += oe.value, e;
|
|
74
|
+
}
|
|
75
|
+
}), _e = a(() => r(t.value) && t.value.rooms !== void 0 && t.value.rooms.flatMap((e) => e.weekendFee).reduce((e, n) => e + n, 0) || 0), Ce = a(() => r(t.value) && t.value.rooms !== void 0 && t.value.rooms.flatMap((e) => e.roomUpgrade).reduce((e, n) => e + n, 0) || 0), Te = a(() => {
|
|
76
|
+
const e = v.value;
|
|
77
|
+
let n = 0;
|
|
78
|
+
for (const d in e)
|
|
79
|
+
n += Number.isNaN(e[d]) ? 0 : e[d];
|
|
80
|
+
return n > 0;
|
|
81
|
+
}), ie = a(() => r(t.value) ? !1 : Object.keys(v.value).length > 0), Oe = a(() => !!(G.value !== "" && x.value !== "" && V.value.length >= 5 && (!ie.value || Te.value) && (!(!r(t.value) && ne.value !== ge.FullDayEvent) || w.value !== "")));
|
|
82
|
+
function Ve(e) {
|
|
83
|
+
return s.value === f.ReservationState && I.value === e && o.value;
|
|
84
|
+
}
|
|
85
|
+
const Fe = a(() => !(s.value === f.InitialState && o.value)), Me = a(() => !(s.value === f.AvailabilityState && o.value)), Re = a(() => t.value !== void 0), ze = a(() => s.value === f.PaymentState && o.value);
|
|
86
|
+
async function re() {
|
|
87
|
+
try {
|
|
88
|
+
const e = (await z.get("https://production.hotel-service.konnectio.dk/api/event/metadata", {
|
|
89
|
+
params: {
|
|
90
|
+
language: C()
|
|
91
|
+
},
|
|
92
|
+
headers: {
|
|
93
|
+
Authorization: k.value,
|
|
94
|
+
Accept: "application/json"
|
|
95
|
+
}
|
|
96
|
+
})).data;
|
|
97
|
+
$.value = e;
|
|
98
|
+
} catch {
|
|
99
|
+
m({
|
|
100
|
+
message: L.t("alert.error.couldntFetchMetadata"),
|
|
101
|
+
type: "warning"
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
async function $e() {
|
|
106
|
+
s.value = f.AvailabilityState, o.value = !0;
|
|
107
|
+
try {
|
|
108
|
+
const e = (await z.get("https://production.hotel-service.konnectio.dk/api/event/get", {
|
|
109
|
+
params: {
|
|
110
|
+
language: C(),
|
|
111
|
+
restaurantId: g.eventLocation,
|
|
112
|
+
date: M.value
|
|
113
|
+
},
|
|
114
|
+
headers: {
|
|
115
|
+
Authorization: k.value,
|
|
116
|
+
Accept: "application/json"
|
|
117
|
+
}
|
|
118
|
+
})).data;
|
|
119
|
+
y.value = e, o.value = !1;
|
|
120
|
+
} catch {
|
|
121
|
+
m({
|
|
122
|
+
message: L.t("alert.error.couldntFetchListings"),
|
|
123
|
+
type: "warning"
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
async function Ge(e) {
|
|
128
|
+
s.value = f.ReservationState, o.value = !0;
|
|
129
|
+
try {
|
|
130
|
+
const n = (await z.get("https://production.hotel-service.konnectio.dk/api/event/get-template", {
|
|
131
|
+
params: {
|
|
132
|
+
language: C(),
|
|
133
|
+
date: M.value,
|
|
134
|
+
templateId: I.value,
|
|
135
|
+
restaurantId: g.eventLocation,
|
|
136
|
+
numberOfPeople: T.value
|
|
137
|
+
},
|
|
138
|
+
headers: {
|
|
139
|
+
Authorization: k.value,
|
|
140
|
+
Accept: "application/json"
|
|
141
|
+
}
|
|
142
|
+
})).data;
|
|
143
|
+
n.rooms.length === 0 ? m({
|
|
144
|
+
message: L.t("alert.error.eventNotAvailable"),
|
|
145
|
+
type: "warning"
|
|
146
|
+
}) : (t.value = n, e()), o.value = !1;
|
|
147
|
+
} catch {
|
|
148
|
+
o.value = !1, s.value = f.AvailabilityState, m({
|
|
149
|
+
message: L.t("alert.error.couldntFetchEvent"),
|
|
150
|
+
type: "warning"
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
async function xe(e) {
|
|
155
|
+
s.value = f.ReservationState, o.value = !0;
|
|
156
|
+
try {
|
|
157
|
+
const n = (await z.get("https://production.hotel-service.konnectio.dk/api/event/vacant-times", {
|
|
158
|
+
params: {
|
|
159
|
+
language: C(),
|
|
160
|
+
date: M.value,
|
|
161
|
+
numberOfPeople: T.value,
|
|
162
|
+
eventId: I.value,
|
|
163
|
+
tableGroupId: O.value,
|
|
164
|
+
restaurantId: g.eventLocation
|
|
165
|
+
},
|
|
166
|
+
headers: {
|
|
167
|
+
Authorization: k.value,
|
|
168
|
+
Accept: "application/json"
|
|
169
|
+
}
|
|
170
|
+
})).data;
|
|
171
|
+
t.value = n, o.value = !1, e();
|
|
172
|
+
} catch {
|
|
173
|
+
o.value = !1, s.value = f.AvailabilityState, m({
|
|
174
|
+
message: L.t("alert.error.couldntFetchEvent"),
|
|
175
|
+
type: "warning"
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async function Ue() {
|
|
180
|
+
if (j.value !== "")
|
|
181
|
+
try {
|
|
182
|
+
const e = (await z.post("https://production.hotel-service.konnectio.dk/api/event/validate-discount-code", {
|
|
183
|
+
language: C(),
|
|
184
|
+
date: M.value,
|
|
185
|
+
discountCode: j.value,
|
|
186
|
+
restaurantId: g.eventLocation
|
|
187
|
+
}, {
|
|
188
|
+
headers: {
|
|
189
|
+
Authorization: k.value,
|
|
190
|
+
Accept: "application/json"
|
|
191
|
+
}
|
|
192
|
+
})).data;
|
|
193
|
+
console.log(e);
|
|
194
|
+
} catch (e) {
|
|
195
|
+
console.log(e), m({
|
|
196
|
+
message: L.t("alert.error.discountCodeValidation"),
|
|
197
|
+
type: "warning"
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
else
|
|
201
|
+
m({
|
|
202
|
+
message: L.t("alert.error.discountCodeEmpty"),
|
|
203
|
+
type: "error"
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
async function je(e) {
|
|
207
|
+
s.value = f.PaymentState, o.value = !0;
|
|
208
|
+
const n = () => {
|
|
209
|
+
o.value = !1, s.value = f.ReservationState, m({
|
|
210
|
+
message: L.t("booking.other.errorMessage"),
|
|
211
|
+
type: "warning"
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
let d, b, p;
|
|
215
|
+
const N = [];
|
|
216
|
+
if (r(t.value))
|
|
217
|
+
le.value?.forEach((h, R) => {
|
|
218
|
+
const ue = [];
|
|
219
|
+
let ce = 0;
|
|
220
|
+
for (const ve in u.value) {
|
|
221
|
+
const W = ve.split("."), de = u.value[ve];
|
|
222
|
+
parseInt(W[0]) === h.roomGroupId && parseInt(W[2]) === R && de > 0 && (ue.push({
|
|
223
|
+
id: ce,
|
|
224
|
+
addonID: parseInt(W[1]),
|
|
225
|
+
quantity: de
|
|
226
|
+
}), ce++);
|
|
227
|
+
}
|
|
228
|
+
N.push({
|
|
229
|
+
adultPerRoom: h.adultPerRoom,
|
|
230
|
+
count: h.count,
|
|
231
|
+
roomGroupID: h.roomGroupId,
|
|
232
|
+
addons: ue
|
|
233
|
+
});
|
|
234
|
+
}), d = {
|
|
235
|
+
templateID: ae.value,
|
|
236
|
+
numberOfDays: P.value,
|
|
237
|
+
templateCounts: N
|
|
238
|
+
};
|
|
239
|
+
else {
|
|
240
|
+
b = [], p = w.value;
|
|
241
|
+
for (const h in v.value) {
|
|
242
|
+
const R = v.value[parseInt(h)];
|
|
243
|
+
R > 0 && b.push({
|
|
244
|
+
id: parseInt(h),
|
|
245
|
+
quantity: R
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
let A = "https://production.hotel-service.konnectio.dk/api/event/book-template";
|
|
250
|
+
const S = {
|
|
251
|
+
language: C(),
|
|
252
|
+
restaurantId: g.eventLocation,
|
|
253
|
+
date: st(M.value),
|
|
254
|
+
name: G.value,
|
|
255
|
+
email: x.value,
|
|
256
|
+
phone: V.value,
|
|
257
|
+
remark: i.value,
|
|
258
|
+
numberOfPeople: T.value,
|
|
259
|
+
days: K.value,
|
|
260
|
+
discountCode: j.value,
|
|
261
|
+
giftCardCode: l.value,
|
|
262
|
+
checkoutUrl: window.location.origin,
|
|
263
|
+
privacyUrl: window.location.origin
|
|
264
|
+
};
|
|
265
|
+
r(t.value) ? S.templateGroup = d : (S.time = p, S.eventId = I.value, S.products = b, A = "https://production.hotel-service.konnectio.dk/api/event/book-event"), await z.post(A, S, {
|
|
266
|
+
headers: {
|
|
267
|
+
Authorization: k.value,
|
|
268
|
+
Accept: "application/json"
|
|
269
|
+
}
|
|
270
|
+
}).then((h) => {
|
|
271
|
+
o.value = !1, D.pay({
|
|
272
|
+
callback: e,
|
|
273
|
+
response: h.data
|
|
274
|
+
});
|
|
275
|
+
}).catch(() => n());
|
|
276
|
+
}
|
|
277
|
+
function Be(e) {
|
|
278
|
+
u.value = {}, v.value = {}, w.value = "", e();
|
|
279
|
+
}
|
|
280
|
+
async function qe() {
|
|
281
|
+
await Promise.all([re(), g.fetchMetadata()]);
|
|
282
|
+
}
|
|
283
|
+
return {
|
|
284
|
+
metaData: $,
|
|
285
|
+
listingData: y,
|
|
286
|
+
tableBasePrice: oe,
|
|
287
|
+
availabilityData: t,
|
|
288
|
+
isLoading: o,
|
|
289
|
+
moduleState: s,
|
|
290
|
+
numberOfPeople: T,
|
|
291
|
+
numberOfDays: P,
|
|
292
|
+
eventId: I,
|
|
293
|
+
tableGroupId: O,
|
|
294
|
+
arrivalTime: w,
|
|
295
|
+
addons: u,
|
|
296
|
+
products: v,
|
|
297
|
+
discountCode: j,
|
|
298
|
+
name: G,
|
|
299
|
+
phone: V,
|
|
300
|
+
email: x,
|
|
301
|
+
remark: i,
|
|
302
|
+
isTemplateEvent: Ie,
|
|
303
|
+
maxNumberOfPeople: be,
|
|
304
|
+
title: he,
|
|
305
|
+
subtitle: ke,
|
|
306
|
+
date: M,
|
|
307
|
+
numberOfTotalDays: K,
|
|
308
|
+
numberOfRooms: we,
|
|
309
|
+
fromDate: De,
|
|
310
|
+
getEventData: E,
|
|
311
|
+
length: Ae,
|
|
312
|
+
templateId: ae,
|
|
313
|
+
getEvents: Se,
|
|
314
|
+
getTemplates: Le,
|
|
315
|
+
hasEvents: Pe,
|
|
316
|
+
hasTemplates: Ee,
|
|
317
|
+
basePrice: se,
|
|
318
|
+
totalPrice: Ne,
|
|
319
|
+
getTemplateData: le,
|
|
320
|
+
getEventTableData: H,
|
|
321
|
+
roomUpgrade: Ce,
|
|
322
|
+
weekendFee: _e,
|
|
323
|
+
hasProducts: ie,
|
|
324
|
+
eventRateType: ne,
|
|
325
|
+
isReservationFormFilled: Oe,
|
|
326
|
+
isMetadataAvailable: Fe,
|
|
327
|
+
areListingsAvailable: Me,
|
|
328
|
+
isAvailabilityDataAvailable: Re,
|
|
329
|
+
isPaymentLoading: ze,
|
|
330
|
+
isEventListingLoading: Ve,
|
|
331
|
+
fetchMetadata: re,
|
|
332
|
+
fetchListings: $e,
|
|
333
|
+
getTemplateAvailability: Ge,
|
|
334
|
+
getEventAvailability: xe,
|
|
335
|
+
validateDiscountCode: Ue,
|
|
336
|
+
localAddonPrice: Q,
|
|
337
|
+
totalAddonPrice: J,
|
|
338
|
+
createBooking: je,
|
|
339
|
+
reset: Be,
|
|
340
|
+
initialize: qe,
|
|
341
|
+
hasListingData: q
|
|
342
|
+
};
|
|
343
|
+
}), mt = {
|
|
344
|
+
class: "konnectio-search-button",
|
|
345
|
+
key: "search"
|
|
346
|
+
}, ft = /* @__PURE__ */ Ke({
|
|
347
|
+
__name: "EventAvailabilityForm",
|
|
348
|
+
props: {
|
|
349
|
+
redirection: { type: Boolean, default: !0 },
|
|
350
|
+
link: {},
|
|
351
|
+
selectedLocation: { default: NaN }
|
|
352
|
+
},
|
|
353
|
+
setup(D) {
|
|
354
|
+
const l = D, {
|
|
355
|
+
eventLocation: m,
|
|
356
|
+
eventLocations: k,
|
|
357
|
+
hasEventLocations: $,
|
|
358
|
+
eventLocationControl: U,
|
|
359
|
+
searchDate: g,
|
|
360
|
+
isExpired: y
|
|
361
|
+
} = ee(te()), { reset: q, updateEventAvailability: t } = te(), { fetchListings: o } = pt(), { t: s } = it(), T = () => new Date(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + 1)).setHours(12, 0, 0, 0)), P = c(U.value), I = c(T()), O = a({
|
|
362
|
+
get: () => l.redirection ? P.value : m.value,
|
|
363
|
+
set: (i) => {
|
|
364
|
+
l.redirection ? P.value = Number(i) : m.value = Number(i);
|
|
365
|
+
}
|
|
366
|
+
}), w = a({
|
|
367
|
+
get: () => l.redirection ? I.value : g.value,
|
|
368
|
+
set: (i) => {
|
|
369
|
+
l.redirection ? I.value = i : g.value = i;
|
|
370
|
+
}
|
|
371
|
+
}), G = a(() => typeof l.link != "string"), V = a(() => {
|
|
372
|
+
const i = k.value.find(({ id: u }) => u === l.selectedLocation);
|
|
373
|
+
return i ? i.name : "";
|
|
374
|
+
});
|
|
375
|
+
function x() {
|
|
376
|
+
if (l.redirection === !0)
|
|
377
|
+
if (t({
|
|
378
|
+
date: w.value,
|
|
379
|
+
location: O.value
|
|
380
|
+
}), G.value) {
|
|
381
|
+
const i = C();
|
|
382
|
+
l.link[i] ? window.location.replace(l.link[i]) : l.link.en && window.location.replace(l.link.en);
|
|
383
|
+
} else
|
|
384
|
+
window.location.replace(l.link);
|
|
385
|
+
else
|
|
386
|
+
o();
|
|
387
|
+
}
|
|
388
|
+
return He(() => {
|
|
389
|
+
y.value && q();
|
|
390
|
+
}), (i, u) => (B(), pe("form", {
|
|
391
|
+
class: Ze([
|
|
392
|
+
"konnectio-event-search-form",
|
|
393
|
+
{ "has-locations": _($) },
|
|
394
|
+
{ "auto-search": !i.redirection }
|
|
395
|
+
]),
|
|
396
|
+
onSubmit: et(x, ["prevent"])
|
|
397
|
+
}, [
|
|
398
|
+
X(Ye, {
|
|
399
|
+
class: "konnectio-event-search-form-content",
|
|
400
|
+
tag: "ul"
|
|
401
|
+
}, {
|
|
402
|
+
default: Qe(() => [
|
|
403
|
+
_($) ? (B(), pe(Je, { key: 0 }, [
|
|
404
|
+
isNaN(i.selectedLocation) ? (B(), me(ut, {
|
|
405
|
+
modelValue: O.value,
|
|
406
|
+
"onUpdate:modelValue": u[1] || (u[1] = (v) => O.value = v),
|
|
407
|
+
key: "location",
|
|
408
|
+
label: _(s)("general.location"),
|
|
409
|
+
icon: "location-dot",
|
|
410
|
+
"icon-type": "fas",
|
|
411
|
+
"icon-placement": "label",
|
|
412
|
+
"label-key": "name",
|
|
413
|
+
"value-key": "id",
|
|
414
|
+
options: _(k),
|
|
415
|
+
searchable: !1
|
|
416
|
+
}, null, 8, ["modelValue", "label", "options"])) : (B(), me(rt, {
|
|
417
|
+
key: 0,
|
|
418
|
+
modelValue: V.value,
|
|
419
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => V.value = v),
|
|
420
|
+
label: _(s)("general.location"),
|
|
421
|
+
icon: "location-dot",
|
|
422
|
+
"icon-type": "fas",
|
|
423
|
+
"icon-placement": "label",
|
|
424
|
+
readonly: ""
|
|
425
|
+
}, null, 8, ["modelValue", "label"]))
|
|
426
|
+
], 64)) : We("", !0),
|
|
427
|
+
X(dt, {
|
|
428
|
+
modelValue: w.value,
|
|
429
|
+
"onUpdate:modelValue": u[2] || (u[2] = (v) => w.value = v),
|
|
430
|
+
key: "date",
|
|
431
|
+
label: _(s)("event.selectDate"),
|
|
432
|
+
"icon-type": "fas",
|
|
433
|
+
"icon-placement": "label",
|
|
434
|
+
"min-date": /* @__PURE__ */ new Date()
|
|
435
|
+
}, null, 8, ["modelValue", "label", "min-date"]),
|
|
436
|
+
Xe("li", mt, [
|
|
437
|
+
X(ct, {
|
|
438
|
+
type: "submit",
|
|
439
|
+
label: _(s)("availability.buttonLabel")
|
|
440
|
+
}, null, 8, ["label"])
|
|
441
|
+
])
|
|
442
|
+
]),
|
|
443
|
+
_: 1
|
|
444
|
+
})
|
|
445
|
+
], 34));
|
|
446
|
+
}
|
|
447
|
+
}), kt = /* @__PURE__ */ vt(ft, [["__scopeId", "data-v-b15bea9d"]]);
|
|
448
|
+
export {
|
|
449
|
+
kt as E,
|
|
450
|
+
pt as u
|
|
451
|
+
};
|
|
452
|
+
//# sourceMappingURL=EventAvailabilityForm-B6_lpxim.js.map
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as l, o as a, a as o, b as i, e as r, f as n, n as f } from "./_commonjsHelpers-04Qj4xBt.js";
|
|
2
|
-
import { E as s, _ as p } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-
|
|
2
|
+
import { E as s, _ as p } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BJlxJLmO.js";
|
|
3
3
|
(function() {
|
|
4
4
|
try {
|
|
5
5
|
var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, e = new Error().stack;
|
|
@@ -47,4 +47,4 @@ const c = {
|
|
|
47
47
|
export {
|
|
48
48
|
y as F
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=Field-
|
|
50
|
+
//# sourceMappingURL=Field-CDhrfFEj.js.map
|
|
Binary file
|