PageSourceSearch

https://wedraw.kr/assets/CutGroupViewPage.D3gJa2-5.js

js wedraw.kr collected 2026-10-04 07:43:03 UTC 5,289 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-ui.BwPBmVwt.js";import{j as k,u as D,r}from"./vendor-react.kR8tqwKZ.js";import{d as L}from"./orderRequests.DIIsJx50.js";import{J as P}from"./processingFormatter.D21Evgig.js";import{P as p}from"./package.sYWGe6pn.js";import{L as C}from"./layers.BwH-iwOg.js";import{R as G}from"./ruler.dRRX-btz.js";import{W as I}from"./wrench.C5VYkIVS.js";import{S as R}from"./search.CoLV_vkF.js";import"./index.86ltQqcV.js";import"./vendor-three.C5-HLXBy.js";import"./vendor-utils.D2q0l15H.js";import"./packagingFeeCalculator.Ds_FKGKV.js";import"./woodCartConverter.CbGBTwwu.js";const B={"cut-general-wood":"일반목재","cut-coated-wood":"코팅합판"};function M(){const{orderId:c,groupType:n}=k(),u=D(),[l,g]=r.useState([]),[j,m]=r.useState(!0),[o,i]=r.useState(null),[b,f]=r.useState(""),[N,y]=r.useState("topping"),a=n==="cut-general-wood"||n==="cut-coated-wood"?n:null;r.useEffect(()=>{(async()=>{if(!c||!a){i("잘못된 URL입니다."),m(!1);return}try{const t=await L(c,a);t?(f(t.orderNumber),y(t.orderSource),g(t.woodItems)):i("주문을 찾을 수 없습니다.")}catch(t){console.error("[CutGroupViewPage] Error:",t),i("데이터를 불러오는 중 오류가 발생했습니다.")}finally{m(!1)}})()},[c,a]);const w=s=>{u(`/cut/item/${c}/${s}`)};if(j)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-amber-600 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-500",children:"목재 목록을 불러오는 중..."})]})});if(o)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 px-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx(p,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),e.jsx("h2",{className:"text-xl font-bold text-gray-800 mb-2",children:"오류"}),e.jsx("p",{className:"text-gray-500 mb-6",children:o}),e.jsx("button",{onClick:()=>window.history.back(),className:"px-4 py-2 bg-amber-600 text-white rounded-lg hover:bg-amber-700",children:"뒤로 가기"})]})});const v=a?B[a]:"목재";return e.jsxs("div",{className:"min-h-screen bg-gray-50",children:[e.jsx("header",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:e.jsxs("div",{className:"max-w-lg mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-lg font-bold text-gray-900",children:[v," 목록"]}),e.jsxs("p",{className:"text-sm text-gray-500",children:[N==="external"?"외부몰":"공홈",": ",b]})]}),e.jsxs("span",{className:"px-2 py-1 bg-amber-100 text-amber-800 text-sm font-medium rounded",children:[l.length,"건"]})]})}),e.jsx("main",{className:"max-w-lg mx-auto px-4 py-4",children:l.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(p,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),e.jsx("p",{className:"text-gray-500",children:"해당 그룹에 목재가 없습니다."})]}):e.jsx("div",{className:"space-y-3",children:l.map((s,t)=>e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 bg-gray-100 text-gray-600 text-xs font-medium rounded",children:["#",t+1]}),e.jsx("h3",{className:"font-bold text-gray-900",children:s.woodType||"목재"})]}),e.jsxs("span",{className:"text-sm font-medium text-white bg-black px-2 py-1 rounded",children:["수량 ",s.quantity,"개"]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(C,{className:"w-4 h-4 text-gray-400"}),e.jsx("span",{children:s.thickness||"-"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(G,{className:"w-4 h-4 text-gray-400"}),e.jsxs("span",{children:[s.width,"mm × ",s.length,"mm"]})]})]}),s.processing&&s.processing.length>0&&e.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[e.jsxs("div",{className:"flex items-center gap-1 mb-2",children:[e.jsx(I,{className:"w-4 h-4 text-[#36583D]"}),e.jsx("span",{className:"text-sm font-medium text-gray-700",children:"가공 옵션"})]}),e.jsx("div",{className:"space-y-2",children:s.processing.map((d,x)=>{const h=P(d);return e.jsxs("div",{className:"bg-[#EEF3E8] rounded-lg p-2",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-xs font-medium text-[#2b4731] bg-[#BDCF9B] px-1.5 py-0.5 rounded",children:x+1}),e.jsx("span",{className:"text-sm font-medium text-[#2b4731]",children:d.name})]}),h.length>0&&e.jsx("div",{className:"ml-6 text-xs text-[#2b4731] space-y-0.5",children:h.map((S,E)=>e.jsx("div",{className:"whitespace-pre-wrap",children:S},E))})]},x)})})]})]}),e.jsxs("button",{onClick:()=>w(s.id),className:"w-full flex items-center justify-center gap-2 py-3 bg-[#36583D] hover:bg-[#36583D] text-white font-medium transition-colors",children:[e.jsx(R,{className:"w-4 h-4"}),"3D 상세보기"]})]},s.id))})})]})}export{M 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.