@oneclick.dev/cms-core-modules 0.0.61 → 0.0.62
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/{ContentEditor-BAepN3Yd.js → ContentEditor-DKFCmfOs.js} +1 -1
- package/dist/{ContentEditor-BPjWW3d1.mjs → ContentEditor-owdOIage.mjs} +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DRVxQswt.js +1 -0
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-BJitmbPE.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-DkgDWC2i.mjs} +130 -125
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs +2332 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js +349 -0
- package/dist/{TableView-_2cP-w_7.js → TableView-BqhL_P45.js} +100 -100
- package/dist/{TableView-DlhHyuUZ.mjs → TableView-Dbl8qcUy.mjs} +14991 -14728
- package/dist/agenda-DFNJ8C1N.mjs +1136 -0
- package/dist/agenda-MjkwV63A.js +1 -0
- package/dist/floating-ui.dom-CBBY0Ism.js +1 -0
- package/dist/floating-ui.dom-xfqXu4GA.mjs +1138 -0
- package/dist/{index-DTago6vW-Bhr8E1Y6.js → index-CgfL8UKf-DAN7RkzR.js} +10 -10
- package/dist/{index-DTago6vW-CnomHQ_S.mjs → index-CgfL8UKf-DUUg9HDA.mjs} +904 -875
- package/dist/index-DBDq-h4j.js +245 -0
- package/dist/{index-BDaVYdkD.mjs → index-X0L4AHBR.mjs} +2406 -2394
- package/dist/index-YMaY4uuk-BgpTtr73.js +1 -0
- package/dist/{index-YMaY4uuk-BshejgNP.mjs → index-YMaY4uuk-C_xV5K9Z.mjs} +13 -14
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +5 -5
- package/dist/orders-Bqa3Z3tH.mjs +356 -0
- package/dist/orders-D5GJOZXN.js +1 -0
- package/dist/src/appointments/components/edit/EventDialog/ApproveReservationDialog.vue.d.ts +8 -0
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +39 -9
- package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +2 -2
- package/dist/src/appointments/components/edit/EventDialog/RejectReservationDialog.vue.d.ts +8 -0
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +36 -8
- package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +46 -9
- package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +19 -0
- package/dist/src/appointments/pages/edit/orders.vue.d.ts +39 -9
- package/package.json +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-D50uTpZY.js +0 -1
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CI8YgHdU.js +0 -345
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-P-MWwcVh.mjs +0 -2093
- package/dist/agenda-D81m29_4.mjs +0 -1135
- package/dist/agenda-uzPPxgsW.js +0 -1
- package/dist/floating-ui.dom-C82nbomj.js +0 -1
- package/dist/floating-ui.dom-ouSgPqty.mjs +0 -1133
- package/dist/index-DfV8-6ON.js +0 -245
- package/dist/index-YMaY4uuk-BxVT7IpO.js +0 -1
- package/dist/orders-Bh8w0ueq.mjs +0 -346
- package/dist/orders-Dt0zMz97.js +0 -1
- package/dist/src/appointments/components/edit/EventDialog/ResendConfirmationDialog.vue.d.ts +0 -4
|
@@ -1,21 +1,32 @@
|
|
|
1
|
+
interface Resource {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
}
|
|
1
7
|
type __VLS_Props = {
|
|
2
8
|
activeDate: Date;
|
|
3
9
|
selectedResource?: string | null;
|
|
10
|
+
resources: Resource[];
|
|
4
11
|
};
|
|
5
12
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
6
13
|
reservationDetailDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
7
|
-
|
|
14
|
+
onConfirmed?: (() => any) | undefined;
|
|
15
|
+
onCancelled?: (() => any) | undefined;
|
|
16
|
+
onRejected?: (() => any) | undefined;
|
|
8
17
|
}>, {
|
|
9
18
|
openDialog: (order: any) => void;
|
|
10
19
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
-
|
|
20
|
+
confirmed: () => any;
|
|
21
|
+
cancelled: () => any;
|
|
22
|
+
rejected: () => any;
|
|
12
23
|
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
13
24
|
cancelReservationDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
14
|
-
|
|
25
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
15
26
|
}>, {
|
|
16
27
|
openDialog: (input: any) => void;
|
|
17
28
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
-
|
|
29
|
+
confirm: (...args: any[]) => void;
|
|
19
30
|
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
20
31
|
P: {};
|
|
21
32
|
B: {};
|
|
@@ -24,20 +35,44 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
24
35
|
M: {};
|
|
25
36
|
Defaults: {};
|
|
26
37
|
}, Readonly<{}> & Readonly<{
|
|
27
|
-
|
|
38
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
28
39
|
}>, {
|
|
29
40
|
openDialog: (input: any) => void;
|
|
30
41
|
}, {}, {}, {}, {}> | null;
|
|
31
|
-
|
|
42
|
+
approveReservationDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
43
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
44
|
+
}>, {
|
|
45
|
+
openDialog: (input: any, type?: "approve" | "resend") => void;
|
|
46
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
47
|
+
confirm: (...args: any[]) => void;
|
|
48
|
+
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
49
|
+
P: {};
|
|
50
|
+
B: {};
|
|
51
|
+
D: {};
|
|
52
|
+
C: {};
|
|
53
|
+
M: {};
|
|
54
|
+
Defaults: {};
|
|
55
|
+
}, Readonly<{}> & Readonly<{
|
|
56
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
}>, {
|
|
58
|
+
openDialog: (input: any, type?: "approve" | "resend") => void;
|
|
59
|
+
}, {}, {}, {}, {}> | null;
|
|
60
|
+
rejectReservationDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
61
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
62
|
+
}>, {
|
|
32
63
|
openDialog: (input: any) => void;
|
|
33
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
64
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
65
|
+
confirm: (...args: any[]) => void;
|
|
66
|
+
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
34
67
|
P: {};
|
|
35
68
|
B: {};
|
|
36
69
|
D: {};
|
|
37
70
|
C: {};
|
|
38
71
|
M: {};
|
|
39
72
|
Defaults: {};
|
|
40
|
-
}, Readonly<{}> & Readonly<{
|
|
73
|
+
}, Readonly<{}> & Readonly<{
|
|
74
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
}>, {
|
|
41
76
|
openDialog: (input: any) => void;
|
|
42
77
|
}, {}, {}, {}, {}> | null;
|
|
43
78
|
transferReservationDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
|
|
@@ -60,7 +95,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
60
95
|
M: {};
|
|
61
96
|
Defaults: {};
|
|
62
97
|
}, Readonly<{}> & Readonly<{
|
|
63
|
-
|
|
98
|
+
onConfirmed?: (() => any) | undefined;
|
|
99
|
+
onCancelled?: (() => any) | undefined;
|
|
100
|
+
onRejected?: (() => any) | undefined;
|
|
64
101
|
}>, {
|
|
65
102
|
openDialog: (order: any) => void;
|
|
66
103
|
}, {}, {}, {}, {}> | null;
|
|
@@ -1,7 +1,26 @@
|
|
|
1
|
+
import { Resource } from '../../../types';
|
|
2
|
+
interface AgendaData {
|
|
3
|
+
serviceName: string;
|
|
4
|
+
resources?: Resource[];
|
|
5
|
+
exceptions?: Exception[];
|
|
6
|
+
}
|
|
7
|
+
interface Exception {
|
|
8
|
+
id: string;
|
|
9
|
+
startDate: string;
|
|
10
|
+
endDate: string;
|
|
11
|
+
isClosed: boolean;
|
|
12
|
+
timeslots: {
|
|
13
|
+
startTime: string;
|
|
14
|
+
endTime: string;
|
|
15
|
+
}[];
|
|
16
|
+
resourceIds?: string[] | null;
|
|
17
|
+
}
|
|
1
18
|
type __VLS_Props = {
|
|
2
19
|
modelValue?: Date;
|
|
3
20
|
selectedResource?: string | null;
|
|
4
21
|
viewMode?: 'stacked' | 'single';
|
|
22
|
+
agendaData?: AgendaData;
|
|
23
|
+
resources?: Resource[];
|
|
5
24
|
};
|
|
6
25
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
26
|
"update:modelValue": (value: Date) => any;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
2
|
reservationDetailDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
3
|
-
|
|
3
|
+
onConfirmed?: (() => any) | undefined;
|
|
4
|
+
onCancelled?: (() => any) | undefined;
|
|
5
|
+
onRejected?: (() => any) | undefined;
|
|
4
6
|
}>, {
|
|
5
7
|
openDialog: (order: any) => void;
|
|
6
8
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
-
|
|
9
|
+
confirmed: () => any;
|
|
10
|
+
cancelled: () => any;
|
|
11
|
+
rejected: () => any;
|
|
8
12
|
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
9
13
|
cancelReservationDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
10
|
-
|
|
14
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
11
15
|
}>, {
|
|
12
16
|
openDialog: (input: any) => void;
|
|
13
17
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
-
|
|
18
|
+
confirm: (...args: any[]) => void;
|
|
15
19
|
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
16
20
|
P: {};
|
|
17
21
|
B: {};
|
|
@@ -20,20 +24,44 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
20
24
|
M: {};
|
|
21
25
|
Defaults: {};
|
|
22
26
|
}, Readonly<{}> & Readonly<{
|
|
23
|
-
|
|
27
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
24
28
|
}>, {
|
|
25
29
|
openDialog: (input: any) => void;
|
|
26
30
|
}, {}, {}, {}, {}> | null;
|
|
27
|
-
|
|
31
|
+
approveReservationDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
32
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
openDialog: (input: any, type?: "approve" | "resend") => void;
|
|
35
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
36
|
+
confirm: (...args: any[]) => void;
|
|
37
|
+
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
38
|
+
P: {};
|
|
39
|
+
B: {};
|
|
40
|
+
D: {};
|
|
41
|
+
C: {};
|
|
42
|
+
M: {};
|
|
43
|
+
Defaults: {};
|
|
44
|
+
}, Readonly<{}> & Readonly<{
|
|
45
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
openDialog: (input: any, type?: "approve" | "resend") => void;
|
|
48
|
+
}, {}, {}, {}, {}> | null;
|
|
49
|
+
rejectReservationDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
50
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}>, {
|
|
28
52
|
openDialog: (input: any) => void;
|
|
29
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
53
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
54
|
+
confirm: (...args: any[]) => void;
|
|
55
|
+
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
30
56
|
P: {};
|
|
31
57
|
B: {};
|
|
32
58
|
D: {};
|
|
33
59
|
C: {};
|
|
34
60
|
M: {};
|
|
35
61
|
Defaults: {};
|
|
36
|
-
}, Readonly<{}> & Readonly<{
|
|
62
|
+
}, Readonly<{}> & Readonly<{
|
|
63
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
64
|
+
}>, {
|
|
37
65
|
openDialog: (input: any) => void;
|
|
38
66
|
}, {}, {}, {}, {}> | null;
|
|
39
67
|
transferReservationDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
|
|
@@ -56,7 +84,9 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
56
84
|
M: {};
|
|
57
85
|
Defaults: {};
|
|
58
86
|
}, Readonly<{}> & Readonly<{
|
|
59
|
-
|
|
87
|
+
onConfirmed?: (() => any) | undefined;
|
|
88
|
+
onCancelled?: (() => any) | undefined;
|
|
89
|
+
onRejected?: (() => any) | undefined;
|
|
60
90
|
}>, {
|
|
61
91
|
openDialog: (order: any) => void;
|
|
62
92
|
}, {}, {}, {}, {}> | null;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),O=require("lucide-vue-next"),D=require("@oneclick.dev/cms-kit"),X=require("./utils-D6CaKJbp.js"),f=require("./DateFormatter-BPPBZp1j.js"),Y={class:"@container/new-res-form space-y-5 py-4"},Z={class:"grid gap-4"},ee={class:"grid gap-4 @md/new-res-form:grid-cols-2"},te={class:"grid gap-2"},oe={class:"flex gap-2 items-center"},ae={class:"grid gap-2"},le={class:"flex gap-2 items-center"},ne={class:"grid gap-2"},re={class:"grid gap-2"},se={class:"grid gap-4"},de={class:"grid gap-4 @md/new-res-form:grid-cols-2"},ie={class:"grid gap-2"},ue={class:"grid gap-4 @md/new-res-form:grid-cols-2"},ce={class:"grid gap-2"},pe={class:"grid gap-2"},me={class:"flex items-center h-9 px-3 text-sm text-muted-foreground"},ve={class:"grid gap-4"},fe={class:"grid gap-4 @md/new-res-form:grid-cols-2"},Ve={class:"grid gap-2"},ge={class:"grid gap-2"},Ne={class:"grid gap-4 @md/new-res-form:grid-cols-2"},_e={class:"grid gap-2"},xe={class:"grid gap-2"},Ce={class:"mt-4 text-red-400"},we={class:"list-disc pl-4"},he=e.defineComponent({__name:"NewReservationDialog",setup(Te){const{params:I}=D.useModuleRoute(),{config:S}=D.useModule(),U=D.useFirebaseIntegration(S.project),N=e.ref(!1);e.watch(N,a=>{a&&(_.value=[],c.value=1,i.value=0,r.value=l.value?.resources?.[0]?.id??"",s.value=l.value?.pricingOptions?.find(t=>t.isDefault===!0)?.id??"",n.value="",V.value="",g.value="",p.value="",x.value="")});const E=e.ref(!1),l=e.inject("agendaData",e.ref({})),_=e.ref([]),c=e.ref(1),i=e.ref(0),r=e.ref(""),s=e.ref(""),n=e.ref(""),V=e.ref(""),g=e.ref(""),p=e.ref(""),x=e.ref(""),L=f.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(f.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),u=e.ref(),M=new f.$fb18d541ea1ad717$export$ad991b66133851cf("en-US",{dateStyle:"long"}),b=e.computed(()=>{if(!n.value||!s.value)return"";const a=l.value?.pricingOptions?.find(T=>T.id===s.value);if(!a?.duration)return n.value;const[t,m]=n.value.split(":").map(Number);if(isNaN(t)||isNaN(m))return"";const C=t*60+m+a.duration,w=Math.floor(C/60)%24,h=C%60;return`${w.toString().padStart(2,"0")}:${h.toString().padStart(2,"0")}`}),R=()=>{const a=[];return _.value=[],c.value<1&&c.value>9999&&a.push("Please fill in a correct number of spots."),i.value<0&&(i.value=0),r.value||a.push("Please select a resource."),s.value||a.push("Please select a type."),u.value||a.push("Please select the booking date."),(!n.value||n.value.length!==5||n.value?.indexOf(":")===-1||!parseInt(n.value?.replace(":","")))&&a.push("Please select a correct booking time."),V.value||a.push("Please fill in the first name of the customer."),g.value||a.push("Please fill in the last name of the customer."),(!p.value||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p.value)===!1)&&a.push("Please fill in the correct email of the customer."),_.value=a,a.length===0},q=async()=>{if(R())try{E.value=!0;const a={agendaId:I.value.id,customerInfo:{firstName:V.value,lastName:g.value,email:p.value,phone:x.value},amountPaid:parseFloat(i.value)??0,amountDue:0,subtotal:parseFloat(i.value)??0,total:parseFloat(i.value)??0,createdAt:new Date,updatedAt:new Date,discount:0,flattenedReservations:[`${r.value}_${u.value}_${n.value?.replace(":","")}`],paymentStatus:"paid",paymentType:"full",reservations:[{totalPrice:parseFloat(i.value?.toFixed(2))??0,basePrice:parseFloat((i.value/c.value).toFixed(2))??0,addOnsPrice:0,addOns:[],date:`${u.value}`,id:`res_${Date.now()}_${Math.random().toString(36).substring(2,9)}`,pricingOption:{duration:l.value?.pricingOptions?.find(t=>t.id===s.value)?.duration||"",id:l.value?.pricingOptions?.find(t=>t.id===s.value)?.id||"",name:l.value?.pricingOptions?.find(t=>t.id===s.value)?.name||"",price:l.value?.pricingOptions?.find(t=>t.id===s.value)?.price||""},pricingOptionId:s.value,resource:{avatarLabel:l.value?.resources?.find(t=>t.id===r.value)?.avatarLabel||"",color:l.value?.resources?.find(t=>t.id===r.value)?.color||"",description:l.value?.resources?.find(t=>t.id===r.value)?.description||"",id:l.value?.resources?.find(t=>t.id===r.value)?.id||"",name:l.value?.resources?.find(t=>t.id===r.value)?.name||""},resourceId:r.value,spots:c.value,timeslot:{startTime:n.value,endTime:b.value}}],status:"confirmed"};await U.add(S.reservationsCollection,a)}catch{}finally{E.value=!1,N.value=!1}};return(a,t)=>{const m=e.resolveComponent("Button"),C=e.resolveComponent("DialogTrigger"),w=e.resolveComponent("DialogTitle"),h=e.resolveComponent("DialogDescription"),T=e.resolveComponent("DialogHeader"),d=e.resolveComponent("Label"),v=e.resolveComponent("Input"),y=e.resolveComponent("SelectValue"),$=e.resolveComponent("SelectTrigger"),P=e.resolveComponent("SelectItem"),k=e.resolveComponent("SelectGroup"),B=e.resolveComponent("SelectContent"),F=e.resolveComponent("Select"),A=e.resolveComponent("PopoverTrigger"),j=e.resolveComponent("Calendar"),H=e.resolveComponent("PopoverContent"),z=e.resolveComponent("Popover"),G=e.resolveComponent("TimeInput"),K=e.resolveComponent("DialogFooter"),J=e.resolveComponent("DialogScrollContent"),Q=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(Q,{open:N.value,"onUpdate:open":t[10]||(t[10]=o=>N.value=o)},{default:e.withCtx(()=>[e.createVNode(C,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(e.unref(O.Plus),{class:"size-4"}),t[11]||(t[11]=e.createTextVNode(" Add Reservation ",-1))]),_:1})]),_:1}),e.createVNode(J,{class:"sm:max-w-xl"},{default:e.withCtx(()=>[e.createVNode(T,null,{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode("Create new reservation",-1)])]),_:1}),e.createVNode(h)]),_:1}),e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("Spots/tickets",-1)])]),_:1}),e.createElementVNode("div",oe,[e.createVNode(v,{modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=o=>c.value=o),modelModifiers:{number:!0},type:"number",min:"1",class:"no-spinner"},null,8,["modelValue"])])]),e.createElementVNode("div",ae,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createTextVNode("Total price paid",-1)])]),_:1}),e.createElementVNode("div",le,[e.createVNode(v,{modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=o=>i.value=o),modelModifiers:{number:!0},type:"number",min:"0",class:"no-spinner"},null,8,["modelValue"]),e.createTextVNode(" "+e.toDisplayString(e.unref(l).currency),1)])]),e.createElementVNode("div",ne,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("Resource",-1)])]),_:1}),e.createVNode(F,{modelValue:r.value,"onUpdate:modelValue":t[2]||(t[2]=o=>r.value=o)},{default:e.withCtx(()=>[e.createVNode($,{class:"w-full"},{default:e.withCtx(()=>[e.createVNode(y,{placeholder:"Select resource"})]),_:1}),e.createVNode(B,null,{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).resources,o=>(e.openBlock(),e.createBlock(P,{value:o.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.name),1)]),_:2},1032,["value"]))),256))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",re,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createTextVNode("Type",-1)])]),_:1}),e.createVNode(F,{modelValue:s.value,"onUpdate:modelValue":t[3]||(t[3]=o=>s.value=o)},{default:e.withCtx(()=>[e.createVNode($,{class:"w-full"},{default:e.withCtx(()=>[e.createVNode(y,{placeholder:"Select type"})]),_:1}),e.createVNode(B,null,{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).pricingOptions,o=>(e.openBlock(),e.createBlock(P,{value:o.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.name)+" ("+e.toDisplayString(o.duration)+"min) ",1)]),_:2},1032,["value"]))),256))]),_:1})]),_:1})]),_:1},8,["modelValue"])])])]),e.createElementVNode("div",se,[e.createElementVNode("div",de,[e.createElementVNode("div",ie,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode("Date",-1)])]),_:1}),e.createVNode(z,null,{default:e.withCtx(({close:o})=>[e.createVNode(A,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(m,{variant:"outline",class:e.normalizeClass(e.unref(X.classNames)("w-[240px] justify-start text-left font-normal",!u.value&&"text-muted-foreground"))},{default:e.withCtx(()=>[e.createVNode(e.unref(O.CalendarIcon)),e.createTextVNode(" "+e.toDisplayString(u.value?e.unref(M).format(u.value.toDate(e.unref(f.$14e0f24ef4ac5c92$export$aa8b41735afcabd2)())):"Pick a date"),1)]),_:1},8,["class"])]),_:1}),e.createVNode(H,{class:"w-auto p-0",align:"start"},{default:e.withCtx(()=>[e.createVNode(j,{modelValue:u.value,"onUpdate:modelValue":[t[4]||(t[4]=W=>u.value=W),o],"default-placeholder":e.unref(L),layout:"month-and-year","initial-focus":"",minValue:e.unref(f.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3)(e.unref(f.$14e0f24ef4ac5c92$export$aa8b41735afcabd2)())},null,8,["modelValue","default-placeholder","onUpdate:modelValue","minValue"])]),_:2},1024)]),_:1})])]),e.createElementVNode("div",ue,[e.createElementVNode("div",ce,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode("Start time",-1)])]),_:1}),e.createVNode(G,{modelValue:n.value,"onUpdate:modelValue":t[5]||(t[5]=o=>n.value=o)},null,8,["modelValue"])]),e.createElementVNode("div",pe,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode("End time",-1)])]),_:1}),e.createElementVNode("div",me,e.toDisplayString(e.unref(b)||"--:--"),1)])])]),e.createElementVNode("div",ve,[e.createElementVNode("div",fe,[e.createElementVNode("div",Ve,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode("Firstname",-1)])]),_:1}),e.createVNode(v,{modelValue:V.value,"onUpdate:modelValue":t[6]||(t[6]=o=>V.value=o)},null,8,["modelValue"])]),e.createElementVNode("div",ge,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[21]||(t[21]=[e.createTextVNode("Lastname",-1)])]),_:1}),e.createVNode(v,{modelValue:g.value,"onUpdate:modelValue":t[7]||(t[7]=o=>g.value=o)},null,8,["modelValue"])])]),e.createElementVNode("div",Ne,[e.createElementVNode("div",_e,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createTextVNode("E-mail",-1)])]),_:1}),e.createVNode(v,{modelValue:p.value,"onUpdate:modelValue":t[8]||(t[8]=o=>p.value=o)},null,8,["modelValue"])]),e.createElementVNode("div",xe,[e.createVNode(d,null,{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode("Phone Nr ",-1),e.createElementVNode("span",{class:"italic text-xs opacity-50"},"optional",-1)])]),_:1}),e.createVNode(v,{modelValue:x.value,"onUpdate:modelValue":t[9]||(t[9]=o=>x.value=o)},null,8,["modelValue"])])])]),e.createElementVNode("div",Ce,[e.createElementVNode("ul",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,o=>(e.openBlock(),e.createElementBlock("li",{key:o},e.toDisplayString(o),1))),128))])])]),e.createVNode(K,{class:"gap-2"},{default:e.withCtx(()=>[e.createVNode(m,{onClick:q},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("Add reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}});exports._sfc_main=he;
|