@konnectio/core 4.0.56-rc5 → 4.0.56-rc7
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--byx0Lp1.js → ActionField-i2xWkFyi.js} +1 -1
- package/dist/ActionField-i2xWkFyi.js.br +0 -0
- package/dist/AvailabilitySkeleton-PWA_yfC-.js +214 -0
- package/dist/AvailabilitySkeleton-PWA_yfC-.js.br +0 -0
- package/dist/{CheckoutWindow-_ZUCAYgm.js → CheckoutWindow-k3-Mh7Mp.js} +17 -17
- package/dist/CheckoutWindow-k3-Mh7Mp.js.br +0 -0
- package/dist/{DateField.vue_vue_type_style_index_0_lang-v-NT3HRG.js → DateField.vue_vue_type_style_index_0_lang-Lzoa_ZgT.js} +2910 -2918
- package/dist/DateField.vue_vue_type_style_index_0_lang-Lzoa_ZgT.js.br +0 -0
- package/dist/{Field-GdMucFcQ.js → Field-f9KUVLIW.js} +7 -7
- package/dist/Field-f9KUVLIW.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-1RNEqBhG.js +30460 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-1RNEqBhG.js.br +0 -0
- package/dist/{ThankYou-9pzt2SfJ.js → ThankYou-cAeMnWCk.js} +4325 -4567
- package/dist/ThankYou-cAeMnWCk.js.br +0 -0
- package/dist/{_-5uiOrU07.js → _-SqGSx3KP.js} +1 -1
- package/dist/{_commonjsHelpers-4t9S7M5p.js → _commonjsHelpers-2ufMB8rV.js} +1 -1
- package/dist/availability.js +138 -108
- package/dist/availability.js.br +0 -0
- package/dist/components/Alert.vue.d.ts +4 -27
- package/dist/components/Clickable.vue.d.ts +4 -59
- package/dist/components/Container.vue.d.ts +4 -22
- package/dist/components/ErrorMessage.vue.d.ts +4 -14
- package/dist/components/Gallery.vue.d.ts +4 -30
- package/dist/components/GoogleNotice.vue.d.ts +4 -2
- package/dist/components/Icon.vue.d.ts +4 -37
- package/dist/components/Loading.vue.d.ts +4 -28
- package/dist/components/Spinner.vue.d.ts +3 -1
- package/dist/components/forms/EventAvailabilityForm.vue.d.ts +4 -17
- package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +4 -33
- package/dist/components/forms/HotelReservationForm.vue.d.ts +4 -41
- package/dist/components/forms/MultiStepForm.vue.d.ts +4 -42
- package/dist/components/forms/ReservationForm.vue.d.ts +5 -62
- package/dist/components/forms/_.vue.d.ts +4 -42
- package/dist/components/inputs/Checkbox.vue.d.ts +4 -54
- package/dist/components/inputs/CheckboxField.vue.d.ts +4 -28
- package/dist/components/inputs/DateField.vue.d.ts +5 -104
- package/dist/components/inputs/InputField.vue.d.ts +4 -61
- package/dist/components/inputs/MediaSelector.vue.d.ts +4 -42
- package/dist/components/inputs/NumberField.vue.d.ts +5 -87
- package/dist/components/inputs/SelectField.vue.d.ts +5 -90
- package/dist/components/inputs/TextField.vue.d.ts +4 -67
- package/dist/components/inputs/TimeField.vue.d.ts +5 -44
- package/dist/components/inputs/grouped/ActionField.vue.d.ts +4 -71
- package/dist/components/inputs/grouped/CountryField.vue.d.ts +4 -40
- package/dist/components/inputs/grouped/NameField.vue.d.ts +4 -70
- package/dist/components/inputs/grouped/PhoneField.vue.d.ts +4 -50
- package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts +4 -46
- package/dist/components/listings/Base.vue.d.ts +5 -55
- package/dist/components/listings/Event.vue.d.ts +4 -46
- package/dist/components/listings/Hotel.vue.d.ts +4 -15
- package/dist/components/listings/Template.vue.d.ts +4 -20
- package/dist/components/side-panels/Base.vue.d.ts +5 -60
- package/dist/components/side-panels/ListingInfo.vue.d.ts +4 -17
- package/dist/components/side-panels/Template.vue.d.ts +4 -17
- package/dist/components/side-panels/TermsOfService.vue.d.ts +4 -13
- package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts +4 -32
- package/dist/components/skeletons/Field.vue.d.ts +4 -35
- package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts +4 -1
- package/dist/components/skeletons/HotelSkeleton.vue.d.ts +4 -1
- package/dist/components/skeletons/Listing.vue.d.ts +4 -1
- package/dist/components/skeletons/Sidebar.vue.d.ts +4 -1
- package/dist/components/skeletons/_.vue.d.ts +4 -35
- package/dist/components/views/CheckoutWindow.vue.d.ts +4 -1
- package/dist/components/views/TermsOfService.vue.d.ts +4 -1
- package/dist/components/views/ThankYou.vue.d.ts +4 -14
- package/dist/event-WJGagPbM.js +328 -0
- package/dist/event-WJGagPbM.js.br +0 -0
- package/dist/event.js +431 -412
- package/dist/event.js.br +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/gift-card-validation.js +77 -67
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.js +291 -312
- package/dist/gift-card.js.br +0 -0
- package/dist/hotel-z4fa3tEa.js +3101 -0
- package/dist/hotel-z4fa3tEa.js.br +0 -0
- package/dist/hotel.js +11 -3136
- package/dist/polyfill.js +159 -159
- package/dist/polyfill.js.br +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +14 -16
- package/dist/ActionField--byx0Lp1.js.br +0 -0
- package/dist/AvailabilitySkeleton-cL6E9wAp.js +0 -239
- package/dist/AvailabilitySkeleton-cL6E9wAp.js.br +0 -0
- package/dist/CheckoutWindow-_ZUCAYgm.js.br +0 -0
- package/dist/Container-6UeOakwz.js +0 -68
- package/dist/Container-6UeOakwz.js.br +0 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-v-NT3HRG.js.br +0 -0
- package/dist/Field-GdMucFcQ.js.br +0 -5
- package/dist/SelectField.vue_vue_type_style_index_0_lang-XwPp5AXD.js +0 -27240
- package/dist/SelectField.vue_vue_type_style_index_0_lang-XwPp5AXD.js.br +0 -0
- package/dist/ThankYou-9pzt2SfJ.js.br +0 -0
- package/dist/assets/typescript/mixins.d.ts +0 -34
- package/dist/availability.d.ts +0 -3
- package/dist/entries/availability.d.ts +0 -5
- package/dist/entries/event.d.ts +0 -2
- package/dist/entries/gift-card-validation.d.ts +0 -5
- package/dist/entries/gift-card.d.ts +0 -5
- package/dist/entries/hotel.d.ts +0 -5
- package/dist/entries/navigation.d.ts +0 -1
- package/dist/entries/polyfill.d.ts +0 -0
- package/dist/event-jnP6wH4w.js +0 -358
- package/dist/event-jnP6wH4w.js.br +0 -0
- package/dist/event.d.ts +0 -3
- package/dist/gift-card-validation.d.ts +0 -3
- package/dist/gift-card.d.ts +0 -3
- package/dist/hotel.d.ts +0 -3
- package/dist/hotel.js.br +0 -0
- package/dist/layouts/Availability.vue.d.ts +0 -25
- package/dist/layouts/Event.vue.d.ts +0 -18
- package/dist/layouts/GiftCard.vue.d.ts +0 -32
- package/dist/layouts/GiftCardValidation.vue.d.ts +0 -18
- package/dist/layouts/Hotel.vue.d.ts +0 -36
- package/dist/layouts/_.vue.d.ts +0 -39
- package/dist/navigation.d.ts +0 -1
- package/dist/plugins/i18n.d.ts +0 -5
- package/dist/polyfill.d.ts +0 -1
- package/dist/store/alert.d.ts +0 -28
- package/dist/store/applyGiftCard.d.ts +0 -28
- package/dist/store/availability.d.ts +0 -40
- package/dist/store/event.d.ts +0 -683
- package/dist/store/giftCard.d.ts +0 -83
- package/dist/store/payment.d.ts +0 -139
- package/dist/store/recaptcha.d.ts +0 -28
- package/dist/store/tracking.d.ts +0 -57
- package/dist/store/utilities.d.ts +0 -350
- package/dist/types/index.d.ts +0 -976
|
@@ -1,36 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
borderRadius?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const _default: import('../../../vue/dist/vue.runtime.esm-bundler.js').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
7
|
-
height: string;
|
|
8
|
-
width: string;
|
|
9
|
-
borderRadius: string;
|
|
10
|
-
}>, {}, unknown, {}, {}, import('../../../vue/dist/vue.runtime.esm-bundler.js').ComponentOptionsMixin, import('../../../vue/dist/vue.runtime.esm-bundler.js').ComponentOptionsMixin, {}, string, import('../../../vue/dist/vue.runtime.esm-bundler.js').VNodeProps & import('../../../vue/dist/vue.runtime.esm-bundler.js').AllowedComponentProps & import('../../../vue/dist/vue.runtime.esm-bundler.js').ComponentCustomProps, Readonly<import('../../../vue/dist/vue.runtime.esm-bundler.js').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
11
|
-
height: string;
|
|
12
|
-
width: string;
|
|
13
|
-
borderRadius: string;
|
|
14
|
-
}>>>, {
|
|
15
|
-
width: string;
|
|
16
|
-
height: string;
|
|
17
|
-
borderRadius: string;
|
|
18
|
-
}, {}>;
|
|
1
|
+
export * from "G:/.projects/konnectio-integration-core/src/components/skeletons/_.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
+
import "G:/.projects/konnectio-integration-core/src/components/skeletons/_.vue?vue&type=style&index=0&scoped=9a3e9892&lang.scss";
|
|
3
|
+
declare const _default: any;
|
|
19
4
|
export default _default;
|
|
20
|
-
|
|
21
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
-
type: import('../../../vue/dist/vue.runtime.esm-bundler.js').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
-
} : {
|
|
25
|
-
type: import('../../../vue/dist/vue.runtime.esm-bundler.js').PropType<T[K]>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
type __VLS_WithDefaults<P, D> = {
|
|
30
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
31
|
-
default: D[K];
|
|
32
|
-
}> : P[K];
|
|
33
|
-
};
|
|
34
|
-
type __VLS_Prettify<T> = {
|
|
35
|
-
[K in keyof T]: T[K];
|
|
36
|
-
} & {};
|
|
5
|
+
//# sourceMappingURL=_.vue.d.ts.map
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "G:/.projects/konnectio-integration-core/src/components/views/CheckoutWindow.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
+
import "G:/.projects/konnectio-integration-core/src/components/views/CheckoutWindow.vue?vue&type=style&index=0&scoped=340cb9ce&lang.scss";
|
|
3
|
+
declare const _default: any;
|
|
2
4
|
export default _default;
|
|
5
|
+
//# sourceMappingURL=CheckoutWindow.vue.d.ts.map
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "G:/.projects/konnectio-integration-core/src/components/views/TermsOfService.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
+
import "G:/.projects/konnectio-integration-core/src/components/views/TermsOfService.vue?vue&type=style&index=0&scoped=d712958a&lang.scss";
|
|
3
|
+
declare const _default: any;
|
|
2
4
|
export default _default;
|
|
5
|
+
//# sourceMappingURL=TermsOfService.vue.d.ts.map
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
message: string;
|
|
5
|
-
}>>>, {}, {}>;
|
|
1
|
+
export * from "G:/.projects/konnectio-integration-core/src/components/views/ThankYou.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
+
import "G:/.projects/konnectio-integration-core/src/components/views/ThankYou.vue?vue&type=style&index=0&scoped=86500fde&lang.scss";
|
|
3
|
+
declare const _default: any;
|
|
6
4
|
export default _default;
|
|
7
|
-
|
|
8
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
9
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
-
type: import('../../../vue/dist/vue.runtime.esm-bundler.js').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
-
} : {
|
|
12
|
-
type: import('../../../vue/dist/vue.runtime.esm-bundler.js').PropType<T[K]>;
|
|
13
|
-
required: true;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
5
|
+
//# sourceMappingURL=ThankYou.vue.d.ts.map
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { d as Ge, u as Ve, s as oe, a as Le, b as Ue, c as _e, r, E as v, e as U, f as a, O as le, S as _, g as qe, h as F, i as C, j as D } from "./SelectField.vue_vue_type_style_index_0_lang-1RNEqBhG.js";
|
|
2
|
+
const xe = Ge("event", () => {
|
|
3
|
+
const re = Ve(), { voucher: se } = oe(Le()), { display: h } = Ue(), { bearerToken: I } = oe(_e()), p = r({}), y = r({}), t = r(void 0), l = r(!0), i = r(v.InitialState), q = r(/* @__PURE__ */ new Date()), N = r(NaN), T = r(1), S = r(NaN), K = r(NaN), E = r(""), $ = U("konnectio_name", "", void 0, { serializer: _.string }), O = U("konnectio_phone", "", void 0, { serializer: _.string }), R = U("konnectio_email", "", void 0, { serializer: _.string }), x = r(""), P = r({}), m = r({}), z = r("");
|
|
4
|
+
function o(e) {
|
|
5
|
+
return e.templateID !== void 0;
|
|
6
|
+
}
|
|
7
|
+
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), me = a(() => o(t.value) ? t.value.packageCount : 0), ge = 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(() => {
|
|
8
|
+
if (!o(t.value))
|
|
9
|
+
return t.value;
|
|
10
|
+
}), H = a(() => {
|
|
11
|
+
if (B.value !== void 0) {
|
|
12
|
+
const e = B.value.find(
|
|
13
|
+
(n) => n.time === E.value
|
|
14
|
+
);
|
|
15
|
+
if (e && e.price)
|
|
16
|
+
return e.price;
|
|
17
|
+
}
|
|
18
|
+
return 0;
|
|
19
|
+
}), J = a(() => {
|
|
20
|
+
if (o(t.value))
|
|
21
|
+
return t.value.templateCounts;
|
|
22
|
+
}), De = a(() => (e) => p.value.eventImages.filter((n) => n.eventID === e));
|
|
23
|
+
function G(e, n, s) {
|
|
24
|
+
let c = 0;
|
|
25
|
+
if (o(t.value)) {
|
|
26
|
+
const u = t.value.templateCounts[s];
|
|
27
|
+
if (u) {
|
|
28
|
+
const k = u.addons, g = P.value[`${n}.${e}.${s}`] || 0;
|
|
29
|
+
if (g > 0) {
|
|
30
|
+
const f = k?.find((w) => w.addonID === e), d = typeof g == "boolean" ? 1 : g;
|
|
31
|
+
c += qe(f?.price, f?.quantityStrategy, M.value, u.adultPerRoom) * d;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
const u = m.value[e] || 0;
|
|
36
|
+
if (u > 0) {
|
|
37
|
+
const k = b.value?.products?.find((g) => g.productID === e);
|
|
38
|
+
k && (c += k.price * u);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return c;
|
|
42
|
+
}
|
|
43
|
+
function V(e, n) {
|
|
44
|
+
let s = 0;
|
|
45
|
+
if (o(t.value))
|
|
46
|
+
for (const c in P.value) {
|
|
47
|
+
const u = c.split(".");
|
|
48
|
+
parseInt(u[0]) === e && parseInt(u[2]) === n && (s += G(parseInt(u[1]), e, n));
|
|
49
|
+
}
|
|
50
|
+
else
|
|
51
|
+
for (const c in m.value)
|
|
52
|
+
s += G(parseInt(c)) * T.value;
|
|
53
|
+
return s;
|
|
54
|
+
}
|
|
55
|
+
const W = a(() => o(t.value) && t.value.totalPrice || 0), Ie = a(() => {
|
|
56
|
+
if (o(t.value))
|
|
57
|
+
return t.value.templateCounts === void 0 ? NaN : t.value.templateCounts.flatMap((e) => e.roomGroupID).reduce(
|
|
58
|
+
(e, n, s) => e + V(n, s),
|
|
59
|
+
W.value
|
|
60
|
+
) || 0;
|
|
61
|
+
{
|
|
62
|
+
let e = V();
|
|
63
|
+
return e += H.value, e;
|
|
64
|
+
}
|
|
65
|
+
}), 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(() => {
|
|
66
|
+
const e = m.value;
|
|
67
|
+
let n = 0;
|
|
68
|
+
for (const s in e)
|
|
69
|
+
n += Number.isNaN(e[s]) ? 0 : e[s];
|
|
70
|
+
return n > 0;
|
|
71
|
+
}), X = a(() => o(t.value) ? !1 : Object.keys(m.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 !== "")));
|
|
72
|
+
function Ce(e) {
|
|
73
|
+
return i.value === v.ReservationState && S.value === e && l.value;
|
|
74
|
+
}
|
|
75
|
+
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);
|
|
76
|
+
async function Y() {
|
|
77
|
+
try {
|
|
78
|
+
const e = (await C.get("https://production.hotel-service.konnectio.dk/api/event/metadata", {
|
|
79
|
+
params: {
|
|
80
|
+
language: F()
|
|
81
|
+
},
|
|
82
|
+
headers: {
|
|
83
|
+
Authorization: I.value,
|
|
84
|
+
"Fresh-Booking-Ver": "4.0.56-rc7"
|
|
85
|
+
}
|
|
86
|
+
})).data;
|
|
87
|
+
p.value = e, Z();
|
|
88
|
+
} catch {
|
|
89
|
+
h({
|
|
90
|
+
message: D.t("alert.error.couldntFetchMetadata"),
|
|
91
|
+
type: "warning"
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async function Z() {
|
|
96
|
+
i.value = v.AvailabilityState, l.value = !0;
|
|
97
|
+
try {
|
|
98
|
+
const e = (await C.get("https://production.hotel-service.konnectio.dk/api/event/restaurant-events", {
|
|
99
|
+
params: {
|
|
100
|
+
language: F(),
|
|
101
|
+
date: A.value
|
|
102
|
+
},
|
|
103
|
+
headers: {
|
|
104
|
+
Authorization: I.value,
|
|
105
|
+
"Fresh-Booking-Ver": "4.0.56-rc7"
|
|
106
|
+
}
|
|
107
|
+
})).data;
|
|
108
|
+
y.value = e, l.value = !1;
|
|
109
|
+
} catch {
|
|
110
|
+
h({
|
|
111
|
+
message: D.t("alert.error.couldntFetchListings"),
|
|
112
|
+
type: "warning"
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async function $e(e) {
|
|
117
|
+
i.value = v.ReservationState, l.value = !0;
|
|
118
|
+
try {
|
|
119
|
+
const n = (await C.get("https://production.hotel-service.konnectio.dk/api/v3/event/get-availability", {
|
|
120
|
+
params: {
|
|
121
|
+
language: F(),
|
|
122
|
+
date: A.value,
|
|
123
|
+
templateId: S.value,
|
|
124
|
+
numberOfPeople: N.value
|
|
125
|
+
},
|
|
126
|
+
headers: {
|
|
127
|
+
Authorization: I.value,
|
|
128
|
+
"Fresh-Booking-Ver": "4.0.56-rc7"
|
|
129
|
+
}
|
|
130
|
+
})).data;
|
|
131
|
+
n.templateCounts.length === 0 ? h({
|
|
132
|
+
message: D.t("alert.error.eventNotAvailable"),
|
|
133
|
+
type: "warning"
|
|
134
|
+
}) : (t.value = n, e()), l.value = !1;
|
|
135
|
+
} catch {
|
|
136
|
+
l.value = !1, i.value = v.AvailabilityState, h({
|
|
137
|
+
message: D.t("alert.error.couldntFetchEvent"),
|
|
138
|
+
type: "warning"
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async function Oe(e) {
|
|
143
|
+
i.value = v.ReservationState, l.value = !0;
|
|
144
|
+
try {
|
|
145
|
+
const n = (await C.get("https://production.hotel-service.konnectio.dk/api/v3/event/get-table-availability", {
|
|
146
|
+
params: {
|
|
147
|
+
language: F(),
|
|
148
|
+
date: A.value,
|
|
149
|
+
numberOfPeople: N.value,
|
|
150
|
+
eventId: S.value,
|
|
151
|
+
tableGroupId: K.value
|
|
152
|
+
},
|
|
153
|
+
headers: {
|
|
154
|
+
Authorization: I.value,
|
|
155
|
+
"Fresh-Booking-Ver": "4.0.56-rc7"
|
|
156
|
+
}
|
|
157
|
+
})).data;
|
|
158
|
+
t.value = n, l.value = !1, e();
|
|
159
|
+
} catch {
|
|
160
|
+
l.value = !1, i.value = v.AvailabilityState, h({
|
|
161
|
+
message: D.t("alert.error.couldntFetchEvent"),
|
|
162
|
+
type: "warning"
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
async function Re() {
|
|
167
|
+
try {
|
|
168
|
+
const e = (await C.get("https://production.hotel-service.konnectio.dk/api/v3/event/validate-discount-code", {
|
|
169
|
+
params: {
|
|
170
|
+
language: F(),
|
|
171
|
+
date: A.value,
|
|
172
|
+
discountCode: z.value
|
|
173
|
+
},
|
|
174
|
+
headers: {
|
|
175
|
+
Authorization: I.value,
|
|
176
|
+
"Fresh-Booking-Ver": "4.0.56-rc7"
|
|
177
|
+
}
|
|
178
|
+
})).data;
|
|
179
|
+
console.log(e);
|
|
180
|
+
} catch (e) {
|
|
181
|
+
console.log(e), h({
|
|
182
|
+
message: D.t("alert.error.discountCodeValidation"),
|
|
183
|
+
type: "warning"
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
async function ze(e) {
|
|
188
|
+
i.value = v.PaymentState, l.value = !0;
|
|
189
|
+
const n = () => {
|
|
190
|
+
l.value = !1, i.value = v.ReservationState, h({
|
|
191
|
+
message: D.t("booking.other.errorMessage"),
|
|
192
|
+
type: "warning"
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
let s, c, u;
|
|
196
|
+
const k = [];
|
|
197
|
+
if (o(t.value))
|
|
198
|
+
J.value?.forEach((d, w) => {
|
|
199
|
+
const ee = [];
|
|
200
|
+
let te = 0;
|
|
201
|
+
for (const ae in P.value) {
|
|
202
|
+
const L = ae.split("."), ne = P.value[ae];
|
|
203
|
+
parseInt(L[0]) === d.roomGroupID && parseInt(L[2]) === w && ne > 0 && (ee.push({
|
|
204
|
+
id: te,
|
|
205
|
+
addonID: parseInt(L[1]),
|
|
206
|
+
quantity: ne
|
|
207
|
+
}), te++);
|
|
208
|
+
}
|
|
209
|
+
k.push({
|
|
210
|
+
adultPerRoom: d.adultPerRoom,
|
|
211
|
+
count: d.count,
|
|
212
|
+
roomGroupID: d.roomGroupID,
|
|
213
|
+
addons: ee
|
|
214
|
+
});
|
|
215
|
+
}), s = {
|
|
216
|
+
templateID: j.value,
|
|
217
|
+
numberOfDays: T.value,
|
|
218
|
+
templateCounts: k
|
|
219
|
+
};
|
|
220
|
+
else {
|
|
221
|
+
c = [], u = E.value;
|
|
222
|
+
for (const d in m.value) {
|
|
223
|
+
const w = m.value[parseInt(d)];
|
|
224
|
+
w > 0 && c.push({
|
|
225
|
+
id: parseInt(d),
|
|
226
|
+
quantity: w
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
let g = "https://production.hotel-service.konnectio.dk/api/v3/event/template-book";
|
|
231
|
+
const f = {
|
|
232
|
+
date: A.value,
|
|
233
|
+
name: $.value,
|
|
234
|
+
email: R.value,
|
|
235
|
+
phone: O.value,
|
|
236
|
+
remark: x.value,
|
|
237
|
+
numberOfPeople: N.value,
|
|
238
|
+
days: M.value,
|
|
239
|
+
discountCode: z.value,
|
|
240
|
+
giftCardCode: se.value,
|
|
241
|
+
checkoutUrl: window.location.origin,
|
|
242
|
+
privacyUrl: window.location.origin
|
|
243
|
+
};
|
|
244
|
+
o(t.value) ? f.templateGroup = s : (f.time = u, f.eventId = S.value, f.products = c, g = "https://production.hotel-service.konnectio.dk/api/v3/event/event-book"), await C.post(g, f, {
|
|
245
|
+
headers: {
|
|
246
|
+
Authorization: I.value,
|
|
247
|
+
"Fresh-Booking-Ver": "4.0.56-rc7"
|
|
248
|
+
}
|
|
249
|
+
}).then((d) => {
|
|
250
|
+
l.value = !1, re.pay({
|
|
251
|
+
callback: e,
|
|
252
|
+
response: d.data
|
|
253
|
+
});
|
|
254
|
+
}).catch(() => n());
|
|
255
|
+
}
|
|
256
|
+
function Me(e) {
|
|
257
|
+
P.value = {}, m.value = {}, E.value = "", e();
|
|
258
|
+
}
|
|
259
|
+
function Be() {
|
|
260
|
+
Y();
|
|
261
|
+
}
|
|
262
|
+
return {
|
|
263
|
+
metaData: p,
|
|
264
|
+
listingData: y,
|
|
265
|
+
tableBasePrice: H,
|
|
266
|
+
availabilityData: t,
|
|
267
|
+
isLoading: l,
|
|
268
|
+
moduleState: i,
|
|
269
|
+
searchDate: q,
|
|
270
|
+
numberOfPeople: N,
|
|
271
|
+
numberOfDays: T,
|
|
272
|
+
eventId: S,
|
|
273
|
+
tableGroupId: K,
|
|
274
|
+
arrivalTime: E,
|
|
275
|
+
addons: P,
|
|
276
|
+
products: m,
|
|
277
|
+
discountCode: z,
|
|
278
|
+
name: $,
|
|
279
|
+
phone: O,
|
|
280
|
+
email: R,
|
|
281
|
+
remark: x,
|
|
282
|
+
isTemplateEvent: pe,
|
|
283
|
+
currency: ue,
|
|
284
|
+
maxNumberOfPeople: ie,
|
|
285
|
+
title: ve,
|
|
286
|
+
subtitle: ce,
|
|
287
|
+
slideshow: de,
|
|
288
|
+
date: A,
|
|
289
|
+
numberOfTotalDays: M,
|
|
290
|
+
numberOfRooms: me,
|
|
291
|
+
fromDate: ge,
|
|
292
|
+
getEventData: b,
|
|
293
|
+
length: fe,
|
|
294
|
+
templateId: j,
|
|
295
|
+
getEvents: he,
|
|
296
|
+
getTemplates: ye,
|
|
297
|
+
hasEvents: be,
|
|
298
|
+
hasTemplates: ke,
|
|
299
|
+
basePrice: W,
|
|
300
|
+
totalPrice: Ie,
|
|
301
|
+
getTemplateData: J,
|
|
302
|
+
getEventTableData: B,
|
|
303
|
+
roomUpgrade: Pe,
|
|
304
|
+
weekendFee: Se,
|
|
305
|
+
hasProducts: X,
|
|
306
|
+
eventRateType: Q,
|
|
307
|
+
isReservationFormFilled: we,
|
|
308
|
+
isMetaDataAvailable: Ee,
|
|
309
|
+
areListingsAvailable: Fe,
|
|
310
|
+
isAvailabilityDataAvailable: Ne,
|
|
311
|
+
isPaymentLoading: Te,
|
|
312
|
+
getEventImages: De,
|
|
313
|
+
isEventListingLoading: Ce,
|
|
314
|
+
fetchMetaData: Y,
|
|
315
|
+
fetchListings: Z,
|
|
316
|
+
getTemplateAvailability: $e,
|
|
317
|
+
getEventAvailability: Oe,
|
|
318
|
+
validateDiscountCode: Re,
|
|
319
|
+
localAddonPrice: G,
|
|
320
|
+
totalAddonPrice: V,
|
|
321
|
+
createBooking: ze,
|
|
322
|
+
reset: Me,
|
|
323
|
+
initialize: Be
|
|
324
|
+
};
|
|
325
|
+
});
|
|
326
|
+
export {
|
|
327
|
+
xe as u
|
|
328
|
+
};
|
|
Binary file
|