PageSourceSearch

https://9oormthon.university/assets/ProviderPage-DGIbA3C8.js

js 9oormthon.university collected 2026-10-09 01:43:44 UTC 11,424 bytes, 1 lines download raw bytes

1import{p as e,q as o,S as D,U as F,ad as J,E as V,s as f,V as g,j as b,x as X,w as Y,z as Z,$ as ee,ac as te}from"./index-BWvEU_Q7.js";import{a as _,P as O}from"./position-D2JDXoTC.js";import{c as $,s as se}from"./ModalHeader-oIQw8MbL.js";import{i as z,l as ae}from"./ModalFooter-CxMTo_Kd.js";import{T as oe,a as re}from"./errorMessage-B2NMHqww.js";import{b as ne,r as ce,c as ie}from"./users-geByriL5.js";import{u as L}from"./usePeriod-Blj9AGo9.js";import{A as x,T as le}from"./TeamBuildingPhaseSelector-M5UTcjxm.js";import{r as S}from"./ControlCommonIcon-B-Z42MY_.js";import{I as de}from"./InformationModal-B3a3pxam.js";import{i as N}from"./Skeleton-Bjo4zOHb.js";import{s as l}from"./styles.module-GJokGfHh.js";import{a as me}from"./mockUtils-D86hxDT1.js";import{u as ye,a as he}from"./useTeamInfo-ChUDNk73.js";import{c as ue}from"./Alert-CQ6VCnYw.js";import{r as xe}from"./InfoCircleIcon-BPNPdQH6.js";import"./Fade-BFlyCT_Z.js";import"./ButtonToggleGroup-Bk04qsZF.js";import"./teams-BPWmK98s.js";const pe="_container_rinbf_1",je="_applyStatus_rinbf_25",be="_applyStatusHeader_rinbf_32",C={container:pe,applyStatus:je,applyStatusHeader:be},_e="_tableContainer_mdyq9_1",ge="_table_mdyq9_1",Ne="_row_mdyq9_94",fe="_actionButtons_mdyq9_98",ve="_modalReasonBody_mdyq9_104",Ce="_modalDecisionBody_mdyq9_111",Ie="_modalText_mdyq9_123",Se="_checkIcon_mdyq9_130",Ee="_warningIcon_mdyq9_135",Ae="_modalFooter_mdyq9_140",Be="_nameContainer_mdyq9_153",Re="_tableHeaderIcon_mdyq9_157",Te="_univ_mdyq9_164",n={tableContainer:_e,table:ge,row:Ne,actionButtons:fe,modalReasonBody:ve,modalDecisionBody:Ce,modalText:Ie,checkIcon:Se,warningIcon:Ee,modalFooter:Ae,nameContainer:Be,tableHeaderIcon:Re,univ:Te};function ke({applyInfo:t,toggle:s,isOpen:a}){return e.jsxs($,{type:"center",isOpen:a,toggle:s,children:[e.jsx(se,{toggle:s,children:e.jsx(o,{as:"h5",typography:"heading5",children:"지원 사유"})}),e.jsxs(z,{className:n.modalReasonBody,children:[e.jsx(o,{as:"p",typography:"body2",children:t.motivation}),e.jsxs(o,{as:"span",typography:"body3",color:"text-alternative",children:[t.name," / ",_(t.role)," / ",t.univ]})]})]})}const we=()=>{const t=D();return F({mutationFn:s=>ne(s),onSuccess:()=>{t.invalidateQueries({queryKey:["applyStatus"]})}})},Me=()=>{const t=D();return F({mutationFn:s=>ce(s),onSuccess:()=>{t.invalidateQueries({queryKey:["applyStatus"]})}})};function P({id:t,isOpen:s,toggle:a,name:c,decision:r}){const{mutate:d}=we(),{mutate:m}=Me(),p=()=>{r==="accept"?d(t,{onSuccess:()=>{a(),g("지원을 수락했습니다.",{type:"primary"})},onError:y=>{var i;a(),g(oe[(i=y.response.data.error)==null?void 0:i.code]||"지원 수락에 실패했습니다.",{type:"danger"})}}):m(t,{onSuccess:()=>{a(),g("지원을 거절했습니다.",{type:"primary"})},onError:y=>{var h;a();const i=((h=y.response.data.error)==null?void 0:h.message)||"지원 거절에 실패했습니다.";g(i,{type:"danger"})}})};return e.jsxs($,{type:"center",isOpen:s,toggle:a,children:[e.jsx(z,{children:e.jsxs("div",{className:n.modalDecisionBody,children:[r==="accept"?e.jsx(J,{className:n.checkIcon}):e.jsx(V,{className:n.warningIcon}),e.jsxs("div",{className:n.modalText,children:[e.jsxs(o,{as:"h5",typography:"heading5",color:"text-normal",children:[c,"님의 지원을 ",r==="accept"?"수락":"거절","하시겠어요?"]}),e.jsx(o,{as:"p",typography:"body2",color:"text-normal",children:"한 번 결정하면 다시 되돌리지 못해요."})]})]})}),e.jsxs(ae,{className:n.modalFooter,children:[e.jsx(f,{size:"lg",color:"secondary",onClick:a,children:"취소"}),e.jsx(f,{size:"lg",color:r==="accept"?"success":"danger",onClick:p,children:r==="accept"?"수락":"거절"})]})]})}function He({applicant:t}){const[s,a]=b.useState(!1),[c,r]=b.useState(!1),[d,m]=b.useState(!1),p=X(),y=()=>{p(`/user/${t.user.id}`)},{isApplyAblePeriod:i}=L();return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{className:n.row,children:[e.jsx("td",{children:e.jsxs(o,{typography:"body3",children:[t.preference,"지망"]})}),e.jsx("td",{children:e.jsx(f,{size:"sm",color:"secondary",onClick:()=>a(!0),children:"지원 사유 보기"})}),e.jsxs("td",{className:n.nameContainer,onClick:y,children:[e.jsx(o,{typography:"body3",children:t.user.name}),e.jsx(Y,{})]}),e.jsx("td",{children:e.jsx(o,{typography:"body3",children:_(t.role)})}),e.jsx("td",{children:e.jsx(o,{typography:"body3",className:n.univ,children:t.user.univ})}),e.jsxs("td",{className:n.actionButtons,children:[t.status==="WAITING"&&e.jsxs(e.Fragment,{children:[e.jsx(f,{size:"sm",color:"danger",onClick:()=>m(!0),disabled:i,children:"거절"}),e.jsx(f,{size:"sm",color:"success",onClick:()=>r(!0),disabled:i,children:"수락"})]}),t.status==="ACCEPTED"&&e.jsx(o,{typography:"subtitle1",color:x[t.status].color,children:x[t.status].text}),t.status==="REJECTED"&&e.jsx(o,{typography:"subtitle1",color:x[t.status].color,children:x[t.status].text}),t.status==="CONFIRMED"&&e.jsx(o,{typography:"subtitle1",color:x[t.status].color,children:x[t.status].text}),t.status==="ACCEPTED_NOT_JOINED"&&e.jsx(o,{typography:"subtitle1",color:x[t.status].color,children:x[t.status].text})]})]}),s&&e.jsx(ke,{isOpen:s,toggle:()=>a(!1),applyInfo:{id:t.id,motivation:t.motivation,name:t.user.name,role:t.role,univ:t.user.univ}}),c&&e.jsx(P,{id:t.id,isOpen:c,toggle:()=>r(!1),name:t.user.name,decision:"accept"}),d&&e.jsx(P,{id:t.id,isOpen:d,toggle:()=>m(!1),name:t.user.name,decision:"reject"})]})}function Oe({applicants:t,onSortChange:s}){return e.jsx("div",{className:n.tableContainer,children:e.jsxs("table",{className:n.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsxs("th",{children:[e.jsx(o,{typography:"subtitle1",color:"text-alternative",children:"지망"}),e.jsx(S,{className:n.tableHeaderIcon,onClick:()=>s("PREFERENCE")})]}),e.jsx("th",{children:e.jsx(o,{typography:"subtitle1",color:"text-alternative",children:"지원 사유"})}),e.jsx("th",{children:e.jsx(o,{typography:"subtitle1",color:"text-alternative",children:"이름"})}),e.jsxs("th",{children:[e.jsx(o,{typography:"subtitle1",color:"text-alternative",children:"파트"}),e.jsx(S,{className:n.tableHeaderIcon,onClick:()=>s("ROLE")})]}),e.jsxs("th",{children:[e.jsx(o,{typography:"subtitle1",color:"text-alternative",children:"대학명"}),e.jsx(S,{className:n.tableHeaderIcon,onClick:()=>s("UNIV")})]}),e.jsx("th",{})]})}),e.jsx("tbody",{children:t.map(a=>e.jsx(He,{applicant:a},a.id))})]})})}const Pe="_tableHeadItem_2zd6n_1",qe="_tableBodyItem_2zd6n_2",De="_tableHeadRow_2zd6n_10",Fe="_tableBodyRow_2zd6n_11",$e="_tableHead_2zd6n_1",ze="_tableBody_2zd6n_2",j={tableHeadItem:Pe,tableBodyItem:qe,tableHeadRow:De,tableBodyRow:Fe,tableHead:$e,tableBody:ze};function Le(){return e.jsxs("table",{children:[e.jsx("thead",{className:j.tableHead,children:e.jsxs("tr",{className:j.tableHeadRow,children:[e.jsx("th",{className:j.tableHeadItem,children:e.jsx(N,{width:"2rem",height:"1.2rem"})}),Array.from({length:5}).map((t,s)=>e.jsx("th",{className:j.tableHeadItem,children:e.jsx(N,{width:"3.5rem",height:"1.2rem"})},s))]})}
1),e.jsx("tbody",{className:j.tableBody,children:Array.from({length:15}).map((t,s)=>e.jsxs("tr",{className:j.tableBodyRow,children:[e.jsx("td",{className:j.tableBodyItem,children:e.jsx(N,{width:"2rem",height:"1.2rem"})}),Array.from({length:5}).map((a,c)=>e.jsx("td",{className:j.tableBodyItem,children:e.jsx(N,{width:"5rem",height:"1.2rem"})},c))]},s))})]})}const u=(t,s,a)=>{var m,p;const c=t.toLowerCase(),r=((m=s.role[c])==null?void 0:m.max_count)||0,d=((p=s.role[c])==null?void 0:p.current_count)||0;if(a){const y=(a==null?void 0:a.filter(i=>i.role===t&&i.status===x.ACCEPTED.key).length)||0;return Math.max(0,r-d-y)}else return r-d};function Ge({teamInfo:t,applies:s}){const a=Z();return t?a==="xs"||a==="sm"?e.jsxs("div",{className:`${l.acceptableWrap} ${l.acceptableWrapMobile}`,children:[e.jsxs("div",{className:l.acceptableRow,children:[e.jsxs("div",{className:l.acceptableItem,children:[e.jsx(o,{as:"span",typography:"subtitle1",color:"text-normal",children:_("PM")}),e.jsxs(o,{as:"span",typography:"body2",color:u("PM",t,s)>0?"text-primary":"text-hint",children:[u("PM",t,s),"명 수락 가능"]})]}),e.jsx("div",{className:l.line}),e.jsxs("div",{className:l.acceptableItem,children:[e.jsx(o,{as:"span",typography:"subtitle1",color:"text-normal",children:_("PD")}),e.jsxs(o,{as:"span",typography:"body2",color:u("PD",t,s)>0?"text-primary":"text-hint",children:[u("PD",t,s),"명 수락 가능"]})]})]}),e.jsxs("div",{className:l.acceptableRow,children:[e.jsxs("div",{className:l.acceptableItem,children:[e.jsx(o,{as:"span",typography:"subtitle1",color:"text-normal",children:_("FE")}),e.jsxs(o,{as:"span",typography:"body2",color:u("FE",t,s)>0?"text-primary":"text-hint",children:[u("FE",t,s),"명 수락 가능"]})]}),e.jsx("div",{className:l.line}),e.jsxs("div",{className:l.acceptableItem,children:[e.jsx(o,{as:"span",typography:"subtitle1",color:"text-normal",children:_("BE")}),e.jsxs(o,{as:"span",typography:"body2",color:u("BE",t,s)>0?"text-primary":"text-hint",children:[u("BE",t,s),"명 수락 가능"]})]})]})]}):e.jsx("div",{className:l.acceptableWrap,children:Object.values(O).map((r,d)=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:l.acceptableItem,children:[e.jsx(o,{as:"span",typography:"subtitle1",color:"text-normal",children:_(r.key)},r.key),e.jsxs(o,{as:"span",typography:"body2",color:u(r.key,t,s)>0?"text-primary":"text-hint",children:[u(r.key,t,s),"명 수락 가능"]},r.key)]},r.key),d!==Object.values(O).length-1&&e.jsx("div",{className:l.line})]}))}):null}const q=(t,s,a)=>ee({queryKey:["applyStatus",t,s??void 0,a??void 0],queryFn:te(()=>ie(t,s,a),me(t,s,a)),staleTime:6e4});function dt(){var T;const{periodData:t,PHASE_INFO:s,currentPhase:a,isLoading:c}=L(),[r,d]=b.useState(a?a-1:0),[m,p]=b.useState(void 0),[y,i]=b.useState(void 0),{data:h,isLoading:E}=q(r+1,m,y),{data:I}=q(a,m,y),{mutate:G}=ye(),{data:A,isLoading:K}=he(),[B,Q]=b.useState(!1),R=()=>Q(!B),U=()=>{G({onSuccess:()=>{g("팀 빌딩이 확정되었습니다.",{type:"primary"}),R()},onError:v=>{var w,M,H;const k=(H=(M=(w=v.response)==null?void 0:w.data)==null?void 0:M.error)==null?void 0:H.code;k&&g(re[k]||"팀 빌딩 확정에 실패했습니다.",{type:"danger"})}})};b.useEffect(()=>{d(a?a-1:0)},[a]);const W=v=>{m!==v?(p(v),i("ASC")):i(y==="ASC"?"DESC":"ASC")};return e.jsxs("div",{className:C.container,children:[!c&&e.jsx(ue,{leftIcon:xe,style:{margin:0},children:s[t.current_period]}),e.jsxs("div",{className:C.applyStatus,children:[e.jsxs("div",{className:C.applyStatusHeader,children:[e.jsx(o,{as:"h3",typography:"heading3",color:"text-normal",children:"지원 현황"}),e.jsxs(o,{as:"h4",typography:"heading4",color:"text-primary",children:[h==null?void 0:h.counts,"명"]})]}),K?e.jsx(N,{width:"32rem",height:"3rem"}):A&&e.jsx(Ge,{teamInfo:A,applies:(I==null?void 0:I.applies)||[]}),E?e.jsx(N,{width:"23.4375rem",height:"3rem"}):e.jsx(le,{onPhaseChange:d,activeIndex:r}),E?e.jsx(Le,{}):((T=h==null?void 0:h.applies)==null?void 0:T.length)>0?e.jsx(Oe,{applicants:h.applies,onSortChange:W}):e.jsx("div",{className:C.noApplyStatus,children:e.jsx(o,{as:"p",typography:"body2",color:"text-hint",children:"지원자가 없습니다."})})]}),e.jsx(de,{isOpen:B,toggle:R,title:"팀 빌딩을 확정할까요?",description:"한번 결정하면 다시 되돌리지 못해요.",cancelLabel:"취소",confirmLabel:"확정",onConfirm:U,isPrimary:!0,confirmButtonColor:"primary"})]})}
1export{dt 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.