PageSourceSearch

https://9oormthon.university/assets/IdeaApply-C_1bNMiX.js

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

1import{$ as q,ac as A,U as I,I as M,j as c,x as S,S as N,p as e,q as P,s as E,V as Q}from"./index-BWvEU_Q7.js";import{F as $,T as K,R as L}from"./index-Dtkrj0oJ.js";import{B as T}from"./BackLinkNavigation-DVq90UeF.js";import{F as d}from"./FormField-DhHudv_g.js";import{b as V,c as w}from"./idea-Bqh5pVPx.js";import{u as f}from"./usePeriod-Blj9AGo9.js";import{c as B}from"./Alert-CQ6VCnYw.js";import{r as D}from"./InfoCircleIcon-BPNPdQH6.js";import"./position-D2JDXoTC.js";import"./Radio-qCjy9rjH.js";import"./Tooltip-CBgkcnUA.js";import"./Fade-BFlyCT_Z.js";import"./ChevronLeftOutlineIcon-62pBNaOH.js";const U="_container_1cg7i_1",z="_buttonAlign_1cg7i_20",G="_formContainer_1cg7i_25",H="_formFieldContainer_1cg7i_31",l={container:U,buttonAlign:z,formContainer:G,formFieldContainer:H},J=()=>{const{currentPhase:a}=f(),{data:t,isLoading:n,isFetched:r}=q({queryKey:["preferences",a],queryFn:A(()=>V(a)),select:o=>o.preferences,staleTime:60*1e3});return{data:t,isLoading:n,isFetched:r}},O=()=>I({mutationFn:({idea_id:a,phase:t,preference:n,motivation:r,role:o})=>w(a,t,n,r,o)});function de(){const{idea_id:a}=M(),[t,n]=c.useState(""),[r,o]=c.useState(""),[i,y]=c.useState(null),x=S(),{data:j}=J(),{currentPhase:v}=f(),[u,C]=c.useState(""),_=i!==null&&t.trim()!==""&&r!=="",{mutate:b}=O(),m=N(),F=s=>{o(s.target.id)},k=()=>{i!==null&&b({idea_id:a??"",phase:v,preference:i,motivation:t,role:r.toUpperCase()},{onSuccess:async()=>{await Promise.all([m.refetchQueries({queryKey:["ideas"]}),m.refetchQueries({queryKey:["user"]})]),x("/hackathon"),Q("아이디어 지원이 완료되었습니다.",{type:"primary"})},onError:s=>{var p,h,g;const R=((g=(h=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:h.error)==null?void 0:g.message)||"알 수 없는 오류가 발생하였습니다.";C(R)}})};return e.jsxs("div",{className:l.container,children:[e.jsx(T,{backLink:`/hackathon/detail/${a}`}),e.jsx(P,{as:"h4",typography:"heading4",color:"text-normal",children:"지원하기"}),e.jsxs("div",{className:l.formContainer,children:[e.jsxs("div",{className:l.formFieldContainer,children:[e.jsx(d,{label:"해당 아이디어는 몇 지망인가요?",required:!0,children:e.jsx($,{selectedValue:i?`${i}지망`:"",placeholder:"지망을 선택해주세요",options:(j??[]).map(s=>({id:s.number,name:`${s.number}지망`,disabled:!s.is_active})),onChange:s=>y(parseInt(s.target.value))})}),e.jsx(d,{label:"함께 하고 싶은 이유를 작성해주세요",required:!0,children:e.jsx(K,{placeholder:"250자 이내로 작성해주세요",value:t,onChange:s=>n(s.target.value)})}),e.jsx(d,{label:"본인 파트를 선택해주세요",required:!0,children:e.jsx(L,{value:r,onChange:F})}),u&&e.jsx(B,{color:"danger",leftIcon:D,fade:!0,children:u})]}),e.jsx("div",{className:l.buttonAlign,children:e.jsx(E,{size:"xl",color:"primary",disabled:!_,onClick:k,children:"지원하기"})})]})]})}export{de 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.