1import{b as ce,c as z,d as q,j as e,u as U,w as ae,r as ie}from"./vendor-data-Z5doMMu-.js";import{r as j}from"./vendor-react-zNM0AU50.js";import{l as de,q as R,w as y,x as _,m as E,T as K,k as M,u as W,z as O,H as J,y as xe,j as me}from"./vendor-firebase-Da9KY1q_.js";import{d as T}from"./index-D1K3lVhu.js";import{D as he,a8 as ue,c as pe,U as ge,b6 as V,b7 as Z,x as be,z as b,aa as X,ae as P,X as B,T as ee}from"./vendor-ui-CW5bJ11U.js";import"./vendor-charts-08G1rM8P.js";const f=r=>de(T,"churches",r,"worship_committees"),N={async getWorshipCommittees(r,l){try{const s=f(r),t=R(s,y("type","==","worship"),y("year","==",l),_("month","asc"),_("day","asc"));return(await E(t)).docs.map(c=>{var n,a,i,d;return{id:c.id,...c.data(),createdAt:(a=(n=c.data().createdAt)==null?void 0:n.toDate)==null?void 0:a.call(n),updatedAt:(d=(i=c.data().updatedAt)==null?void 0:i.toDate)==null?void 0:d.call(i)}})}catch(s){throw console.error("ìë°°ìì ëª©ë¡ ì¡°í ì¤í¨:",s),s}},async getUsherCommittees(r,l){try{const s=f(r),t=R(s,y("type","==","usher"),y("year","==",l),_("month","asc"),_("serviceNumber","asc"));return(await E(t)).docs.map(c=>{var n,a,i,d;return{id:c.id,...c.data(),createdAt:(a=(n=c.data().createdAt)==null?void 0:n.toDate)==null?void 0:a.call(n),updatedAt:(d=(i=c.data().updatedAt)==null?void 0:i.toDate)==null?void 0:d.call(i)}})}catch(s){throw console.error("ìë´ìì ëª©ë¡ ì¡°í ì¤í¨:",s),s}},async getCommittee(r,l){var s,t,o,c;try{const n=M(T,"churches",r,"worship_committees",l),a=await me(n);return a.exists()?{id:a.id,...a.data(),createdAt:(t=(s=a.data().createdAt)==null?void 0:s.toDate)==null?void 0:t.call(s),updatedAt:(c=(o=a.data().updatedAt)==null?void 0:o.toDate)==null?void 0:c.call(o)}:null}catch(n){throw console.error("ìì ì¡°í ì¤í¨:",n),n}},async saveWorshipCommittee(r,l){try{const s=K.now(),{id:t,createdAt:o,updatedAt:c,...n}=l;if(t){const a=M(T,"churches",r,"worship_committees",t);return await W(a,{...n,updatedAt:s}),t}else{const a=f(r),i=R(a,y("type","==","worship"),y("year","==",n.year),y("month","==",n.month),y("day","==",n.day)),d=await E(i);if(d.empty)return(await O(a,{...n,createdAt:s,updatedAt:s})).id;{const g=d.docs[0];return await W(g.ref,{...n,updatedAt:s}),g.id}}}catch(s){throw console.error("ìë°°ìì ì ì¥ ì¤í¨:",s),s}},async saveUsherCommittee(r,l){try{const s=K.now(),{id:t,createdAt:o,updatedAt:c,...n}=l;if(t){const a=M(T,"churches",r,"worship_committees",t);return await W(a,{...n,updatedAt:s}),t}else{const a=f(r),i=R(a,y("type","==","usher"),y("year","==",n.year),y("month","==",n.month),y("serviceNumber","==",n.serviceNumber)),d=await E(i);if(d.empty){const g=f(r);return(await O(g,{...n,createdAt:s,updatedAt:s})).id}else{const g=d.docs[0];return await W(g.ref,{...n,updatedAt:s}),g.id}}}catch(s){throw console.error("ìë´ìì ì ì¥ ì¤í¨:",s),s}},async deleteCommittee(r,l){try{const s=M(T,"churches",r,"worship_committees",l);await xe(s)}catch(s){throw console.error("ìì ìì ì¤í¨:",s),s}},async bulkSaveWorshipCommittees(r,l){try{const s=J(T),t=K.now();for(const o of l){const c=M(f(r));s.set(c,{...o,createdAt:t,updatedAt:t})}await s.commit()}catch(s){throw console.error("ìë°°ìì ì¼ê´ ì ì¥ ì¤í¨:",s),s}},async bulkSaveUsherCommittees(r,l){try{const s=J(T),t=K.now();for(const o of l){const c=M(f(r));s.set(c,{...o,createdAt:t,updatedAt:t})}await s.commit()}catch(s){throw console.error("ìë´ìì ì¼ê´ ì ì¥ ì¤í¨:",s),s}},async deleteByYear(r,l,s){try{const t=f(r);let o=R(t,y("year","==",l));s&&(o=R(o,y("type","==",s)));const c=await E(o),n=J(T);c.docs.forEach(a=>{n.delete(a.ref)}),await n.commit()}catch(t){throw console.error("ì°ëë³ ë°ì´í° ìì ì¤í¨:",t),t}},async getUshersByMonth(r,l,s){try{const t=f(r),o=R(t,y("type","==","usher"),y("year","==",l),y("month","==",s),_("serviceNumber","asc"));return(await E(o)).docs.map(n=>{var a,i,d,g;return{id:n.id,...n.data(),createdAt:(i=(a=n.data().createdAt)==null?void 0:a.toDate)==null?void 0:i.call(a),updatedAt:(g=(d=n.data().updatedAt)==null?void 0:d.toDate)==null?void 0:g.call(d)}})}
1catch(t){throw console.error("ìë³ ìë´ìì ì¡°í ì¤í¨:",t),t}},async getParkingTeam(r,l){var s,t,o,c;try{const n=f(r),a=R(n,y("type","==","parking"),y("year","==",l)),i=await E(a);if(i.empty)return null;const d=i.docs[0];return{id:d.id,...d.data(),createdAt:(t=(s=d.data().createdAt)==null?void 0:s.toDate)==null?void 0:t.call(s),updatedAt:(c=(o=d.data().updatedAt)==null?void 0:o.toDate)==null?void 0:c.call(o)}}catch(n){throw console.error("주차ê´ë¦¬í ì¡°í ì¤í¨:",n),n}},async saveParkingTeam(r,l){try{const s=K.now(),{id:t,createdAt:o,updatedAt:c,...n}=l;if(t){const a=M(T,"churches",r,"worship_committees",t);return await W(a,{...n,updatedAt:s}),t}else{const a=f(r);return(await O(a,{...n,createdAt:s,updatedAt:s})).id}}catch(s){throw console.error("주차ê´ë¦¬í ì ì¥ ì¤í¨:",s),s}},async getKitchenTeams(r,l){try{const s=f(r),t=R(s,y("type","==","kitchen"),y("year","==",l),_("startMonth","asc"));return(await E(t)).docs.map(c=>{var n,a,i,d;return{id:c.id,...c.data(),createdAt:(a=(n=c.data().createdAt)==null?void 0:n.toDate)==null?void 0:a.call(n),updatedAt:(d=(i=c.data().updatedAt)==null?void 0:i.toDate)==null?void 0:d.call(i)}})}catch(s){throw console.error("주방ë´ì¬í ì¡°í ì¤í¨:",s),s}},async saveKitchenTeam(r,l){try{const s=K.now(),{id:t,createdAt:o,updatedAt:c,...n}=l;if(t){const a=M(T,"churches",r,"worship_committees",t);return await W(a,{...n,updatedAt:s}),t}else{const a=f(r);return(await O(a,{...n,createdAt:s,updatedAt:s})).id}}catch(s){throw console.error("주방ë´ì¬í ì ì¥ ì¤í¨:",s),s}},async getWorshipByMonth(r,l,s){try{const t=f(r),o=R(t,y("type","==","worship"),y("year","==",l),y("month","==",s),_("day","asc"));return(await E(o)).docs.map(n=>{var a,i,d,g;return{id:n.id,...n.data(),createdAt:(i=(a=n.data().createdAt)==null?void 0:a.toDate)==null?void 0:i.call(a),updatedAt:(g=(d=n.data().updatedAt)==null?void 0:d.toDate)==null?void 0:g.call(d)}})}catch(t){throw console.error("ìë³ ìë°°ìì ì¡°í ì¤í¨:",t),t}}},v="seodoon-church",Q=[1,2,3,4,5,6,7,8,9,10,11,12],ye=[2025,2026,2027,2028,2029,2030];function je(r){const l=[];for(let o=1;o<=12;o++){const c=new Date(r,o,0);for(let n=1;n<=c.getDate();n++)new Date(r,o-1,n).getDay()===0&&l.push({ì:o,ì¼:n,"1ë¶":"","2ë¶":"","3ë¶":"",êµííì¬:"",ì¤í기ë:""})}const s=U.json_to_sheet(l),t=U.book_new();U.book_append_sheet(t,s,"ìë°°ìì"),s["!cols"]=[{wch:5},{wch:5},{wch:12},{wch:12},{wch:12},{wch:20},{wch:12}],ae(t,`ìë°°ìì_${r}ë
_ìì.xlsx`),b.success("ìë°°ìì ììì´ ë¤ì´ë¡ëëììµëë¤")}function fe(r){const l=[];for(let o=1;o<=12;o++)for(let c=1;c<=3;c++)l.push({ì:o,ë¶:c,ìë´ìì1:"",ìë´ìì2:"",ìë´ìì3:"",ìë´ìì4:"",ìë´ìì5:"",íê¸ìì:"",ë´ë¹:c===2?"":"-"});const s=U.json_to_sheet(l),t=U.book_new();U.book_append_sheet(t,s,"ìë´ìì"),s["!cols"]=[{wch:5},{wch:5},{wch:10},{wch:10},{wch:10},{wch:10},{wch:10},{wch:10},{wch:10}],ae(t,`ìë´ìì_${r}ë
_ìì.xlsx`),b.success("ìë´ìì ììì´ ë¤ì´ë¡ëëììµëë¤")}function Ne(r,l){return r.filter(s=>s.ì&&s.ì¼).map(s=>({year:l,month:Number(s.ì),day:Number(s.ì¼),type:"worship",service1:String(s["1ë¶"]||"").trim(),service2:String(s["2ë¶"]||"").trim(),service3:String(s["3ë¶"]||"").trim(),event:String(s.êµííì¬||"").trim(),afternoonPrayer:String(s.ì¤í기ë||"").trim()})).filter(s=>s.service1||s.service2||s.service3)}function ve(r,l){return r.filter(s=>s.ì&&s.ë¶).map(s=>{const t=[];for(let o=1;o<=5;o++){const c=String(s[`ìë´ìì${o}`]||"").trim();c&&t.push(c)}return{year:l,month:Number(s.ì),type:"usher",serviceNumber:Number(s.ë¶),ushers:t,offeringCollector:String(s.íê¸ìì||"").trim(),coordinator:s.ë´ë¹==="-"?"":String(s.ë´ë¹||"").trim()}}).filter(s=>s.ushers&&s.ushers.length>0)}function Pe(){const r=ce(),[l,s]=j.useState("worship"),[t,o]=j.useState(new Date().getFullYear()),[c,n]=j.useState(null),[a,i]=j.useState(!1),d=j.useRef(null),{data:g=[],isLoading:S}=z({queryKey:["worship-committees",t],queryFn:()=>N.getWorshipCommittees(v,t),enabled:l==="worship"}),{data:k=[],isLoading:C}=z({queryKey:["usher-committees",t],queryFn:()=>N.getUsherCommittees(v,t),enabled:l==="usher"}),{data:m,isLoading:h}=z({queryKey:["parking-team",t],queryFn:()=>N.getParkingTeam(v,t),enabled:l==="parking"}),{data:A=[],isLoading:D}=z({queryKey:["kitchen-teams",t],queryFn:()=>N.getKitchenTeams(v,t),enabled:l==="kitchen"}),L=q({mutationFn:async p=>{if(p.type==="worship")for(const w of p.items)await N.saveWorshipCommittee(v,w);else for(const w of p.items)await N.saveUsherCommittee(v,w)},onSuccess:()=>{b.success("ìì
ë°ì´í°ê° ì ì¥ëììµëë¤"),r.invalidateQueries({queryKey:["worship-committees",t]}),r.invalidateQueries({queryKey:["usher-committees",t]})},onError:p=>{console.error("ì ì¥ ì¤í¨:",p),b.error("ì ì¥ì ì¤í¨íìµëë¤")}}
1),$=async p=>{var se;const w=(se=p.target.files)==null?void 0:se[0];if(w){i(!0);try{const I=new FileReader;I.onload=async ne=>{var te;try{const G=new Uint8Array((te=ne.target)==null?void 0:te.result),re=ie(G,{type:"array"}),le=re.SheetNames[0],oe=re.Sheets[le],H=U.sheet_to_json(oe);if(H.length===0){b.error("ìì
íì¼ì ë°ì´í°ê° ììµëë¤"),i(!1);return}const Y=H[0];let F;if("1ë¶"in Y||"ì¼"in Y){if(F=Ne(H,t),F.length===0){b.error("ë´ë¹ìê° ì
ë ¥ë íì´ ììµëë¤"),i(!1);return}await L.mutateAsync({type:"worship",items:F})}else if("ìë´ìì1"in Y||"ë¶"in Y){if(F=ve(H,t),F.length===0){b.error("ìë´ììì´ ì
ë ¥ë íì´ ììµëë¤"),i(!1);return}await L.mutateAsync({type:"usher",items:F})}else b.error("ì¬ë°ë¥¸ ììì ìì
íì¼ì´ ìëëë¤")}catch(G){console.error("íì± ìë¬:",G),b.error("ìì
íì¼ ì²ë¦¬ ì¤ ì¤ë¥ê° ë°ìíìµëë¤")}finally{i(!1),d.current&&(d.current.value="")}},I.readAsArrayBuffer(w)}catch(I){console.error("íì¼ ì½ê¸° ìë¬:",I),b.error("íì¼ì ì½ë ì¤ ì¤ë¥ê° ë°ìíìµëë¤"),i(!1)}}},x=j.useMemo(()=>c===null?g:g.filter(p=>p.month===c),[g,c]),u=j.useMemo(()=>c===null?k:k.filter(p=>p.month===c),[k,c]);return e.jsxs("div",{className:"p-6 max-w-7xl mx-auto",children:[e.jsxs("div",{className:"mb-6 flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"ìë°°/ë´ì¬ìì ê´ë¦¬"}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"주ì¼ìë°° ìë°°ìì, ìë´ìì, 주차ê´ë¦¬í, 주방ë´ì¬íì ê´ë¦¬í©ëë¤"})]}),(l==="worship"||l==="usher")&&e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>l==="worship"?je(t):fe(t),className:"flex items-center gap-2 px-4 py-2 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 transition-colors",children:[e.jsx(he,{className:"w-4 h-4"}),"ìì ë¤ì´ë¡ë"]}),e.jsxs("label",{className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors cursor-pointer",children:[e.jsx(ue,{className:"w-4 h-4"}),a?"ì
ë¡ë ì¤...":"ìì
ì
ë¡ë",e.jsx("input",{ref:d,type:"file",accept:".xlsx,.xls",onChange:$,disabled:a,className:"hidden"})]})]})]}),e.jsxs("div",{className:"flex gap-2 mb-6 flex-wrap",children:[e.jsxs("button",{onClick:()=>s("worship"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${l==="worship"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[e.jsx(pe,{className:"w-4 h-4 inline-block mr-2"}),"ìë°°ìì"]}),e.jsxs("button",{onClick:()=>s("usher"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${l==="usher"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[e.jsx(ge,{className:"w-4 h-4 inline-block mr-2"}),"ìë´ìì"]}),e.jsxs("button",{onClick:()=>s("parking"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${l==="parking"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[e.jsx(V,{className:"w-4 h-4 inline-block mr-2"}),"주차ê´ë¦¬í"]}),e.jsxs("button",{onClick:()=>s("kitchen"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${l==="kitchen"?"bg-orange-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[e.jsx(Z,{className:"w-4 h-4 inline-block mr-2"}),"주방ë´ì¬í"]})]}),e.jsxs("div",{className:"flex gap-4 mb-6 items-center",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-gray-700",children:"ì°ë"}),e.jsx("select",{value:t,onChange:p=>o(Number(p.target.value)),className:"px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500",children:ye.map(p=>e.jsxs("option",{value:p,children:[p,"ë
"]},p))})]}),(l==="worship"||l==="usher")&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-gray-700",children:"ì"}),e.jsxs("select",{value:c??"",onChange:p=>n(p.target.value?Number(p.target.value):null),className:"px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500",children:[e.jsx("option",{value:"",children:"ì ì²´"}),Q.map(p=>e.jsxs("option",{value:p,children:[p,"ì"]},p))]})]})]}),(l==="worship"||l==="usher")&&e.jsx("div",{className:"mb-6 p-4 bg-blue-50 rounded-lg border border-blue-200",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(be,{className:"w-5 h-5 text-blue-600 mt-0.5"}),e.jsxs("div",{className:"text-sm text-blue-800",children:[e.jsx("p",{className:"font-medium mb-1",children:"ìì
ë¡ ì¼ê´ ì
ë ¥í기"}),e.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-blue-700",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"ìì ë¤ì´ë¡ë"})," ë²í¼ì í´ë¦íì¬ ",t,"ë
",l==="worship"?"ìë°°ìì":"ìë´ìì"," ììì ë°ìµëë¤"]}),e.jsx("li",{children:"ìì
íì¼ì ë´ë¹ì ì´ë¦ì ì
ë ¥í©ëë¤"}),e.jsxs("li",{children:[e.jsx("strong",{children:"ìì
ì
ë¡ë"}
1)," ë²í¼ì í´ë¦íì¬ ìì±í íì¼ì ì
ë¡ëí©ëë¤"]})]})]})]})}),l==="worship"?S?e.jsx("div",{className:"flex justify-center items-center h-64",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):e.jsx(we,{data:x,year:t,onRefresh:()=>r.invalidateQueries({queryKey:["worship-committees",t]})}):l==="usher"?C?e.jsx("div",{className:"flex justify-center items-center h-64",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):e.jsx(ke,{data:u,year:t,onRefresh:()=>r.invalidateQueries({queryKey:["usher-committees",t]})}):l==="parking"?h?e.jsx("div",{className:"flex justify-center items-center h-64",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):e.jsx(Ce,{data:m||null,year:t,onRefresh:()=>r.invalidateQueries({queryKey:["parking-team",t]})}):D?e.jsx("div",{className:"flex justify-center items-center h-64",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-orange-600"})}):e.jsx(Ae,{data:A,year:t,onRefresh:()=>r.invalidateQueries({queryKey:["kitchen-teams",t]})})]})}function we({data:r,year:l,onRefresh:s}){const[t,o]=j.useState(null),[c,n]=j.useState(!1),[a,i]=j.useState({year:l,month:new Date().getMonth()+1,day:1,type:"worship",service1:"",service2:"",service3:"",event:"",afternoonPrayer:""}),d=q({mutationFn:m=>N.saveWorshipCommittee(v,m),onSuccess:()=>{b.success("ì ì¥ëììµëë¤"),s(),o(null),n(!1),i({year:l,month:new Date().getMonth()+1,day:1,type:"worship",service1:"",service2:"",service3:"",event:"",afternoonPrayer:""})},onError:()=>{b.error("ì ì¥ì ì¤í¨íìµëë¤")}}),g=q({mutationFn:m=>N.deleteCommittee(v,m),onSuccess:()=>{b.success("ìì ëììµëë¤"),s()},onError:()=>{b.error("ìì ì ì¤í¨íìµëë¤")}}),S=m=>{d.mutate(m)},k=()=>{if(!a.service1&&!a.service2&&!a.service3){b.error("ë´ë¹ì를 ì
ë ¥í´ì£¼ì¸ì");return}d.mutate(a)},C=m=>{confirm("ìì íìê² ìµëê¹?")&&g.mutate(m)};return j.useMemo(()=>{const m={};return r.forEach(h=>{m[h.month]||(m[h.month]=[]),m[h.month].push(h)}),m},[r]),e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200",children:[e.jsxs("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:[e.jsx("h3",{className:"font-semibold text-gray-900",children:"ìë°°ìì 목ë¡"}),e.jsxs("button",{onClick:()=>n(!0),className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:[e.jsx(X,{className:"w-4 h-4"}),"ì¶ê°"]})]}),c&&e.jsx("div",{className:"p-4 bg-blue-50 border-b border-blue-100",children:e.jsxs("div",{className:"grid grid-cols-8 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"ì"}),e.jsx("select",{value:a.month,onChange:m=>i({...a,month:Number(m.target.value)}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",children:Q.map(m=>e.jsxs("option",{value:m,children:[m,"ì"]},m))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"ì¼"}),e.jsx("input",{type:"number",min:1,max:31,value:a.day,onChange:m=>i({...a,day:Number(m.target.value)}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"1ë¶"}),e.jsx("input",{type:"text",value:a.service1,onChange:m=>i({...a,service1:m.target.value}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",placeholder:"ë´ë¹ì"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"2ë¶"}),e.jsx("input",{type:"text",value:a.service2,onChange:m=>i({...a,service2:m.target.value}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",placeholder:"ë´ë¹ì"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"3ë¶"}),e.jsx("input",{type:"text",value:a.service3,onChange:m=>i({...a,service3:m.target.value}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",placeholder:"ë´ë¹ì"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"êµííì¬"}),e.jsx("input",{type:"text",value:a.event,onChange:m=>i({...a,event:m.target.value}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",placeholder:"íì¬ëª
"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"ì¤í기ë"}),e.jsx("input",{type:"text",value:a.afternoonPrayer,onChange:m=>i({...a,afternoonPrayer:m.target.value}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",placeholder:"기ëì"})]}),e.jsxs("div",{className:"flex items-end gap-2",children:[e.jsx("button",{onClick:k,disabled:d.isPending,className:"px-3 py-1.5 bg-blue-600 text-white rounded text-sm hover:bg-blue-700 disabled:opacity-50",children:e.jsx(P,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>n(!1),className:"px-3 py-1.5 bg-gray-200 text-gray-700 rounded text-sm hover:bg-gray-300",children:e.jsx(B,{className:"w-4 h-4"})})]})]})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-gray-50 text-left",children:[e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider",children:"ì/ì¼"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider",children:"1ë¶"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider",children:"2ë¶"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider",children:"3ë¶"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider",children:"êµííì¬"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider",children:"ì¤í기ë"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider w-24",children:"ì¡ì
"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-200",children:r.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"px-4 py-8 text-center text-gray-500",children:"ë°ì´í°ê° ììµëë¤. ìì 'ì¶ê°' ë²í¼ì ëë¬ ìë°°ììì ë±ë¡í´ì£¼ì¸ì."})}):r.map(m=>e.jsx("tr",{className:"hover:bg-gray-50",children:(t==null?void 0:t.id)===m.id?e.jsxs(e.Fragment,{children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("select",{value:t.month,onChange:h=>o({...t,month:Number(h.target.value)}),className:"w-16 px-1 py-1 border rounded text-sm",children:Q.map(h=>e.jsx("option",{value:h,children:h},h))}),e.jsx("input",{type:"number",min:1,max:31,value:t.day,onChange:h=>o({...t,day:Number(h.target.value)}),className:"w-12 px-1 py-1 border rounded text-sm"})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:t.service1,onChange:h=>o({...t,service1:h.target.value}),className:"w-full px-2 py-1 border rounded text-sm"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:t.service2,onChange:h=>o({...t,service2:h.target.value}),className:"w-full px-2 py-1 border rounded text-sm"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:t.service3,onChange:h=>o({...t,service3:h.target.value}),className:"w-full px-2 py-1 border rounded text-sm"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:t.event||"",onChange:h=>o({...t,event:h.target.value}),className:"w-full px-2 py-1 border rounded text-sm"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:t.afternoonPrayer||"",onChange:h=>o({...t,afternoonPrayer:h.target.value}),className:"w-full px-2 py-1 border rounded text-sm"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:()=>S(t),disabled:d.isPending,className:"p-1.5 text-blue-600 hover:bg-blue-50 rounded disabled:opacity-50",children:e.jsx(P,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>o(null),className:"p-1.5 text-gray-600 hover:bg-gray-100 rounded",children:e.jsx(B,{className:"w-4 h-4"})})]})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("td",{className:"px-4 py-3 text-sm font-medium text-gray-900",children:[m.month,"/",m.day]}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-700",children:m.service1}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-700",children:m.service2}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-700",children:m.service3}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-700",children:m.event||"-"}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-700",children:m.afternoonPrayer||"-"}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:()=>o(m),className:"p-1.5 text-gray-600 hover:bg-gray-100 rounded",children:e.jsx(P,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>C(m.id),disabled:g.isPending,className:"p-1.5 text-red-600 hover:bg-red-50 rounded disabled:opacity-50",children:e.jsx(ee,{className:"w-4 h-4"})})]})})]})},m.id))})]})})]})}function ke({data:r,year:l,onRefresh:s}
1){const[t,o]=j.useState(null),[c,n]=j.useState(!1),[a,i]=j.useState({year:l,month:new Date().getMonth()+1,type:"usher",serviceNumber:1,ushers:[],offeringCollector:"",coordinator:""}),[d,g]=j.useState(""),[S,k]=j.useState(""),C=q({mutationFn:x=>N.saveUsherCommittee(v,x),onSuccess:()=>{b.success("ì ì¥ëììµëë¤"),s(),o(null),n(!1),i({year:l,month:new Date().getMonth()+1,type:"usher",serviceNumber:1,ushers:[],offeringCollector:"",coordinator:""}),g("")},onError:()=>{b.error("ì ì¥ì ì¤í¨íìµëë¤")}}),m=q({mutationFn:x=>N.deleteCommittee(v,x),onSuccess:()=>{b.success("ìì ëììµëë¤"),s()},onError:()=>{b.error("ìì ì ì¤í¨íìµëë¤")}}),h=x=>{C.mutate(x)},A=()=>{var x;if(((x=a.ushers)==null?void 0:x.length)===0){b.error("ìë´ììì ì
ë ¥í´ì£¼ì¸ì");return}if(!a.offeringCollector){b.error("íê¸ììì ì
ë ¥í´ì£¼ì¸ì");return}C.mutate(a)},D=x=>{confirm("ìì íìê² ìµëê¹?")&&m.mutate(x)},L=(x=!1)=>{const u=x?S:d;u.trim()&&(x&&t?(o({...t,ushers:[...t.ushers,u.trim()]}),k("")):(i({...a,ushers:[...a.ushers||[],u.trim()]}),g("")))},$=(x,u=!1)=>{u&&t?o({...t,ushers:t.ushers.filter((p,w)=>w!==x)}):i({...a,ushers:(a.ushers||[]).filter((p,w)=>w!==x)})};return j.useMemo(()=>{const x={};return r.forEach(u=>{x[u.month]||(x[u.month]=[]),x[u.month].push(u)}),Object.keys(x).forEach(u=>{x[Number(u)].sort((p,w)=>p.serviceNumber-w.serviceNumber)}),x},[r]),e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200",children:[e.jsxs("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:[e.jsx("h3",{className:"font-semibold text-gray-900",children:"ìë´ìì 목ë¡"}),e.jsxs("button",{onClick:()=>n(!0),className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:[e.jsx(X,{className:"w-4 h-4"}),"ì¶ê°"]})]}),c&&e.jsxs("div",{className:"p-4 bg-blue-50 border-b border-blue-100",children:[e.jsxs("div",{className:"grid grid-cols-6 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"ì"}),e.jsx("select",{value:a.month,onChange:x=>i({...a,month:Number(x.target.value)}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",children:Q.map(x=>e.jsxs("option",{value:x,children:[x,"ì"]},x))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"ë¶"}),e.jsxs("select",{value:a.serviceNumber,onChange:x=>i({...a,serviceNumber:Number(x.target.value)}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",children:[e.jsx("option",{value:1,children:"1ë¶"}),e.jsx("option",{value:2,children:"2ë¶"}),e.jsx("option",{value:3,children:"3ë¶"})]})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"ìë´ìì"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("input",{type:"text",value:d,onChange:x=>g(x.target.value),onKeyPress:x=>x.key==="Enter"&&L(),className:"flex-1 px-2 py-1.5 border border-gray-300 rounded text-sm",placeholder:"ì´ë¦ ì
ë ¥ í Enter"}),e.jsx("button",{onClick:()=>L(),className:"px-2 py-1.5 bg-gray-200 text-gray-700 rounded text-sm hover:bg-gray-300",children:e.jsx(X,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:(a.ushers||[]).map((x,u)=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 text-blue-700 rounded text-xs",children:[x,e.jsx("button",{onClick:()=>$(u),className:"hover:text-blue-900",children:e.jsx(B,{className:"w-3 h-3"})})]},u))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"íê¸ìì"}),e.jsx("input",{type:"text",value:a.offeringCollector,onChange:x=>i({...a,offeringCollector:x.target.value}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",placeholder:"íê¸ìì"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"ë´ë¹ (2ë¶)"}),e.jsx("input",{type:"text",value:a.coordinator,onChange:x=>i({...a,coordinator:x.target.value}),className:"w-full px-2 py-1.5 border border-gray-300 rounded text-sm",placeholder:"ë´ë¹ì"})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 mt-3",children:[e.jsx("button",{onClick:A,disabled:C.isPending,className:"px-4 py-2 bg-blue-600 text-white rounded text-sm hover:bg-blue-700 disabled:opacity-50",children:"ì ì¥"}),e.jsx("button",{onClick:()=>{n(!1),g(""),i({year:l,month:new Date().getMonth()+1,type:"usher",serviceNumber:1,ushers:[],offeringCollector:"",coordinator:""})},className:"px-4 py-2 bg-gray-200 text-gray-700 rounded text-sm hover:bg-gray-300",children:"ì·¨ì"})]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-gray-50 text-left",children:[e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider w-20",children:"ì"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider w-20",children:"ë¶"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider",children:"ìë´ìì"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider w-28",children:"íê¸ìì"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider w-28",children:"ë´ë¹"}),e.jsx("th",{className:"px-4 py-3 text-xs font-semibold text-gray-600 uppercase tracking-wider w-24",children:"ì¡ì
"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-200",children:r.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-4 py-8 text-center text-gray-500",children:"ë°ì´í°ê° ììµëë¤. ìì 'ì¶ê°' ë²í¼ì ëë¬ ìë´ììì ë±ë¡í´ì£¼ì¸ì."})}):r.map(x=>e.jsx("tr",{className:"hover:bg-gray-50",children:(t==null?void 0:t.id)===x.id?e.jsxs(e.Fragment,{children:[e.jsx("td",{className:"px-4 py-3",children:e.jsx("select",{value:t.month,onChange:u=>o({...t,month:Number(u.target.value)}),className:"w-full px-1 py-1 border rounded text-sm",children:Q.map(u=>e.jsx("option",{value:u,children:u},u))})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("select",{value:t.serviceNumber,onChange:u=>o({...t,serviceNumber:Number(u.target.value)}),className:"w-full px-1 py-1 border rounded text-sm",children:[e.jsx("option",{value:1,children:"1ë¶"}),e.jsx("option",{value:2,children:"2ë¶"}),e.jsx("option",{value:3,children:"3ë¶"})]})}),e.jsxs("td",{className:"px-4 py-3",children:[e.jsxs("div",{className:"flex gap-1 mb-1",children:[e.jsx("input",{type:"text",value:S,onChange:u=>k(u.target.value),onKeyPress:u=>u.key==="Enter"&&L(!0),className:"flex-1 px-2 py-1 border rounded text-sm",placeholder:"ì´ë¦ ì
ë ¥"}),e.jsx("button",{onClick:()=>L(!0),className:"px-2 py-1 bg-gray-200 rounded text-sm",children:e.jsx(X,{className:"w-3 h-3"})})]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.ushers.map((u,p)=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 text-blue-700 rounded text-xs",children:[u,e.jsx("button",{onClick:()=>$(p,!0),children:e.jsx(B,{className:"w-3 h-3"})})]},p))})]}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:t.offeringCollector,onChange:u=>o({...t,offeringCollector:u.target.value}),className:"w-full px-2 py-1 border rounded text-sm"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:t.coordinator||"",onChange:u=>
1o({...t,coordinator:u.target.value}),className:"w-full px-2 py-1 border rounded text-sm"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:()=>h(t),disabled:C.isPending,className:"p-1.5 text-blue-600 hover:bg-blue-50 rounded disabled:opacity-50",children:e.jsx(P,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>{o(null),k("")},className:"p-1.5 text-gray-600 hover:bg-gray-100 rounded",children:e.jsx(B,{className:"w-4 h-4"})})]})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("td",{className:"px-4 py-3 text-sm font-medium text-gray-900",children:[x.month,"ì"]}),e.jsxs("td",{className:"px-4 py-3 text-sm text-gray-700",children:[x.serviceNumber,"ë¶"]}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:x.ushers.map((u,p)=>e.jsx("span",{className:"inline-block px-2 py-0.5 bg-gray-100 text-gray-700 rounded text-xs",children:u},p))})}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-700",children:x.offeringCollector}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-700",children:x.coordinator||"-"}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:()=>o(x),className:"p-1.5 text-gray-600 hover:bg-gray-100 rounded",children:e.jsx(P,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>D(x.id),disabled:m.isPending,className:"p-1.5 text-red-600 hover:bg-red-50 rounded disabled:opacity-50",children:e.jsx(ee,{className:"w-4 h-4"})})]})})]})},x.id))})]})})]})}function Ce({data:r,year:l,onRefresh:s}){var i;const[t,o]=j.useState(!1),[c,n]=j.useState({teamLeader:(r==null?void 0:r.teamLeader)||"",teamLeaderTitle:(r==null?void 0:r.teamLeaderTitle)||"",members:((i=r==null?void 0:r.members)==null?void 0:i.join(", "))||""});j.useEffect(()=>{var d;n({teamLeader:(r==null?void 0:r.teamLeader)||"",teamLeaderTitle:(r==null?void 0:r.teamLeaderTitle)||"",members:((d=r==null?void 0:r.members)==null?void 0:d.join(", "))||""})},[r]);const a=q({mutationFn:()=>{const d=c.members.split(/[,ï¼]/).map(g=>g.trim()).filter(Boolean);return N.saveParkingTeam(v,{id:(r==null?void 0:r.id)||"",type:"parking",year:l,teamLeader:c.teamLeader,teamLeaderTitle:c.teamLeaderTitle,members:d})},onSuccess:()=>{b.success("ì ì¥ëììµëë¤"),s(),o(!1)},onError:()=>b.error("ì ì¥ì ì¤í¨íìµëë¤")});return e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200",children:[e.jsxs("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:[e.jsxs("h3",{className:"font-semibold text-gray-900 flex items-center gap-2",children:[e.jsx(V,{className:"w-5 h-5 text-blue-600"}),"주차ê´ë¦¬í (",l,"ë
)"]}),e.jsx("button",{onClick:()=>o(!t),className:`px-4 py-2 rounded-lg font-medium transition-colors ${t?"bg-gray-200 text-gray-700":"bg-blue-600 text-white hover:bg-blue-700"}`,children:t?"ì·¨ì":r?"ìì ":"ë±ë¡"})]}),e.jsx("div",{className:"p-6",children:t?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"íì¥"}
1),e.jsx("input",{type:"text",value:c.teamLeader,onChange:d=>n({...c,teamLeader:d.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg",placeholder:"íì¥ ì´ë¦"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"ì§ë¶"}),e.jsx("input",{type:"text",value:c.teamLeaderTitle,onChange:d=>n({...c,teamLeaderTitle:d.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg",placeholder:"ì: ììì§ì¬"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"íì (ì¼íë¡ êµ¬ë¶)"}),e.jsx("input",{type:"text",value:c.members,onChange:d=>n({...c,members:d.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg",placeholder:"í길ë, ê¹ì² ì, ì´ìí¬"})]}),e.jsxs("button",{onClick:()=>a.mutate(),disabled:a.isPending,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50",children:[e.jsx(P,{className:"w-4 h-4"}),a.isPending?"ì ì¥ ì¤...":"ì ì¥"]})]}):r?e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 p-4 bg-blue-50 rounded-lg",children:[e.jsx("div",{className:"text-sm text-blue-600 mb-1",children:"íì¥"}),e.jsxs("div",{className:"text-lg font-bold text-blue-900",children:[r.teamLeader," ",r.teamLeaderTitle]})]}),e.jsxs("div",{className:"text-sm font-medium text-gray-700 mb-2",children:["íì (",r.members.length,"ëª
)"]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:r.members.map((d,g)=>e.jsx("span",{className:"px-3 py-1.5 bg-blue-50 text-blue-700 rounded-lg text-sm font-medium",children:d},g))})]}):e.jsxs("div",{className:"text-center py-12 text-gray-400",children:[e.jsx(V,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),e.jsxs("p",{children:[l,"ë
주차ê´ë¦¬í ë°ì´í°ê° ììµëë¤"]}),e.jsx("button",{onClick:()=>o(!0),className:"mt-3 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:"ë±ë¡í기"})]})})]})}function Ae({data:r,year:l,onRefresh:s}){var C,m;const[t,o]=j.useState(null),[c,n]=j.useState({}),a=q({mutationFn:h=>N.saveKitchenTeam(v,h),onSuccess:()=>{b.success("ì ì¥ëììµëë¤"),s(),o(null)},onError:()=>b.error("ì ì¥ì ì¤í¨íìµëë¤")}),i=q({mutationFn:h=>N.deleteCommittee(v,h),onSuccess:()=>{b.success("ìì ëììµëë¤"),s()},onError:()=>b.error("ìì ì ì¤í¨íìµëë¤")}),d=h=>{o(h.id),n({...h,weekdayTeam:h.weekdayTeam,sundayTeam:h.sundayTeam})},g=()=>{c&&a.mutate(c)},S=((C=r[0])==null?void 0:C.supervisor)||"",k=((m=r[0])==null?void 0:m.support)||"";return e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200",children:[e.jsx("div",{className:"p-4 border-b border-gray-200",children:e.jsxs("h3",{className:"font-semibold text-gray-900 flex items-center gap-2",children:[e.jsx(Z,{className:"w-5 h-5 text-orange-600"}),"주방ë´ì¬í (",l,"ë
)"]})}),e.jsxs("div",{className:"p-6",children:[S&&e.jsx("div",{className:"mb-6 p-4 bg-orange-50 rounded-lg border border-orange-200",children:e.jsxs("div",{className:"text-sm text-orange-700",children:[e.jsxs("div",{className:"mb-1",children:[e.jsx("strong",{children:"주ê´:"})," ",S]}),e.jsxs("div",{children:[e.jsx("strong",{children:"주방 ì§ì:"})," ",k]})]})}),r.length===0?e.jsxs("div",{className:"text-center py-12 text-gray-400",children:[e.jsx(Z,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),e.jsxs("p",{children:[l,"ë
주방ë´ì¬í ë°ì´í°ê° ììµëë¤"]})]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-gray-50 border-b border-gray-200",children:[e.jsx("th",{className:"px-4 py-3 text-left font-medium text-gray-600",children:"ìë³"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-gray-600",children:"ì£¼ì¤ ë´ì¬í"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-gray-600",children:"ì£¼ì¼ ë´ì¬í"}),e.jsx("th",{className:"px-4 py-3 text-center font-medium text-gray-600 w-24",children:"ê´ë¦¬"})]})}),e.jsx("tbody",{children:r.map(h=>e.jsx("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:t===h.id?e.jsxs(e.Fragment,{children:[e.jsxs("td",{className:"px-4 py-3 font-medium text-gray-900",children:[h.startMonth,"-",h.endMonth,"ì"]}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:(c.weekdayTeam||[]).join(", "),onChange:A=>n({...c,weekdayTeam:A.target.value.split(/[,ï¼]/).map(D=>
1D.trim()).filter(Boolean)}),className:"w-full px-2 py-1 border border-gray-300 rounded text-sm"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:(c.sundayTeam||[]).join(", "),onChange:A=>n({...c,sundayTeam:A.target.value.split(/[,ï¼]/).map(D=>D.trim()).filter(Boolean)}),className:"w-full px-2 py-1 border border-gray-300 rounded text-sm"})}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsxs("div",{className:"flex justify-center gap-1",children:[e.jsx("button",{onClick:g,className:"p-1.5 text-green-600 hover:bg-green-50 rounded",children:e.jsx(P,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>o(null),className:"p-1.5 text-gray-600 hover:bg-gray-100 rounded",children:e.jsx(B,{className:"w-4 h-4"})})]})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("td",{className:"px-4 py-3 font-medium text-gray-900",children:[h.startMonth,"-",h.endMonth,"ì"]}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:h.weekdayTeam.map((A,D)=>e.jsx("span",{className:"px-2 py-0.5 bg-amber-50 text-amber-700 rounded text-xs",children:A},D))})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:h.sundayTeam.map((A,D)=>e.jsx("span",{className:"px-2 py-0.5 bg-orange-50 text-orange-700 rounded text-xs",children:A},D))})}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsxs("div",{className:"flex justify-center gap-1",children:[e.jsx("button",{onClick:()=>d(h),className:"p-1.5 text-blue-600 hover:bg-blue-50 rounded",children:e.jsx(P,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>{confirm("ìì íìê² ìµëê¹?")&&i.mutate(h.id)},className:"p-1.5 text-red-600 hover:bg-red-50 rounded",children:e.jsx(ee,{className:"w-4 h-4"})})]})})]})},h.id))})]})})]})]})}export{Pe as WorshipCommitteePage,Pe 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.