1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3850,9810],{5194:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/order/[orderId]",function(){return n(41239)}])},4180:function(e,t){"use strict";t.Z={src:"/_next/static/media/samu-giken.1bf2ec60.webp",height:549,width:1920,blurDataURL:"data:image/webp;base64,UklGRmQAAABXRUJQVlA4WAoAAAAQAAAABwAAAQAAQUxQSBEAAAAAGjk6MjtENBAZNi4qQzcvCgBWUDggLAAAAJABAJ0BKggAAgACQDgloAJ0ugADmAD+6ez/dAAp+z/+0s/+pZ/9Sz/NAAAA",blurWidth:8,blurHeight:2}},49810:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var i=n(52676),r=n(75271),a=n(46035),s=n(33022),l=n(40150),o=n(28994),d=n(85304),c=n(4180),u=n(16624),h=n(27026),m=n.n(h),p=n(78051),x=n(98807),v=n(15036),g=n(32623),f=n.n(g);let N=e=>{let{isMobile:t,isDrawerOpen:n,setIsDrawerOpen:r,collapsed:a,setCollapsed:s,fullName:l}=e,{logout:o}=(0,d.a)();return(0,i.jsxs)("div",{style:{borderBottom:"1px solid #e8e8e8",position:"fixed",width:"100%",zIndex:100},className:"flex items-center justify-between h-16 px-6 bg-white",children:[(0,i.jsxs)("div",{className:"flex items-center h-full gap-2",children:[(0,i.jsx)(p.ZP,{onClick:()=>{t?r(!n):s(!a)},"aria-controls":"sidebar",className:"flex items-center justify-center w-8 px-1 py-0",icon:(0,i.jsx)("svg",{className:"w-5 h-5 text-gray-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})}),!t&&(0,i.jsx)(m(),{href:"/",className:"h-full",children:(0,i.jsx)(f(),{src:c.Z,alt:"Samugiken",className:"w-[100%] h-[60px]"})})]}),(0,i.jsx)("div",{className:"flex items-center justify-center",children:(0,i.jsx)("div",{className:"flex items-center justify-center col-row",children:(0,i.jsx)(x.Z,{arrow:!0,placement:"bottomRight",overlayClassName:"shadow-[rgba(0,0,0,0.35)_0_5px_15px] rounded-xl top-10",trigger:["click"],dropdownRender:()=>(0,i.jsxs)("div",{className:"flex flex-col p-3 bg-white rounded-md shadow-md gap-y-1",children:[(0,i.jsx)(m(),{href:"/my-profile",className:"font-medium leading-[normal] text-primary hover:text-primary",children:(0,i.jsx)("div",{className:"cursor-pointer rounded-[4px] p-3 duration-100 hover:bg-primary/10",children:"My Profile"})}),(0,i.jsx)(v.Z,{className:"!my-2"}),(0,i.jsx)(p.ZP,{type:"primary",danger:!0,onClick:o,children:"Logout"})]}),children:(0,i.jsxs)("div",{className:"flex items-center cursor-pointer gap-x-3",children:[(0,i.jsx)("div",{className:"flex items-center gap-2 ml-2",children:(0,i.jsx)("span",{className:"font-semibold",children:l})}),(0,i.jsx)(u.ZP,{name:l,round:!0,maxInitials:1,size:"35",textSizeRatio:2,fgColor:"white",color:"black"})]})})})})]})};var j=n(73640),E=n(62581),b=n(26134),A=n(1952),y=n(7144),S=n(42439),w=n(88483),R=n(42720),Z=n(43146),C=n(57221),D=n(84176),I=n(54216),k=n(12285),P=n(20188),O=n(19254);let T=e=>{var t,n,a,s,l,o,c,u,h,p,x;let{activeMenu:v,activeDropdown:g}=e,[f,N]=(0,r.useState)(v),{user:T}=(0,d.a)(),_=null==T?void 0:T.role.accessRights,L=e=>{N([e])},U=[{key:"dashboard",label:(0,i.jsx)(m(),{href:E.Z.ADMIN_DASHBOARD,children:"Dashboard"}),icon:(0,i.jsx)(A.Z,{width:16,height:16}),onClick:()=>L("dashboard")},...(0,b.f)(null==_?void 0:null===(t=_.PRODUCT)||void 0===t?void 0:t.READ,[{key:"product",label:(0,i.jsx)(m(),{href:E.Z.PRODUCT,children:"Product"}),icon:(0,i.jsx)(y.Z,{width:16,height:16}),onClick:()=>L("product")}]),...(0,b.f)(null==_?void 0:null===(n=_.REVIEW)||void 0===n?void 0:n.READ,[{key:"review",label:(0,i.jsx)(m(),{href:E.Z.REVIEW,children:"Reviews"}),icon:(0,i.jsx)(S.Z,{width:16,height:16}),onClick:()=>L("review")}]),...(0,b.f)(null==_?void 0:null===(a=_.WARRANTY)||void 0===a?void 0:a.READ,[{key:"warranty",label:"Warranty",icon:(0,i.jsx)(O.Z,{width:16,height:16}),children:[{key:"warranty-register",label:(0,i.jsx)(m(),{href:E.Z.WARRANTY_REGISTER,children:"Warranty Register"}),onClick:()=>L("warranty-register")},{key:"warranty-claim",label:(0,i.jsx)(m(),{href:E.Z.WARRANTY_CLAIM,children:"Warranty Claim"}),onClick:()=>L("warranty-claim")}]}]),...(0,b.f)(null==_?void 0:null===(s=_.COUPON)||void 0===s?void 0:s.READ,[{key:"c
1oupon",label:(0,i.jsx)(m(),{href:E.Z.COUPON,children:"Coupon"}),icon:(0,i.jsx)(w.Z,{width:16,height:16}),onClick:()=>L("coupon")}]),...(0,b.f)(null==_?void 0:null===(l=_.ORDER)||void 0===l?void 0:l.READ,[{key:"order",label:(0,i.jsx)(m(),{href:E.Z.ORDER,children:"Orders"}),icon:(0,i.jsx)(O.Z,{width:16,height:16}),onClick:()=>L("order")},{key:"abandonment",label:(0,i.jsx)(m(),{href:E.Z.ABANDONMENT,children:"Abandonment"}),icon:(0,i.jsx)(R.Z,{width:16,height:16}),onClick:()=>L("abandonment")}]),...(0,b.f)(null==_?void 0:null===(o=_.BLOG)||void 0===o?void 0:o.READ,[{key:"blog",label:(0,i.jsx)(m(),{href:E.Z.BLOG,children:"Blog"}),icon:(0,i.jsx)(Z.Z,{width:16,height:16}),onClick:()=>L("blog")}]),...(0,b.f)(null==_?void 0:null===(c=_.OUR_PARTNERS)||void 0===c?void 0:c.READ,[{key:"our-partners",label:(0,i.jsx)(m(),{href:E.Z.OUR_PARTNERS,children:"Our Partners"}),icon:(0,i.jsx)(C.Z,{width:16,height:16}),onClick:()=>L("our-partners")}]),...(0,b.f)(null==_?void 0:null===(u=_.CONTENT_MANAGEMENT)||void 0===u?void 0:u.READ,[{key:"content",label:"Content Management",icon:(0,i.jsx)(D.Z,{width:16,height:16}),children:[{key:"content-banners",label:(0,i.jsx)(m(),{href:E.Z.CONTENT_BANNER,children:"Banners"}),onClick:()=>L("content-banners")},{key:"content-reviews",label:(0,i.jsx)(m(),{href:E.Z.CONTENT_REVIEW,children:"Customer Reviews"}),onClick:()=>L("content-reviews")},{key:"content-videos",label:(0,i.jsx)(m(),{href:E.Z.CONTENT_VIDEO,children:"Product Videos"}),onClick:()=>L("content-videos")},{key:"content-popups",label:(0,i.jsx)(m(),{href:E.Z.CONTENT_POPUP,children:"Popups"}),onClick:()=>L("content-popups")}]}]),...(0,b.f)(null==_?void 0:null===(h=_.USER)||void 0===h?void 0:h.READ,[{key:"user",label:(0,i.jsx)(m(),{href:E.Z.USER,children:"User"}),icon:(0,i.jsx)(I.Z,{width:16,height:16}),onClick:()=>L("user")}]),...(0,b.f)(null==_?void 0:null===(p=_.ROLE)||void 0===p?void 0:p.READ,[{key:"role",label:(0,i.jsx)(m(),{href:E.Z.ROLE,children:"Role"}),icon:(0,i.jsx)(k.Z,{width:16,height:16}),onClick:()=>L("role")}]),...(0,b.f)(null==_?void 0:null===(x=_["SYSTEM_CONFIG/CATEGORY"])||void 0===x?void 0:x.READ,[{key:"system-config",label:(0,i.jsx)(m(),{href:E.Z.SYSTEM_CONFIG,children:"System Config"}),icon:(0,i.jsx)(P.Z,{width:16,height:16}),onClick:()=>L("category")}])];return(0,i.jsx)(j.Z,{theme:"light",mode:"inline",defaultOpenKeys:g||[],defaultSelectedKeys:f,items:U,className:"h-full font-medium"})};var _=n(63309);let{Sider:L,Content:U}=s.default;var M=e=>{let{children:t,user:n,activeMenu:u=[],activeDropdown:h=[],seoConfig:m,withPadding:p=!0,card:x=!0,contentClassName:v}=e,g=(0,o.ac)("(max-width: 768px)"),[j,E]=(0,r.useState)(!1),[b,A]=(0,r.useState)(!1);return(0,i.jsx)(d.H,{user:n,children:(0,i.jsxs)(s.default,{className:"!min-h-screen",children:[(0,i.jsx)(a.PB,{...m}),(0,i.jsx)(N,{isMobile:g,isDrawerOpen:b,setIsDrawerOpen:A,collapsed:j,setCollapsed:E,fullName:(null==n?void 0:n.firstName)+" "+(null==n?void 0:n.lastName)||""}),(0,i.jsx)("div",{className:"mt-[64px]"}),(0,i.jsxs)(s.default,{hasSider:!0,style:{minHeight:"100%"},children:[g?(0,i.jsx)(l.Z,{placement:"left",open:b,onClose:()=>A(!1),width:"250px",styles:{body:{padding:0}},closable:!1,children:(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsx)("div",{className:"py-2",children:(0,i.jsx)(f(),{src:c.Z,alt:"Samugiken",className:"w-[100%] h-[70px]"})}),(0,i.jsx)(T,{activeMenu:u,activeDropdown:h})]})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:j?"duration-200 ml-[80px]":"duration-200 ml-[250px]"}),(0,i.jsx)(L,{trigger:null,collapsible:!0,collapsed:j,theme:"light",width:250,className:"hide-scrollbar",style:{overflow:"scroll",position:"fixed",marginTop:"64px",left:0,top:0,bottom:0,zIndex:100},children:(0,i.jsx)(T,{activeMenu:u,activeDropdown:h})})]}),(0,i.jsx)(U,{className:(0,_.cn)("min-h-full",p&&"px-3 py-5 md:p-9"),children:(0,i.jsx)("div",{className:(0,_.cn)(x&&"rounded-lg bg-white p-8 shadow-sm",v),children:t})})]})]})})}},5409:function(e,t,n){"use strict";n.d(t,{J:function(){return l}});var i=n(15989),r=n(39771),a=n(91340);let s=i.Z.create({baseURL:r.T5+"/api",headers:{"Content-Type":"application/json"},withCredentials:!0});s.interceptors.request.use(e=>{if((0,a.rD)()){let t=(0,a.Zd)();t&&(e.headers=e.headers||{},e.headers["x-session-id"]=t)}else e.headers&&e.headers["x-session-id"]&&delete e.headers["x-session-id"];return e});let l=i.Z.create({baseURL:r.T5+"/api",headers:{"Content-Type":"multipart/form-data"},maxContentLength:1/0,maxBodyLength:1/0,withCredentials:!0});t.Z=s},85304:function(e,t,n){"use strict";n.d(t,{H:function(){return m},a:function(){return p}});var i=n(52676),r=n(75271),a=n(76517),s=n(73414),l=n(71030),o=n(83214),d=n(62581),c=n(69504),u=n(91340);let h=(0,r.createContext)(null),m=e=>{let{children:t,user:n}=e,m=(0,s.useRouter)(),{mutate:p}=(0,l.D)({mutationFn:c.kS,onError:e=>a.Am.error((0,o._g)(e)),onSuccess:()=>{m.push(d.Z.LOGIN)}});return(0,r.useEffect)(()=>{n?(0,u.hv)():(0,u.wN)()},[n]),(0,i.jsx)(h.Provider,{value:{user:n,logout:p},children:t})},p=()=>{let e=(0,r.useContext)(h);if(!e)throw Error("useAuth must be used within a AuthProvider");return e}},98111:function(e,t,n){"use strict";var i,r;n.d(t,{D:function(){return i}}),(r=i||(i={})).PENDING="PENDING",r.PROCESSING="PROCESSING",r.SHIPPED="SHIPPED",r.DELIVERED="DELIVERED",r.COMPLETED="COMPLETED",r.CANCELLED="CANCELLED",r.PAYMENT_FAILED="PAYMENT_FAILED",r.REFUND_REQUESTED="REFUND_REQUESTED",r.REFUNDED="REFUNDED",r.EXPIRED="EXPIRED"},41239:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return P}});var i=n(52676),r=n(33561),a=n(69834),s=n(71030),l=n(56220),o=n(57722),d=n(99508),c=n(29350),u=n(77471),h=n(3833),m=n(8478),p=n(77894),x=n(21844),v=n(78051),g=n(4948),f=n(29289),N=n(79406),j=n(49810),E=n(99564),b=n(98111),A=n(83214),y=n(76517),S=n(75271),w=n(27026),R=n.n(w),Z=n(62581);let{Title:C,Text:D}
1=l.default,I=e=>e.toLowerCase().replace(/[_-]/g," ").replace(/\b\w/g,e=>e.toUpperCase()),k=e=>(0,i.jsx)(o.Z,{color:"PENDING"===e?"gold":"PROCESSING"===e?"orange":"SHIPPED"===e?"blue":"DELIVERED"===e?"green":"COMPLETED"===e?"#166534":"CANCELLED"===e?"red":"PAYMENT_FAILED"===e?"red":"REFUND_REQUESTED"===e?"yellow":"REFUNDED"===e?"yellow":"default",children:I(e)});var P=!0;t.default=e=>{var t,n,l,N;let{user:w}=e,{orderId:P}=(0,r.useRouter)().query,[T,_]=(0,S.useState)(""),[L,U]=(0,S.useState)("PENDING"),M=(0,a.a)({queryKey:["admin","order",P],queryFn:async()=>(await (0,E.QL)(P)).data,enabled:!!P});(0,S.useEffect)(()=>{M.data&&(_(M.data.note||""),U(M.data.status))},[M.data]);let F=(0,s.D)({mutationFn:async()=>(0,E.UW)(P,T),onSuccess:()=>{y.Am.success("Note updated"),M.refetch()},onError:e=>y.Am.error((0,A._g)(e))}),W=(0,s.D)({mutationFn:async e=>(0,E.CW)(P,e),onSuccess:()=>{y.Am.success("Status updated"),M.refetch()},onError:e=>y.Am.error((0,A._g)(e))}),B=M.data,G=(null==B?void 0:B.couponSnapshots)&&B.couponSnapshots.length>0?B.couponSnapshots.filter(e=>!!(null==e?void 0:e.code)).map(e=>({key:"snapshot-".concat(e.id,"-").concat(e.code),code:e.code,title:e.title})):((null==B?void 0:B.appliedCoupons)||[]).filter(e=>{var t;return!!(null==e?void 0:null===(t=e.coupon)||void 0===t?void 0:t.code)}).map(e=>({key:"relation-".concat(e.coupon.refId),code:e.coupon.code,title:e.coupon.title}));return(0,i.jsxs)(j.Z,{user:w,activeMenu:["order"],card:!1,children:[(0,i.jsx)("div",{className:"flex items-center justify-between mb-6",children:(0,i.jsxs)("div",{children:[(0,i.jsxs)(C,{level:4,className:"mb-1",children:["Order ",(null==B?void 0:B.orderCode)||"-"]}),(0,i.jsx)(d.Z,{size:"small",wrap:!0,children:B&&k(B.status)})]})}),(0,i.jsxs)(c.Z,{gutter:24,children:[(0,i.jsxs)(u.Z,{span:16,children:[(0,i.jsx)(h.Z,{title:"Customer",className:"!mb-6",children:(0,i.jsxs)(m.Z,{column:1,bordered:!0,size:"small",children:[(0,i.jsx)(m.Z.Item,{label:"Name",children:B?(0,i.jsxs)(R(),{href:"".concat(Z.Z.USER,"/").concat(B.user.refId),children:[B.user.firstName," ",B.user.lastName]}):"-"}),(0,i.jsx)(m.Z.Item,{label:"Email",children:(null==B?void 0:B.user.email)||"-"}),(0,i.jsx)(m.Z.Item,{label:"Created at",children:B?(0,A.i$)(B.createdAt,"-"):"-"})]})}),(0,i.jsx)(h.Z,{title:(null==B?void 0:B.deliveryMethod)==="DELIVERY"?"Shipping Address":"Pickup Location",className:"!mb-6",children:(null==B?void 0:B.deliveryMethod)==="DELIVERY"?(0,i.jsxs)(m.Z,{column:1,bordered:!0,size:"small",children:[(0,i.jsx)(m.Z.Item,{label:"Name",labelStyle:{width:140},children:(null==B?void 0:B.shippingAddressSnapshot)?"".concat(B.shippingAddressSnapshot.firstName," ").concat(B.shippingAddressSnapshot.lastName):"-"}),(0,i.jsx)(m.Z.Item,{label:"Phone",labelStyle:{width:140},children:(null==B?void 0:null===(t=B.shippingAddressSnapshot)||void 0===t?void 0:t.phone)||"-"}),(0,i.jsx)(m.Z.Item,{label:"Address",labelStyle:{width:140},children:(null==B?void 0:B.shippingAddressSnapshot)?"".concat(B.shippingAddressSnapshot.addressLine1).concat(B.shippingAddressSnapshot.addressLine2?", "+B.shippingAddressSnapshot.addressLine2:"",", ").concat(B.shippingAddressSnapshot.city,", ").concat(B.shippingAddressSnapshot.state,", ").concat(B.shippingAddressSnapshot.postcode,", ").concat(B.shippingAddressSnapshot.country):"-"})]}):(0,i.jsxs)(m.Z,{column:1,bordered:!0,size:"small",children:[(0,i.jsx)(m.Z.Item,{label:"Name",labelStyle:{width:140},children:(null==B?void 0:null===(n=B.pickupLocationSnapshot)||void 0===n?void 0:n.name)||"-"}),(0,i.jsx)(m.Z.Item,{label:"Phone",labelStyle:{width:140},children:(null==B?void 0:null===(l=B.pickupLocationSnapshot)||void 0===l?void 0:l.phone)||"-"}),(0,i.jsx)(m.Z.Item,{label:"Address",labelStyle:{width:140},children:(null==B?void 0:B.pickupLocationSnapshot)?"".concat(B.pickupLocationSnapshot.addressLine1).concat(B.pickupLocationSnapshot.addressLine2?", "+B.pickupLocationSnapshot.addressLine2:"",", ").concat(B.pickupLocationSnapshot.city,", ").concat(B.pickupLocationSnapshot.state,", ").concat(B.pickupLocationSnapshot.postcode,", ").concat(B.pickupLocationSnapshot.country):"-"}),(0,i.jsx)(m.Z.Item,{label:"Hours",children:(null==B?void 0:null===(N=B.pickupLocationSnapshot)||void 0===N?void 0:N.hours)||"-"})]})}),(0,i.jsx)(h.Z,{title:"Items",className:"!mb-6",children:(0,i.jsx)(p.Z,{rowKey:e=>e.refId,dataSource:(null==B?void 0:B.items)||[],pagination:!1,columns:[{title:"Product",dataIndex:"productName",render:(e,t)=>{var n;return(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsx)(R(),{href:"".concat(Z.Z.PRODUCT,"/").concat((null===(n=t.product)||void 0===n?void 0:n.refId)||""),className:"font-medium",children:t.productName}),t.variationAttributes&&t.variationAttributes.length>0&&(0,i.jsx)("span",{className:"text-xs text-gray-500",children:t.variationAttributes.filter(e=>e.attribute&&e.value).map(e=>"".concat(e.attribute,": ").concat(e.value)).join(" ⢠")})]})}},{title:"Unit Price",dataIndex:"unitPrice",render:e=>"RM ".concat(Number(e).toFixed(2))},{title:"Shipping",render:(e,t)=>(0,i.jsxs)("div",{className:"text-xs",children:[(0,i.jsxs)("div",{children:["Weight:"," ",t.weight?"".concat(Number(t.weight).toFixed(2)," kg"):"-"]}),(0,i.jsxs)("div",{children:["Dim: ",t.length?Number(t.length).toFixed(2):"-"," ","x ",t.width?Number(t.width).toFixed(2):"-"," x"," ",t.height?Number(t.height).toFixed(2):"-"," cm"]})]})},{title:"Qty",dataIndex:"quantity"},{title:"Subtotal",render:(e,t)=>"RM ".concat(Number(t.unitPrice*t.quantity).toFixed(2))},{title:"Action",render:(e,t)=>(0,i.jsx)(O,{orderRefId:(null==B?void 0:B.refId)||"",itemRefId:t.refId,defaultValues:{weight:t.weight?Number(t.weight):void 0,length:t.length?Number(t.length):void 0,width:t.width?Number(t.width):void 0,height:t.height?Number(t.height):void 0},onSuccess:()=>M.refetch()})}]})}),(0,i.jsx)(h.Z,{title:"Summary",className:"!mb-6",children:(0,i.jsxs)(m.Z,{bordered:!0,size:"small",column:1,children:[(0,i.jsx)(m.Z.Item,{label:"Subtotal",children:B?"RM ".concat(Number(B.subtotal).toFixed(2)):"-"}),(0,i.jsx)(m.Z.Item,{label:"Shipping",children:B?"RM ".concat(Number(B.shippingFee).toFixed(2)):"-"}),(0,i.jsx)(m.Z.Item,{label:"Applied coupon",children:G.length>0?(0,i.jsx)(d.Z,{size:[4,4],wrap:!0,children:G.map(e=>(0,i.jsx)(o.Z,{color:"blue",children:e.title?"".concat(e.code," (").concat(e.title,")"):e.code},e.key))}):"-"}),(0,i.jsx)(m.Z.Item,{label:"Discount",children:B?"-RM ".concat(Number(B.discount).toFixed(2)):"-"}),(0,i.jsx)(m.Z.Item,{label:"Total",children:(0,i.jsx)(D,{strong:!0,children:B?"RM ".concat(Number(B.total).toFixed(2)):"-"})})]})}),(0,i.jsx)(h.Z,{title:"Transactions",className:"!mb-6",children:(0,i.jsx)(p.Z,{size:"small",pagination:!1,rowKey:e=>e.refId,dataSource:(null==B?void 0:B.payments)||[],columns:[{title:"Status",dataIndex:"status",render:e=>I(e)},{title:"Amount",dataIndex:"amount",render:e=>"RM ".concat(Number(e).toFixed(2))},{title:"Channel",dataIndex:"paymentChannel"},{title:"FIUU Txn ID",dataIndex:"fiuuTransactionId"},{title:"Order ID",dataIndex:"fiuuOrderId"},{title:"Date",dataIndex:"createdAt",render:e=>(0,A.i$)(e,"-")}]})}),(0,i.jsx)(h.Z,{title:"Note",children:(0,i.jsxs)(d.Z,{direction:"vertical",className:"w-full",children:[(0,i.jsx)(x.default.TextArea,{rows:4,value:T,onChange:e=>_(e.target.value)}),(0,i.jsx)("div",{children:(0,i.jsx)(v.ZP,{type:"primary",onClick:()=>y.Am.promise(F.mutateAsync(),{pending:"Saving...",success:"Saved",error:{render(e){let{data:t}=e;return"Error: ".concat((0,A._g)(t))}}}),loading:F.isPending,disabled:F.isPending,children:"Save"})})]})})]}),(0,i.jsxs)(u.Z,{span:8,children:[(0,i.jsx)(h.Z,{title:"Status",className:"!mb-6",children:(0,i.jsxs)(d.Z,{direction:"vertical",className:"w-full",children:[(0,i.jsx)(g.default,{value:L,onChange:e=>U(e),options:Object.values(b.D).map(e=>({label:I(e),value:e})),className:"w-full"}),(0,i.jsx)("div",{className:"flex gap-2",children:(0,i.jsx)(v.ZP,{type:"primary",onClick:()=>y.Am.promise(W.mutateAsync(L),{pending:"Updating...",success:"Status updated",error:{render(e){let{data:t}=e;return"Error: ".concat((0,A._g)(t))}}}
1),loading:W.isPending,disabled:W.isPending,children:"Save Status"})})]})}),(0,i.jsx)(h.Z,{title:"Activity",children:(0,i.jsx)(f.Z,{mode:"left",items:((null==B?void 0:B.activities)||[]).map(e=>{let t=e.actorName||(e.actor?"".concat(e.actor.firstName," ").concat(e.actor.lastName):"System"),n=e.message||e.action;return{key:e.refId,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-sm font-medium",children:n}),(0,i.jsxs)("div",{className:"text-xs text-gray-500",children:[(0,A.i$)(e.createdAt,"-")," - ",t]})]})}})})})]})]})]})};let O=e=>{var t,n,r,a;let{orderRefId:l,itemRefId:o,defaultValues:d,onSuccess:c}=e,[u,h]=(0,S.useState)(!1),[m,p]=(0,S.useState)(d),g=(0,s.D)({mutationFn:async()=>(0,E.vi)(l,o,m),onSuccess:()=>{y.Am.success("Shipping snapshot updated"),c(),h(!1)},onError:e=>y.Am.error((0,A._g)(e))});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v.ZP,{size:"small",onClick:()=>h(!0),children:"Edit"}),(0,i.jsx)(N.Z,{title:"Edit Shipping Snapshot",open:u,onCancel:()=>h(!1),okText:"Save",confirmLoading:g.isPending,onOk:()=>y.Am.promise(g.mutateAsync(),{pending:"Updating...",success:"Updated",error:{render(e){let{data:t}=e;return"Error: ".concat((0,A._g)(t))}}}),children:(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,i.jsxs)("label",{className:"text-sm",children:["Weight (kg)",(0,i.jsx)(x.default,{type:"number",step:"0.01",value:null!==(t=m.weight)&&void 0!==t?t:"",onChange:e=>p(t=>({...t,weight:""===e.target.value?void 0:Number(e.target.value)}))})]}),(0,i.jsx)("div",{}),(0,i.jsxs)("label",{className:"text-sm",children:["Length (cm)",(0,i.jsx)(x.default,{type:"number",step:"0.01",value:null!==(n=m.length)&&void 0!==n?n:"",onChange:e=>p(t=>({...t,length:""===e.target.value?void 0:Number(e.target.value)}))})]}),(0,i.jsxs)("label",{className:"text-sm",children:["Width (cm)",(0,i.jsx)(x.default,{type:"number",step:"0.01",value:null!==(r=m.width)&&void 0!==r?r:"",onChange:e=>p(t=>({...t,width:""===e.target.value?void 0:Number(e.target.value)}))})]}),(0,i.jsxs)("label",{className:"text-sm",children:["Height (cm)",(0,i.jsx)(x.default,{type:"number",step:"0.01",value:null!==(a=m.height)&&void 0!==a?a:"",onChange:e=>p(t=>({...t,height:""===e.target.value?void 0:Number(e.target.value)}))})]})]})})]})}},69504:function(e,t,n){"use strict";n.d(t,{A9:function(){return d},IU:function(){return a},c0:function(){return o},kS:function(){return s},o9:function(){return l},x4:function(){return r}});var i=n(5409);let r=async e=>i.Z.post("/auth/login",e),a=async e=>i.Z.post("/auth/signup",e),s=async()=>i.Z.post("/auth/logout"),l=async e=>i.Z.post("/auth/forget-password",e),o=async e=>i.Z.post("/auth/password-reset/confirm",e),d=async e=>i.Z.post("/auth/verify-user",e)},99564:function(e,t,n){"use strict";n.d(t,{CW:function(){return s},QL:function(){return a},UW:function(){return l},gH:function(){return r},vi:function(){return o}});var i=n(5409);let r=e=>i.Z.get("/admin/order",{params:e}),a=e=>i.Z.get("/admin/order/".concat(e)),s=(e,t)=>i.Z.put("/admin/order/".concat(e,"/status"),{status:t}),l=(e,t)=>i.Z.put("/admin/order/".concat(e,"/note"),{note:t}),o=(e,t,n)=>i.Z.put("/admin/order/".concat(e,"/item/").concat(t,"/shipping"),n)},62581:function(e,t,n){"use strict";var i,r;n.d(t,{Z:function(){return i}}),(r=i||(i={})).LOGIN="/login",r.ADMIN_DASHBOARD="/admin/dashboard",r.HOME="/",r.USER="/admin/user",r.ROLE="/admin/role",r.NEW_ROLE="/admin/role/new",r.SYSTEM_CONFIG="/admin/system-config",r.PRODUCT="/admin/product",r.BLOG="/admin/blog",r.ORDER="/admin/order",r.ABANDONMENT="/admin/abandonment",r.WARRANTY_REGISTER="/admin/warranty-register",r.WARRANTY_CLAIM="/admin/warranty-claim",r.COUPON="/admin/coupon",r.OUR_PARTNERS="/admin/our-partners",r.REVIEW="/admin/review",r.CONTENT_BANNER="/admin/content/banners",r.CONTENT_REVIEW="/admin/content/reviews",r.CONTENT_VIDEO="/admin/content/videos",r.CONTENT_POPUP="/admin/content/popups"},26134:function(e,t,n){"use strict";n.d(t,{f:function(){return i}});let i=(e,t,n)=>void 0===t?void 0!==n?n:Array.isArray(t)?[]:{}:e?t:void 0!==n?n:Array.isArray(t)?[]:{}},83214:function(e,t,n){"use strict";n.d(t,{_g:function(){return a},i$:function(){return s}});var i=n(52043),r=n.n(i);let a=e=>{if("response"in e){var t,n;return null===(n=e.response)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.message}return e.message},s=(e,t)=>{let n=r()(e);return e&&n.isValid()?r()(e).format("DD MMM YYYY, hh:mm a"):t||null}},91340:function(e,t,n){"use strict";n.d(t,{Zd:function(){return a}
1,hv:function(){return l},rD:function(){return o},wN:function(){return s}});let i="session_id",r="session_header_enabled";function a(){try{let e=localStorage.getItem(i);if(e&&e.length>0)return e;let t="undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():d();return localStorage.setItem(i,t),t}catch(e){return d()}}function s(){try{localStorage.setItem(r,"1")}catch(e){}}function l(){try{localStorage.setItem(r,"0"),localStorage.removeItem(i)}catch(e){}}function o(){try{return"1"===localStorage.getItem(r)}catch(e){return!1}}function d(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}},function(e){e.O(0,[5989,4237,7610,8174,9834,8051,9513,4540,928,4298,4190,6631,6220,9575,7444,9406,150,1887,5934,9059,8672,1795,8374,7894,7645,7206,7165,2888,9774,179],function(){return e(e.s=5194)}),_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.