PageSourceSearch

https://naemo.ai/_next/static/chunks/9005.d611b3c53aadbab9.js

js naemo.ai collected 2026-10-02 01:15:49 UTC 4,686 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9005],{49005:function(e,a,n){n.r(a),n.d(a,{default:function(){return l}});var s=n(57437),i=n(2265);n(83079);var r=(0,n(12119).$)("27b4639806a1d1569c60ebe67b894bc778ad03f4"),t=n(50647),c=n.n(t);function l(e){let{detail:a,schoolClass:n,busy:t,onBusyChange:l,onComplete:d}=e,[u,o]=(0,i.useState)(""),[m,p]=(0,i.useState)(""),[h,v]=(0,i.useState)(null),[b,x]=(0,i.useState)(!1),[j,w]=(0,i.useState)(""),[N,f]=(0,i.useState)(null),[g,k]=(0,i.useState)(!1),[y,C]=(0,i.useState)(""),[S,I]=(0,i.useState)(!1),_=(0,i.useRef)(!1),q=(0,i.useId)(),E=S||t,R=()=>{f(null),k(!1),C("")};async function Y(e){if(!_.current&&!t&&("preview"!==e||h&&j)&&("confirm"!==e||N&&(!(N.preview.sameNameCount>0)||g))){_.current=!0,I(!0),l(!0),C("");try{let s={spaceId:a.space.id,classId:n.id,revision:n.revision,name:u.trim().normalize("NFC"),number:Number(m),studentId:"new"===j?null:j},i=await r("search"===e?{action:e,spaceId:a.space.id,name:u.trim()}:"preview"===e?{action:e,...s}:{action:e,...N.input,fingerprint:N.preview.fingerprint,distinctStudentConfirmed:g});if(!i.success){C(i.error),f(null),k(!1);return}let t=i.data;"candidates"===t.kind?(v(t.candidates),x(t.truncated),w(t.candidates.length?"":"new"),R()):"preview"===t.kind?(f({input:s,preview:t.preview}),k(!1)):"completed"===t.kind&&(o(""),p(""),v(null),f(null),w(""),k(!1),await d())}catch(e){C("결과를 확인하지 못했습니다. 학생 명단을 새로고침해 확인해 주세요.")}finally{_.current=!1,I(!1),l(!1)}}}return a.me.operator?(0,s.jsxs)("details",{className:c().yearSection,children:[(0,s.jsx)("summary",{children:"전입\xb7재등록 학생 추가"}),(0,s.jsx)("p",{className:c().note,children:"이 학교에 이전 기록이 있으면 해당 학생을 선택하세요. 기존 성적이 이어지며, 담임에게 배정된 학생 목록에도 표시됩니다."}),(0,s.jsxs)("form",{className:c().form,onSubmit:e=>{e.preventDefault(),Y("search")},children:[(0,s.jsxs)("label",{children:["추가할 학생 이름",(0,s.jsx)("input",{required:!0,maxLength:60,disabled:E,value:u,onChange:e=>{o(e.target.value),v(null),w(""),R()}})]}),(0,s.jsxs)("label",{children:["새 학급 번호",(0,s.jsx)("input",{type:"number",required:!0,min:1,max:999,disabled:E,value:m,onChange:e=>{p(e.target.value),R()}})]}),(0,s.jsx)("button",{className:c().secondary,disabled:E||!u.trim()||!m,children:"기존 기록 확인"})]}),y&&(0,s.jsx)("p",{role:"alert",className:c().error,children:y}),null!==h&&(0,s.jsxs)("div",{className:c().form,children:[h.length?(0,s.jsxs)("fieldset",{disabled:E,children:[(0,s.jsx)("legend",{children:"같은 이름의 학생 기록"}),h.map(e=>(0,s.jsxs)("label",{className:c().checkbox,children:[(0,s.jsx)("input",{type:"radio",name:q,value:e.id,disabled:e.active,checked:j===e.id,onChange:()=>{w(e.id),R()}}),(0,s.jsxs)("span",{children:[e.name," \xb7 ",e.previous?"".concat(e.previous.academicYear,"학년도 ").concat(e.previous.grade,"학년 ").concat(e.previous.classNum,"반 ").concat(e.previous.number,"번"):"학급 기록 없음",e.active?" (현재 재학 중)":" (이전 기록 연결)"]})]},e.id)),(0,s.jsxs)("label",{className:c().checkbox,children:[(0,s.jsx)("input",{type:"radio",name:q,checked:"new"===j,onChange:()=>{w("new"),R()}}),"목록의 학생과 다른 학생을 새로 등록"]})]}):(0,s.jsx)("p",{className:c().note,children:"같은 이름의 학교 기록이 없습니다. 새 학생으로 등록합니다."}),b&&(0,s.jsx)("p",{className:c().note,children:"같은 이름의 기록이 많아 50명까지 표시합니다. 찾는 학생이 없으면 기존 학교 학생 명단을 먼저 확인해 주세요."}),(0,s.jsx)("button",{type:"button",className:c().secondary,disabled:E||!j||!m,onClick:()=>void Y("preview"),children:"등록 내용 확인"})]}),N&&(0,s.jsxs)("div",{className:c().yearReview,children:[(0,s.jsx)("p",{children:(0,s.jsxs)("strong",{children:[N.preview.academicYear,"학년도 ",N.preview.grade,"학년 ",N.preview.classNum,"반 ",N.preview.number,"번 ",N.preview.name]})}),(0,s.jsx)("p",{children:N.preview.returning?"이전 학교 기록을 이 학생에게 이어 붙입니다.":"새 학생으로 학교 학생 명단에 등록합니다."}),N.preview.sameNameCount>0&&(0,s.jsxs)("label",{className:c().checkbox,children:[(0,s.jsx)("input",{type:"checkbox",disabled:E,checked:g,onChange:e=>k(e.target.checked)}),"같은 이름의 기존 학생 ",N.preview.sameNameCount,"명과 다른 학생임을 확인했습니다."]}),(0,s.jsx)("button",{type:"button",className:c().primary,disabled:E||N.preview.sameNameCount>0&&!g,onClick:()=>void Y("confirm"),children:"학생 등록"})]})]}):null}}}]);

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.