PageSourceSearch

https://seodoon-church-admin.web.app/assets/WorshipCommitteePage-BfMqZMi-.js

js seodoon-church-admin.web.app collected 2026-10-03 12:36:13 UTC 40,988 bytes, 1 lines download raw bytes

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.