@oneclick.dev/cms-core-modules 0.0.58 → 0.0.60

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.
Files changed (147) hide show
  1. package/dist/{Components-D9yIIosM.mjs → Components-C83O-xlF.mjs} +1 -1
  2. package/dist/{ContentEditor-DCmt_y_R.js → ContentEditor-BAepN3Yd.js} +51 -34
  3. package/dist/{ContentEditor-CtGeIzC4.mjs → ContentEditor-BPjWW3d1.mjs} +12341 -10099
  4. package/dist/Create-Bh4g6QW4.js +1 -0
  5. package/dist/{Create-Bwf1RXdG.mjs → Create-Cf7pvh5G.mjs} +38 -39
  6. package/dist/DateFormatter-BPPBZp1j.js +1 -0
  7. package/dist/{CalendarDate-CRT2Viyt.mjs → DateFormatter-DsmlAuYV.mjs} +353 -256
  8. package/dist/{Detail-CpfOQChd.mjs → Detail-B4b_FLDa.mjs} +2 -2
  9. package/dist/{Detail-B-PnkcXD.mjs → Detail-BGD75ul4.mjs} +2 -2
  10. package/dist/{Detail-Dd_OkpcN.js → Detail-BayNaAg9.js} +1 -1
  11. package/dist/{Detail-C4E1T87K.mjs → Detail-Byk781b4.mjs} +3 -3
  12. package/dist/{Detail-Cd5CBVN0.js → Detail-CnK-qbhE.js} +1 -1
  13. package/dist/Detail-CtbWzq-R.js +1 -0
  14. package/dist/{Detail-CNfTDUE5.js → Detail-Cxd2VMOl.js} +1 -1
  15. package/dist/{Detail-BVlGSjOq.mjs → Detail-D10shmpK.mjs} +6 -7
  16. package/dist/{Detail-CwagT6gQ.mjs → Detail-U0mgLKt6.mjs} +2 -2
  17. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs +75 -0
  18. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js +1 -0
  19. package/dist/{Entries-zyhycw1M.mjs → Entries-C6Di46My.mjs} +1 -1
  20. package/dist/{Find-BPR0uU-Z.mjs → Find-B4sAEx0B.mjs} +2 -2
  21. package/dist/{Find-BidEQJxT.js → Find-Ds6OvuH6.js} +1 -1
  22. package/dist/{GlobalStyling-BLQ_1W2y.mjs → GlobalStyling-C9VthHWK.mjs} +1 -1
  23. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BJitmbPE.mjs +396 -0
  24. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-D50uTpZY.js +1 -0
  25. package/dist/Overview-B-8TLLjh.js +1 -0
  26. package/dist/{Overview-CDN88OSM.mjs → Overview-BCpJNiEB.mjs} +1 -1
  27. package/dist/Overview-B_99j5eA.js +1 -0
  28. package/dist/{Overview-BLsZMHNW.mjs → Overview-CIa1E-HH.mjs} +1 -1
  29. package/dist/{Overview-D1nJLBe1.mjs → Overview-CgViRnNc.mjs} +1 -1
  30. package/dist/Overview-DtWvKB3W.mjs +327 -0
  31. package/dist/Overview-HvlDEgqi.mjs +862 -0
  32. package/dist/{Overview-BH3NwvNX.mjs → Overview-Su8ZUbMs.mjs} +3 -3
  33. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CI8YgHdU.js +345 -0
  34. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-P-MWwcVh.mjs +2093 -0
  35. package/dist/{TableView-CS13LLxk.mjs → TableView-B8iLWWcP.mjs} +48394 -36321
  36. package/dist/TableView-BxK6R8v3.js +312 -0
  37. package/dist/{TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs → TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs} +5 -5
  38. package/dist/{View-C7axVP9t.mjs → View-DDXN0tKD.mjs} +7 -7
  39. package/dist/View-DfzaVOzS.js +1 -0
  40. package/dist/agenda-D81m29_4.mjs +1135 -0
  41. package/dist/agenda-uzPPxgsW.js +1 -0
  42. package/dist/availability-B-tRp8hB.mjs +629 -0
  43. package/dist/availability-BiBbzEIM.js +1 -0
  44. package/dist/{exceptions-D3b18TiY.mjs → exceptions-BFchkR06.mjs} +70 -71
  45. package/dist/exceptions-C-DPRNQa.js +1 -0
  46. package/dist/index-4tjmIans.js +1 -0
  47. package/dist/index-AmUV8LZQ.mjs +176 -0
  48. package/dist/index-BDaVYdkD.mjs +7763 -0
  49. package/dist/{index-DT1wWnUk.mjs → index-BWDwEd8D.mjs} +1 -1
  50. package/dist/{index-CImCyE3L.mjs → index-BfBBm9uY.mjs} +1 -1
  51. package/dist/{index-DMoyoaks.mjs → index-Bkq58CeQ.mjs} +2 -2
  52. package/dist/{index-DI6mydpm.mjs → index-CABh6Qn6.mjs} +2 -2
  53. package/dist/{index-CQiY-oTN.mjs → index-CQkOH2_3.mjs} +1 -1
  54. package/dist/{index-Bwi1mtkq.mjs → index-CU-tbS5W.mjs} +1 -1
  55. package/dist/{index-BzuHN-r8.mjs → index-Cpnn_Pxd.mjs} +1 -1
  56. package/dist/index-CxETuRsG.js +1 -0
  57. package/dist/{index-DyCHxFp3.mjs → index-DRqJOqUR.mjs} +502 -449
  58. package/dist/index-DTago6vW-Bhr8E1Y6.js +88 -0
  59. package/dist/index-DTago6vW-CnomHQ_S.mjs +4123 -0
  60. package/dist/index-DfV8-6ON.js +245 -0
  61. package/dist/index-Dnn2SCSl.js +1 -0
  62. package/dist/{index-BEGU8Kme.mjs → index-Dpl9sU6a.mjs} +2 -2
  63. package/dist/index-Uf7TwBuW.mjs +110 -0
  64. package/dist/index-YMaY4uuk-BgpTtr73.js +1 -0
  65. package/dist/{index-CKPshlZ8-BQiiP6r_.mjs → index-YMaY4uuk-C_xV5K9Z.mjs} +399 -363
  66. package/dist/{index--jjEzba7.mjs → index-cOnxXTbF.mjs} +1 -1
  67. package/dist/index-hlylYYgy.mjs +24 -0
  68. package/dist/index.cjs.js +1 -1
  69. package/dist/index.mjs +98 -81
  70. package/dist/orders-Bh8w0ueq.mjs +346 -0
  71. package/dist/orders-Dt0zMz97.js +1 -0
  72. package/dist/payment-BQaAqQ5q.js +1 -0
  73. package/dist/payment-BbWByERf.mjs +1080 -0
  74. package/dist/regular-1LXNPviB.js +1 -0
  75. package/dist/regular-_05oq5Tx.mjs +1101 -0
  76. package/dist/regular-slots-Bs3WJB3U.js +1 -0
  77. package/dist/regular-slots-C2NYxLPn.mjs +222 -0
  78. package/dist/resources-DgPnEv76.mjs +811 -0
  79. package/dist/resources-eb0pivDL.js +1 -0
  80. package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +2 -2
  81. package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +92 -0
  82. package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +8 -0
  83. package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +10 -0
  84. package/dist/src/appointments/components/edit/{EventDialog.vue.d.ts → EventDialog/ResendConfirmationDialog.vue.d.ts} +1 -1
  85. package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +51 -0
  86. package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +24 -0
  87. package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +4 -0
  88. package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +15 -7
  89. package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +2 -0
  90. package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +68 -0
  91. package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +15 -0
  92. package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +50 -0
  93. package/dist/src/appointments/config.d.ts +30 -0
  94. package/dist/src/appointments/index.d.ts +32 -5
  95. package/dist/src/appointments/pages/edit/agenda.vue.d.ts +1 -1
  96. package/dist/src/appointments/pages/edit/availability.vue.d.ts +1 -1
  97. package/dist/src/appointments/pages/edit/index.vue.d.ts +1 -1
  98. package/dist/src/appointments/pages/edit/orders.vue.d.ts +64 -0
  99. package/dist/src/appointments/pages/edit/payment.vue.d.ts +1 -1
  100. package/dist/src/appointments/pages/edit/regular-slots.vue.d.ts +1 -1
  101. package/dist/src/appointments/pages/edit/resources.vue.d.ts +1 -1
  102. package/dist/src/appointments/routes.d.ts +2 -5
  103. package/dist/src/appointments/types.d.ts +16 -0
  104. package/dist/src/appointments/utils/printReservation.d.ts +45 -0
  105. package/dist/src/content-manager/components/content-editor/ContentStructuredContentSections.vue.d.ts +4 -0
  106. package/dist/src/content-manager/components/content-editor/PageSettings.vue.d.ts +2 -0
  107. package/dist/src/content-manager/components/content-editor/SidebarSectionWrapper.vue.d.ts +11 -1
  108. package/dist/src/content-manager/types.d.ts +5 -0
  109. package/dist/{vee-validate-zod-BPQyEfpF.js → vee-validate-zod-ByykgYKJ.js} +1 -1
  110. package/dist/{vee-validate-zod-IXkfh-6Q.mjs → vee-validate-zod-CcOwoF6y.mjs} +4 -4
  111. package/package.json +4 -2
  112. package/dist/CalendarDate-CWtpXgpD.js +0 -1
  113. package/dist/Create-BP8TX6rj.js +0 -1
  114. package/dist/DateFormatter-BbcSwTs4.js +0 -1
  115. package/dist/DateFormatter-CbO0PVUK.mjs +0 -99
  116. package/dist/Detail-DUo6qKqO.js +0 -1
  117. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +0 -1
  118. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +0 -55
  119. package/dist/Overview-BNMZ9MUK.js +0 -1
  120. package/dist/Overview-CEPodGCn.mjs +0 -311
  121. package/dist/Overview-CvquDPhB.js +0 -1
  122. package/dist/Overview-D67UjG6n.mjs +0 -947
  123. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +0 -1
  124. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +0 -392
  125. package/dist/TableView-Dv4YXBD1.js +0 -111
  126. package/dist/View-7qb_ohVo.js +0 -1
  127. package/dist/agenda-B49oKGeh.mjs +0 -706
  128. package/dist/agenda-DipQ5IWP.js +0 -1
  129. package/dist/availability-C7q9tq6l.js +0 -1
  130. package/dist/availability-DeCkqiu8.mjs +0 -613
  131. package/dist/exceptions-DJ9zWX3k.js +0 -1
  132. package/dist/index-CKPshlZ8-CIz1tDwX.js +0 -1
  133. package/dist/index-DUeFrD-B.js +0 -1
  134. package/dist/index-DsnoK4ia.mjs +0 -579
  135. package/dist/index-WL1P6d3j.js +0 -1
  136. package/dist/index-_mG-aU3Z.mjs +0 -87
  137. package/dist/index-_sQDF1pH.js +0 -1
  138. package/dist/index-klI238nT.mjs +0 -24
  139. package/dist/payment-kTjsV0Jj.js +0 -1
  140. package/dist/payment-zpCM0LD-.mjs +0 -981
  141. package/dist/regular-C4_3YXqx.mjs +0 -602
  142. package/dist/regular-DFwPEbZO.js +0 -1
  143. package/dist/regular-slots-4ooEpICB.mjs +0 -67
  144. package/dist/regular-slots-BAVGbomI.js +0 -1
  145. package/dist/resources-MpQkSstv.mjs +0 -563
  146. package/dist/resources-iM28T3dD.js +0 -1
  147. package/dist/src/appointments/components/edit/RegularSlotEditor.vue.d.ts +0 -16
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js"),c=require("@oneclick.dev/cms-kit"),l=require("lucide-vue-next"),C={class:"max-w-3xl"},b={key:0},h={key:0,class:"space-y-4"},T={class:"flex items-center justify-between"},S={class:"grid gap-3"},_={class:"flex items-start gap-4"},B={class:"flex-1 min-w-0"},$={class:"font-medium"},R={class:"mt-2 grid grid-cols-3 gap-3 text-sm"},A={class:"ml-1 font-medium"},D={class:"ml-1 font-medium"},j={class:"ml-1 font-medium"},q={class:"flex flex-col items-center gap-4"},L={class:"size-16 rounded-full bg-muted flex items-center justify-center"},M={key:1,class:"flex justify-center py-8"},z={class:"mt-8 p-4 rounded-lg bg-muted/50"},O={class:"text-sm font-medium mb-2 flex items-center gap-2"},F={class:"text-sm text-muted-foreground space-y-2 ml-6 list-decimal"},I=e.defineComponent({__name:"regular-slots",setup(P){const{params:s,resolvePath:r}=c.useModuleRoute(),{config:f}=c.useModule(),g=c.useFirebaseIntegration(f.project),a=e.ref([]),p=e.ref(!0),x=async()=>{try{const o=await g.get(f.agendaCollection,s.value.id);a.value=o.resources||[]}catch(o){console.error("Error loading resources:",o)}finally{p.value=!1}},v=e.computed(()=>a.value.filter(o=>o.isActive)),E=e.computed(()=>a.value.length>0),y=o=>{const i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].filter((N,u)=>o.openingHours?.[u]?.length>0);return i.length===0?"No hours set":i.length===7?"Open all week":i.join(", ")};return x(),(o,t)=>{const i=e.resolveComponent("AlertTitle"),N=e.resolveComponent("AlertDescription"),u=e.resolveComponent("Alert"),m=e.resolveComponent("Button"),V=e.resolveComponent("Card"),w=e.resolveComponent("Spinner"),d=e.resolveComponent("NuxtLink");return e.openBlock(),e.createBlock(k._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",C,[t[27]||(t[27]=e.createElementVNode("h1",{class:"text-lg font-medium mb-2"},"Slot Configuration",-1)),t[28]||(t[28]=e.createElementVNode("p",{class:"mb-6 text-muted-foreground text-sm"}," Time slots are now automatically generated based on your resources' operating hours, booking intervals, and service durations. ",-1)),e.createVNode(u,{class:"mb-6"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.Info),{class:"h-4 w-4"}),e.createVNode(i,null,{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode("How Dynamic Slots Work",-1)])]),_:1}),e.createVNode(N,{class:"mt-2 space-y-2 text-sm"},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createElementVNode("p",null,[e.createElementVNode("strong",null,"1. Resources define operating hours:"),e.createTextVNode(" Each resource (staff, room, equipment) has its own schedule and booking interval (e.g., every 15 or 30 minutes). ")],-1),e.createElementVNode("p",null,[e.createElementVNode("strong",null,"2. Services define duration:"),e.createTextVNode(" In Payment Settings, each service specifies how long it takes (e.g., 30 min haircut, 60 min massage). ")],-1),e.createElementVNode("p",null,[e.createElementVNode("strong",null,"3. Slots are generated dynamically:"),e.createTextVNode(" The system creates available booking slots by combining resource availability with service duration, allowing multiple services to overlap within the resource's capacity. ")],-1)])]),_:1})]),_:1}),p.value?(e.openBlock(),e.createElementBlock("div",M,[e.createVNode(w,{class:"w-6 h-6"})])):(e.openBlock(),e.createElementBlock("div",b,[E.value?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",T,[t[6]||(t[6]=e.createElementVNode("h2",{class:"text-base font-medium"},"Your Resources",-1)),e.createVNode(m,{size:"sm",variant:"outline",onClick:t[0]||(t[0]=n=>o.$router.push(e.unref(r)(`/edit/${e.unref(s).id}/resources`)))},{default:e.withCtx(()=>[e.createVNode(e.unref(l.Users),{class:"w-4 h-4 mr-2"}),t[5]||(t[5]=e.createTextVNode(" Manage Resources ",-1))]),_:1})]),e.createElementVNode("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,n=>(e.openBlock(),e.createBlock(V,{key:n.id,class:"p-4 hover:shadow-sm transition-shadow"},{default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createElementVNode("div",{class:"size-10 rounded-full flex items-center justify-center text-white text-sm font-medium flex-shrink-0",style:e.normalizeStyle({backgroundColor:n.color||"#6b7280"})},e.toDisplayString(n.avatarLabel||n.name.charAt(0).toUpperCase()),5),e.createElementVNode("div",B,[e.createElementVNode("h3",$,e.toDisplayString(n.name),1),e.createElementVNode("div",R,[e.createElementVNode("div",null,[t[7]||(t[7]=e.createElementVNode("span",{class:"text-muted-foreground"},"Capacity:",-1)),e.createElementVNode("span",A,e.toDisplayString(n.capacity),1)]),e.createElementVNode("div",null,[t[8]||(t[8]=e.createElementVNode("span",{class:"text-muted-foreground"},"Interval:",-1)),e.createElementVNode("span",D,e.toDisplayString(n.interval)+" min",1)]),e.createElementVNode("div",null,[t[9]||(t[9]=e.createElementVNode("span",{class:"text-muted-foreground"},"Schedule:",-1)),e.createElementVNode("span",j,e.toDisplayString(y(n)),1)])])]),e.createVNode(m,{size:"sm",variant:"ghost",onClick:t[1]||(t[1]=U=>o.$router.push(e.unref(r)(`/edit/${e.unref(s).id}/resources`)))},{default:e.withCtx(()=>[t[10]||(t[10]=e.createTextVNode(" Edit ",-1)),e.createVNode(e.unref(l.ArrowRight),{class:"w-4 h-4 ml-1"})]),_:1})])]),_:2},1024))),128))])])):(e.openBlock(),e.createBlock(V,{key:1,class:"p-8 text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",q,[e.createElementVNode("div",L,[e.createVNode(e.unref(l.Users),{class:"w-8 h-8 text-muted-foreground"})]),t[12]||(t[12]=e.createElementVNode("div",null,[e.createElementVNode("h3",{class:"text-lg font-medium mb-2"},"No Resources Yet"),e.createElementVNode("p",{class:"text-sm text-muted-foreground max-w-md"}," Create resources (staff members, rooms, or equipment) to define when and how appointments can be booked. ")],-1)),e.createVNode(m,{onClick:t[2]||(t[2]=n=>o.$router.push(e.unref(r)(`/edit/${e.unref(s).id}/resources`)))},{default:e.withCtx(()=>[e.createVNode(e.unref(l.Users),{class:"w-4 h-4 mr-2"}),t[11]||(t[11]=e.createTextVNode(" Create First Resource ",-1))]),_:1})])]),_:1}))])),e.createElementVNode("div",z,[e.createElementVNode("h3",O,[e.createVNode(e.unref(l.Clock),{class:"w-4 h-4"}),t[13]||(t[13]=e.createTextVNode(" Quick Setup Guide ",-1))]),e.createElementVNode("ol",F,[e.createElementVNode("li",null,[t[15]||(t[15]=e.createElementVNode("strong",null,"Create resources",-1)),t[16]||(t[16]=e.createTextVNode(" in the ",-1)),e.createVNode(d,{to:e.unref(r)(`/edit/${e.unref(s).id}/resources`),class:"underline font-medium"},{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createTextVNode(" Resource Management ",-1)])]),_:1},8,["to"]),t[17]||(t[17]=e.createTextVNode(" section with their operating hours and booking intervals ",-1))]),e.createElementVNode("li",null,[t[19]||(t[19]=e.createElementVNode("strong",null,"Configure service durations",-1)),t[20]||(t[20]=e.createTextVNode(" in ",-1)),e.createVNode(d,{to:e.unref(r)(`/edit/${e.unref(s).id}/payment`),class:"underline font-medium"},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode(" Payment Settings ",-1)])]),_:1},8,["to"])]),e.createElementVNode("li",null,[t[22]||(t[22]=e.createElementVNode("strong",null,"View the generated slots",-1)),t[23]||(t[23]=e.createTextVNode(" in the ",-1)),e.createVNode(d,{to:e.unref(r)(`/edit/${e.unref(s).id}/agenda`),class:"underline font-medium"},{default:e.withCtx(()=>[...t[21]||(t[21]=[e.createTextVNode(" Agenda ",-1)])]),_:1},8,["to"])]),e.createElementVNode("li",null,[t[25]||(t[25]=e.createElementVNode("strong",null,"Override specific dates",-1)),t[26]||(t[26]=e.createTextVNode(" if needed in ",-1)),e.createVNode(d,{to:e.unref(r)(`/edit/${e.unref(s).id}/exceptions`),class:"underline font-medium"},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode(" Override Slots ",-1)])]),_:1},8,["to"])])])])])]),_:1})}}});exports.default=I;
@@ -0,0 +1,222 @@
1
+ import { defineComponent as B, ref as _, computed as $, resolveComponent as a, openBlock as m, createBlock as w, withCtx as i, createElementVNode as t, createVNode as n, unref as s, createTextVNode as o, createElementBlock as c, Fragment as D, renderList as E, normalizeStyle as L, toDisplayString as p } from "vue";
2
+ import { _ as M } from "./EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs";
3
+ import { useModuleRoute as F, useModule as I, useFirebaseIntegration as O } from "@oneclick.dev/cms-kit";
4
+ import { Info as V, Users as b, ArrowRight as H, Clock as P } from "lucide-vue-next";
5
+ const q = { class: "max-w-3xl" }, U = { key: 0 }, W = {
6
+ key: 0,
7
+ class: "space-y-4"
8
+ }, Y = { class: "flex items-center justify-between" }, G = { class: "grid gap-3" }, Q = { class: "flex items-start gap-4" }, J = { class: "flex-1 min-w-0" }, K = { class: "font-medium" }, X = { class: "mt-2 grid grid-cols-3 gap-3 text-sm" }, Z = { class: "ml-1 font-medium" }, ee = { class: "ml-1 font-medium" }, te = { class: "ml-1 font-medium" }, se = { class: "flex flex-col items-center gap-4" }, ne = { class: "size-16 rounded-full bg-muted flex items-center justify-center" }, oe = {
9
+ key: 1,
10
+ class: "flex justify-center py-8"
11
+ }, ie = { class: "mt-8 p-4 rounded-lg bg-muted/50" }, le = { class: "text-sm font-medium mb-2 flex items-center gap-2" }, re = { class: "text-sm text-muted-foreground space-y-2 ml-6 list-decimal" }, ge = /* @__PURE__ */ B({
12
+ __name: "regular-slots",
13
+ setup(de) {
14
+ const { params: d, resolvePath: u } = F(), { config: k } = I(), R = O(k.project), v = _([]), C = _(!0), A = async () => {
15
+ try {
16
+ const l = await R.get(k.agendaCollection, d.value.id);
17
+ v.value = l.resources || [];
18
+ } catch (l) {
19
+ console.error("Error loading resources:", l);
20
+ } finally {
21
+ C.value = !1;
22
+ }
23
+ }, N = $(() => v.value.filter((l) => l.isActive)), T = $(() => v.value.length > 0), j = (l) => {
24
+ const f = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].filter((h, y) => l.openingHours?.[y]?.length > 0);
25
+ return f.length === 0 ? "No hours set" : f.length === 7 ? "Open all week" : f.join(", ");
26
+ };
27
+ return A(), (l, e) => {
28
+ const f = a("AlertTitle"), h = a("AlertDescription"), y = a("Alert"), x = a("Button"), S = a("Card"), z = a("Spinner"), g = a("NuxtLink");
29
+ return m(), w(M, null, {
30
+ default: i(() => [
31
+ t("div", q, [
32
+ e[27] || (e[27] = t("h1", { class: "text-lg font-medium mb-2" }, "Slot Configuration", -1)),
33
+ e[28] || (e[28] = t("p", { class: "mb-6 text-muted-foreground text-sm" }, " Time slots are now automatically generated based on your resources' operating hours, booking intervals, and service durations. ", -1)),
34
+ n(y, { class: "mb-6" }, {
35
+ default: i(() => [
36
+ n(s(V), { class: "h-4 w-4" }),
37
+ n(f, null, {
38
+ default: i(() => [...e[3] || (e[3] = [
39
+ o("How Dynamic Slots Work", -1)
40
+ ])]),
41
+ _: 1
42
+ }),
43
+ n(h, { class: "mt-2 space-y-2 text-sm" }, {
44
+ default: i(() => [...e[4] || (e[4] = [
45
+ t("p", null, [
46
+ t("strong", null, "1. Resources define operating hours:"),
47
+ o(" Each resource (staff, room, equipment) has its own schedule and booking interval (e.g., every 15 or 30 minutes). ")
48
+ ], -1),
49
+ t("p", null, [
50
+ t("strong", null, "2. Services define duration:"),
51
+ o(" In Payment Settings, each service specifies how long it takes (e.g., 30 min haircut, 60 min massage). ")
52
+ ], -1),
53
+ t("p", null, [
54
+ t("strong", null, "3. Slots are generated dynamically:"),
55
+ o(" The system creates available booking slots by combining resource availability with service duration, allowing multiple services to overlap within the resource's capacity. ")
56
+ ], -1)
57
+ ])]),
58
+ _: 1
59
+ })
60
+ ]),
61
+ _: 1
62
+ }),
63
+ C.value ? (m(), c("div", oe, [
64
+ n(z, { class: "w-6 h-6" })
65
+ ])) : (m(), c("div", U, [
66
+ T.value ? (m(), c("div", W, [
67
+ t("div", Y, [
68
+ e[6] || (e[6] = t("h2", { class: "text-base font-medium" }, "Your Resources", -1)),
69
+ n(x, {
70
+ size: "sm",
71
+ variant: "outline",
72
+ onClick: e[0] || (e[0] = (r) => l.$router.push(s(u)(`/edit/${s(d).id}/resources`)))
73
+ }, {
74
+ default: i(() => [
75
+ n(s(b), { class: "w-4 h-4 mr-2" }),
76
+ e[5] || (e[5] = o(" Manage Resources ", -1))
77
+ ]),
78
+ _: 1
79
+ })
80
+ ]),
81
+ t("div", G, [
82
+ (m(!0), c(D, null, E(N.value, (r) => (m(), w(S, {
83
+ key: r.id,
84
+ class: "p-4 hover:shadow-sm transition-shadow"
85
+ }, {
86
+ default: i(() => [
87
+ t("div", Q, [
88
+ t("div", {
89
+ class: "size-10 rounded-full flex items-center justify-center text-white text-sm font-medium flex-shrink-0",
90
+ style: L({ backgroundColor: r.color || "#6b7280" })
91
+ }, p(r.avatarLabel || r.name.charAt(0).toUpperCase()), 5),
92
+ t("div", J, [
93
+ t("h3", K, p(r.name), 1),
94
+ t("div", X, [
95
+ t("div", null, [
96
+ e[7] || (e[7] = t("span", { class: "text-muted-foreground" }, "Capacity:", -1)),
97
+ t("span", Z, p(r.capacity), 1)
98
+ ]),
99
+ t("div", null, [
100
+ e[8] || (e[8] = t("span", { class: "text-muted-foreground" }, "Interval:", -1)),
101
+ t("span", ee, p(r.interval) + " min", 1)
102
+ ]),
103
+ t("div", null, [
104
+ e[9] || (e[9] = t("span", { class: "text-muted-foreground" }, "Schedule:", -1)),
105
+ t("span", te, p(j(r)), 1)
106
+ ])
107
+ ])
108
+ ]),
109
+ n(x, {
110
+ size: "sm",
111
+ variant: "ghost",
112
+ onClick: e[1] || (e[1] = (ue) => l.$router.push(s(u)(`/edit/${s(d).id}/resources`)))
113
+ }, {
114
+ default: i(() => [
115
+ e[10] || (e[10] = o(" Edit ", -1)),
116
+ n(s(H), { class: "w-4 h-4 ml-1" })
117
+ ]),
118
+ _: 1
119
+ })
120
+ ])
121
+ ]),
122
+ _: 2
123
+ }, 1024))), 128))
124
+ ])
125
+ ])) : (m(), w(S, {
126
+ key: 1,
127
+ class: "p-8 text-center"
128
+ }, {
129
+ default: i(() => [
130
+ t("div", se, [
131
+ t("div", ne, [
132
+ n(s(b), { class: "w-8 h-8 text-muted-foreground" })
133
+ ]),
134
+ e[12] || (e[12] = t("div", null, [
135
+ t("h3", { class: "text-lg font-medium mb-2" }, "No Resources Yet"),
136
+ t("p", { class: "text-sm text-muted-foreground max-w-md" }, " Create resources (staff members, rooms, or equipment) to define when and how appointments can be booked. ")
137
+ ], -1)),
138
+ n(x, {
139
+ onClick: e[2] || (e[2] = (r) => l.$router.push(s(u)(`/edit/${s(d).id}/resources`)))
140
+ }, {
141
+ default: i(() => [
142
+ n(s(b), { class: "w-4 h-4 mr-2" }),
143
+ e[11] || (e[11] = o(" Create First Resource ", -1))
144
+ ]),
145
+ _: 1
146
+ })
147
+ ])
148
+ ]),
149
+ _: 1
150
+ }))
151
+ ])),
152
+ t("div", ie, [
153
+ t("h3", le, [
154
+ n(s(P), { class: "w-4 h-4" }),
155
+ e[13] || (e[13] = o(" Quick Setup Guide ", -1))
156
+ ]),
157
+ t("ol", re, [
158
+ t("li", null, [
159
+ e[15] || (e[15] = t("strong", null, "Create resources", -1)),
160
+ e[16] || (e[16] = o(" in the ", -1)),
161
+ n(g, {
162
+ to: s(u)(`/edit/${s(d).id}/resources`),
163
+ class: "underline font-medium"
164
+ }, {
165
+ default: i(() => [...e[14] || (e[14] = [
166
+ o(" Resource Management ", -1)
167
+ ])]),
168
+ _: 1
169
+ }, 8, ["to"]),
170
+ e[17] || (e[17] = o(" section with their operating hours and booking intervals ", -1))
171
+ ]),
172
+ t("li", null, [
173
+ e[19] || (e[19] = t("strong", null, "Configure service durations", -1)),
174
+ e[20] || (e[20] = o(" in ", -1)),
175
+ n(g, {
176
+ to: s(u)(`/edit/${s(d).id}/payment`),
177
+ class: "underline font-medium"
178
+ }, {
179
+ default: i(() => [...e[18] || (e[18] = [
180
+ o(" Payment Settings ", -1)
181
+ ])]),
182
+ _: 1
183
+ }, 8, ["to"])
184
+ ]),
185
+ t("li", null, [
186
+ e[22] || (e[22] = t("strong", null, "View the generated slots", -1)),
187
+ e[23] || (e[23] = o(" in the ", -1)),
188
+ n(g, {
189
+ to: s(u)(`/edit/${s(d).id}/agenda`),
190
+ class: "underline font-medium"
191
+ }, {
192
+ default: i(() => [...e[21] || (e[21] = [
193
+ o(" Agenda ", -1)
194
+ ])]),
195
+ _: 1
196
+ }, 8, ["to"])
197
+ ]),
198
+ t("li", null, [
199
+ e[25] || (e[25] = t("strong", null, "Override specific dates", -1)),
200
+ e[26] || (e[26] = o(" if needed in ", -1)),
201
+ n(g, {
202
+ to: s(u)(`/edit/${s(d).id}/exceptions`),
203
+ class: "underline font-medium"
204
+ }, {
205
+ default: i(() => [...e[24] || (e[24] = [
206
+ o(" Override Slots ", -1)
207
+ ])]),
208
+ _: 1
209
+ }, 8, ["to"])
210
+ ])
211
+ ])
212
+ ])
213
+ ])
214
+ ]),
215
+ _: 1
216
+ });
217
+ };
218
+ }
219
+ });
220
+ export {
221
+ ge as default
222
+ };