PageSourceSearch

https://www.superschool.link/assets/RPPFDetailPage-Do17S2pw.js

js superschool.link collected 2026-10-02 15:46:38 UTC 7,941 bytes, 3 lines download raw bytes

1import{u as K,r as f,k as Q,j as e}from"./vendor-react-wpXF2Dvf.js";import{b4 as X,I as T,S as _}from"./superschool-sdk-B9p352qX.js";import{r as Y,u as Z,ae as p,T as a}from"./main-C1IJdISs.js";import{A as ee}from"./AlertV2-DYSJJNVm.js";import{B as D}from"./BadgeV2-D3jKhdtt.js";import{B as se}from"./Breadcrumb-Dsp9wx3i.js";import{I as M}from"./IBBlank-CM8Ysbas.js";import{T as te}from"./TextareaV2-B3Z0eTl2.js";import{I as re}from"./IbEeRPPF-sc69S2C_.js";import{F as le}from"./Feedback-BfkDtnkk.js";import{I as ie}from"./IBLayout-BETspvJ4.js";import{u as ae}from"./ib-deadline-DBLYEg2f.js";import{u as oe}from"./ib-rppf-create-BRb7h257.js";import{u as ne}from"./ib-rppf-findId-HYJoGdqK.js";import{a as ce}from"./proposalStatus-oWBbc7_0.js";import{G as de}from"./GuideCard-D5qzgmfI.js";import"./vendor-query-fYiNqPbw.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-pdf-C3KUfZHm.js";import"./superschool-ui-ijQK0qhP.js";import"./vendor-radix-DCMKLCCS.js";import"./vendor-recharts-ecE23-P5.js";import"./vendor-tiptap-cyOKIKhB.js";import"./vendor-i18n-BUJziXlB.js";import"./SolidSVGIcon-DlyVDH1H.js";import"./SVGIcon-B16yl3ht.js";import"./ib-feedback-CFRDFWAM.js";import"./responseIBDtoStatus-iucJdVs-.js";function ke(){var E,R;const A=Y(),g=K(),S=(E=g.state)==null?void 0:E.title,l=(R=g.state)==null?void 0:R.data,{me:w}=Z(),[x,h]=f.useState(!1),{id:o,rppfId:j}=Q(),{data:r,isLoading:W,refetch:L}=ne(Number(o),Number(j)),{deadline:c}=ae({type:"IB_EE",model:"RPPF"}),{createIBRPPF:k,isLoading:y}=oe({onSuccess:()=>{P(`RPPF가
2수정되었습니다`)},onError:s=>{console.error("RPPF 생성 중 오류 발생:",s)}}),[b,P]=f.useState(null),[d,N]=f.useState(!1),[v,C]=f.useState([]),z=()=>{P(`RPPF가
3저장되었습니다`),h(!x),L()};f.useEffect(()=>{if(r!=null&&r.contents){const s=r.contents.map(t=>Number(t.wordCount)||0);C(s)}},[r]);const O=(s,t)=>{C(n=>{const i=[...n];return i[s]=t,i})},{register:F,handleSubmit:$,reset:q}=X({defaultValues:{contents:(r==null?void 0:r.contents.map(s=>({id:s.id,sequence:s.sequence,text:s.text||"",wordCount:Number(s.wordCount)||0})))||[]}}),V=()=>{N(!0),q(r)},G=s=>{if(y)return;const t=s.contents.map((i,m)=>({...i,id:i.id,sequence:m+1,wordCount:v[m]})).filter(i=>i.text&&i.text.trim()!==""),n={...s,contents:t};o!==void 0&&k({ibId:Number(o),data:n}),N(!d)};return w===void 0?e.jsx(M,{}):e.jsxs("div",{children:[(W||y)&&e.jsx(M,{}),e.jsx(ie,{topContent:e.jsx("div",{children:e.jsx("div",{className:"w-full pt-16 pb-6",children:e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsxs("div",{className:"flex w-full flex-row items-center justify-between",children:[e.jsxs("div",{className:"flex flex-row gap-1",children:[e.jsx(D,{color:"dark_green",size:24,type:"solid_strong",className:"self-start px-[12.5px]",children:"EE"}),e.jsx(D,{color:"gray",size:24,type:"solid_regular",className:"self-start",children:"RPPF"})]}),e.jsx(se,{data:{진행상태:"/portal/student/ib",EE:`/portal/student/ib/ee/${o}`,"RPPF 상세":`/portal/student/ib/ee/${o}/rppf/${j}`}})]}),e.jsx(a,{variant:"heading",className:"w-[692px] overflow-hidden text-ellipsis whitespace-nowrap",children:S})]})})}),bottomContent:e.jsx("div",{className:"flex grow flex-col",children:e.jsxs("div",{className:"flex h-full flex-row gap-4 py-6",children:[e.jsxs("div",{className:"flex w-[848px] flex-col justify-between rounded-xl bg-white p-6",children:[d?e.jsx(e.Fragment,{children:e.jsx("form",{children:e.jsxs("div",{className:"scroll-box flex h-full flex-col gap-6 overflow-auto pt-4",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsx(a,{variant:"title1",children:"공식 RPPF"}),e.jsxs("div",{className:"text-12 flex flex-row items-center",children:[e.jsx("p",{className:"text-gray-500",children:"총 단어 수"})," ",e.jsx("p",{className:"text-primary-800 font-medium",children:v.reduce((s,t)=>s+t,0)})]})]}),e.jsx("div",{className:"flex flex-col",children:r==null?void 0:r.contents.map((s,t)=>e.jsxs("div",{className:_("flex flex-col gap-4",{"pt-6":t===0,"py-10":t===1,"pb-10":t===2}),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(a,{variant:"title2",children:["RPPF ",s.sequence,"차"]}),e.jsxs(a,{variant:"caption",className:"text-gray-500",children:["최초 저장일 : ",T(new Date(s.createdAt),"yyyy.MM.dd")]})]}),e.jsx("input",{type:"hidden",value:Number(s.id),...F(`contents.${t}.id`,{valueAsNumber:!0})}),e.jsx(te,{showWordCount:!0,onWordCountChange:n=>O(t,n),value:s.text,placeholder:"내용을 입력해주세요.",className:"h-[308px]",...F(`contents.${t}.text`)})]},s.id))})]})})}):e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsx(a,{variant:"title1",children:"공식 RPPF"}),e.jsxs("div",{className:"text-12 flex flex-row items-center",children:[e.jsx("p",{className:"text-gray-500",children:"총 단어 수"})," ",e.jsx("p",{className:"text-primary-800 font-medium",children:v.reduce((s,t)=>s+t,0)})]})]}),e.jsx("div",{className:"flex flex-col",children:r==null?void 0:r.contents.map((s,t)=>e.jsxs("div",{className:_("flex flex-col gap-4",{"pt-6":t===0,"py-10":t===1,"pb-10":t===2}),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(a,{variant:"title2",children:["RPPF ",s.sequence,"차"]}),e.jsxs(a,{variant:"caption",className:"text-gray-500",children:["최초 저장일 : ",T(new Date(s.createdAt),"yyyy.MM.dd")]})]}
3),e.jsxs("div",{className:"flex flex-col gap-4 rounded-lg border border-gray-200 p-4",children:[e.jsx(a,{variant:"body2",children:s.text}),e.jsxs("div",{className:"text-12 flex flex-row items-center",children:[e.jsx("p",{className:"text-gray-500",children:"단어 수"})," ",e.jsx("p",{className:"text-primary-800 font-medium",children:s.wordCount})]})]})]},s.id))})]}),e.jsx("footer",{className:"flex flex-row items-center justify-between",children:d?e.jsxs(e.Fragment,{children:[e.jsx(p,{size:40,variant:"solid",color:"gray100",onClick:()=>N(!d),children:"취소"}),e.jsx(p,{size:40,variant:"solid",color:"orange100",onClick:$(G),children:"저장하기"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-row items-center gap-2",children:(l==null?void 0:l.status)!=="COMPLETE"&&e.jsx(p,{size:40,variant:"outline",color:"gray400",onClick:V,disabled:["WAIT_PLAN_APPROVE","WAIT_COMPLETE"].includes(l==null?void 0:l.status),children:"수정"})}),e.jsx(p,{size:40,variant:"solid",color:"gray100",onClick:()=>A.push(`/portal/student/ib/ee/${o}`,{type:"RPPF"}),children:"목록 돌아가기"})]})}),!d&&(l==null?void 0:l.status)&&(()=>{const s=ce(l.status);return s?e.jsx(de,{title:s.title,description:s.description,color:s.color,className:"mt-6"}):null})()]}),e.jsxs("div",{className:"flex h-[720px] w-[416px] flex-col gap-6 rounded-xl bg-white p-6",children:[e.jsx(a,{variant:"title1",children:"진행기록"}),e.jsx("div",{className:"h-full w-full",children:e.jsx(le,{referenceId:Number(j),referenceTable:"RPPF",user:w,useTextarea:(l==null?void 0:l.status)!=="COMPLETE"})})]})]})}),bottomBgColor:"bg-gray-50",floatingButton:!d&&(()=>{if((l==null?void 0:l.status)==="COMPLETE")return null;const s=new Date,t=m=>{const I=c==null?void 0:c.find(u=>u.type===m);if(!I)return!1;const B=c==null?void 0:c.find(u=>u.type===`EE_RPPF_${Number(m.split("_")[2])-1}`),H=s<=new Date(I.deadlineTime),U=B?s>new Date(B.deadlineTime):!0,J=!(r!=null&&r.contents.some(u=>u.sequence===Number(m.split("_")[2])));return H&&U&&J},n=t("EE_RPPF_2"),i=t("EE_RPPF_3");return n||i?e.jsx("div",{className:"flex w-full justify-center",children:e.jsx(p,{variant:"solid",color:"orange800",size:48,className:"w-[416px]",onClick:()=>h(!x),children:"작성하기"})}):null})()}),x&&e.jsx(re,{modalOpen:x,setModalClose:()=>h(!x),projectId:Number(o),RPPFData:r,onSuccess:()=>z()}),b&&e.jsx(ee,{message:b,confirmText:"확인",onConfirm:()=>P(null)})]})}export{ke 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.