1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[542],{61141:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/orders/[[...orderId]]",function(){return r(18859)}])},18859:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return j}});var n=r(87394),a=r(52322),i=r(2784),o=r(36350),c=r(63141),d=r(9206),l=r(42306),s=r(98788),u=r(5163),f=r(57628),p=r(84513),g=r(35025),m=r(61019);var h=function(e){var t=(0,i.useState)([]),r=t[0],a=t[1],o=(0,n.Z)(function(e){var t=(0,n.Z)((0,f.Z)({context:g.Z,auth:!0}),2),r=t[0],a=t[1],o=(0,m.V)().navigate;return(0,i.useEffect)((function(){(0,s.Z)((function(){var t;return(0,u.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),e?[4,r({path:"order?$filter=createdUtc ge ".concat((0,p.WU)(e,"yyyy-MM-dd")),storeName:"orders"})]:[3,2];case 1:return n.sent(),[3,4];case 2:return[4,r({path:"order",storeName:"orders"})];case 3:n.sent(),n.label=4;case 4:return[3,6];case 5:return t=n.sent(),o(t),[3,6];case 6:return[2]}}))}))()}),[e,r,o]),[(0,i.useContext)(g.Z).orders,a]}(e),2),h=o[0],v=o[1],y=(0,n.Z)((0,d.Ng)(),2),Z=y[0],x=y[1],b=(0,c.iB)(),j=b.products,N=b.loading,w=v||x||N;return(0,i.useEffect)((function(){if(!w&&Z.length&&j.length){var e=(0,l.Z)(h,[{array:j,mapping:function(e,t){return e.productId===t.id},propertyName:"product"},{array:Z,mapping:function(e,t){return e.configId===t.general.id},propertyName:"config"}]);e.length&&a(e)}}),[w,Z,h,j]),[r,w||!r.length]},v=r(74815),y=r(20065),Z=r(5632),x=(0,v.k)(new Date,30);var b=function(){var e,t=(0,n.Z)((0,o.$)("translation"),1)[0],r=[{title:t("order.tableHeaders.givenName"),field:"givenName"},{title:t("order.tableHeaders.familyName"),field:"familyName"},{title:t("order.tableHeaders.email"),field:"email"},{title:t("order.tableHeaders.progress"),field:"progress"},{title:t("order.tableHeaders.product"),field:"product.name"},{title:t("order.tableHeaders.modifiedUtc"),field:"modifiedUtc",render:function(e){var t=e.modifiedUtc;return"string"===typeof t?(0,p.WU)(new Date(t),"yyyy-MM-dd"):t},defaultSort:"desc"},{title:t("order.tableHeaders.createdUtc"),field:"createdUtc",render:function(e){var t=e.createdUtc;return"string"===typeof t?(0,p.WU)(new Date(t),"yyyy-MM-dd"):t}},{title:t("order.tableHeaders.executedUtc"),field:"executedUtc",render:function(e){var t=e.executedUtc;return"string"===typeof t?(0,p.WU)(new Date(t),"yyyy-MM-dd"):t}}],c=(0,i.useState)(x),d=c[0],l=c[1],s=(0,n.Z)(h(d),2),u=s[0],f=s[1],g=(0,Z.useRouter)();return(0,a.jsx)(y.Z,{columns:r,data:u,loading:f,openedItemId:null===(e=g.query.orderId)||void 0===e?void 0:e[0],selectedDate:d,setSelectedDate:l,type:"order"})};b.auth="admin";var j=b},77524:function(e,t,r){"use strict";r.d(t,{Z:function(){return E}});var n=r(70865),a=r(87394),i=r(52322),o=r(2784),c=r(28336),d=r.n(c),l=r(35423),s=r(36350),u=r(8629),f=r(79249),p=r(38724),g=r(60905),m=r(86619),h=r(49429),v=r(77277);var y=r(5632),Z=function(e){var t=e.type,r=e.item,o=(0,a.Z)((0,s.$)("translation"),1)[0],c=(0,y.useRouter)();if(!r||!r.config)return null;var d=(0,n.Z)({},r);delete d.tableData,d.config=d.config.general.name,d.product=d.product.name;var l=Object.entries(d),Z=function(){return c.push("/admin/".concat(t,"s"))};return(0,i.jsxs)(u.Z,{fullWidth:!0,maxWidth:"lg",onClose:Z,open:!0,children:[(0,i.jsx)(f.Z,{onClose:Z,children:o("".concat(t,".details"))}),(0,i.jsx)(p.Z,{children:(0,i.jsx)(g.Z,{container:!0,item:!0,spacing:2,wrap:"wrap",children:l.map((function(e){var t,r=(0,a.Z)(e,2),n=r[0],o=r[1];return"boolean"===typeof o&&(o=o.toString()),(0,i.jsx)(g.Z,{item:!0,xs:4,children:(0,i.jsx)(m.Z,{disabled:!0,fullWidth:!0,label:(t=n,"string"!==typeof t?"":t.charAt(0).toUpperCase()+t.slice(1)),margin:"normal",value:o||""})},n)}))})}),(0,i.jsx)(h.Z,{children:(0,i.jsx)(v.Z,{onClick:Z,children:o("close")})})]})},x=r(79692),b=r(61837),j=r(61564),N=r(12817),w=r(17115),U=r(47842),I=r(96670),_=r(98069),C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t>15&&(t=15);var r=e.reduce((function(e,t){var r=t.field;return(0,I.Z)((0,n.Z)({},e),(0,U.Z)({},r,(0,i.jsx)(_.Z,{})))}),{});return Array.from({length:t}).map((function(){return(0,n.Z)({},r)}))},M=r(45058),k=(0,x.Z)((function(e){return{toolbar:{display:"grid",gridTemplateColumns:"1fr 3rem 6rem",gridGap:"2rem",alignItems:"baseline"},toolbarFiltering:{justifyItems:"center"},datePicker:{marginRight:e.spacing(2)},root:{padding:"".concat(e.spacing(2),"px ").concat(e.spacing(1),"px")}}})),E=function(e){var t=e.selectedDate,r=e.setSelectedDate,u=e.type,f=e.title,p=e.columns,g=e.data,m=e.loading,h=e.openedItemComponent,v=e.openedItemId,x=e.loadingRows,U=e.pageSize,I=void 0===U?20:U;(0,o.useEffect)((function(){if(!m&&g.length){var e=g.length>I?I:g.length;(0,M.k)("".concat(u,".list"),e)}}),[m,g.length,u,I]);var _=(0,M.I)("".concat(u,".list")),E=C(p,_);m&&(g=x||E);var S=(0,a.Z)((0,s.$)("translation"),1)[0],D=k(),H=(0,y.useRouter)(),W=(0,o.useState)(!1),R=W[0],T=W[1],O=function(){return T((function(e){return!e}))};return(0,i.jsxs)("div",{className:D.root,children:[h?null:(0,i.jsx)(Z,{item:g.find((function(e){return e.id===v})),type:u}),h&&v?(0,i.jsx)(h,{id:v}):(0,i.jsx)(d(),{columns:p,components:{Toolbar:function(e){return(0,i.jsxs)("div",{className:D.toolbar,children:[(0,i.jsx)(c.MTableToolbar,(0,n.Z)({},e)),(0,i.jsx)("div",{className:D.toolbarFiltering,children:(0,i.jsx)(b.Z,{"aria-label":"open drawer",onClick:O,children:(0,i.jsx)(l.G6,{})})}),(0,i.jsx)(j.M,{utils:w.Z,children:(0,i.jsx)(N.M,{className:D.datePicker,disableFuture:!0,format:"yyyy-MM-dd",onChange:r,value:t,variant:"inline"})})]})}},data:g,icons:l.gw,onRowClick:function(e,t){var r=t.path||t.id||t.general.path||t.general.id;!e.target.attributes.getNamedItem("href")&&H.push("/admin/".concat(u,"s/").concat(r))},options:{pageSize:I,actionsColumnIndex:-1,filtering:R,grouping:!0,exportButton:!0,exportAllData:!0},title:null!==f&&void 0!==f?f:S("".concat(u,".list"))})]})}},20065:function(e,t,r){"use strict";var n=r(77524);t.Z=n.Z},42306:function(e,t){"use strict";t.Z=function(e,t){var r=JSON.parse(JSON.stringify(e));return t.forEach((function(e){var t=e.array,n=e.mapping,a=e.propertyName;t.forEach((function(e){r.filter((function(t){return n(t,e)}
1)).forEach((function(t){t[a]=e}))}))})),r}},74815:function(e,t,r){"use strict";r.d(t,{k:function(){return a}});var n=r(16724);function a(e,t,r){return(0,n.E)(e,-t,r)}}},function(e){e.O(0,[70,139,790,30,845,441,374,774,888,179],(function(){return t=61141,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.