PageSourceSearch

https://mooi-gastehu-c9hqbwbn.manus.space/assets/AdminCalendar-CeoQpyI0.js

js mooi-gastehu-c9hqbwbn.manus.space collected 2026-10-03 05:03:48 UTC 4,005 bytes, 1 lines download raw bytes

1import{a as k,j as e}from"./data-vendor-DEmh30qb.js";import{A as v}from"./AdminLayout-Bg_nfjzF.js";import{t as x}from"./index-42Y4XNQx.js";import{t as m,G as w,I as N,b as D}from"./ui-vendor-BLmTRyki.js";import{e as B,c as M,i as S,g as l}from"./calendarChannels-SkykVQam.js";import{a as p,e as O,s as h}from"./startOfMonth-ByIe8Gsy.js";import{f as u}from"./format-D3no_oSe.js";function $(n,c,d){return p(n,-1,d)}function L(){const[n,c]=k.useState(new Date),{data:d}=x.ical.allBlockedDates.useQuery(),{data:g,refetch:b}=x.bookings.list.useQuery(),f=t=>(d??[]).filter(s=>{const o=new Date(s.startDate),a=new Date(s.endDate);return t>=o&&t<a}),i=x.ical.syncNow.useMutation({onSuccess:t=>{m.success(`Sinkronisasie voltooi: ${t.eventsImported} geblokkeerde datums ingevoer`),b()},onError:()=>m.error("Sinkronisasie het misluk")}),C=B({start:h(n),end:O(n)}),A=h(n).getDay(),y=t=>(g??[]).filter(s=>{const o=new Date(s.checkIn),a=new Date(s.checkOut);return t>=o&&t<a});return e.jsx(v,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsx("div",{className:"flex flex-wrap gap-3",children:Object.entries(M).map(([t,s])=>e.jsxs("div",{className:"flex items-center gap-2 text-xs text-[#1B2A4A]/70",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:s.color}}),s.label]},t))}),e.jsxs("button",{onClick:()=>i.mutate(),disabled:i.isPending,className:"flex items-center gap-2 px-5 py-2.5 bg-[#1B2A4A] text-[#C9A84C] text-xs font-bold uppercase tracking-wider rounded-lg hover:bg-[#C9A84C] hover:text-[#1B2A4A] transition-colors disabled:opacity-60",children:[e.jsx(w,{size:14,className:i.isPending?"animate-spin":""}),i.isPending?"Sinkroniseer...":"Sinkroniseer Nou"]})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-sm border border-[#C9A84C]/10 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-[#C9A84C]/10 bg-[#1B2A4A]",children:[e.jsx("button",{onClick:()=>c($(n)),className:"p-2 text-white/60 hover:text-[#C9A84C] transition-colors rounded-lg hover:bg-white/10",children:e.jsx(N,{size:18})}),e.jsx("h2",{className:"font-serif text-xl text-white font-semibold",children:u(n,"MMMM yyyy")}),e.jsx("button",{onClick:()=>c(p(n,1)),className:"p-2 text-white/60 hover:text-[#C9A84C] transition-colors rounded-lg hover:bg-white/10",children:e.jsx(D,{size:18})})]}),e.jsx("div",{className:"grid grid-cols-7 border-b border-[#C9A84C]/10",children:["Son","Maa","Din","Woe","Don","Vry","Sat"].map(t=>e.jsx("div",{className:"py-3 text-center text-xs font-bold text-[#1B2A4A]/50 uppercase tracking-wider",children:t},t))}),e.jsxs("div",{className:"grid grid-cols-7",children:[Array.from({length:A}).map((t,s)=>e.jsx("div",{className:"min-h-[100px] border-r border-b border-[#C9A84C]/10 bg-[#FAF7F0]/50"},`empty-${s}`)),C.map(t=>{const s=f(t),o=y(t),a=S(t);return e.jsxs("div",{className:`min-h-[100px] border-r border-b border-[#C9A84C]/10 p-2 ${a?"bg-[#C9A84C]/10":"hover:bg-[#FAF7F0] transition-colors"}`,children:[e.jsx("span",{className:`inline-flex items-center justify-center w-7 h-7 rounded-full text-sm font-semibold mb-1 ${a?"bg-[#1B2A4A] text-[#C9A84C]":"text-[#1B2A4A]/70"}`,children:u(t,"d")}),e.jsxs("div",{className:"space-y-1",children:[o.slice(0,3).map(r=>e.jsx("div",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded text-white truncate",style:{backgroundColor:l(r.channel).color},title:`${r.bookingRef} (${l(r.channel).label})`,children:r.bookingRef},r.id)),s.slice(0,2).map((r,j)=>e.jsx("div",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded text-white truncate opacity-75",style:{backgroundColor:l(r.channel).color},title:`${r.summary??"OTA Block"} (${l(r.channel).label})`,children:r.summary?.slice(0,10)??"Geblokkeer"},`ota-${j}`)),o.length>3&&e.jsxs("p",{className:"text-[10px] text-[#1B2A4A]/40",children:["+",o.length-3," meer"]})]})]},t.toISOString())})]})]})]})})}export{L as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.