1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2307],{92924:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/orders/[orderId]",function(){return c(80043)}])},80043:function(a,b,c){"use strict";c.r(b);var d=c(85893),e=c(67294),f=c(89569),g=c(25675),h=c(98396),i=c(46574),j=c(21987),k=c(48263),l=c(87357),m=c(2734),n=c(23143),o=c(31394),p=function(a){return(0,d.jsxs)(n.ZT,{paragraph:!0,mb:4,children:[(0,d.jsx)(n.ZT,{fontWeight:"bold",sx:{mr:2},component:"span",children:a.label}),a.value]})},q=(0,f.qC)(o.KQ)(function(a){var b=a.order,c=void 0===b?{}:b,f=(0,m.Z)(),o=(0,h.Z)(f.breakpoints.down("md")),q=c.data,r=c.loaded,s=(0,e.useMemo)(function(){var a;return(null==q?void 0:null===(a=q.orderProducts)|| void 0===a?void 0:a.reduce(function(a,b){return a+b.quantity*b.product.points},0))||0},[q]);return(0,d.jsxs)(i.Z,{maxWidth:!1,sx:{mt:6},children:[r?q?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(n.ZT,{variant:"h4",mb:3,children:["Comanda cu nr. ",q.id," - ",q.status.toLowerCase()]}),(0,d.jsxs)(k.ZP,{container:!0,spacing:10,rowSpacing:6,children:[(0,d.jsx)(k.ZP,{item:!0,xs:12,sm:12,md:6,children:(0,d.jsx)(j.Z,{sx:{py:5},square:!0,children:(0,d.jsxs)(i.Z,{maxWidth:!1,children:[(0,d.jsx)(n.ZT,{variant:o?"h3":"h4",mb:6,children:"Produse"}),q.orderProducts.map(function(a){var b,c;return(0,d.jsxs)(k.ZP,{container:!0,alignItems:"center",children:[(0,d.jsx)(k.ZP,{item:!0,xs:1,children:(0,d.jsxs)(n.ZT,{variant:o?"body1":"h6",fontWeight:"bold",children:[a.quantity,"x"]})}),(0,d.jsx)(k.ZP,{item:!0,xs:3,md:2,textAlign:"center",children:(null===(b=a.product.images)|| void 0===b?void 0:null===(c=b[0])|| void 0===c?void 0:c.path)&&(0,d.jsx)(g.default,{src:encodeURI("/api/".concat(a.product.images[0].path)),width:100,height:100,alt:a.product.name})}),(0,d.jsx)(k.ZP,{item:!0,xs:4,md:6,children:(0,d.jsx)(n.ZT,{children:a.product.name})}),(0,d.jsx)(k.ZP,{item:!0,xs:4,md:3,textAlign:"right",children:(0,d.jsxs)(n.ZT,{fontWeight:"bold",children:[a.quantity*a.product.points," stele"]})})]},"order-product-".concat(a.id))}),(0,d.jsx)(n.aO,{color:f.palette.primary.main,sx:{opacity:0.25,mt:2,mb:3},size:"fullWidth"}),(0,d.jsxs)(k.ZP,{container:!0,children:[(0,d.jsx)(k.ZP,{item:!0,xs:1}),(0,d.jsx)(k.ZP,{item:!0,xs:3,md:2,textAlign:"center",children:(0,d.jsx)(n.ZT,{variant:o?"body1":"h6",fontWeight:"bold",children:"Total"})}),(0,d.jsx)(l.Z,{sx:{flexGrow:1}}),(0,d.jsx)(k.ZP,{item:!0,xs:4,md:3,textAlign:"right",children:(0,d.jsxs)(n.ZT,{fontWeight:"bold",children:[s," stele"]})})]})]})})}),(0,d.jsx)(k.ZP,{item:!0,xs:12,sm:12,md:6,children:(0,d.jsxs)(k.ZP,{container:!0,rowSpacing:6,children:[(0,d.jsx)(k.ZP,{item:!0,xs:12,children:(0,d.jsx)(j.Z,{sx:{py:5},square:!0,children:(0,d.jsxs)(i.Z,{maxWidth:!1,children:[(0,d.jsx)(n.ZT,{variant:o?"h4":"h5",fontWeight:"semiBold",mb:3,children:"Adresa"}),(0,d.jsxs)(n.ZT,{mb:4,paragraph:!0,children:[q.user.streetType||""," ",q.user.street||""," ",q.user.streetNo||""," ",q.user.building||""," Scara ",q.user.staircase||"-"," "," Etaj "," ",q.user.floor||"-"," "," Apartament "," ",q.user.appartment||"-"," "," OraÈ "," ",q.user.town||"-"," "," JudeÈ "," ",q.user.county||"-"," "," Sector "," ",q.user.sector||"-"," ",q.user.postalcode||""]})]})})}),(0,d.jsx)(k.ZP,{item:!0,xs:12,children:(0,d.jsx)(j.Z,{sx:{py:5},square:!0,children:(0,d.jsxs)(i.Z,{maxWidth:!1,children:[(0,d.jsx)(n.ZT,{variant:o?"h4":"h5",fontWeight:"semiBold",mb:3,children:"Date de contact"}),(0,d.jsx)(p,{label:"Prenume Èi nume:",value:"".concat(q.user.firstName," ").concat(q.user.lastName)}),(0,d.jsx)(p,{label:"Email:",value:q.user.email}),(0,d.jsx)(p,{label:"Telefon:",value:q.user.phone})]})})})]})})]})]}):(0,d.jsx)(j.Z,{sx:{px:8,py:4},square:!0,children:(0,d.jsxs)(n.ZT,{variant:"h6",fontWeight:"bold",children:["Nu existÄ comanda cu nr. ",q.id]})}):(0,d.jsx)(j.Z,{sx:{px:o?2:8,py:4},square:!0,children:(0,d.jsx)(n.ZT,{children:"Getting data..."})}),(0,d.jsx)(n.LZ,{mb:8})]})});q.getInitialProps=function(){return{route:{requireAuthToken:!0,requiredRole:"ADMIN"}}},q.description="ComandÄ",q.layout="dashboard",q.noindex=!0,q.nofollow=!0,b.default=q}},function(a){a.O(0,[9774,2888,179],function(){return a(a.s=92924)}),_N_E=a.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.