@konnectio/core 4.0.14 → 4.0.16
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-251eb289.cjs → ActionField-3450fcba.cjs} +1 -1
- package/dist/{ActionField-ed13e600.js → ActionField-c1dc7f3e.js} +3 -3
- package/dist/ActionField-c1dc7f3e.js.br +0 -0
- package/dist/{AvailabilitySkeleton-beb10d07.js → AvailabilitySkeleton-454ad0ec.js} +7 -6
- package/dist/AvailabilitySkeleton-454ad0ec.js.br +0 -0
- package/dist/AvailabilitySkeleton-f0e12cb1.cjs +1 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-4f2f4c47.cjs +5 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-f7e8a940.js +8866 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-f7e8a940.js.br +0 -0
- package/dist/{Field-cbc16db4.cjs → Field-91254e17.cjs} +1 -1
- package/dist/{Field-48a50c44.js → Field-c0c88ff7.js} +2 -2
- package/dist/Field-c0c88ff7.js.br +0 -0
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-7676783c.cjs → NumberField.vue_vue_type_script_setup_true_lang-1aefdd0e.cjs} +1 -1
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-7aa515cb.js → NumberField.vue_vue_type_script_setup_true_lang-aad02565.js} +2 -2
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-aad02565.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-2d4e943b.cjs +802 -0
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-96b84c98.js → SelectField.vue_vue_type_style_index_0_lang-ab6da587.js} +4408 -4379
- package/dist/SelectField.vue_vue_type_style_index_0_lang-ab6da587.js.br +0 -0
- package/dist/{TextField-379793fe.cjs → TextField-2ccfa48b.cjs} +1 -1
- package/dist/{TextField-7150eae7.js → TextField-45a6d0f3.js} +1 -1
- package/dist/TextField-45a6d0f3.js.br +0 -0
- package/dist/{ThankYou-bcce79d1.cjs → ThankYou-266a1340.cjs} +6 -6
- package/dist/{ThankYou-f3dd76f4.js → ThankYou-b353b8e0.js} +213 -212
- package/dist/ThankYou-b353b8e0.js.br +0 -0
- package/dist/{_-de6b4115.cjs → _-0a59e9b5.cjs} +1 -1
- package/dist/{_-cd5be070.js → _-f8481bc2.js} +14 -14
- package/dist/_-f8481bc2.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-0a73d10e.cjs +1 -0
- package/dist/{event-43539c7b.js → event-1b2cce27.js} +43 -43
- package/dist/event-1b2cce27.js.br +0 -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 +28 -28
- package/dist/gift-card.js.br +0 -0
- package/dist/hotel.cjs +5 -5
- package/dist/hotel.js +1483 -1477
- package/dist/hotel.js.br +0 -0
- package/dist/{index-cadcbd9e.js → index-1532370f.js} +2 -2
- package/dist/index-1532370f.js.br +0 -0
- package/dist/{index-751b236a.cjs → index-4a6e0dad.cjs} +1 -1
- 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 +14 -14
- package/dist/ActionField-ed13e600.js.br +0 -0
- package/dist/AvailabilitySkeleton-beb10d07.js.br +0 -0
- package/dist/AvailabilitySkeleton-cc8eafe0.cjs +0 -1
- package/dist/DateField.vue_vue_type_style_index_0_lang-8ddce55e.cjs +0 -5
- package/dist/DateField.vue_vue_type_style_index_0_lang-d1a9ffca.js +0 -8411
- package/dist/DateField.vue_vue_type_style_index_0_lang-d1a9ffca.js.br +0 -0
- package/dist/Field-48a50c44.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-7aa515cb.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-43c8a651.cjs +0 -802
- package/dist/SelectField.vue_vue_type_style_index_0_lang-96b84c98.js.br +0 -0
- package/dist/TextField-7150eae7.js.br +0 -0
- package/dist/ThankYou-f3dd76f4.js.br +0 -0
- package/dist/_-cd5be070.js.br +0 -0
- package/dist/event-2b792293.cjs +0 -1
- package/dist/event-43539c7b.js.br +0 -0
- package/dist/index-cadcbd9e.js.br +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
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
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
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-ab6da587.js";
|
|
2
|
+
import { u as _e } from "./_-f8481bc2.js";
|
|
3
|
+
import { u as qe } from "./NumberField.vue_vue_type_script_setup_true_lang-aad02565.js";
|
|
4
4
|
const Qe = Ge("event", () => {
|
|
5
|
-
const se =
|
|
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
6
|
function o(e) {
|
|
7
7
|
return e.templateID !== void 0;
|
|
8
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(() =>
|
|
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
10
|
if (!o(t.value))
|
|
11
11
|
return t.value;
|
|
12
12
|
}), H = a(() => {
|
|
13
|
-
if (
|
|
14
|
-
const e =
|
|
13
|
+
if (B.value !== void 0) {
|
|
14
|
+
const e = B.value.find(
|
|
15
15
|
(n) => n.time === E.value
|
|
16
16
|
);
|
|
17
17
|
if (e && e.price)
|
|
@@ -30,7 +30,7 @@ const Qe = Ge("event", () => {
|
|
|
30
30
|
const k = u.addons, m = P.value[`${n}.${e}.${r}`] || 0;
|
|
31
31
|
if (m > 0) {
|
|
32
32
|
const f = k?.find((w) => w.addonID === e), d = typeof m == "boolean" ? 1 : m;
|
|
33
|
-
c += Ue(f?.price, f?.quantityStrategy,
|
|
33
|
+
c += Ue(f?.price, f?.quantityStrategy, M.value, u.adultPerRoom) * d;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
} else {
|
|
@@ -74,16 +74,16 @@ const Qe = Ge("event", () => {
|
|
|
74
74
|
function Ce(e) {
|
|
75
75
|
return i.value === v.ReservationState && S.value === e && l.value;
|
|
76
76
|
}
|
|
77
|
-
const Ee = a(() => !(i.value === v.InitialState && l.value)),
|
|
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
78
|
async function Y() {
|
|
79
79
|
try {
|
|
80
80
|
const e = (await C.get("https://stage.hotel-service.konnectio.dk/api/event/metadata", {
|
|
81
81
|
params: {
|
|
82
|
-
language:
|
|
82
|
+
language: F()
|
|
83
83
|
},
|
|
84
84
|
headers: {
|
|
85
85
|
Authorization: I.value,
|
|
86
|
-
"Fresh-Booking-Ver": "4.0.
|
|
86
|
+
"Fresh-Booking-Ver": "4.0.16"
|
|
87
87
|
}
|
|
88
88
|
})).data;
|
|
89
89
|
p.value = e, Z();
|
|
@@ -99,12 +99,12 @@ const Qe = Ge("event", () => {
|
|
|
99
99
|
try {
|
|
100
100
|
const e = (await C.get("https://stage.hotel-service.konnectio.dk/api/event/restaurant-events", {
|
|
101
101
|
params: {
|
|
102
|
-
language:
|
|
102
|
+
language: F(),
|
|
103
103
|
date: A.value
|
|
104
104
|
},
|
|
105
105
|
headers: {
|
|
106
106
|
Authorization: I.value,
|
|
107
|
-
"Fresh-Booking-Ver": "4.0.
|
|
107
|
+
"Fresh-Booking-Ver": "4.0.16"
|
|
108
108
|
}
|
|
109
109
|
})).data;
|
|
110
110
|
y.value = e, l.value = !1;
|
|
@@ -120,14 +120,14 @@ const Qe = Ge("event", () => {
|
|
|
120
120
|
try {
|
|
121
121
|
const n = (await C.get("https://stage.hotel-service.konnectio.dk/api/v3/event/get-availability", {
|
|
122
122
|
params: {
|
|
123
|
-
language:
|
|
123
|
+
language: F(),
|
|
124
124
|
date: A.value,
|
|
125
125
|
templateId: S.value,
|
|
126
|
-
numberOfPeople:
|
|
126
|
+
numberOfPeople: N.value
|
|
127
127
|
},
|
|
128
128
|
headers: {
|
|
129
129
|
Authorization: I.value,
|
|
130
|
-
"Fresh-Booking-Ver": "4.0.
|
|
130
|
+
"Fresh-Booking-Ver": "4.0.16"
|
|
131
131
|
}
|
|
132
132
|
})).data;
|
|
133
133
|
n.templateCounts.length === 0 ? h({
|
|
@@ -146,15 +146,15 @@ const Qe = Ge("event", () => {
|
|
|
146
146
|
try {
|
|
147
147
|
const n = (await C.get("https://stage.hotel-service.konnectio.dk/api/v3/event/get-table-availability", {
|
|
148
148
|
params: {
|
|
149
|
-
language:
|
|
149
|
+
language: F(),
|
|
150
150
|
date: A.value,
|
|
151
|
-
numberOfPeople:
|
|
151
|
+
numberOfPeople: N.value,
|
|
152
152
|
eventId: S.value,
|
|
153
|
-
tableGroupId:
|
|
153
|
+
tableGroupId: K.value
|
|
154
154
|
},
|
|
155
155
|
headers: {
|
|
156
156
|
Authorization: I.value,
|
|
157
|
-
"Fresh-Booking-Ver": "4.0.
|
|
157
|
+
"Fresh-Booking-Ver": "4.0.16"
|
|
158
158
|
}
|
|
159
159
|
})).data;
|
|
160
160
|
t.value = n, l.value = !1, e();
|
|
@@ -169,13 +169,13 @@ const Qe = Ge("event", () => {
|
|
|
169
169
|
try {
|
|
170
170
|
const e = (await C.get("https://stage.hotel-service.konnectio.dk/api/v3/event/validate-discount-code", {
|
|
171
171
|
params: {
|
|
172
|
-
language:
|
|
172
|
+
language: F(),
|
|
173
173
|
date: A.value,
|
|
174
|
-
discountCode:
|
|
174
|
+
discountCode: z.value
|
|
175
175
|
},
|
|
176
176
|
headers: {
|
|
177
177
|
Authorization: I.value,
|
|
178
|
-
"Fresh-Booking-Ver": "4.0.
|
|
178
|
+
"Fresh-Booking-Ver": "4.0.16"
|
|
179
179
|
}
|
|
180
180
|
})).data;
|
|
181
181
|
console.log(e);
|
|
@@ -186,7 +186,7 @@ const Qe = Ge("event", () => {
|
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
async function
|
|
189
|
+
async function ze(e) {
|
|
190
190
|
i.value = v.PaymentState, l.value = !0;
|
|
191
191
|
const n = () => {
|
|
192
192
|
l.value = !1, i.value = v.ReservationState, h({
|
|
@@ -235,10 +235,10 @@ const Qe = Ge("event", () => {
|
|
|
235
235
|
name: $.value,
|
|
236
236
|
email: R.value,
|
|
237
237
|
phone: O.value,
|
|
238
|
-
remark:
|
|
239
|
-
numberOfPeople:
|
|
240
|
-
days:
|
|
241
|
-
discountCode:
|
|
238
|
+
remark: x.value,
|
|
239
|
+
numberOfPeople: N.value,
|
|
240
|
+
days: M.value,
|
|
241
|
+
discountCode: z.value,
|
|
242
242
|
giftCardCode: re.value,
|
|
243
243
|
checkoutUrl: window.location.origin,
|
|
244
244
|
privacyUrl: window.location.origin
|
|
@@ -246,7 +246,7 @@ const Qe = Ge("event", () => {
|
|
|
246
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
247
|
headers: {
|
|
248
248
|
Authorization: I.value,
|
|
249
|
-
"Fresh-Booking-Ver": "4.0.
|
|
249
|
+
"Fresh-Booking-Ver": "4.0.16"
|
|
250
250
|
}
|
|
251
251
|
}).then((d) => {
|
|
252
252
|
l.value = !1, se.pay({
|
|
@@ -255,10 +255,10 @@ const Qe = Ge("event", () => {
|
|
|
255
255
|
});
|
|
256
256
|
}).catch(() => n());
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Me(e) {
|
|
259
259
|
P.value = {}, g.value = {}, E.value = "", e();
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Be() {
|
|
262
262
|
Y();
|
|
263
263
|
}
|
|
264
264
|
return {
|
|
@@ -268,19 +268,19 @@ const Qe = Ge("event", () => {
|
|
|
268
268
|
availabilityData: t,
|
|
269
269
|
isLoading: l,
|
|
270
270
|
moduleState: i,
|
|
271
|
-
searchDate:
|
|
272
|
-
numberOfPeople:
|
|
271
|
+
searchDate: q,
|
|
272
|
+
numberOfPeople: N,
|
|
273
273
|
numberOfDays: T,
|
|
274
274
|
eventId: S,
|
|
275
|
-
tableGroupId:
|
|
275
|
+
tableGroupId: K,
|
|
276
276
|
arrivalTime: E,
|
|
277
277
|
addons: P,
|
|
278
278
|
products: g,
|
|
279
|
-
discountCode:
|
|
279
|
+
discountCode: z,
|
|
280
280
|
name: $,
|
|
281
281
|
phone: O,
|
|
282
282
|
email: R,
|
|
283
|
-
remark:
|
|
283
|
+
remark: x,
|
|
284
284
|
isTemplateEvent: pe,
|
|
285
285
|
currency: ue,
|
|
286
286
|
maxNumberOfPeople: ie,
|
|
@@ -288,7 +288,7 @@ const Qe = Ge("event", () => {
|
|
|
288
288
|
subtitle: ce,
|
|
289
289
|
slideshow: de,
|
|
290
290
|
date: A,
|
|
291
|
-
numberOfTotalDays:
|
|
291
|
+
numberOfTotalDays: M,
|
|
292
292
|
numberOfRooms: ge,
|
|
293
293
|
fromDate: me,
|
|
294
294
|
getEventData: b,
|
|
@@ -301,15 +301,15 @@ const Qe = Ge("event", () => {
|
|
|
301
301
|
basePrice: W,
|
|
302
302
|
totalPrice: Ie,
|
|
303
303
|
getTemplateData: J,
|
|
304
|
-
getEventTableData:
|
|
304
|
+
getEventTableData: B,
|
|
305
305
|
roomUpgrade: Pe,
|
|
306
306
|
weekendFee: Se,
|
|
307
307
|
hasProducts: X,
|
|
308
308
|
eventRateType: Q,
|
|
309
309
|
isReservationFormFilled: we,
|
|
310
310
|
isMetaDataAvailable: Ee,
|
|
311
|
-
areListingsAvailable:
|
|
312
|
-
isAvailabilityDataAvailable:
|
|
311
|
+
areListingsAvailable: Fe,
|
|
312
|
+
isAvailabilityDataAvailable: Ne,
|
|
313
313
|
isPaymentLoading: Te,
|
|
314
314
|
getEventImages: De,
|
|
315
315
|
isEventListingLoading: Ce,
|
|
@@ -320,9 +320,9 @@ const Qe = Ge("event", () => {
|
|
|
320
320
|
validateDiscountCode: Re,
|
|
321
321
|
localAddonPrice: G,
|
|
322
322
|
totalAddonPrice: V,
|
|
323
|
-
createBooking:
|
|
324
|
-
reset:
|
|
325
|
-
initialize:
|
|
323
|
+
createBooking: ze,
|
|
324
|
+
reset: Me,
|
|
325
|
+
initialize: Be
|
|
326
326
|
};
|
|
327
327
|
});
|
|
328
328
|
export {
|
|
Binary file
|
package/dist/event.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-43c8a651.cjs"),b=require("./index-751b236a.cjs"),w=require("./ThankYou-bcce79d1.cjs"),x=require("./event-2b792293.cjs"),ye=require("./ActionField-251eb289.cjs"),H=require("./TextField-379793fe.cjs"),Be=require("./DateField.vue_vue_type_style_index_0_lang-8ddce55e.cjs"),A=require("./NumberField.vue_vue_type_script_setup_true_lang-7676783c.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./_-de6b4115.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-2d4e943b.cjs"),b=require("./index-4a6e0dad.cjs"),w=require("./ThankYou-266a1340.cjs"),x=require("./event-0a73d10e.cjs"),ye=require("./ActionField-3450fcba.cjs"),H=require("./TextField-2ccfa48b.cjs"),Be=require("./DateField.vue_vue_type_style_index_0_lang-4f2f4c47.cjs"),A=require("./NumberField.vue_vue_type_script_setup_true_lang-1aefdd0e.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./_-0a59e9b5.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-ab6da587.js";
|
|
2
|
+
import { P as ol, C as pe, a as sl, S as il, i as rl } from "./index-1532370f.js";
|
|
3
|
+
import { B as ul, M as dl, R as ml, T as cl, x as pl } from "./ThankYou-b353b8e0.js";
|
|
4
|
+
import { u as J } from "./event-1b2cce27.js";
|
|
5
|
+
import { A as vl } from "./ActionField-c1dc7f3e.js";
|
|
6
|
+
import { T as ve } from "./TextField-45a6d0f3.js";
|
|
7
|
+
import { _ as bl } from "./DateField.vue_vue_type_style_index_0_lang-f7e8a940.js";
|
|
8
|
+
import { _ as x } from "./NumberField.vue_vue_type_script_setup_true_lang-aad02565.js";
|
|
9
9
|
import "./_commonjsHelpers-c5d32002.js";
|
|
10
|
-
import "./_-
|
|
10
|
+
import "./_-f8481bc2.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-2d4e943b.cjs"),c=require("./NumberField.vue_vue_type_script_setup_true_lang-1aefdd0e.cjs"),_=require("./ActionField-3450fcba.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./TextField-2ccfa48b.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-ab6da587.js";
|
|
2
|
+
import { u as b } from "./NumberField.vue_vue_type_script_setup_true_lang-aad02565.js";
|
|
3
|
+
import { A as F } from "./ActionField-c1dc7f3e.js";
|
|
4
4
|
import "./_commonjsHelpers-c5d32002.js";
|
|
5
|
-
import "./TextField-
|
|
5
|
+
import "./TextField-45a6d0f3.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-43c8a651.cjs"),V=require("./index-751b236a.cjs"),$=require("./_-de6b4115.cjs"),z=require("./TextField-379793fe.cjs"),x=require("./Field-cbc16db4.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("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:""}),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),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:[]}},a=o.value.places;return a&&a.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 a=k.value,_=h.value[n.value].data;_.length===1?c=_[0]:a!==void 0&&_.forEach(P=>{String(P.id)===String(a)&&(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("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: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:l.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.14"}}).then(c=>{t.value=e.GiftCardModuleState.ReadyToPay,i.value=!1,y({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:k,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(y,{emit:l}){const o=l,t=y,{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 k(){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=>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"},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(y){const{t:l}=e.useI18n(),{name:o,email:t,phone:p,value:g,remark:s,showValue:f,quantity:C,media:w,placeId:v,placeType:u,showFormPage:k,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(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(z.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(z.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(N)?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(u),"onUpdate:modelValue":r[3]||(r[3]=P=>e.isRef(u)?u.value=P:null),type:"radio",name:"placeType",val:_,label:a.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]=a=>e.isRef(v)?v.value=a:null),placeholder:e.unref(l)("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]=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)]])]),S.layout!=="minimal"&&e.unref(k)?(e.openBlock(),e.createElementBlock("div",de,[e.createBaseVNode("div",se,[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",ue,[e.createVNode(z.TextField,{modelValue:e.unref(s),"onUpdate:modelValue":r[10]||(r[10]=a=>e.isRef(s)?s.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",ce,[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)]])])),[[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-2d4e943b.cjs"),V=require("./index-4a6e0dad.cjs"),$=require("./_-0a59e9b5.cjs"),P=require("./TextField-2ccfa48b.cjs"),x=require("./Field-91254e17.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.16"}}).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");
|