PageSourceSearch

https://withgoods.net/_next/static/chunks/pages/admin/order/manufacture-board-d2e7c17cdf22fc12.js

js withgoods.net collected 2026-10-08 12:19:00 UTC 56,816 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5148],{97069:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/order/manufacture-board",function(){return n(82222)}])},95451:function(e,t,n){"use strict";var a=n(52676),o=n(75271),s=n(76837),i=n(19551),l=n(47747),d=n(5079);t.Z=e=>{let[t,n]=o.useState(!0),[r,c]=o.useState(e.mainImage),getImagePath=e=>e?"".concat("https://cdn.withgoods.net","/").concat(e):"/img/300.png";return(0,a.jsx)("div",{children:(0,a.jsx)(s.Z,{open:t,onClose:()=>{n(!1),e.closeGallery()},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description",children:(0,a.jsx)(i.Z,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4,width:"50%",height:"100%"},children:(0,a.jsx)(l.Z,{dots:!0,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,dotsClass:"slick-dots slick-thumb",customPaging:function(t){return(0,a.jsx)("a",{style:{display:"inline-block",width:20},children:(0,a.jsx)(d.Z,{src:"https://cdn.withgoods.net/"+e.images[t],alt:"Image ".concat(t),height:150,width:150,style:{width:"100%",height:"100%",objectFit:"contain"}})})},children:e.images.map((e,t)=>(0,a.jsx)("div",{onClick:()=>{c(e)},children:(0,a.jsx)(d.Z,{src:getImagePath(e),alt:"Image ".concat(t),style:{width:"100%",height:"70vh",cursor:"pointer",objectFit:"contain"},width:1e3,height:700})},t))})})})})}},75495:function(e,t,n){"use strict";n.d(t,{CP:function(){return getCategories},Py:function(){return useGetCategories},bk:function(){return useRemoveBaseGood},eS:function(){return sortCategory},k4:function(){return createCategory},n3:function(){return getCategory},se:function(){return o},vq:function(){return useAddBaseGood},yr:function(){return updateCategory}});var a,o,s=n(35360),i=n(79155),l=n(21964),d=n(78554),r=n(91240);(a=o||(o={})).ShopCategories="shopCategories",a.MakerCategories="makerCategories",a.Category="category";let getCategory=e=>(0,d.BJ)({})(t=>{let{token:n,options:a}=t;return(0,i.a)(["category"],t=>(0,s.eE)(n).get("/api/admin/categories/".concat(e),{params:{scope:["deep","blog"]}}),{...a,enabled:!!e})}),getCategories=e=>(0,d.BJ)({})(t=>{let{token:n,options:a}=t;return(0,i.a)([o["shop"===e?"ShopCategories":"MakerCategories"]],t=>(0,s.eE)(n).get("/api/admin/categories",{params:{type:e,sortBy:"sorting_key",orderBy:"ASC"}}),a)}),updateCategory=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>{let{categoryId:n,data:a}=e;return(0,s.eE)(t).put("/api/admin/categories/".concat(n),a)},onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},sortCategory=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>{let{type:n,categoryId:a,data:o}=e;return(0,s.eE)(t).put("/api/admin/categories/".concat(a,"/sort"),{...o,type:n})},onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},createCategory=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>(0,s.eE)(t).post("/api/admin/categories",e),onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useAddBaseGood=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>{let{parentId:n,data:a}=e;return(0,s.eE)(t).put("/api/admin/categories/".concat(n,"/add-base-good"),a)},onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useRemoveBaseGood=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>{let{parentId:n,data:a}=e;return(0,s.eE)(t).put("/api/admin/categories/".concat(n,"/remove-base-good"),a)},onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useGetCategories=(e,t)=>r.Z.get("".concat("https://api.withgoods.net","/api/admin/categories").concat(e),{headers:{Authorization:"bearer ".concat(t)}})},21401:function(e,t,n){"use strict";n.d(t,{AY:function(){return useCancelPayment},ER:function(){return useInitializePayment},GZ:function(){return useUpdatePayment},LI:function(){return o},NR:function(){return useGetCoupons},Ow:function(){return useUpdateCard},Vj:function(){return useInitializeAdvancedPayment},W3:function(){return usePaymentsByPeriod},YY:function(){return useDeleteOrderOnPayment},_P:function(){return getPayments},eq:function(){return useCompletePaymentWithoutPG},hM:function(){return useCompletePaymentWithPG},mj:function(){return usePaymentTrackingInfo},nx:function(){return getPayment},q:function(){return useGetPaymentStates},sT:function(){return useCancelOrder},t0:function(){return useRevenuesByPeriod},tY:function(){return useUpdateOrderOnPayment},vl:function(){return useGetPaymentList}});var a,o,s=n(35360),i=n(79155),l=n(21964),d=n(78554),r=n(91240);(a=o||(o={})).UserPayments="userPayments",a.UserPayment="userPayment";let getPayments=e=>(0,d.BJ)({})(t=>{let{token:n,options:a}=t;return(0,i.a)(["userPayments",e],t=>(0,s.eE)(n).get("/api/payments",{params:e}),a)}
1),getPayment=(e,t,n)=>(0,d.BJ)({enabled:null==n||n})(n=>{let{token:a,options:o}=n;return(0,i.a)(["userPayment",t,e],t=>(0,s.eE)(a).get("/api/payments/".concat(t.queryKey[1]),{params:e}),o)}),useInitializePayment=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>(0,s.eE)(t).post("/api/payments",e),onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useInitializeAdvancedPayment=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>(0,s.eE)(t).post("/api/advance-pay"),onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useCompletePaymentWithPG=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>(0,s.eE)(t).put("/api/payments/complete",e),onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useCompletePaymentWithoutPG=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>(0,s.eE)(t).put("/api/payments/complete/without-pg",e),onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useUpdateOrderOnPayment=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>(0,s.eE)(t).put("/api/payments/".concat(e.paymentId,"/order/update"),e),onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useUpdatePayment=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>{let{paymentId:n,...a}=e;return(0,s.eE)(t).put("/api/payments/".concat(n),a)},onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useDeleteOrderOnPayment=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>(0,s.eE)(t).put("/api/payments/".concat(e.paymentId,"/order/delete"),e),onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useCancelPayment=e=>{let{onSuccess:t,onError:n,onSettled:a}=e;return(0,d.Q$)({onSuccess:t,onError:n,onSettled:a})(e=>{let{token:t,options:n}=e;return(0,l.D)({mutationFn:e=>{let{paymentId:n}=e;return(0,s.eE)(t).put("/api/payments/".concat(n,"/cancel-all"))},onSuccess:null==n?void 0:n.onSuccess,onError:null==n?void 0:n.onError,onSettled:null==n?void 0:n.onSettled})})},useGetPaymentList=(e,t)=>r.Z.get("".concat("https://api.withgoods.net","/api/admin/payments").concat(e),{headers:{Authorization:"bearer ".concat(t)}}),useGetCoupons=(e,t)=>r.Z.get("".concat("https://api.withgoods.net","/api/admin/coupons").concat(e),{headers:{Authorization:"bearer ".concat(t)}}),useGetPaymentStates=(e,t)=>r.Z.get("".concat("https://api.withgoods.net","/api/admin/statistics/payment-states"),{headers:{Authorization:"bearer ".concat(t)}}),usePaymentsByPeriod=(e,t)=>r.Z.get("".concat("https://api.withgoods.net","/api/admin/statistics/payments-by-period").concat(e),{headers:{Authorization:"bearer ".concat(t)}}),useRevenuesByPeriod=(e,t)=>r.Z.get("".concat("https://api.withgoods.net","/api/admin/statistics/revenues-by-period").concat(e),{headers:{Authorization:"bearer ".concat(t)}}),useUpdateCard=(e,t)=>r.Z.put("".concat("https://api.withgoods.net","/api/admin/payments/").concat(e.paymentId).concat(null==e?void 0:e.additionalPath),e,{headers:{Authorization:"bearer ".concat(t)}}),useCancelOrder=(e,t,n)=>r.Z.put("".concat("https://api.withgoods.net","/api/admin/payments/").concat(n,"/cancel-order"),e,{headers:{Authorization:"bearer ".concat(t)}}),usePaymentTrackingInfo=(e,t)=>r.Z.get("".concat("https://api.withgoods.net","/api/tracking/").concat(e),{headers:{Authorization:"bearer ".concat(t)}})},82222:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return manufacture_board}});var a=n(52676),o=n(54153),s=n(22654),i=n(75271),l=n(4322),d=n(19551),r=n(74923),c=n(6690),m=n(8771),u=n(73434),h=n(59428),p=n(902),v=n(95451),g=n(76837),x=n(25598),y=n(14781),j=n(30956),b=n(22519),f=n(67600),N=n(66189),S=n(82973),C=n(91240),_=n(37466),k=n(1368),Z=n(85615),w=n(21812),P=n(84099),I=n(31625),G=n(15596),O=n(5079),T=n(21401),E=n(71675),M=n(89931),B=n(57314),D=n(68228),A=n(52588),R=n(32574);let $lessThanToday=e=>{let t=new Date,n=new Date(e);return n<t},getImagePath=e=>e?"".concat("https://cdn.withgoods.net","/").concat(e):"/img/300.png",L={thumbnail:{width:100,height:100}},F=[{value:"06",label:"로젠택배"},{value:"01",label:"우체국택배"},{value:"04",label:"CJ대한통운"},{value:"C0",label:"퀵 배송"},{value:"C1",label:"직접 수령"}];var ManufactureBoardItem=e=>{var t,n,o,s,r,p,v,x,y,z,U,$,Q,q,H,W,Y,J,K,X,V,ee,et,en,ea,eo,es,ei,el,ed,er,ec;let $date=e=>{let t="",n="",a="",o="",s=new Date(e),i=s.getFullYear(),l=s.getMonth()+1;l<10&&(t="0".concat(l));let d=s.getDate();d<10&&(n="0".concat(d));let r=s.getHours();r<10&&(a="0".concat(r));let c=s.getMinutes();return c<10&&(o="0".concat(c)),c||(o="00"),"".concat(i,"-").concat(t,"-").concat(n," (").concat(a,":").concat(o,")")},[em,eu]=(0,i.useState)(!1);function closeMemoModel(){eu(!1)}let updateCard=async(t,n,a)=>{try{var o;let s=E.Z.getCurrentToken(),i=await (0,T.Ow)({paymentId:t,admin_memo:n,admin_memo_user:a,additionalPath:""},s);(null===(o=i.data)||void 0===o?void 0:o.message)==="OK"&&e.setPayments(e.payments.map(e=>e.id===t?{...e,admin_memo:n,admin_memo_user:a}:e))}catch(e){eb("메모 저장에 실패했습니다."),ey({open:!0,Transition:P.Z})}},handleMemoChange=(t,n)=>{e.setPayments(e.payments.map(a=>a.id===e.payment.id?{...a,[n]:t.target.value}:a))},handleMemoSave=()=>{closeMemoModel(),updateCard(e.payment.id,e.payment.admin_memo,e.payment.admin_memo_user)},[eh,ep]=(0,i.useState)(!1);function closeShippingTypeModel(){ep(!1)}let handleTrackingInvoiceChange=(t,n)=>{e.setPayments(e.payments.map(a=>a.id===e.payment.id?{...a,[n]:t.target.value}:a))},handleShippingTypeSave=async()=>{closeShippingTypeModel();try{let t=E.Z.getCurrentToken(),n={paymentId:e.payment.id,tracking_company_code:e.payment.tracking_company_code,tracking_invoice:e.payment.tracking_invoice,additionalPath:""};await (0,T.Ow)(n,t)}catch(e){eb("배송 정보 저장에 실패했습니다."),ey({open:!0,Transition:P.Z})}},shippingCompleted=(e,t)=>{switch(t){case"C0":case"C1":return!0;default:if(e&&t)return!0;return!1}},getIconClass=e=>"makingInProgress"===e.state?e.amount_manufactured===e.amount?"done":"makingInProgress":"makingComplete"===e.state?"done":"makingReady"===e.state?"makingReady":"makingComplete",downloadImage=async(e,t)=>{try{eg(!0);let n=new Date().getTime(),a="".concat("https://cdn.withgoods.net","/").concat(e,"?timestamp=").concat(n),o=await (0,C.Z)({url:a,method:"GET",responseType:"blob"});if(200===o.status&&o.data){let n=window.URL.createObjectURL(new Blob([o.data])),a=e.split(".").pop(),s=document.createElement("a");s.setAttribute("href",n),s.setAttribute("download","".concat(t||"downloaded_image",".").concat(a)),document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(n),eb("다운로드에 성공했습니다."),ey({open:!0,Transition:P.Z}),eg(!1)}else eb("다운로드에 실패했습니다."),ey({open:!0,Transition:P.Z}),eg(!1)}catch(e){eb("다운로드 중 오류가 발생했습니다."),ey({open:!0,Transition:P.Z}),eg(!1)}},getGoodPrintImages=async(e,t)=>{eg(!0);let n=E.Z.getCurrentToken(),a="&goodId=".concat(e.id,"&baseGoodOptionId=").concat(t.id,"&scope=deep"),o=await (0,R.lq)(a,n);return o.data.printImages},handleDownloadPrintImage=e=>{getGoodPrintImages(e.Good,e.BaseGoodOption).then(t=>{if(eg(!1),t&&t.length>0){var n,a,o,s,i,l;t.is_manually_uploaded?(eb("수동 업로드된 이미지를 다운로드합니다."),downloadImage(null===(n=t[0])||void 0===n?void 0:n.image_path,null==e?void 0:null===(o=e.Good)||void 0===o?void 0:null===(a=o.BaseGood)||void 0===a?void 0:a.name)):(eb("자동 생성된 이미지를 다운로드합니다."),downloadImage(null===(s=t[0])||void 0===s?void 0:s.image_path,null==e?void 0:null===(l=e.Good)||void 0===l?void 0:null===(i=l.BaseGood)||void 0===i?void 0:i.name))}else eb("이미지가 없습니다."),ey({open:!0,Transition:P.Z})})},isService=e=>{var t,n,a;let o=null==e?void 0:null===(t=e.Orders)||void 0===t?void 0:t.find(e=>{var t,n;return(null===(n=e.Good)||void 0===n?void 0:null===(t=n.BaseGood)||void 0===t?void 0:t.service)===!0});return o?{base_good_name:null===(a=o.Good)||void 0===a?void 0:null===(n=a.BaseGood)||void 0===n?void 0:n.name,option_name:o.option_name,amount:o.amount,customer_memo:e.customer_memo}:null},[ev,eg]=(0,i.useState)(!1),[ex,ey]=(0,i.useState)({open:!1,Transition:P.Z}),[ej,eb]=(0,i.useState)(""),handleCloseSnack=()=>{ey({open:!1,Transition:P.Z})};return(0,a.jsxs)(a.Fragment,{children:[ev&&(0,a.jsx)(D.Z,{sx:{color:"#fff",zIndex:2e3},open:ev,children:(0,a.jsx)(A.Z,{color:"inherit"})}),(0,a.jsx)(M.Z,{open:ex.open,onClose:handleCloseSnack,TransitionComponent:ex.Transition,message:ej,autoHideDuration:3e3,anchorOrigin:{vertical:"top",horizontal:"right"},style:{marginTop:40,fontWeight:700},action:(0,a.jsx)(i.Fragment,{children:(0,a.jsx)(b.Z,{onClick:handleCloseSnack,style:{cursor:"pointer"}})})},ex.Transition.name),(0,a.jsxs)("div",{className:"board-content-item",children:[(0,a.jsxs)("div",{className:"board-content-item-top",children:[(0,a.jsxs)("div",{className:"board-content-item-top-left",onClick:()=>{var t;return e.changeActive("".concat(null==e?void 0:null===(t=e.payment)||void 0===t?void 0:t.id,"-").concat(null==e?void 0:e.activeState))},children:[(0,a.jsxs)("p",{className:"id text-sm font-normal",children:[(0,a.jsx)("span",{className:"font-normal text-base",children:null==e?void 0:null===(t=e.payment)||void 0===t?void 0:t.id}),(0,a.jsx)(m.Z,{onClick:()=>void eu(!0),children:(0,a.jsx)(w.Z,{className:"".concat(e.payment.admin_memo?"text-yellow-500":"text-neutral-300"," text-lg")})})]}),e.payment.admin_memo&&(0,a.jsxs)("div",{className:"board-item-memo",onClick:()=>void eu(!0),children:[(0,a.jsxs)("div",{className:"left-memo",children:[(0,a.jsx)("span",{className:"text-sm",children:"어드민(관리) 메모:"}),(0,a.jsx)("span",{className:"text-sm font-bold",children:e.payment.admin_memo})]}),(0,a.jsxs)("div",{className:"flex items-start",children:[(0,a.jsx)("span",{className:"font-bold text-sm",children:" 작성자:\xa0"}),(0,a.jsx)("span",{className:"font-bold text-sm",children:e.payment.admin_memo_user})]})]}),(0,a.jsxs)("p",{className:"date",children:[(0,a.jsxs)("span",{className:"text-sm font-normal",children:[null==e?void 0:null===(n=e.payment)||void 0===n?void 0:n.created_at.split("T")[0]," (",(e=>{let t=new Date().getTime(),n=new Date(e).getTime(),a=Math.floor((t-n)/1e3),o=Math.floor(a/60),s=Math.floor(o/60),i=Math.floor(s/24),l=Math.floor(i/30),d=Math.floor(l/12);return d>0?"".concat(d,"년 전"):l>0?"".concat(l,"개월 전"):i>0?"".concat(i,"일 전"):s>0?"".concat(s,"시간 전"):o>0?"".concat(o,"분 전"):a>0?"".concat(a,"초 전"):"방금 전"})(null==e?void 0:null===(o=e.payment)||void 0===o?void 0:o.created_at),")"]}),((null===(s=e.payment)||void 0===s?void 0:s.state)==="makingInProgress"||(null===(r=e.payment)||void 0===r?void 0:r.state)==="makingReady"||(null===(p=e.payment)||void 0===p?void 0:p.state)==="makingComplete")&&(0,a.jsxs)("span",{className:"progress ml-2",children:["진행: ",null==(ea=e.payment)?void 0:null===(eo=ea.Orders)||void 0===eo?void 0:eo.reduce((e,t)=>
1e+t.amount_manufactured,0),"/",null==(es=e.payment)?void 0:null===(ei=es.Orders)||void 0===ei?void 0:ei.reduce((e,t)=>e+t.amount,0)]})]}),(0,a.jsx)("div",{className:"receiver",children:(0,a.jsxs)("span",{className:"text-sm font-normal",children:[null==e?void 0:null===(v=e.payment)||void 0===v?void 0:v.receiver_name," (",null==e?void 0:null===(x=e.payment)||void 0===x?void 0:x.phone_number,")"]})}),(0,a.jsx)("div",{className:"message",children:(0,a.jsxs)("span",{className:"text-sm font-normal",children:["배송메세지: ",(null==e?void 0:null===(y=e.payment)||void 0===y?void 0:y.shipping_message)?null==e?void 0:null===(z=e.payment)||void 0===z?void 0:z.shipping_message:"없음"]})}),isService(e.payment)&&(0,a.jsxs)("div",{className:"customer-memo-board",children:[(0,a.jsxs)("span",{className:"text-sm font-normal",children:[null===(U=isService(e.payment))||void 0===U?void 0:U.base_good_name,":"," ",(0,a.jsx)("b",{className:"font-bold",children:"".concat(null===($=isService(e.payment))||void 0===$?void 0:$.option_name," ").concat((null===(Q=isService(e.payment))||void 0===Q?void 0:Q.amount)!==1?"x ".concat(null===(q=isService(e.payment))||void 0===q?void 0:q.amount):"")})]}),(null===(H=isService(e.payment))||void 0===H?void 0:H.customer_memo)&&(null===(W=isService(e.payment))||void 0===W?void 0:W.customer_memo)!==""&&(0,a.jsxs)("span",{className:"text-sm font-normal",children:["고객 메모: ",(0,a.jsx)("b",{className:"font-bold",children:null===(Y=isService(e.payment))||void 0===Y?void 0:Y.customer_memo})]})]})]}),(null===(J=e.payment)||void 0===J?void 0:J.state)==="shippingReady"?(0,a.jsxs)("div",{className:"board-content-item-top-right",children:[(0,a.jsx)(G.Z,{className:"open-icon",onClick:function(){ep(!0)}}),(0,a.jsx)(u.Z,{className:"ship-icon ".concat(shippingCompleted(e.payment.tracking_invoice,e.payment.tracking_company_code)?"done":""),onClick:()=>{var t,n;return shippingCompleted(e.payment.tracking_invoice,e.payment.tracking_company_code)&&e.moveCard(null==e?void 0:null===(t=e.payment)||void 0===t?void 0:t.id,null===(n=e.payment)||void 0===n?void 0:n.state)}})]}):(null===(K=e.payment)||void 0===K?void 0:K.state)!=="makingReady"&&(0,a.jsx)("div",{className:"board-content-item-top-right",children:(null===(X=e.payment)||void 0===X?void 0:X.state)!=="makingInProgress"?(0,a.jsx)(_.Z,{className:"send-icon",onClick:()=>{var t,n;return e.moveCard(null==e?void 0:null===(t=e.payment)||void 0===t?void 0:t.id,null===(n=e.payment)||void 0===n?void 0:n.state)}}):(null==(el=e.payment)?void 0:null===(ed=el.Orders)||void 0===ed?void 0:ed.every(e=>e.amount_manufactured===e.amount))?(0,a.jsx)(_.Z,{className:"send-icon",onClick:()=>{var t,n;return e.moveCard(null==e?void 0:null===(t=e.payment)||void 0===t?void 0:t.id,null===(n=e.payment)||void 0===n?void 0:n.state)}}):(0,a.jsx)(_.Z,{className:"send-icon disabled"})})]}),(0,a.jsxs)("div",{className:"board-content-item-bottom ".concat((null==e?void 0:e.activeItem)==="".concat(null==e?void 0:null===(V=e.payment)||void 0===V?void 0:V.id,"-").concat(null==e?void 0:e.activeState)?"active":"none"),children:[null===(ee=(null==e?void 0:null===(et=e.payment)||void 0===et?void 0:et.Orders).filter(e=>{var t,n;return(null===(n=e.Good)||void 0===n?void 0:null===(t=n.BaseGood)||void 0===t?void 0:t.service)===!1}))||void 0===ee?void 0:ee.map((t,n)=>{var o,s,i,l,d,r,m,u,p,v,g,x,y;return(0,a.jsxs)("div",{className:"order-widget",children:[(0,a.jsxs)("div",{className:"product",children:[(0,a.jsx)("div",{className:"product-image",onClick:()=>null==e?void 0:e.openGallery(t),children:(0,a.jsx)(O.Z,{src:getImagePath(null==t?void 0:null===(s=t.Good)||void 0===s?void 0:null===(o=s.GoodImages[0])||void 0===o?void 0:o.image_path),alt:(null==t?void 0:null===(l=t.Good)||void 0===l?void 0:null===(i=l.BaseGood)||void 0===i?void 0:i.name)||"Product image",width:L.thumbnail.width,height:L.thumbnail.height,style:{objectFit:"contain",width:"100%",height:"auto"}})}),(0,a.jsxs)("div",{className:"product-info",children:[(null==t?void 0:null===(d=t.Good)||void 0===d?void 0:d.type)==="public"?(0,a.jsx)("p",{className:"red font-normal",children:"아트굿즈"}):(0,a.jsx)("p",{className:"text-blue-400 text-xs font-normal",children:"주문 제작(내 이미지)"}),(0,a.jsx)("p",{className:"product-name font-normal",children:null==t?void 0:null===(m=t.Good)||void 0===m?void 0:null===(r=m.BaseGood)||void 0===r?void 0:r.name}),(0,a.jsxs)("p",{className:"option font-normal",children:["옵션: ",(null==t?void 0:t.option_group)+" "+(null==t?void 0:t.option_name)]}),(0,a.jsxs)("p",{className:"option font-normal",children:["상품ID: ",null==t?void 0:null===(u=t.Good)||void 0===u?void 0:u.id]}),(0,a.jsxs)("p",{className:"option font-normal",children:["디자인명: ",null==t?void 0:null===(v=t.Good)||void 0===v?void 0:null===(p=v.Artwork)||void 0===p?void 0:p.name]}),"revise"===t.state&&($lessThanToday(null==t?void 0:null===(g=t.Good)||void 0===g?void 0:g.revision_due)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:"text-xs font-medium text-red-400",children:["수정 기한: ",$date(null==t?void 0:null===(x=t.Good)||void 0===x?void 0:x.revision_due)]}),(0,a.jsx)("p",{className:"text-xs font-medium text-red-400",children:"수정 기한 지남"})]}):(0,a.jsxs)("p",{className:"text-xs font-medium text-yellow-500",children:["수정 기한: ",$date(null==t?void 0:null===(y=t.Good)||void 0===y?void 0:y.revision_due)]}))]})]}),"depositComplete"===e.activeState&&(0,a.jsxs)("div",{className:"right-section",children:[(0,a.jsxs)("div",{className:"quantity",children:[(0,a.jsx)(k.Z,{className:"icon"}),(0,a.jsx)("p",{children:t.amount})]}),(0,a.jsx)("span",{className:"status-span",style:{lineHeight:"0"},children:(0,a.jsx)(h.Z,{className:"status-icon cursor-pointer",onClick:()=>handleDownloadPrintImage(t)})}),(0,a.jsx)("div",{className:"more-btns",children:(0,a.jsx)(B.Z,{order:t,setIsLoading:e.setIsLoading,btnType:"dots"})})]}),"makingReady"===e.activeState&&(0,a.jsxs)("div",{className:"right-section",children:[(0,a.jsxs)("div",{className:"quantity",children:[(0,a.jsx)(k.Z,{className:"icon"}),(0,a.jsx)("p",{children:t.amount})]}),(0,a.jsx)("span",{className:"status-span",style:{lineHeight:"0"},children:(0,a.jsx)(h.Z,{className:"status-icon cursor-pointer",onClick:()=>handleDownloadPrintImage(t)})}),(0,a.jsx)("div",{className:"more-btns",children:(0,a.jsx)(B.Z,{order:t,setIsLoading:e.setIsLoading,btnType:"dots"})}),(0,a.jsx)("div",{className:"board-content-item-top-right",children:(0,a.jsx)(_.Z,{className:"send-icon",onClick:()=>e.moveOrder(t.id,"makingInProgress")})})]}),"makingInProgress"===e.activeState&&(0,a.jsxs)("div",{className:"right-section",children:[(0,a.jsxs)("div",{className:"quantity",children:[(0,a.jsx)(k.Z,{className:"icon"}),(0,a.jsxs)("p",{children:[null==t?void 0:t.amount_manufactured,"/",t.amount]})]}),(0,a.jsx)("div",{className:"more-btns",children:(0,a.jsx)(B.Z,{order:t,setIsLoading:e.setIsLoading,btnType:"dots"})}),"revise"===t.state?(0,a.jsx)("span",{className:"status-span revision",children:(0,a.jsx)(c.Z,{className:"status-icon"})}):(0,a.jsx)("span",{className:"status-span ".concat(getIconClass(t)),children:(0,a.jsx)(c.Z,{className:"status-icon"})})]}),"makingComplete"===e.activeState&&(0,a.jsxs)("div",{className:"right-section",children:[(0,a.jsxs)("div",{className:"quantity",children:[(0,a.jsx)(k.Z,{className:"icon"}),(0,a.jsxs)("p",{children:[null==t?void 0:t.amount_manufactured,"/",t.amount]})]}),(0,a.jsx)("div",{className:"more-btns",children:(0,a.jsx)(B.Z,{order:t,setIsLoading:e.setIsLoading,btnType:"dots"})}),"revise"===t.state?(0,a.jsx)("span",{className:"status-span revision",children:(0,a.jsx)(c.Z,{className:"status-icon"})}):(0,a.jsx)("span",{className:"status-span ".concat(getIconClass(t)),children:(0,a.jsx)(c.Z,{className:"status-icon"})})]}),"shippingReady"===e.activeState&&(0,a.jsxs)("div",{className:"right-section",children:[(0,a.jsxs)("div",{className:"quantity",children:[(0,a.jsx)(k.Z,{className:"icon"}),(0,a.jsx)("p",{children:t.amount})]}),(0,a.jsx)("span",{className:"status-span",style:{lineHeight:"0"},children:(0,a.jsx)(h.Z,{className:"status-icon cursor-pointer",onClick:()=>handleDownloadPrintImage(t)})}),(0,a.jsx)("div",{className:"more-btns",children:(0,a.jsx)(B.Z,{order:t,setIsLoading:e.setIsLoading,btnType:"dots"})})]})]},t.id||n)}),"shippingReady"===e.payment.state&&(0,a.jsxs)("div",{className:"shipping-info",children:[(0,a.jsxs)("div",{className:"shipping-info-item",children:[(0,a.jsx)("p",{className:"info",children:e.payment.receiver_name}),(0,a.jsx)("p",{className:"info",children:e.payment.phone_number}),(0,a.jsx)("p",{className:"info",children:e.payment.postcode}),(0,a.jsx)("p",{className:"info",children:e.payment.address}),(0,a.jsx)("p",{className:"info",children:e.payment.address_detail}),(0,a.jsxs)("p",{className:"info",children:["배송메세지: ",e.payment.shipping_message]})]}),(0,a.jsxs)("div",{className:"shipping-info-item",children:[(0,a.jsxs)("p",{className:"info",children:["택배사: ",(er=e.payment.tracking_company_code,(null===(ec=F.find(e=>e.value===er))||void 0===ec?void 0:ec.label)||"택배사")]}),(0,a.jsxs)("p",{className:"info",children:["송장번호: ",e.payment.tracking_invoice]})]})]})]})]},"".concat(null==e?void 0:null===(en=e.payment)||void 0===en?void 0:en.id,"-").concat(null==e?void 0:e.activeState)),(0,a.jsx)(g.Z,{open:eh,onClose:closeShippingTypeModel,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",className:"flex justify-center items-center",children:(0,a.jsx)(d.Z,{sx:{width:320},children:(0,a.jsxs)(j.Z,{className:"p-6 py-5",children:[(0,a.jsxs)("div",{id:"modal-modal-title",className:"flex justify-between align-center mb-7",children:[(0,a.jsx)(l.Z,{variant:"h6",component:"h5",className:"font-semibold text-base mt-3",children:"운송장입력"}),(0,a.jsx)(m.Z,{onClick:closeShippingTypeModel,children:(0,a.jsx)(b.Z,{})})]}),(0,a.jsxs)("div",{className:"form",children:[(0,a.jsxs)(I.Z,{id:"outlined-basic",label:"택배사",placeholder:"택배사",variant:"filled",className:"w-full mb-4",value:e.payment.tracking_company_code,onChange:e=>handleTrackingInvoiceChange(e,"tracking_company_code"),children:[(0,a.jsx)(Z.Z,{value:"06",children:"로젠택배"}),(0,a.jsx)(Z.Z,{value:"01",children:"우체국택배"}),(0,a.jsx)(Z.Z,{value:"04",children:"CJ대한통운"}),(0,a.jsx)(Z.Z,{value:"C0",children:"퀵 배송"}),(0,a.jsx)(Z.Z,{value:"C1",children:"직접 수령"})]}),"C1"!==e.payment.tracking_company_code&&"C0"!==e.payment.tracking_company_code&&(0,a.jsx)(f.Z,{id:"outlined-basic",label:"송장번호",variant:"filled",className:"w-full mb-4",value:e.payment.tracking_invoice,onChange:e=>handleTrackingInvoiceChange(e,"tracking_invoice")}),(0,a.jsxs)("div",{className:"btns flex justify-between mt-4 gap-3",children:[(0,a.jsx)(N.Z,{size:"md",customStyle:"h-10",className:"bg-white text-black border border-radius-5 p-2",style:{width:"100%"},onClick:closeShippingTypeModel,children:"취소"}),(0,a.jsx)(N.Z,{size:"md",customStyle:"h-10",className:"bg-black text-white border border-radius-5 p-2",style:{width:"100%"},onClick:()=>handleShippingTypeSave(),children:"확인"})]})]})]})})}),(0,a.jsx)(g.Z,{open:em,onClose:closeMemoModel,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",className:"flex justify-center items-center",children:(0,a.jsx)(d.Z,{sx:{width:320},children:(0,a.jsxs)(j.Z,{className:"p-6 py-5",children:[(0,a.jsxs)("div",{id:"modal-modal-title",className:"flex justify-between align-center mb-7",children:[(0,a.jsx)(l.Z,{variant:"h6",component:"h5",className:"font-semibold text-base mt-3",children:"Memo"}),(0,a.jsx)(m.Z,{onClick:closeMemoModel,children:(0,a.jsx)(b.Z,{})})]}),(0,a.jsxs)("div",{className:"form",children:[(0,a.jsx)(S.Z,{"aria-label":"minimum height",minRows:4,placeholder:"",className:"w-full border border-b-1 border-t-0 border-r-0 border-l-0 border-gray-400 mb-4 outline-0",value:e.payment.admin_memo,onChange:e=>handleMemoChange(e,"admin_memo")}),(0,a.jsx)(f.Z,{id:"outlined-basic",label:"어드민 메모 작성자",placeholder:"히스토리를 위해 작성 부탁드립니다.",variant:"filled",className:"w-full mb-4",focused:!0,value:e.payment.admin_memo_user,onCh
1ange:e=>handleMemoChange(e,"admin_memo_user")}),(0,a.jsx)(l.Z,{id:"modal-modal-title",variant:"h6",component:"h6",className:"font-bold text-xs",children:"* 히스토리 추적을 위해 메모는 꼭 작성자와 함께 작성해주세요."}),(0,a.jsxs)("div",{className:"btns flex justify-between mt-4 gap-3",children:[(0,a.jsx)(N.Z,{size:"md",customStyle:"h-10",className:"bg-white text-black border border-radius-5 p-2",style:{width:"100%"},onClick:closeMemoModel,children:"취소"}),(0,a.jsx)(N.Z,{size:"md",customStyle:"h-10",className:"bg-black text-white border border-radius-5 p-2",style:{width:"100%"},onClick:()=>handleMemoSave(),children:"확인/저장"})]})]})]})})})]})},z=n(33723),U=n(59928),$=n.n(U),Q=n(64221),q=n(75495),H=n(82581),manufacture_BulkUploadShipping=e=>{let{payments:t,setPayments:n}=e,[o,s]=(0,i.useState)(!1),[l,d]=(0,i.useState)(""),[r,c]=(0,i.useState)({open:!1,Transition:P.Z}),m=(0,i.useRef)(null),handleCloseSnack=()=>{c({open:!1,Transition:P.Z})},onFileLoad=e=>{let t=new Uint8Array(e.target.result),n=Q.ij(t,{type:"array"}),a=n.SheetNames[0],o=n.Sheets[a],s=Q.P6.sheet_to_json(o,{range:0}),i=parseRows(s);updateShippingInfo(i)},updateShippingInfo=e=>{s(!0);let a=t.map(t=>{let n=e.find(e=>e.paymentId===t.id);return{...t,tracking_invoice:n.trackingInvoice,tracking_company_code:"06"}});n(a),s(!1),d("송장번호가 업데이트되었습니다."),c({open:!0,Transition:P.Z})},parseRows=e=>{var t;return null!==(t=null==e?void 0:e.map(e=>{let t=null==e?void 0:e["운송장번호"],n=null==e?void 0:e["주문번호"],a=(null==e?void 0:e["집하여부"])==="○";if(t)try{t=null==t?void 0:t.replace(/-/gi,"")}catch(e){console.log("error",e)}return{paymentId:n,trackingInvoice:t,isOnBoard:a}}))&&void 0!==t?t:[]};return(0,a.jsxs)("div",{className:"Manufacture-boards-section",children:[o&&(0,a.jsx)(D.Z,{sx:{color:"#fff",zIndex:2e3},open:o,children:(0,a.jsx)(A.Z,{color:"inherit"})}),(0,a.jsx)(M.Z,{open:r.open,onClose:handleCloseSnack,TransitionComponent:r.Transition,message:l,autoHideDuration:3e3,anchorOrigin:{vertical:"top",horizontal:"right"},style:{marginTop:40,fontWeight:700},action:(0,a.jsx)(i.Fragment,{children:(0,a.jsx)(b.Z,{onClick:handleCloseSnack,style:{cursor:"pointer"}})})},r.Transition.name),(0,a.jsx)("input",{ref:m,type:"file",style:{display:"none"},accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",onChange:e=>{let{files:t}=e.target,n=t[0],a=new FileReader;a.onload=e=>onFileLoad(e),a.readAsArrayBuffer(n),e.target.value=null}}),(0,a.jsx)(H.Z,{className:"text-3xl text-indigo-500 mr-4 cursor-pointer",onClick:()=>{var e;null===(e=m.current)||void 0===e||e.click()}})]})},manufacture_ManufactureBoard=()=>{let getImagePath=e=>e?"".concat("https://cdn.withgoods.net","/").concat(e):"/img/300.png",[e,t]=(0,i.useState)(!1),[n,o]=i.useState([]),[s,C]=i.useState([]),[_,k]=i.useState([]),[Z,w]=i.useState([]),[I,G]=i.useState([]),[B,R]=i.useState([]),[L,F]=(0,i.useState)(!1);async function getAllOrders(){t(!0);let e=E.Z.getCurrentToken(),n="?&scope=deep&sortBy=deposit_complete_at&orderBy=ASC";try{var a,s,i,l,d,r,c,m,u,h;let t=["".concat(n,"&state=depositComplete"),"".concat(n,"&state=makingInProgress&state=makingReady"),"".concat(n,"&state=makingInProgress"),"".concat(n,"&state=makingComplete"),"".concat(n,"&state=shippingReady"),"".concat(n,"&state=shipping")].map(t=>(0,T.vl)(t,e)),p=await Promise.all(t),v=[];null===(s=p[0])||void 0===s||null===(a=s.data)||void 0===a||a.payments.forEach(e=>{let t={...e,Orders:[]};e.Orders.forEach(e=>{e.is_cancelled||t.Orders.push(e)}),t.Orders.length>0&&v.push(t)}),o(v);let g=[];null===(l=p[1])||void 0===l||null===(i=l.data)||void 0===i||i.payments.forEach(e=>{let t={...e,Orders:[]};e.Orders.forEach(e=>{"makingReady"!==e.state&&"revise"!==e.state||e.is_cancelled||t.Orders.push(e)}),t.Orders.length>0&&g.push(t)}),C(g);let x=[],y=[];null===(r=p[2])||void 0===r||null===(d=r.data)||void 0===d||d.payments.forEach(e=>{var t;let n={...e,Orders:[]};e.Orders.forEach(e=>{e.is_cancelled||"revise"===e.state||n.Orders.push(e)}),n.Orders.length>0&&("makingComplete"===e.state||(null==n?void 0:null===(t=n.Orders)||void 0===t?void 0:t.every(e=>e.amount_manufactured===e.amount))?x.push(n):y.push(n))}),k(y),w(x);let j=[];null===(m=p[4])||void 0===m||null===(c=m.data)||void 0===c||c.payments.forEac
1h(e=>{let t={...e,Orders:[]};e.Orders.forEach(e=>{e.is_cancelled||t.Orders.push(e)}),t.Orders.length>0&&j.push(t)}),G(j);let b=[];null===(h=p[5])||void 0===h||null===(u=h.data)||void 0===u||u.payments.forEach(e=>{let t={...e,Orders:[]};e.Orders.forEach(e=>{e.is_cancelled||t.Orders.push(e)}),t.Orders.length>0&&b.push(t)}),R(b),F(!0)}catch(e){}finally{t(!1)}}let changeCardState=async(e,n)=>{t(!0);try{var a;let t=E.Z.getCurrentToken(),o=await (0,T.Ow)({paymentId:e,state:n,additionalPath:"/state"},t);(null===(a=o.data)||void 0===a?void 0:a.message)==="OK"&&getAllOrders()}catch(e){e.response.data.error&&(ex(e.response.data.error),ej({open:!0,Transition:P.Z})),t(!1)}},changeCardOrderState=async(e,n)=>{t(!0);try{var a;let t=E.Z.getCurrentToken(),o=await (0,z.zV)({orderId:e,state:n,additionalPath:"/state"},t);(null===(a=o.data)||void 0===a?void 0:a.message)==="OK"&&getAllOrders()}catch(e){e.response.data.error&&(ex(e.response.data.error),ej({open:!0,Transition:P.Z})),t(!1)}};(0,i.useEffect)(()=>{L||getAllOrders()},[L]);let[U,H]=i.useState("");function changeActive(e){U===e?H(""):H(e)}let[W,Y]=i.useState(null);function moveCard(e,t){"depositComplete"===t&&changeCardState(e,"makingReady"),"makingReady"===t&&changeCardState(e,"makingInProgress"),"makingInProgress"===t&&changeCardState(e,"shippingReady"),"makingComplete"===t&&changeCardState(e,"shippingReady"),"shippingReady"===t&&changeCardState(e,"shippingComplete")}let moveOrder=async(e,t)=>{changeCardOrderState(e,t)},[J,K]=(0,i.useState)(""),[X,V]=(0,i.useState)([]),[ee,et]=(0,i.useState)(!1);function openGallery(e){var t,n,a,o;K(null==e?void 0:null===(n=e.Good)||void 0===n?void 0:null===(t=n.GoodImages[0])||void 0===t?void 0:t.image_path),V(null==e?void 0:null===(o=e.Good)||void 0===o?void 0:null===(a=o.GoodImages)||void 0===a?void 0:a.map(e=>e.image_path)),et(!0)}let[en,ea]=(0,i.useState)(!1),[eo,es]=i.useState([!0,!1]),[ei,el]=(0,i.useState)(!1);function closeMemoModel(){el(!1)}let[ed,er]=(0,i.useState)([{title:"패브릭포스터",children:["라이트 패브릭 포스터(세로형)","라이트 패브릭 포스터(정방형)","심플리 패브릭 포스터(정방형)","심플리 패브릭 포스터(세로형)","위드 썸머 패브릭 포스터(세로형)","위드 썸머 패브릭 포스터(가로형)","위드 썸머 패브릭 포스터(정방형)","우드행거 패브릭 포스터(정방형)","베이직 패브릭 포스터(정방형)","베이직 패브릭 포스터(세로형)","우드행거 패브릭 포스터(세로형)","베이직 패브릭 포스터(가로형)","우드봉 패브릭 포스터 M","심플리 패브릭 포스터(가로형)","우드봉 패브릭 포스터 S"]},{title:"다이어리",children:["비건레더 노트폴리오"]},{title:"데일리 컬렉션",children:["블럭 베리 유리컵(245ml)","파르페 고블릿 유리컵(345ml)","하이볼 유리컵","비어 유리컵","치얼스 비어캔 글라스","로제 고블릿","구슬 샷잔","베이직 유리컵","돌체 고블릿"]},{title:"머그컵",children:["스퀘어 머그컵","블럭 볼드 머그컵","블럭 라이트 머그컵","라운드 머그컵","필름 머그컵","포그 머그컵"]},{title:"텀블러",children:["위드 그릿 텀블러","모멘트 텀블러 M","모멘트 텀블러 S"]},{title:"오로라시리즈",children:["오로라 치코 글라스","오로라 그란도 글라스","오로라 미디오 글라스"]},{title:"폰케이스",children:["갤럭시 22 ULTRA","갤럭시 S22 플러스","갤럭시 S21 울트라","갤럭시 S21 플러스","갤럭시 S21","아이폰 12 미니","아이폰 12 프로 맥스","아이폰 12 프로","아이폰 12","아이폰 13 미니","아이폰 13 프로 맥스","갤럭시 S22","아이폰 13","아이폰 13 프로"]},{title:"위드 유리컵",children:["위드 플레오 글라스","위드 메리 샷잔","위드 알토 글라스","위드 그랑 글라스"]},{title:"쿠션",children:["베이직 쿠션","위드 썸머 쿠션"]},{title:"와인/칵테일",children:["로제 고블릿","파르페 고블릿 유리컵(345ml)","돌체 고블릿"]},{title:"바이오 폰케이스",children:["iPhone 13 Pro","Galaxy S21 Plus","Galaxy S21 Ultra","iPhone 13 Pro Max","iPhone 13 Mini","iPhone 13","Galaxy S21"]},{title:"우드블럭",children:["우드아트블럭(세로형)","우드아트블럭(가로형)","우드 코스터 육각","우드 코스터 원형","우드아트블럭(정방형)"]},{title:"패브릭포스터",children:["베이직 패브릭 포스터(가로형)","베이직 패브릭 포스터(세로형)","베이직 패브릭 포스터(정방형)","우드행거 패브릭 포스터(세로형)","우드행거 패브릭 포스터(정방형)","위드 썸머 패브릭 포스터(정방형)","위드 썸머 패브릭 포스터(가로형)","위드 썸머 패브릭 포스터(세로형)","라이트 패브릭 포스터(세로형)","라이트 패브릭 포스터(정방형)","심플리 패브릭 포스터(세로형)","심플리 패브릭 포스터(정방형)","심플리 패브릭 포스터(가로형)","우드봉 패브릭 포스터 M)","우드봉 패브릭 포스터 S"]},{title:"데일리 컬렉션",children:["하이볼 유리컵","비어 유리컵","치얼스 비어캔 글라스","구슬 샷잔","베이직 유리컵","돌체 고블릿","로제 고블릿","블럭 베리 유리컵(245ml)","파르페 고블릿 유리컵(345ml)"]},{title:"텀블러",children:["모멘트 텀블러 S","모멘트 텀블러 M","위드 그릿 텀블러"]},{title:"위드 유리컵",children:["위드 그랑 글라스","위드 플레오 글라스","위드 알토 글라스","위드 메리 샷잔"]},{title:"다이어리",children:["비건레더 노트폴리오"]},{title:"쿠션",children:["베이직 쿠션","위드 썸머 쿠션"]},{title:"머그컵",children:["라운드 머그컵","스퀘어 머그컵","블럭 볼드 머그컵","블럭 라이트 머그컵","포그 머그컵","필름 머그컵"]},{title:"오로라시리즈",children:["오로라 치코 글라스","오로라 미디오 글라스","오로라 그란도 글라스"]}
1,{title:"넥스트제로",children:["제로디자인 넥스트제로 반지갑"]},{title:"와인/칵테일",children:["로제 고블릿","돌체 고블릿","파르페 고블릿 유리컵(345ml)"]},{title:"폰케이스",children:["아이폰 12 미니","아이폰 12","아이폰 12 프로","아이폰 12 프로 맥스","아이폰 13 미니","아이폰 13 프로 맥스","갤럭시 S21 울트라","갤럭시 S21 플러스","갤럭시 S21","갤럭시 22 ULTRA","갤럭시 S22","갤럭시 S22 플러스"]},{title:"바이오 폰케이스",children:["iPhone 13 Pro","iPhone 13 Mini","iPhone 13 Pro Max","Galaxy S21 Ultra","Galaxy S21 Plus","iPhone 13"]},{title:"우드블럭",children:["우드 코스터 원형","우드 코스터 육각","우드아트블럭(정방형)","우드아트블럭(세로형)","우드아트블럭(가로형)"]}]),[ec,em]=(0,i.useState)([]),getCategories=async()=>{let e=E.Z.getCurrentToken();await (0,q.Py)("?&scope=deep&state=live",e).then(e=>{let t=e.data.categories;er(t),em([])})};(0,i.useEffect)(()=>{getCategories()},[]);let[eu,eh]=(0,i.useState)(!1);function closeorderlabelModal(){eh(!1)}let ep=(0,i.useRef)(null),handleDownload=e=>{(null==ep?void 0:ep.current)?$()(ep.current,{scale:3}).then(t=>{let n=t.toDataURL("image/png"),a=document.createElement("a");a.download="".concat(e,".png"),a.href=n,document.body.appendChild(a),a.click(),document.body.removeChild(a)}).catch(e=>{ex("이미지 다운로드에 실패했습니다."),ej({open:!0,Transition:P.Z})}):(ex("이미지 다운로드에 실패했습니다."),ej({open:!0,Transition:P.Z}))};function toPhoneNumber(e){return 11===e.length?e.replace(/(\d{3})(\d{4})(\d{4})/,"$1-$2-$3"):e}function handleDownloadToExcel(e){let t=[];if("makingReady"===e){let e=[];s.forEach(t=>{let n=[];t.Orders.forEach(e=>{"makingReady"===e.state&&n.push(e)}),e.push({...t,Orders:n})}),e.forEach(e=>{let n=0;if(e.Orders.length>0){var a,o,s,i,l;t.push(["".concat(null===(s=e.Orders[0])||void 0===s?void 0:null===(o=s.Good)||void 0===o?void 0:null===(a=o.BaseGood)||void 0===a?void 0:a.name,"_").concat(null===(i=e.Orders[0])||void 0===i?void 0:i.option_group,"_").concat(null===(l=e.Orders[0])||void 0===l?void 0:l.option_name)]),t.push(["상품번호","상품명","디자인번호","너비(mm)","높이(mm)","주문번호/주문인/수량","수량"]),e.Orders.forEach(a=>{var o,s,i,l;n+=a.amount,t.push([a.good_id,e.display_name,a.Good.artwork_id,null==a?void 0:null===(s=a.BaseGoodOption)||void 0===s?void 0:null===(o=s.BaseGoodPrintSpecs)||void 0===o?void 0:o.actual_width_mm,null==a?void 0:null===(l=a.BaseGoodOption)||void 0===l?void 0:null===(i=l.BaseGoodPrintSpecs)||void 0===i?void 0:i.actual_height_mm,"".concat(e.id,"_").concat(e.buyer_name,"_").concat(a.amount),a.amount])}),t.push(["","","","","","합계",n]),t.push(["","","","","","",""]),t.push(["","","","","","",""])}});let n=Q.P6.aoa_to_sheet(t),a=Q.P6.book_new();Q.P6.book_append_sheet(a,n,"Sheet1");let o=new Date;Q.NC(a,"주문요청_".concat(o.getFullYear(),"-").concat(o.getMonth()+1,"-").concat(o.getDate()," ").concat(o.getHours(),"_").concat(o.getMinutes(),"_").concat(o.getSeconds(),".xlsx"))}if("makingInProgress"===e){t.push(["수하인명"," ","수하인주소","수하인전화번호","수하인핸드폰번호","박스수량","택배운임","운임구분","품목명"," ","배송메세지","","","주문번호"]),Z.forEach(e=>{let n=function(e){let t=e.map(e=>{let{Good:t,option_name:n,amount:a,option_detail_name:o}=e;return"".concat(t.BaseGood.name," ").concat(n," ").concat(o||""," ").concat(t.BaseGood.name," ").concat(a)});return[...t].join("\r\n")}(e.Orders);t.push([e.buyer_name,"",e.address+" "+e.address_detail,toPhoneNumber(e.buyer_phone_number),toPhoneNumber(e.buyer_phone_number),1,2750,"신용",n,"",e.shipping_message,"","",e.id])});let e=Q.P6.aoa_to_sheet(t),n=Q.P6.book_new();Q.P6.book_append_sheet(n,e,"Sheet1");let a=new Date,o=a.getFullYear(),s=a.getMonth()+1<10?"0"+(a.getMonth()+1):a.getMonth()+1,i=10>a.getDate()?"0"+a.getDate():a.getDate(),l=10>a.getHours()?"0"+a.getHours():a.getHours(),d=10>a.getMinutes()?"0"+a.getMinutes():a.getMinutes(),r=10>a.getSeconds()?"0"+a.getSeconds():a.getSeconds();Q.NC(n,"배송용_".concat(o,"-").concat(s,"-").concat(i," ").concat(l,":").concat(d,":").concat(r,".xlsx"))}}function processedPayments(e){if(0===ec.length)return e;let t=[];
1return e.forEach(e=>{var n;let a=null==e?void 0:null===(n=e.Orders)||void 0===n?void 0:n.filter(e=>{var t,n;return ec.includes(null==e?void 0:null===(n=e.Good)||void 0===n?void 0:null===(t=n.BaseGood)||void 0===t?void 0:t.id)});(null==a?void 0:a.length)>0&&t.push(e)}),t}let ev=Z.map(e=>e.Orders).flat();async function bulkUpdateShipping(e){t(!0);let n=e.map(e=>({...e,tracking_company_code:"06"}));try{await Promise.all(n.map(e=>handleShippingTypeSave(e)))}catch(e){}finally{t(!1)}}let handleShippingTypeSave=async e=>{let t=E.Z.getCurrentToken(),n={paymentId:e.id,tracking_company_code:e.tracking_company_code,tracking_invoice:e.tracking_invoice,additionalPath:""};await (0,T.Ow)(n,t)},[eg,ex]=(0,i.useState)(""),[ey,ej]=(0,i.useState)({open:!1,Transition:P.Z}),handleCloseSnack=()=>{ej({open:!1,Transition:P.Z})};return(0,a.jsxs)("div",{className:"Manufacture-boards-section",children:[e&&(0,a.jsx)(D.Z,{sx:{color:"#fff",zIndex:2e3},open:e,children:(0,a.jsx)(A.Z,{color:"inherit"})}),(0,a.jsx)(M.Z,{open:ey.open,onClose:handleCloseSnack,TransitionComponent:ey.Transition,message:eg,autoHideDuration:3e3,anchorOrigin:{vertical:"top",horizontal:"right"},style:{marginTop:40,fontWeight:700},action:(0,a.jsx)(i.Fragment,{children:(0,a.jsx)(b.Z,{onClick:handleCloseSnack,style:{cursor:"pointer"}})})},ey.Transition.name),(0,a.jsxs)("div",{className:"top-section",children:[(0,a.jsx)("p",{}),(0,a.jsx)("button",{type:"button",className:"border border-blue-800 text-blue-800 bg-gray-100 p-3 px-6 font-medium text-sm",onClick:()=>void ea(!0),children:"필터"})]}),(0,a.jsxs)("div",{className:"Manufacture-boards",children:[(0,a.jsxs)("div",{className:"board-section",children:[(0,a.jsx)("div",{className:"board-header",children:(0,a.jsxs)("div",{className:"board-title",children:[(0,a.jsxs)(l.Z,{variant:"h5",children:["결제완료 (",n.length,")"]}),(0,a.jsx)("div",{className:"icon",children:(0,a.jsx)(r.Z,{})})]})}),(0,a.jsx)("div",{className:"board-content",children:processedPayments(n).map((s,i)=>(0,a.jsx)(ManufactureBoardItem,{payment:s,changeActive:changeActive,activeItem:U,moveCard:moveCard,moveOrder:moveOrder,openGallery:openGallery,payments:n,setPayments:o,isLoading:e,setIsLoading:t,activeState:"depositComplete"},s.id))})]}),(0,a.jsxs)("div",{className:"board-section",children:[(0,a.jsxs)("div",{className:"board-header",children:[(0,a.jsxs)("div",{className:"board-title",children:[(0,a.jsxs)(l.Z,{variant:"h5",children:["제작준비중 (",s.length,")"]}),(0,a.jsx)("div",{className:"icon",children:(0,a.jsx)(r.Z,{})})]}),(0,a.jsx)("div",{className:"right-icon text-indigo-300 text-lg",children:(0,a.jsx)(h.Z,{className:"text-3xl cursor-pointer",onClick:()=>handleDownloadToExcel("makingReady")})})]}),(0,a.jsx)("div",{className:"board-content",children:processedPayments(s).map((n,o)=>(0,a.jsx)(ManufactureBoardItem,{payment:n,changeActive:changeActive,activeItem:U,moveCard:moveCard,moveOrder:moveOrder,openGallery:openGallery,payments:s,setPayments:C,isLoading:e,setIsLoading:t,activeState:"makingReady"},n.id))})]}),(0,a.jsxs)("div",{className:"board-section",children:[(0,a.jsxs)("div",{className:"board-header",children:[(0,a.jsxs)("div",{className:"board-title",children:[(0,a.jsxs)(l.Z,{variant:"h5",children:["제작중 (",_.length,")"]}),(0,a.jsx)("div",{className:"icon",children:(0,a.jsx)(r.Z,{})})]}),(0,a.jsxs)("div",{className:"statuses",children:[(0,a.jsxs)("div",{className:"status",children:[(0,a.jsx)(c.Z,{className:"text-gray-500 text-lg"}),(0,a.jsx)("span",{children:"수정요청"})]}),(0,a.jsxs)("div",{className:"status",children:[(0,a.jsx)(c.Z,{className:"text-orange-600 text-lg"}),(0,a.jsx)("span",{children:"준비중"})]}),(0,a.jsxs)("div",{className:"status",children:[(0,a.jsx)(c.Z,{className:"text-yellow-500 text-lg"}),(0,a.jsx)("span",{children:"진행중"})]}),(0,a.jsxs)("div",{className:"status",children:[(0,a.jsx)(c.Z,{className:"text-green-600 text-lg"}),(0,a.jsx)("span",{children:"완료"})]})]})]}),(0,a.jsx)("div",{className:"board-content",children:processedPayments(_).map((n,o)=>(0,a.jsx)(ManufactureBoardItem,{payment:n,changeActive:changeActive,activeItem:U,moveCard:moveCard,openGallery:openGallery,payments:_,setPayments:k,moveOrder:moveOrder,isLoading:e,setIsLoading:t,activeState:"makingInProgress"},n.id))})]}),(0,a.jsxs)("div",{className:"board-section",children:[(0,a.jsxs)("div",{className:"board-header",children:[(0,a.jsxs)("div",{className:"board-title",children:[(0,a.jsxs)(l.Z,{variant:"h5",children:["제작완료 (",Z.length,")"]}),(0,a.jsx)("div",{className:"icon",children:(0,a.jsx)(r.Z,{})})]}),(0,a.jsxs)("div",{className:"right-icon",children:[(0,a.jsx)(p.Z,{className:"text-3xl text-green-600 mr-4 cursor-pointer",onClick:()=>void eh(!0)}),(0,a.jsx)(h.Z,{className:"text-3xl text-blue-800 cursor-pointer",onClick:()=>handleDownloadToExcel("makingInProgress")})]})]}),(0,a.jsx)("div",{className:"board-content",children:processedPayments(Z).map((n,o)=>(0,a.jsx)(ManufactureBoardItem,{payment:n,changeActive:changeActive,activeItem:U,moveCard:moveCard,openGallery:openGallery,payments:Z,setPayments:w,moveOrder:moveOrder,isLoading:e,setIsLoading:t,activeState:"makingComplete"},n.id))})]}),(0,a.jsxs)("div",{className:"board-section",children:[(0,a.jsxs)("div",{className:"board-header",children:[(0,a.jsxs)("div",{className:"board-title",children:[(0,a.jsxs)(l.Z,{variant:"h5",children:["배송준비중 (",I.length,")"]}),(0,a.jsx)("div",{className:"icon",children:(0,a.jsx)(r.Z,{})})]}),(0,a.jsxs)("div",{className:"right-icon flex items-center",children:[(0,a.jsx)(manufacture_BulkUploadShipping,{payments:I,setPayments:G}),(0,a.jsx)(u.Z,{className:"text-3xl text-green-500 cursor-pointer",onClick:()=>bulkUpdateShipping(I)})]})]}),(0,a.jsx)("div",{className:"board-content",children:processedPayments(I).map((n,o)=>(0,a.jsx)(ManufactureBoardItem,{payment:n,changeActive:changeActive,activeItem:U,moveCard:moveCard,openGallery:openGallery,payments:I,setPayments:G,moveOrder:moveOrder,isLoading:e,setIsLoading:t,activeState:"shippingReady"},n.id))})]})]}),ee&&(0,a.jsx)(v.Z,{mainImage:J,images:X,closeGallery:()=>et(!1)}),(0,a.jsx)(g.Z,{className:"filter-Modal",open:en,onClose:function(){ea(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description",children:(0,a.jsxs)(d.Z,{className:"filter-modal-box",sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,maxHeight:"90vh",bgcolor:"background.paper",border:"0px solid #000",boxShadow:24,overflow:"auto"},children:[(0,a.jsx)("div",{id:"modal-modal-title",className:"flex justify-between align-center mb-2 pb-1 px-4 border border-b-1 border-t-0 border-l-0 border-r-0",children:(0,a.jsx)(l.Z,{variant:"h6",component:"h5",className:"font-semibold text-3xl mt-3",children:"필터"})}),null==ed?void 0:ed.map((e,t)=>{var n,o,s;return(null==e?void 0:null===(n=e.BaseGoods)||void 0===n?void 0:n.length)>0&&(0,a.jsxs)("div",{className:"p-4 pt-1",children:[(0,a.jsx)(x.Z,{label:e.name,control:(0,a.jsx)(y.Z,{checked:null!=e&&!!e.BaseGoods&&(null==e?void 0:null===(s=e.BaseGoods)||void 0===s?void 0:s.length)!==0&&e.BaseGoods.every(e=>ec.includes(e.id)),onChange:()=>(function(e){let t=new Set(ec),n=e.BaseGoods.map(e=>e.id),a=n.every(e=>t.has(e));if(a){let e=ec.filter(e=>!n.includes(e));em(e)}else{let e=Array.from(new Set([...ec,...n]));em(e)}})(e)})}),(0,a.jsx)(d.Z,{sx:{display:"flex",flexDirection:"column",ml:3},children:null==e?void 0:null===(o=e.BaseGoods)||void 0===o?void 0:o.map(e=>(0,a.jsx)(x.Z,{label:e.name,control:(0,a.jsx)(y.Z,{checked:function(e){let t=ec.findIndex(t=>t===e);return -1!==t}(e.id),onChange:()=>(function(e){let t=[...ec],n=t.findIndex(t=>t===e);-1===n?t.push(e):t.splice(n,1),em(t)})(e.id)})},e.id))})]},t)})]})}),(0,a.jsx)(g.Z,{open:ei,onClose:closeMemoModel,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",className:"flex justify-center items-center",children:(0,a.jsx)(d.Z,{sx:{width:320},children:(0,a.jsxs)(j.Z,{className:"p-6 py-5",children:[(0,a.jsxs)("div",{id:"modal-modal-title",className:"flex justify-between align-center mb-7",children:[(0,a.jsx)(l.Z,{variant:"h6",component:"h5",className:"font-semibold text-base mt-3",children:"Memo"}),(0,a.jsx)(m.Z,{onClick:closeMemoModel,children:(0,a.jsx)(b.Z,{})})]}),(0,a.jsxs)("div",{className:"form",children:[(0,a.jsx)(S.Z,{"aria-label":"minimum height",minRows:4,placeholder:"",className:"w-full border border-b-1 border-t-0 border-r-0 border-l-0 border-gray-400 mb-4 outline-0"}),(0,a.jsx)(f.Z,{id:"outlined-basic",label:"어드민 메모 작성자",placeholder:"히스토리를 위해 작성 부탁드립니다.",variant:"filled",className:"w-full mb-4",focused:!0}),(0,a.jsx)(l.Z,{id:"modal-modal-title",variant:"h6",component:"h6",className:"font-bold text-xs",children:"* 히스토리 추적을 위해 메모는 꼭 작성자와 함께 작성해주세요."}),(0,a.jsxs)("div",{className:"btns flex justify-between mt-4 gap-3",children:[(0,a.jsx)(N.Z,{size:"md",customStyle:"h-10",className:"bg-white text-black border border-radius-5 mb-2",style:{width:"100%"},children:"취소"}),(0,a.jsx)(N.Z,{size:"md",customStyle:"h-10",className:"bg-black text-white border border-radius-5",style:{width:"100%"},children:"확인/저장"})]})]})]})})}),(0,a.jsx)(g.Z,{open:eu,onClose:closeorderlabelModal,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",className:"flex justify-center items-center",children:(0,a.jsx)(d.Z,{sx:{width:"100vw",height:"100vh"},className:"rounded-md overflow-auto",children:(0,a.jsxs)(j.Z,{className:"p-4 py-3",sx:{width:"100%",height:"100%",overflowX:"hidden"},children:[(0,a.jsxs)("div",{className:"labels-top-btn flex justify-between items-center",children:[(0,a.jsx)("button",{className:"bg-blue-800 text-white border-radius-5 mb-10 px-4 py-2",onClick:()=>void handleDownload("주문라벨-"+new Date().getFullYear()+(new Date().getMonth()+1)+new Date().getDate()),children:"다운로드 (파이어폭스만 가능)"}),(0,a.jsx)(b.Z,{onClick:closeorderlabelModal,className:"cursor-pointer"})]}),(0,a.jsx)("div",{className:"page-wraper",ref:ep,children:(0,a.jsx)("div",{className:"page-wraper-body",children:ev.map((e,t)=>{var n,o,s,i,l,d,r,c,m,u,h,p;return(0,a.jsx)("div",{className:"paper-item",children:(0,a.jsxs)("div",{className:"paper-top",children:[(0,a.jsx)("img",{src:"/images/logo.7219e59.svg",alt:"mainImage",width:1e3,height:100}),(0,a.jsxs)("div",{className:"flex label-image-section",children:[(0,a.jsx)("div",{className:"left-section",children:null==e?void 0:null===(o=e.Good)||void 0===o?void 0:null===(n=o.Artwork)||void 0===n?void 0:n.description}),(0,a.jsxs)("div",{className:"right-section",children:[(0,a.jsxs)("div",{className:"artist",children:["Artist: ",null==e?void 0:null===(l=e.Good)||void 0===l?void 0:null===(i=l.Artwork)||void 0===i?void 0:null===(s=i.User)||void 0===s?void 0:s.display_name]}),(0,a.jsx)(O.Z,{src:"".concat(getImagePath(null==e?void 0:null===(r=e.Good)||void 0===r?void 0:null===(d=r.GoodImages[0])||void 0===d?void 0:d.image_path),"?d=500xauto&q=full&quot;"),alt:"mainImage",width:100,height:100,style:{width:"100%",height:"auto",objectFit:"contain"}})]})]}),(0,a.jsxs)("div",{className:"label-list",children:[(0,a.jsxs)("div",{className:"label-list-item",children:[(0,a.jsx)("p",{children:"To"}),(0,a.jsx)("p",{children:null==e?void 0:e.receiver_name})]}),(0,a.jsxs)("div",{className:"label-list-item",children:[(0,a.jsx)("p",{children:"Base Item"}),(0,a.jsx)("p",{children:null==e?void 0:null===(m=e.Good)||void 0===m?void 0:null===(c=m.BaseGood)||void 0===c?void 0:c.name})]}),(0,a.jsxs)("div",{className:"label-list-item",children:[(0,a.jsx)("p",{children:"Artwork"}),(0,a.jsx)("p",{children:null==e?void 0:null===(h=e.Good)||void 0===h?void 0:null===(u=h.Artwork)||void 0===u?void 0:u.name})]}),(0,a.jsxs)("div",{className:"label-list-item",children:[(0,a.jsx)("p",{children:"Item ID"}),(0,a.jsx)("p",{children:null==e?void 0:null===(p=e.Good)||void 0===p?void 0:p.id})]})]})]})},e.id||t)})})})]})})})]})},manufacture_board=()=>(0,a.jsx)(o.Z,{children:(0,a.jsx)(s.Z,{maxWidth:!1,sx:{mt:4,mb:0},children:(0,a.jsx)(manufacture_ManufactureBoard,{})})})},24863:function(){},82963:function(){}},function(e){e.O(0,[2706,5704,3060,5082,3337,9155,8619,9678,9652,1625,5397,5466,6721,9413,9914,2502,8273,6875,4153,4762,7314,9774,2888,179],function(){return e(e.s=97069)}),_N_E=e.O()}]);

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.