text: (this["webpackJsonpreact-material-dashboard"]=this["webpackJsonpreact-material-dashboard"]||[]).push([[0],{307:function(e,a,t){e.exports=t(432)},405:function(e,a,t){},432:function(e,a,t){"use strict";t.r(a);var n=t(0),r=t.n(n),c=t(26),i=t.n(c);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var l=t(3),o=t(5),s=t(57),m=t(36),u=t(44),d=t(500),p=t(61),g=t.n(p);var b={draw:function(){var e,a,t,n,r,c,i,l,o=this._chart.ctx,s=this._view,m=s.borderWidth,u=this._chart.config.options.cornerRadius;if(u<0&&(u=0),"undefined"===typeof u&&(u=0),s.horizontal?(e=s.base,a=s.x,t=s.y-s.height/2,n=s.y+s.height/2,r=a>e?1:-1,c=1,i=s.borderSkipped||"left"):(e=s.x-s.width/2,a=s.x+s.width/2,t=s.y,r=1,c=(n=s.base)>t?1:-1,i=s.borderSkipped||"bottom"),m){var d=Math.min(Math.abs(e-a),Math.abs(t-n)),p=(m=m>d?d:m)/2,g=e+("left"!==i?p*r:0),b=a+("right"!==i?-p*r:0),f=t+("top"!==i?p*c:0),h=n+("bottom"!==i?-p*c:0);g!==b&&(t=f,n=h),f!==h&&(e=g,a=b)}o.beginPath(),o.fillStyle=s.backgroundColor,o.strokeStyle=s.borderColor,o.lineWidth=m;var v=[[e,n],[e,t],[a,t],[a,n]],E=["bottom","left","top","right"].indexOf(i,0);function j(e){return v[(E+e)%4]}-1===E&&(E=0);var O=j(0);o.moveTo(O[0],O[1]);for(var y=1;y<4;y+=1){O=j(y);var x=y+1;4===x&&(x=0);var k=v[2][0]-v[1][0],N=v[0][1]-v[1][1],w=v[1][0],_=v[1][1];if((l=u)>Math.abs(N)/2&&(l=Math.floor(Math.abs(N)/2)),l>Math.abs(k)/2&&(l=Math.floor(Math.abs(k)/2)),N<0){var C=w,S=w+k,I=_+N,D=_+N,T=w,P=w+k,R=_,M=_;o.moveTo(T+l,R),o.lineTo(P-l,M),o.quadraticCurveTo(P,M,P,M-l),o.lineTo(S,D+l),o.quadraticCurveTo(S,D,S-l,D),o.lineTo(C+l,I),o.quadraticCurveTo(C,I,C,I+l),o.lineTo(T,R-l),o.quadraticCurveTo(T,R,T+l,R)}else if(k<0){var A=w+k,L=w,q=_,B=_,W=w+k,F=w,Y=_+N,H=_+N;o.moveTo(W+l,Y),o.lineTo(F-l,H),o.quadraticCurveTo(F,H,F,H-l),o.lineTo(L,B+l),o.quadraticCurveTo(L,B,L-l,B),o.lineTo(A+l,q),o.quadraticCurveTo(A,q,A,q+l),o.lineTo(W,Y-l),o.quadraticCurveTo(W,Y,W+l,Y)}else o.moveTo(w+l,_),o.lineTo(w+k-l,_),o.quadraticCurveTo(w+k,_,w+k,_+l),o.lineTo(w+k,_+N-l),o.quadraticCurveTo(w+k,_+N,w+k-l,_+N),o.lineTo(w+l,_+N),o.quadraticCurveTo(w,_+N,w,_+N-l),o.lineTo(w,_+l),o.quadraticCurveTo(w,_,w+l,_)}o.fill(),m&&o.stroke()}},f=t(299),h=t(8),v="#FFFFFF",E={black:"#000000",white:v,primary:{contrastText:v,dark:h.a.indigo[900],main:h.a.indigo[500],light:h.a.indigo[100]},secondary:{contrastText:v,dark:h.a.blue[900],main:h.a.blue.A400,light:h.a.blue.A400},success:{contrastText:v,dark:h.a.green[900],main:h.a.green[600],light:h.a.green[400]},info:{contrastText:v,dark:h.a.blue[900],main:h.a.blue[600],light:h.a.blue[400]},warning:{contrastText:v,dark:h.a.orange[900],main:h.a.orange[600],light:h.a.orange[400]},error:{contrastText:v,dark:h.a.red[900],main:h.a.red[600],light:h.a.red[400]},text:{primary:h.a.blueGrey[900],secondary:h.a.blueGrey[600],link:h.a.blue[600]},background:{default:"#F4F6F8",paper:v},icon:h.a.blueGrey[600],divider:h.a.grey[200]},j={h1:{color:E.text.primary,fontWeight:500,fontSize:"35px",letterSpacing:"-0.24px",lineHeight:"40px"},h2:{color:E.text.primary,fontWeight:500,fontSize:"29px",letterSpacing:"-0.24px",lineHeight:"32px"},h3:{color:E.text.primary,fontWeight:500,fontSize:"24px",letterSpacing:"-0.06px",lineHeight:"28px"},h4:{color:E.text.primary,fontWeight:500,fontSize:"20px",letterSpacing:"-0.06px",lineHeight:"24px"},h5:{color:E.text.primary,fontWeight:500,fontSize:"16px",letterSpacing:"-0.05px",lineHeight:"20px"},h6:{color:E.text.primary,fontWeight:500,fontSize:"14px",letterSpacing:"-0.05px",lineHeight:"20px"},subtitle1:{color:E.text.primary,fontSize:"16px",letterSpacing:"-0.05px",lineHeight:"25px"},subtitle2:{color:E.text.secondary,fontWeight:400,fontSize:"14px",letterSpacing:"-0.05px",lineHeight:"21px"},body1:{color:E.text.primary,fontSize:"14px",letterSpacing:"-0.05px",lineHeight:"21px"},body2:{color:E.text.secondary,fontSize:"12px",letterSpacing:"-0.04px",lineHeight:"18px"},button:{color:E.text.primary,fontSize:"14px"},caption:{color:E.text.secondary,fontSize:"11px",letterSpacing:"0.33px",lineHeight:"13px"},overline:{color:E.text.secondary,fontSize:"11px",fontWeight:500,letterSpacing:"0.33px",lineHeight:"13px",textTransform:"uppercase"}},O={MuiButton:{contained:{boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20)",backgroundColor:"#FFFFFF"}},MuiIconButton:{root:{color:E.icon,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}},MuiPaper:{elevation1:{boxShadow:"0 0 0 1px rgba(63,63,68,0.05), 0 1px 3px 0 rgba(63,63,68,0.15)"}},MuiTableCell:{root:Object(o.a)({},j.body1,{borderBottom:"1px solid ".concat(E.divider)})},MuiTableHead:{root:{backgroundColor:h.a.grey[50]}},MuiTypography:{gutterBottom:{marginBottom:8}}},y=Object(f.a)({palette:E,typography:j,overrides:O,zIndex:{appBar:1200,drawer:1100}}),x=(t(404),t(405),{checked:function(e,a){if(!0!==e)return a.message||"must be checked"}}),k=t(4),N=t(1),w=t(501),_=t(125),C=t(301),S=t(281),I=t.n(S),D=Object(w.a)((function(e){return{root:{borderRadius:"4px",alignItems:"center",padding:e.spacing(1),display:"flex",flexBasis:420},icon:{marginRight:e.spacing(1),color:e.palette.text.secondary},input:{flexGrow:1,fontSize:"14px",lineHeight:"16px",letterSpacing:"-0.05px"}}})),T=function(e){var a=e.className,t=e.onChange,n=e.style,c=Object(k.a)(e,["className","onChange","style"]),i=D();return r.a.createElement(_.a,Object.assign({},c,{className:Object(N.a)(i.root,a),style:n}),r.a.createElement(I.a,{className:i.icon}),r.a.createElement(C.a,Object.assign({},c,{className:i.input,disableUnderline:!0,onChange:t})))},P=t(474),R=t(53),M=t.n(R),A=Object(w.a)((function(e){return{root:{borderRadius:"4px",alignItems:"center",padding:e.spacing(1),display:"flex",flexBasis:320},icon:{marginRight:e.spacing(1),color:e.palette.text.secondary},input:{flexGrow:1,fontSize:"14px",lineHeight:"16px",letterSpacing:"-0.05px"}}})),L=function(e){var a=e.className,t=e.onChange,n=e.labelText,c=e.style,i=Object(k.a)(e,["className","onChange","labelText","style"]),l=A();return r.a.createElement(_.a,Object.assign({},i,{className:Object(N.a)(l.root,a),style:c}),r.a.createElement("div",null,n),r.a.createElement(M.a,{className:l.icon}),r.a.createElement(P.a,{id:"date",label:"",type:"date",onChange:function(e){return t(e.target.value)},className:l.textField,InputLabelProps:{shrink:!0}}))},q=Object(w.a)((function(e){return{root:{borderRadius:"4px",alignItems:"center",padding:e.spacing(1),display:"flex",flexBasis:250},icon:{marginRight:e.spacing(1),color:e.palette.text.secondary},input:{flexGrow:1,fontSize:"14px",lineHeight:"16px",letterSpacing:"-0.05px"}}})),B=function(e){var a=e.className,t=e.onChange,n=e.style,c=e.labelText,i=Object(k.a)(e,["className","onChange","style","labelText"]),l=q();return r.a.createElement(_.a,Object.assign({},i,{className:Object(N.a)(l.root,a),style:n}),r.a.createElement("div",null,c),r.a.createElement(M.a,{className:l.icon}),r.a.createElement(P.a,{id:"date",label:"",type:"time",onChange:function(e){return t(e.target.value)},className:l.textField,InputLabelProps:{shrink:!0}}))},W=t(19),F=t(475),Y=Object(w.a)((function(e){return{root:{borderRadius:"4px",alignItems:"center",padding:e.spacing(1),display:"flex",flexBasis:320},icon:{marginRight:e.spacing(1),color:e.palette.text.secondary},input:{flexGrow:1,fontSize:"14px",lineHeight:"16px",letterSpacing:"-0.05px"}}})),H=function(e){var a=e.className,t=(e.onChange,e.style),c=e.placeHolderText,i=e.searchOnClick,m=Object(k.a)(e,["className","onChange","style","placeHolderText","searchOnClick"]),u=Y(),d=Object(n.useState)({filterData:""}),p=Object(l.a)(d,2),g=p[0],b=p[1],f=Object(s.g)((function(e){e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return i(g)}},"Cari")}));return r.a.createElement(_.a,Object.assign({},m,{className:Object(N.a)(u.root,a),style:t}),r.a.createElement(P.a,{fullWidth:!0,placeholder:c,label:"",margin:"dense",name:"filterData",onChange:function(e){b(Object(o.a)({},g,Object(W.a)({},e.target.name,e.target.value)))},required:!0,value:g.filterData,variant:"outlined"}),r.a.createElement(f,null))},J=Object(w.a)((function(e){return{root:{borderRadius:"4px",alignItems:"center",padding:e.spacing(1),display:"flex",flexBasis:320},icon:{marginRight:e.spacing(1),color:e.palette.text.secondary},input:{flexGrow:1,fontSize:"14px",lineHeight:"16px",letterSpacing:"-0.05px"}}})),U=function(e){var a=e.className,t=e.onClick,c=e.style,i=e.myLabel,s=e.buttonLabel,m=Object(k.a)(e,["className","onClick","style","myLabel","buttonLabel"]),u=J(),d=Object(n.useState)({startDate:null,endDate:null}),p=Object(l.a)(d,2),g=p[0],b=p[1],f=function(e){b(Object(o.a)({},g,Object(W.a)({},e.target.name,e.target.value)))};return r.a.createElement(_.a,Object.assign({},m,{className:Object(N.a)(u.root,a),style:c}),r.a.createElement("div",null,i," "),r.a.createElement(M.a,{className:u.icon}),r.a.createElement(P.a,{label:"",name:"startDate",type:"date",onChange:f,className:u.textField,InputLabelProps:{shrink:!0}}),r.a.createElement("div",null," ke "),r.a.createElement(M.a,{className:u.icon}),r.a.createElement(P.a,{name:"endDate",label:"",type:"date",onChange:f,className:u.textField,InputLabelProps:{shrink:!0}}),r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return t(g)}},s||"Search"))},G=Object(w.a)((function(e){return{root:{display:"inline-block",borderRadius:"50%",flexGrow:0,flexShrink:0},sm:{height:e.spacing(1),width:e.spacing(1)},md:{height:e.spacing(2),width:e.spacing(2)},lg:{height:e.spacing(3),width:e.spacing(3)},neutral:{backgroundColor:e.palette.neutral},primary:{backgroundColor:e.palette.primary.main},info:{backgroundColor:e.palette.info.main},warning:{backgroundColor:e.palette.warning.main},danger:{backgroundColor:e.palette.error.main},success:{backgroundColor:e.palette.success.main}}})),z=function(e){var a,t=e.className,n=e.size,c=e.color,i=Object(k.a)(e,["className","size","color"]),l=G();return r.a.createElement("span",Object.assign({},i,{className:Object(N.a)((a={},Object(W.a)(a,l.root,!0),Object(W.a)(a,l[n],n),Object(W.a)(a,l[c],c),a),t)}))};z.defaultProps={size:"md",color:"default"};var V=z,K=function(e){var a=e.layout,t=e.component,n=Object(k.a)(e,["layout","component"]);return r.a.createElement(s.b,Object.assign({},n,{render:function(e){return r.a.createElement(a,null,r.a.createElement(t,e))}}))},Z=Object(n.createContext)();function $(){return Object(n.useContext)(Z)}var Q=function(e){var a=e.layout,t=e.component,n=Object(k.a)(e,["layout","component"]),c=$().authTokens;return r.a.createElement(s.b,Object.assign({},n,{render:function(e){return c?r.a.createElement(a,null,r.a.createElement(t,e)):r.a.createElement(s.a,{to:"/sign-in"})}}))},X=t(304);function ee(){return{top:"".concat(50,"%"),left:"".concat(50,"%"),transform:"translate(-".concat(50,"%, -").concat(50,"%)")}}var ae=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)},buttonKanan:{float:"right",marginTop:50,backgroundColor:"red",color:"white"},buttonKiri:{float:"left",marginRight:70,marginTop:50}}})),te=function(e){e.className;var a=e.open,t=e.handleClose,n=e.handleYes,c=(e.dataModal,e.title),i=e.content,o=(Object(k.a)(e,["className","open","handleClose","handleYes","dataModal","title","content"]),ae()),s=r.a.useState(ee),m=Object(l.a)(s,1)[0],u=r.a.createElement("div",{style:m,className:o.paper},r.a.createElement("h2",{id:"simple-modal-title"},c),r.a.createElement("p",{id:"simple-modal-description"},i),r.a.createElement(F.a,{color:"default",variant:"contained",className:o.buttonKiri,onClick:t},"Batal"),r.a.createElement(F.a,{color:"inherit",variant:"contained",className:o.buttonKanan,onClick:n},"Iya"));return r.a.createElement(X.a,{open:a,onClose:t,"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},u)},ne=t(124),re=t(448),ce=t(49),ie=t(477),le=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),oe=function(e){var a=e.className,t=Object(k.a)(e,["className"]),n=le();return r.a.createElement("div",Object.assign({},t,{className:Object(N.a)(n.root,a)}),r.a.createElement(ce.a,{variant:"body1"},"\xa9"," ",r.a.createElement(ie.a,{component:"a",href:"#",target:"_blank"},"HCO System"),". 2020"),r.a.createElement(ce.a,{variant:"caption"},"Sebuah Tugas AKPSI"))},se=t(478),me=t(479),ue=t(285),de=t.n(ue),pe=t(286),ge=t.n(pe),be=t(290),fe=t.n(be),he=t(289),ve=t.n(he),Ee=t(288),je=t.n(Ee),Oe=t(164),ye=t.n(Oe),xe=t(287),ke=t.n(xe),Ne={pegawai:["John"],atasanPegawai:["Bob","Scarlet"],hco:["Jane"],admin:["Hatori"],atasanHCO:["Scarlet"]},we={pegawai:["/dashboard","/order-inventory","/reservasi-ruang-meeting","/catering","/pemesanan-mobil"],atasanPegawai:["/dashboard","/order-inventory","/reservasi-ruang-meeting","/catering","/pemesanan-mobil"],hco:["/dashboard","/order-inventory","/reservasi-ruang-meeting","/catering","/pemesanan-mobil","/laporan"],admin:["/dashboard","/order-inventory","/reservasi-ruang-meeting","/catering","/pemesanan-mobil","/user"],atasanHCO:["/dashboard","/order-inventory","/reservasi-ruang-meeting","/catering","/pemesanan-mobil","/laporan-summary"]},_e={Jane:{avatar:"avatar_12.png",nickName:"Awan",position:"HCO Staff",departemen:"HRD",role:"hco"},Bob:{avatar:"avatar_3.png",nickName:"Budi",position:"IT Manager",departemen:"IT",role:"atasanPegawai"},John:{avatar:"avatar_8.png",nickName:"Ujang",position:"IT Staff",departemen:"IT",role:"pegawai"},Hatori:{avatar:"avatar_7.png",nickName:"Asep",position:"Admin",departemen:"IT",role:"admin"},Scarlet:{avatar:"avatar_2.png",nickName:"Scarlet",position:"HCO Manager",departemen:"HCO",role:"atasanHCO"}};function Ce(e){return!!Ne.pegawai.includes(e)}function Se(e){return!!Ne.atasanPegawai.includes(e)}function Ie(e){return!!Ne.hco.includes(e)}function De(e){return _e[e]}var Te=t(28),Pe=t.n(Te);function Re(e){if(!e)return null;var a=e.match(/"(.*?)"/g)[0].replace(/\"/g,"");return Pe()(a)}var Me=t(17),Ae=t(506),Le=Object(w.a)((function(e){return{root:{display:"flex",flexDirection:"column",alignItems:"center",minHeight:"fit-content"},avatar:{width:60,height:60},name:{marginTop:e.spacing(1)}}})),qe=function(e){var a=e.className,t=Object(k.a)(e,["className"]),n=$().authTokens,c=Le(),i=De(Re(n).name),l={name:i.nickName,avatar:"/images/avatars/".concat(i.avatar),bio:i.position};return r.a.createElement("div",Object.assign({},t,{className:Object(N.a)(c.root,a)}),r.a.createElement(Ae.a,{alt:"Person",className:c.avatar,component:Me.a,src:l.avatar,to:"/settings"}),r.a.createElement(ce.a,{className:c.name,variant:"h4"},l.name),r.a.createElement(ce.a,{variant:"body2"},l.bio))},Be=t(442),We=t(444),Fe=Object(w.a)((function(e){return{root:{},item:{display:"flex",paddingTop:0,paddingBottom:0},button:{color:h.a.blueGrey[800],padding:"10px 8px",justifyContent:"flex-start",textTransform:"none",letterSpacing:0,width:"100%",fontWeight:e.typography.fontWeightMedium},icon:{color:e.palette.icon,width:24,height:24,display:"flex",alignItems:"center",marginRight:e.spacing(1)},active:{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium,"& $icon":{color:e.palette.primary.main}}}})),Ye=Object(n.forwardRef)((function(e,a){return r.a.createElement("div",{ref:a,style:{flexGrow:1}},r.a.createElement(Me.b,e))})),He=function(e){var a=e.pages,t=e.className,n=Object(k.a)(e,["pages","className"]),c=Fe();return r.a.createElement(Be.a,Object.assign({},n,{className:Object(N.a)(c.root,t)}),a.map((function(e){return r.a.createElement(We.a,{className:c.item,disableGutters:!0,key:e.title},r.a.createElement(F.a,{activeClassName:c.active,className:c.button,component:Ye,to:e.href},r.a.createElement("div",{className:c.icon},e.icon),e.title))})))},Je=Object(w.a)((function(e){return{root:{backgroundColor:h.a.grey[50]},media:{paddingTop:e.spacing(2),height:80,textAlign:"center","& > img":{height:"100%",width:"auto"}},content:{padding:e.spacing(1,2)},actions:{padding:e.spacing(1,2),display:"flex",justifyContent:"center"}}})),Ue=function(e){var a=e.className,t=Object(k.a)(e,["className"]),n=Je();return r.a.createElement("div",Object.assign({},t,{className:Object(N.a)(n.root,a)}),"\xa0")},Ge=Object(w.a)((function(e){return{drawer:Object(W.a)({width:240},e.breakpoints.up("lg"),{marginTop:64,height:"calc(100% - 64px)"}),root:{backgroundColor:e.palette.white,display:"flex",flexDirection:"column",height:"100%",padding:e.spacing(2)},divider:{margin:e.spacing(2,0)},nav:{marginBottom:e.spacing(2)}}})),ze=function(e){var a=e.open,t=e.variant,n=e.onClose,c=e.className,i=Object(k.a)(e,["open","variant","onClose","className"]),l=$().authTokens,o=Ge(),s=[{title:"Dashboard",href:"/dashboard",icon:r.a.createElement(de.a,null)},{title:"User",href:"/user",icon:r.a.createElement(ge.a,null)},{title:"Permintaan Inventaris",href:"/order-inventory",icon:r.a.createElement(ke.a,null)},{title:"Ruang Meeting",href:"/reservasi-ruang-meeting",icon:r.a.createElement(je.a,null)},{title:"Catering",href:"/catering",icon:r.a.createElement(ve.a,null)},{title:"Pemesanan Mobil",href:"/pemesanan-mobil",icon:r.a.createElement(fe.a,null)},{title:"Laporan",href:"/laporan",icon:r.a.createElement(ye.a,null)},{title:"Laporan Summary",href:"/laporan-summary",icon:r.a.createElement(ye.a,null)}],m=function(e){return we[e]}(De(Re(l).name).role),u=s.filter((function(e){return m.includes(e.href)}));return r.a.createElement(se.a,{anchor:"left",classes:{paper:o.drawer},onClose:n,open:a,variant:t},r.a.createElement("div",Object.assign({},i,{className:Object(N.a)(o.root,c)}),r.a.createElement(qe,null),r.a.createElement(me.a,{className:o.divider}),r.a.createElement(He,{className:o.nav,pages:u}),r.a.createElement(Ue,null)))},Ve=t(480),Ke=t(481),Ze=t(482),$e=t(504),Qe=t(292),Xe=t.n(Qe),ea=t(291),aa=t.n(ea),ta=Object(w.a)((function(e){return{root:{boxShadow:"none"},flexGrow:{flexGrow:1},signOutButton:{marginLeft:e.spacing(1)}}})),na=function(e){var a=e.className,t=e.onSidebarOpen,c=Object(k.a)(e,["className","onSidebarOpen"]),i=ta(),o=Object(n.useState)([]),m=(Object(l.a)(o,1)[0],$().setAuthTokens),u=Object(s.g)((function(e){var a=e.history;return r.a.createElement(Ve.a,{className:i.signOutButton,color:"inherit",onClick:function(){m(null),a.push("/sign-in")}},r.a.createElement(aa.a,null))}));return r.a.createElement(Ke.a,Object.assign({},c,{className:Object(N.a)(i.root,a)}),r.a.createElement(Ze.a,null,r.a.createElement(Me.a,{to:"/"},r.a.createElement("img",{alt:"Logo",src:"/images/logos/logo2.png"})),r.a.createElement("div",{className:i.flexGrow}),r.a.createElement($e.a,{mdDown:!0},r.a.createElement(Ve.a,{color:"inherit"}),r.a.createElement(u,null)),r.a.createElement($e.a,{lgUp:!0},r.a.createElement(Ve.a,{color:"inherit",onClick:t},r.a.createElement(Xe.a,null)))))},ra=Object(w.a)((function(e){return{root:Object(W.a)({paddingTop:56,height:"100%"},e.breakpoints.up("sm"),{paddingTop:64}),shiftContent:{paddingLeft:240},content:{height:"100%"}}})),ca=function(e){var a,t=e.children,c=ra(),i=Object(ne.a)(),o=Object(re.a)(i.breakpoints.up("lg"),{defaultMatches:!0}),s=Object(n.useState)(!1),m=Object(l.a)(s,2),u=m[0],d=m[1],p=!!o||u;return r.a.createElement("div",{className:Object(N.a)((a={},Object(W.a)(a,c.root,!0),Object(W.a)(a,c.shiftContent,o),a))},r.a.createElement(na,{onSidebarOpen:function(){d(!0)}}),r.a.createElement(ze,{onClose:function(){d(!1)},open:p,variant:o?"persistent":"temporary"}),r.a.createElement("main",{className:c.content},t,r.a.createElement(oe,null)))},ia=Object(w.a)((function(){return{root:{boxShadow:"none"}}})),la=function(e){var a=e.className,t=Object(k.a)(e,["className"]),n=ia();return r.a.createElement(Ke.a,Object.assign({},t,{className:Object(N.a)(n.root,a),color:"primary",position:"fixed"}),r.a.createElement(Ze.a,null,r.a.createElement(Me.a,{to:"/"},r.a.createElement("img",{alt:"Logo",src:"/images/logos/logo2.png"}))))},oa=Object(w.a)((function(){return{root:{paddingTop:64,height:"100%"},content:{height:"100%"}}})),sa=function(e){var a=e.children,t=oa();return r.a.createElement("div",{className:t.root},r.a.createElement(la,null),r.a.createElement("main",{className:t.content},a))},ma=t(487),ua=t(484),da=t(485),pa=t(486),ga=t(488),ba=Object(w.a)((function(){return{root:{}}})),fa=function(e){var a=e.className,t=Object(k.a)(e,["className"]),c=ba(),i=Object(n.useState)({firstName:"Shen",lastName:"Zhi",email:"shen.zhi@devias.io",phone:"",state:"Alabama",country:"USA"}),s=Object(l.a)(i,2),m=s[0],u=s[1],d=function(e){u(Object(o.a)({},m,Object(W.a)({},e.target.name,e.target.value)))};return r.a.createElement(ua.a,Object.assign({},t,{className:Object(N.a)(c.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{subheader:"The information can be edited",title:"Profile"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:6,xs:12},r.a.createElement(P.a,{fullWidth:!0,helperText:"Please specify the first name",label:"First name",margin:"dense",name:"firstName",onChange:d,required:!0,value:m.firstName,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:6,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Last name",margin:"dense",name:"lastName",onChange:d,required:!0,value:m.lastName,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:6,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Email Address",margin:"dense",name:"email",onChange:d,required:!0,value:m.email,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:6,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Phone Number",margin:"dense",name:"phone",onChange:d,type:"number",value:m.phone,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:6,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Select State",margin:"dense",name:"state",onChange:d,required:!0,select:!0,SelectProps:{native:!0},value:m.state,variant:"outlined"},[{value:"alabama",label:"Alabama"},{value:"new-york",label:"New York"},{value:"san-francisco",label:"San Francisco"}].map((function(e){return r.a.createElement("option",{key:e.value,value:e.value},e.label)})))),r.a.createElement(ma.a,{item:!0,md:6,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Country",margin:"dense",name:"country",onChange:d,required:!0,value:m.country,variant:"outlined"})))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(F.a,{color:"primary",variant:"contained"},"Save details"))))},ha=t(10),va=t.n(ha),Ea=t(489),ja=Object(w.a)((function(e){return{root:{},details:{display:"flex"},avatar:{marginLeft:"auto",height:110,width:100,flexShrink:0,flexGrow:0},progress:{marginTop:e.spacing(2)},uploadButton:{marginRight:e.spacing(2)}}})),Oa=function(e){var a=e.className,t=Object(k.a)(e,["className"]),n=ja(),c="Los Angeles",i="USA",l="GTM-7",o="/images/avatars/avatar_11.png";return r.a.createElement(ua.a,Object.assign({},t,{className:Object(N.a)(n.root,a)}),r.a.createElement(pa.a,null,r.a.createElement("div",{className:n.details},r.a.createElement("div",null,r.a.createElement(ce.a,{gutterBottom:!0,variant:"h2"},"John Doe"),r.a.createElement(ce.a,{className:n.locationText,color:"textSecondary",variant:"body1"},c,", ",i),r.a.createElement(ce.a,{className:n.dateText,color:"textSecondary",variant:"body1"},va()().format("hh:mm A")," (",l,")")),r.a.createElement(Ae.a,{className:n.avatar,src:o})),r.a.createElement("div",{className:n.progress},r.a.createElement(ce.a,{variant:"body1"},"Profile Completeness: 70%"),r.a.createElement(Ea.a,{value:70,variant:"determinate"}))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(F.a,{className:n.uploadButton,color:"primary",variant:"text"},"Upload picture"),r.a.createElement(F.a,{variant:"text"},"Remove picture")))},ya=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),xa=function(){var e=ya();return r.a.createElement("div",{className:e.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:4,md:6,xl:4,xs:12},r.a.createElement(Oa,null)),r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(fa,null))))},ka=t(92),Na=t.n(ka),wa=t(119),_a=t.n(wa),Ca=(Object(w.a)((function(e){return{root:{height:"100%"},content:{alignItems:"center",display:"flex"},title:{fontWeight:700},avatar:{backgroundColor:e.palette.error.main,height:56,width:56},icon:{height:32,width:32},difference:{marginTop:e.spacing(2),display:"flex",alignItems:"center"},differenceIcon:{color:e.palette.error.dark},differenceValue:{color:e.palette.error.dark,marginRight:e.spacing(1)}}})),t(20)),Sa=t.n(Ca),Ia=t(490),Da=t(491),Ta=t(492),Pa=t(493),Ra=t(494),Ma=t(505),Aa=t(495),La=(t(32),t(15)),qa=t.n(La),Ba=(qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:800},statusContainer:{display:"flex",alignItems:"center"},status:{marginRight:e.spacing(1)},actions:{justifyContent:"flex-end"}}})),t(496),t(497),t(121),qa()(),va()().subtract(2,"hours"),qa()(),va()().subtract(2,"hours"),qa()(),va()().subtract(3,"hours"),qa()(),va()().subtract(5,"hours"),qa()(),va()().subtract(9,"hours"),Object(w.a)((function(){return{root:{height:"100%"},content:{padding:0},image:{height:48,width:48},actions:{justifyContent:"flex-end"}}})),t(154),E.primary.main,E.text.primary,E.text.secondary,E.text.secondary,E.text.secondary,E.text.secondary,Object(w.a)((function(){return{root:{},chartContainer:{height:400,position:"relative"},actions:{justifyContent:"flex-end"}}})),t(155),Object(w.a)((function(e){return{root:{height:"100%"},content:{alignItems:"center",display:"flex"},title:{fontWeight:700},avatar:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,height:56,width:56},icon:{height:32,width:32},progress:{marginTop:e.spacing(3)}}})),t(122),Object(w.a)((function(e){return{root:{height:"100%",backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},content:{alignItems:"center",display:"flex"},title:{fontWeight:700},avatar:{backgroundColor:e.palette.white,color:e.palette.primary.main,height:56,width:56},icon:{height:32,width:32}}})),t(93)),Wa=t.n(Ba),Fa=(t(156),Object(w.a)((function(e){return{root:{height:"100%"},content:{alignItems:"center",display:"flex"},title:{fontWeight:700},avatar:{backgroundColor:e.palette.success.main,height:56,width:56},icon:{height:32,width:32},difference:{marginTop:e.spacing(2),display:"flex",alignItems:"center"},differenceIcon:{color:e.palette.success.dark},differenceValue:{color:e.palette.success.dark,marginRight:e.spacing(1)}}})),t(157),t(159),t(160),t(158),Object(w.a)((function(e){return{root:{height:"100%"},chartContainer:{position:"relative",height:"300px"},stats:{marginTop:e.spacing(2),display:"flex",justifyContent:"center"},device:{textAlign:"center",padding:e.spacing(1)},deviceIcon:{color:e.palette.icon}}})),Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}}))),Ya=function(){var e=Fa();return r.a.createElement("div",{className:e.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement("h1",null,"Selamat datang di HCO System")))},Ha=Object(w.a)((function(e){return{root:{padding:e.spacing(4)},iframe:{width:"100%",minHeight:640,border:0}}})),Ja=function(){var e=Ha();return r.a.createElement("div",{className:e.root},r.a.createElement("iframe",{className:e.iframe,src:"https://material.io/tools/icons/?icon=accessibility&style=outline",title:"Material Design icons"}))},Ua=Object(w.a)((function(e){return{root:{padding:e.spacing(4)},content:{paddingTop:150,textAlign:"center"},image:{marginTop:50,display:"inline-block",maxWidth:"100%",width:560}}})),Ga=function(){var e=Ua();return r.a.createElement("div",{className:e.root},r.a.createElement(ma.a,{container:!0,justify:"center",spacing:4},r.a.createElement(ma.a,{item:!0,lg:6,xs:12},r.a.createElement("div",{className:e.content},r.a.createElement(ce.a,{variant:"h1"},"404: The page you are looking for isn\u2019t here"),r.a.createElement(ce.a,{variant:"subtitle2"},"You either tried some shady route or you came here by mistake. Whichever it is, try using the navigation"),r.a.createElement("img",{alt:"Under development",className:e.image,src:"/images/undraw_page_not_found_su7k.svg"})))))},za=t(297),Va=t.n(za),Ka=t(296),Za=t.n(Ka),$a=t(294),Qa=t.n($a),Xa=t(295),et=t.n(Xa),at=Object(w.a)((function(e){return{root:{},imageContainer:{height:64,width:64,margin:"0 auto",border:"1px solid ".concat(e.palette.divider),borderRadius:"5px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center"},image:{width:"100%"},statsItem:{display:"flex",alignItems:"center"},statsIcon:{color:e.palette.icon,marginRight:e.spacing(1)}}})),tt=function(e){var a=e.className,t=e.product,n=Object(k.a)(e,["className","product"]),c=at();return r.a.createElement(ua.a,Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement(pa.a,null,r.a.createElement("div",{className:c.imageContainer},r.a.createElement("img",{alt:"Product",className:c.image,src:t.imageUrl})),r.a.createElement(ce.a,{align:"center",gutterBottom:!0,variant:"h4"},t.title),r.a.createElement(ce.a,{align:"center",variant:"body1"},t.description)),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(ma.a,{container:!0,justify:"space-between"},r.a.createElement(ma.a,{className:c.statsItem,item:!0},r.a.createElement(Qa.a,{className:c.statsIcon}),r.a.createElement(ce.a,{display:"inline",variant:"body2"},"Updated 2hr ago")),r.a.createElement(ma.a,{className:c.statsItem,item:!0},r.a.createElement(et.a,{className:c.statsIcon}),r.a.createElement(ce.a,{display:"inline",variant:"body2"},t.totalDownloads," Downloads")))))},nt=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),rt=function(e){var a=e.className,t=Object(k.a)(e,["className"]),n=nt();return r.a.createElement("div",Object.assign({},t,{className:Object(N.a)(n.root,a)}),r.a.createElement("div",{className:n.row},r.a.createElement("span",{className:n.spacer}),r.a.createElement(F.a,{className:n.importButton},"Import"),r.a.createElement(F.a,{className:n.exportButton},"Export"),r.a.createElement(F.a,{color:"primary",variant:"contained"},"Add product")),r.a.createElement("div",{className:n.row},r.a.createElement(T,{className:n.searchInput,placeholder:"Search product"})))},ct=[{id:qa()(),title:"Dropbox",description:"Dropbox is a file hosting service that offers cloud storage, file synchronization, a personal cloud.",imageUrl:"/images/products/product_1.png",totalDownloads:"594",updatedAt:"27/03/2019"},{id:qa()(),title:"Medium Corporation",description:"Medium is an online publishing platform developed by Evan Williams, and launched in August 2012.",imageUrl:"/images/products/product_2.png",totalDownloads:"625",createdAt:"31/03/2019"},{id:qa()(),title:"Slack",description:"Slack is a cloud-based set of team collaboration tools and services, founded by Stewart Butterfield.",imageUrl:"/images/products/product_3.png",totalDownloads:"857",createdAt:"03/04/2019"},{id:qa()(),title:"Lyft",description:"Lyft is an on-demand transportation company based in San Francisco, California.",imageUrl:"/images/products/product_4.png",totalDownloads:"406",createdAt:"04/04/2019"},{id:qa()(),title:"GitHub",description:"GitHub is a web-based hosting service for version control of code using Git.",imageUrl:"/images/products/product_5.png",totalDownloads:"835",createdAt:"04/04/2019"},{id:qa()(),title:"Squarespace",description:"Squarespace provides software as a service for website building and hosting. Headquartered in NYC.",imageUrl:"/images/products/product_6.png",totalDownloads:"835",createdAt:"04/04/2019"}],it=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)},pagination:{marginTop:e.spacing(3),display:"flex",alignItems:"center",justifyContent:"flex-end"}}})),lt=function(){var e=it(),a=Object(n.useState)(ct),t=Object(l.a)(a,1)[0];return r.a.createElement("div",{className:e.root},r.a.createElement(rt,null),r.a.createElement("div",{className:e.content},r.a.createElement(ma.a,{container:!0,spacing:3},t.map((function(e){return r.a.createElement(ma.a,{item:!0,key:e.id,lg:4,md:6,xs:12},r.a.createElement(tt,{product:e}))})))),r.a.createElement("div",{className:e.pagination},r.a.createElement(ce.a,{variant:"caption"},"1-6 of 20"),r.a.createElement(Ve.a,null,r.a.createElement(Za.a,null)),r.a.createElement(Ve.a,null,r.a.createElement(Va.a,null))))},ot=t(498),st=t(502),mt=Object(w.a)((function(){return{root:{},item:{display:"flex",flexDirection:"column"}}})),ut=function(e){var a=e.className,t=Object(k.a)(e,["className"]),n=mt();return r.a.createElement(ua.a,Object.assign({},t,{className:Object(N.a)(n.root,a)}),r.a.createElement("form",null,r.a.createElement(da.a,{subheader:"Manage the notifications",title:"Notifications"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:6,wrap:"wrap"},r.a.createElement(ma.a,{className:n.item,item:!0,md:4,sm:6,xs:12},r.a.createElement(ce.a,{gutterBottom:!0,variant:"h6"},"Notifications"),r.a.createElement(ot.a,{control:r.a.createElement(st.a,{color:"primary",defaultChecked:!0}),label:"Email"}),r.a.createElement(ot.a,{control:r.a.createElement(st.a,{color:"primary",defaultChecked:!0}),label:"Push Notifications"}),r.a.createElement(ot.a,{control:r.a.createElement(st.a,{color:"primary"}),label:"Text Messages"}),r.a.createElement(ot.a,{control:r.a.createElement(st.a,{color:"primary",defaultChecked:!0}),label:"Phone calls"})),r.a.createElement(ma.a,{className:n.item,item:!0,md:4,sm:6,xs:12},r.a.createElement(ce.a,{gutterBottom:!0,variant:"h6"},"Messages"),r.a.createElement(ot.a,{control:r.a.createElement(st.a,{color:"primary",defaultChecked:!0}),label:"Email"}),r.a.createElement(ot.a,{control:r.a.createElement(st.a,{color:"primary"}),label:"Push Notifications"}),r.a.createElement(ot.a,{control:r.a.createElement(st.a,{color:"primary",defaultChecked:!0}),label:"Phone calls"})))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(F.a,{color:"primary",variant:"outlined"},"Save"))))},dt=Object(w.a)((function(){return{root:{}}})),pt=function(e){var a=e.className,t=Object(k.a)(e,["className"]),c=dt(),i=Object(n.useState)({password:"",confirm:""}),s=Object(l.a)(i,2),m=s[0],u=s[1],d=function(e){u(Object(o.a)({},m,Object(W.a)({},e.target.name,e.target.value)))};return r.a.createElement(ua.a,Object.assign({},t,{className:Object(N.a)(c.root,a)}),r.a.createElement("form",null,r.a.createElement(da.a,{subheader:"Update password",title:"Password"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(P.a,{fullWidth:!0,label:"Password",name:"password",onChange:d,type:"password",value:m.password,variant:"outlined"}),r.a.createElement(P.a,{fullWidth:!0,label:"Confirm password",name:"confirm",onChange:d,style:{marginTop:"1rem"},type:"password",value:m.confirm,variant:"outlined"})),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(F.a,{color:"primary",variant:"outlined"},"Update"))))},gt=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),bt=function(){var e=gt();return r.a.createElement("div",{className:e.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,md:7,xs:12},r.a.createElement(ut,null)),r.a.createElement(ma.a,{item:!0,md:5,xs:12},r.a.createElement(pt,null))))},ft=t(6),ht=t.n(ft),vt=t(14);t(115);var Et=t(12),jt=t.n(Et),Ot={email:{presence:{allowEmpty:!1,message:"is required"},email:!0,length:{maximum:64}},password:{presence:{allowEmpty:!1,message:"is required"},length:{minimum:8,maximum:128}}},yt=Object(w.a)((function(e){return{root:{backgroundColor:e.palette.background.default,height:"100%"},grid:{height:"100%"},quoteContainer:Object(W.a)({},e.breakpoints.down("md"),{display:"none"}),quote:{backgroundColor:e.palette.neutral,height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundImage:"url(/images/inventory-blue.png)",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},quoteInner:{textAlign:"center",flexBasis:"600px"},quoteText:{color:e.palette.white,fontWeight:300},name:{marginTop:e.spacing(3),color:e.palette.white},bio:{color:e.palette.white},contentContainer:{},content:{height:"100%",display:"flex",flexDirection:"column"},contentHeader:{display:"flex",alignItems:"center",paddingTop:e.spacing(5),paddingBototm:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},logoImage:{marginLeft:e.spacing(4)},contentBody:Object(W.a)({flexGrow:1,display:"flex",alignItems:"center"},e.breakpoints.down("md"),{justifyContent:"center"}),form:Object(W.a)({paddingLeft:100,paddingRight:100,paddingBottom:125,flexBasis:700},e.breakpoints.down("sm"),{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}),title:{marginTop:e.spacing(3)},socialButtons:{marginTop:e.spacing(3)},socialIcon:{marginRight:e.spacing(1)},sugestion:{marginTop:e.spacing(2)},textField:{marginTop:e.spacing(2)},signInButton:{margin:e.spacing(2,0)}}})),xt=Object(s.g)((function(e){var a=e.history,t=yt(),c=Object(n.useState)({isValid:!1,values:{},touched:{},errors:{}}),i=Object(l.a)(c,2),s=i[0],m=i[1],u=Object(n.useState)([]),d=Object(l.a)(u,2),p=(d[0],d[1],$().setAuthTokens);Object(n.useEffect)((function(){var e=g()(s.values,Ot);m((function(a){return Object(o.a)({},a,{isValid:!e,errors:e||{}})}))}),[s.values]);var b=function(e){e.persist(),m((function(a){return Object(o.a)({},a,{values:Object(o.a)({},a.values,Object(W.a)({},e.target.name,"checkbox"===e.target.type?e.target.checked:e.target.value)),touched:Object(o.a)({},a.touched,Object(W.a)({},e.target.name,!0))})}))},f=function(){var e=Object(vt.a)(ht.a.mark((function e(t){var n,r;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),n=null,e.prev=2,e.next=5,jt.a.post("".concat("https://quiet-mesa-17901.herokuapp.com","/users/login"),{email:s.values.email,password:s.values.password});case 5:r=e.sent,n=r.data.token,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),alert("Email atau Password ada yang salah");case 12:n&&(p('{token:"'.concat(n,'"}')),a.push("/"));case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(a){return e.apply(this,arguments)}}(),h=function(e){return!(!s.touched[e]||!s.errors[e])};return r.a.createElement("div",{className:t.root},r.a.createElement(ma.a,{className:t.grid,container:!0},r.a.createElement(ma.a,{className:t.quoteContainer,item:!0,lg:5},r.a.createElement("div",{className:t.quote},r.a.createElement("div",{className:t.quoteInner},r.a.createElement(ce.a,{className:t.quoteText,variant:"h1"},"Selamat datang di HCO System."),r.a.createElement("div",{className:t.person},r.a.createElement(ce.a,{className:t.name,variant:"body1"},"Team 3 AKPSI 2019FC"),r.a.createElement(ce.a,{className:t.bio,variant:"body2"},"@2020"))))),r.a.createElement(ma.a,{className:t.content,item:!0,lg:7,xs:12},r.a.createElement("div",{className:t.content},r.a.createElement("div",{className:t.contentHeader}),r.a.createElement("div",{className:t.contentBody},r.a.createElement("form",{className:t.form,onSubmit:f},r.a.createElement(ce.a,{className:t.title,variant:"h2"},"Sign in"),r.a.createElement(ma.a,{className:t.socialButtons,container:!0,spacing:2},r.a.createElement(ma.a,{item:!0})),r.a.createElement(ce.a,{align:"center",className:t.sugestion,color:"textSecondary",variant:"body1"}),r.a.createElement(P.a,{className:t.textField,error:h("email"),fullWidth:!0,helperText:h("email")?s.errors.email[0]:null,label:"Email address",name:"email",onChange:b,type:"text",value:s.values.email||"",variant:"outlined"}),r.a.createElement(P.a,{className:t.textField,error:h("password"),fullWidth:!0,helperText:h("password")?s.errors.password[0]:null,label:"Password",name:"password",onChange:b,type:"password",value:s.values.password||"",variant:"outlined"}),r.a.createElement(F.a,{className:t.signInButton,color:"primary",disabled:!s.isValid,fullWidth:!0,size:"large",type:"submit",variant:"contained"},"Sign in now")))))))})),kt=t(443),Nt=t(161),wt=t.n(Nt),_t={firstName:{presence:{allowEmpty:!1,message:"is required"},length:{maximum:32}},lastName:{presence:{allowEmpty:!1,message:"is required"},length:{maximum:32}},email:{presence:{allowEmpty:!1,message:"is required"},email:!0,length:{maximum:64}},password:{presence:{allowEmpty:!1,message:"is required"},length:{maximum:128}},policy:{presence:{allowEmpty:!1,message:"is required"},checked:!0}},Ct=Object(w.a)((function(e){return{root:{backgroundColor:e.palette.background.default,height:"100%"},grid:{height:"100%"},quoteContainer:Object(W.a)({},e.breakpoints.down("md"),{display:"none"}),quote:{backgroundColor:e.palette.neutral,height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundImage:"url(/images/auth.jpg)",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},quoteInner:{textAlign:"center",flexBasis:"600px"},quoteText:{color:e.palette.white,fontWeight:300},name:{marginTop:e.spacing(3),color:e.palette.white},bio:{color:e.palette.white},contentContainer:{},content:{height:"100%",display:"flex",flexDirection:"column"},contentHeader:{display:"flex",alignItems:"center",paddingTop:e.spacing(5),paddingBototm:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},logoImage:{marginLeft:e.spacing(4)},contentBody:Object(W.a)({flexGrow:1,display:"flex",alignItems:"center"},e.breakpoints.down("md"),{justifyContent:"center"}),form:Object(W.a)({paddingLeft:100,paddingRight:100,paddingBottom:125,flexBasis:700},e.breakpoints.down("sm"),{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}),title:{marginTop:e.spacing(3)},textField:{marginTop:e.spacing(2)},policy:{marginTop:e.spacing(1),display:"flex",alignItems:"center"},policyCheckbox:{marginLeft:"-14px"},signUpButton:{margin:e.spacing(2,0)}}})),St=Object(s.g)((function(e){var a=e.history,t=Ct(),c=Object(n.useState)({isValid:!1,values:{},touched:{},errors:{}}),i=Object(l.a)(c,2),s=i[0],m=i[1];Object(n.useEffect)((function(){var e=g()(s.values,_t);m((function(a){return Object(o.a)({},a,{isValid:!e,errors:e||{}})}))}),[s.values]);var u=function(e){e.persist(),m((function(a){return Object(o.a)({},a,{values:Object(o.a)({},a.values,Object(W.a)({},e.target.name,"checkbox"===e.target.type?e.target.checked:e.target.value)),touched:Object(o.a)({},a.touched,Object(W.a)({},e.target.name,!0))})}))},d=function(e){return!(!s.touched[e]||!s.errors[e])};return r.a.createElement("div",{className:t.root},r.a.createElement(ma.a,{className:t.grid,container:!0},r.a.createElement(ma.a,{className:t.quoteContainer,item:!0,lg:5},r.a.createElement("div",{className:t.quote},r.a.createElement("div",{className:t.quoteInner},r.a.createElement(ce.a,{className:t.quoteText,variant:"h1"},"Hella narwhal Cosby sweater McSweeney's, salvia kitsch before they sold out High Life."),r.a.createElement("div",{className:t.person},r.a.createElement(ce.a,{className:t.name,variant:"body1"},"Takamaru Ayako"),r.a.createElement(ce.a,{className:t.bio,variant:"body2"},"Manager at inVision"))))),r.a.createElement(ma.a,{className:t.content,item:!0,lg:7,xs:12},r.a.createElement("div",{className:t.content},r.a.createElement("div",{className:t.contentHeader},r.a.createElement(Ve.a,{onClick:function(){a.goBack()}},r.a.createElement(wt.a,null))),r.a.createElement("div",{className:t.contentBody},r.a.createElement("form",{className:t.form,onSubmit:function(e){e.preventDefault(),a.push("/")}},r.a.createElement(ce.a,{className:t.title,variant:"h2"},"Create new account"),r.a.createElement(ce.a,{color:"textSecondary",gutterBottom:!0},"Use your email to create new account"),r.a.createElement(P.a,{className:t.textField,error:d("firstName"),fullWidth:!0,helperText:d("firstName")?s.errors.firstName[0]:null,label:"First name",name:"firstName",onChange:u,type:"text",value:s.values.firstName||"",variant:"outlined"}),r.a.createElement(P.a,{className:t.textField,error:d("lastName"),fullWidth:!0,helperText:d("lastName")?s.errors.lastName[0]:null,label:"Last name",name:"lastName",onChange:u,type:"text",value:s.values.lastName||"",variant:"outlined"}),r.a.createElement(P.a,{className:t.textField,error:d("email"),fullWidth:!0,helperText:d("email")?s.errors.email[0]:null,label:"Email address",name:"email",onChange:u,type:"text",value:s.values.email||"",variant:"outlined"}),r.a.createElement(P.a,{className:t.textField,error:d("password"),fullWidth:!0,helperText:d("password")?s.errors.password[0]:null,label:"Password",name:"password",onChange:u,type:"password",value:s.values.password||"",variant:"outlined"}),r.a.createElement("div",{className:t.policy},r.a.createElement(st.a,{checked:s.values.policy||!1,className:t.policyCheckbox,color:"primary",name:"policy",onChange:u}),r.a.createElement(ce.a,{className:t.policyText,color:"textSecondary",variant:"body1"},"I have read the"," ",r.a.createElement(ie.a,{color:"primary",component:Me.a,to:"#",underline:"always",variant:"h6"},"Terms and Conditions"))),d("policy")&&r.a.createElement(kt.a,{error:!0},s.errors.policy[0]),r.a.createElement(F.a,{className:t.signUpButton,color:"primary",disabled:!s.isValid,fullWidth:!0,size:"large",type:"submit",variant:"contained"},"Sign up now"),r.a.createElement(ce.a,{color:"textSecondary",variant:"body1"},"Have an account?"," ",r.a.createElement(ie.a,{component:Me.a,to:"/sign-in",variant:"h6"},"Sign in"))))))))})),It=(Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),t(503)),Dt=(Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),t(16)),Tt=t(436),Pt=t(437),Rt=t(450),Mt=t(499),At=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),Lt=function(e){e.className;var a=e.history,t=e.datasupir,n=e.datapemesanan,c=e.dataIndex,i=e.parentSetData,s=e.parentData,m=(Object(k.a)(e,["className","history","datasupir","datapemesanan","dataIndex","parentSetData","parentData"]),At(),r.a.useState("")),u=Object(l.a)(m,2),d=u[0],p=u[1],g=function(){var e=Object(vt.a)(ht.a.mark((function e(a,r){var l,m,u,d,p;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.user,n.mobil,l=Object(k.a)(n,["user","mobil"]),m=Object(o.a)({},l,{status_pemesanan:"allocated",userId:n.user.id,mobilId:n.mobil.nomor_polisi,supirId:parseInt(r)}),u=t.find((function(e){return e.id===r})),d=Object(o.a)({},n,{status_pemesanan:"allocated",supir:{id:parseInt(r),nama:u.nama}}),p=[].concat(Object(Dt.a)(s.slice(0,c)),[d],Object(Dt.a)(s.slice(c+1))),e.prev=5,e.next=8,jt.a.put("".concat("https://quiet-mesa-17901.herokuapp.com","/pemesanan-mobils/").concat(n.id),m);case 8:e.sent,alert("Pemesanan berhasil di alokasi ke supir."),i(p),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(5),console.log("Axios request failed: ".concat(e.t0));case 16:case"end":return e.stop()}}),e,null,[[5,13]])})));return function(a,t){return e.apply(this,arguments)}}();return r.a.createElement(Tt.a,{variant:"filled"},r.a.createElement(Pt.a,{id:"demo-simple-select-filled-label"},"Pilih Supir"),r.a.createElement(Rt.a,{labelId:"demo-simple-select-filled-label",id:"demo-simple-select-filled",value:d,onChange:function(e){p(e.target.value),g(a,e.target.value)}},r.a.createElement(Mt.a,{value:""},r.a.createElement("em",null,"None")),t.map((function(e){return r.a.createElement(Mt.a,{value:e.id},e.nama)}))))},qt=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}}));var Bt=function(e){var a=e.className,t=e.users,c=Object(k.a)(e,["className","users"]),i=r.a.useState(!1),m=Object(l.a)(i,2),u=(m[0],m[1],r.a.useState(null)),d=Object(l.a)(u,2),p=(d[0],d[1],Object(n.useState)([])),g=Object(l.a)(p,2),b=g[0],f=g[1],h=Object(n.useState)([]),v=Object(l.a)(h,2),E=v[0],j=v[1],O=$().authTokens,y=r.a.useState(!1),x=Object(l.a)(y,2),w=x[0],_=x[1],C=r.a.useState({}),S=Object(l.a)(C,2),I=S[0],D=S[1];Object(n.useEffect)((function(){var e={include:[{relation:"user"},{relation:"mobil"},{relation:"supir"}]},a=Re(O),t=a.id,n=a.name;Ie(n)||(e=Object(o.a)({},e,{where:{userId:{ilike:t}}})),function(){var a=Object(vt.a)(ht.a.mark((function a(){var t;return ht.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,jt()({method:"get",url:"".concat("https://quiet-mesa-17901.herokuapp.com","/pemesanan-mobils?filter=").concat(JSON.stringify(e))});case 2:t=a.sent,f(t.data);case 4:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}()()}),[]);var T={where:{status_tersedia:"tersedia"}};Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat("https://quiet-mesa-17901.herokuapp.com","/supirs?filter=").concat(JSON.stringify(T))});case 2:a=e.sent,j(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]);var P=qt(),R=Object(n.useState)([]),M=Object(l.a)(R,2),A=M[0],L=(M[1],Object(n.useState)(10)),q=Object(l.a)(L,2),B=q[0],W=q[1],Y=Object(n.useState)(0),H=Object(l.a)(Y,2),J=H[0],U=H[1],G=Re(O).name,z=Se(G),V=Ie(G),K=Ce(G),Z=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,c,i,l;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),c=Object(o.a)({},r,{status_pemesanan:"approved",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),i=Object(o.a)({},t,{status_pemesanan:"approved"}),l=[].concat(Object(Dt.a)(b.slice(0,n)),[i],Object(Dt.a)(b.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat("https://quiet-mesa-17901.herokuapp.com","/pemesanan-mobils/").concat(t.id),c);case 7:e.sent,alert("Pemesanan Mobil berhasil di setujui."),f(l),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}(),Q=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n,r,c,i,l;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.history,t=a.datapemesanan,n=a.dataIndex,t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),c=Object(o.a)({},r,{status_pemesanan:"cancelled",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),i=Object(o.a)({},t,{status_pemesanan:"cancelled"}),l=[].concat(Object(Dt.a)(b.slice(0,n)),[i],Object(Dt.a)(b.slice(n+1))),e.prev=5,e.next=8,jt.a.put("".concat("https://quiet-mesa-17901.herokuapp.com","/pemesanan-mobils/").concat(t.id),c);case 8:e.sent,alert("Pemesanan berhasil dibatalkan."),f(l),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(5),console.log("Axios request failed: ".concat(e.t0));case 16:case"end":return e.stop()}}),e,null,[[5,13]])})));return function(a){return e.apply(this,arguments)}}(),X=Object(s.g)((function(e){var a=e.history,t=e.datapemesanan,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){Z(a,t,n)}},"Approve")})),ee=Object(s.g)((function(e){var a=e.history,t=e.datapemesanan,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){return ne(a,t,n)}},"Cancel")})),ae=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){a.push("/pemesanan-mobil/view",{jenis_input:"ubah",dataDefault:t})}},"View")})),ne=function(e,a,t){D({history:e,datapemesanan:a,dataIndex:t}),_(!0)};return r.a.createElement(ua.a,Object.assign({},c,{className:Object(N.a)(P.root,a)}),r.a.createElement(pa.a,{className:P.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:P.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,null,"Tanggal Pemesanan"),r.a.createElement(Pa.a,null,"Status"),r.a.createElement(Pa.a,null,"Pemesan"),r.a.createElement(Pa.a,null,"Tipe Pemesanan"),r.a.createElement(Pa.a,null,"Mobil"),r.a.createElement(Pa.a,null,"Supir"),r.a.createElement(Pa.a,null,"Keterangan"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,b.slice(0,B).map((function(e,a){return r.a.createElement(Ta.a,{className:P.tableRow,hover:!0,key:e.id,selected:-1!==A.indexOf(e.id)},r.a.createElement(Pa.a,null,r.a.createElement("div",{className:P.nameContainer},r.a.createElement(ce.a,{variant:"body1"}," ",va()(e.tanggal_pemesanan).format("DD/MM/YYYY")))),r.a.createElement(Pa.a,null,e.status_pemesanan),r.a.createElement(Pa.a,null,e.user?e.user.username:""),r.a.createElement(Pa.a,null,e.tipe_pemesanan),r.a.createElement(Pa.a,null,e.mobil?e.mobil.tipe_mobil:""),r.a.createElement(Pa.a,null,e.supir?e.supir.nama:""),r.a.createElement(Pa.a,null,e.keterangan),r.a.createElement(Pa.a,null,K&&"submitted"===e.status_pemesanan?r.a.createElement(ee,{datapemesanan:e,dataIndex:a}):r.a.createElement("div",null),z&&"submitted"===e.status_pemesanan?r.a.createElement(X,{datapemesanan:e,dataIndex:a}):r.a.createElement("div",null),V&&"approved"===e.status_pemesanan?r.a.createElement(Lt,{datasupir:E,datapemesanan:e,dataIndex:a,parentSetData:f,parentData:b}):r.a.createElement("div",null),r.a.createElement(ae,{datatransaksi:e,dataIndex:a})))}))))))),r.a.createElement(ga.a,{className:P.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){U(a)},onChangeRowsPerPage:function(e){W(e.target.value)},page:J,rowsPerPage:B,rowsPerPageOptions:[5,10,25]})),r.a.createElement(te,{open:w,handleClose:function(){_(!1)},handleYes:function(){_(!1),Q(I)},title:"Konfirmasi",content:"Anda yakin untuk membatalkan pemesanan mobil ini?"}))},Wt=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),Ft=function(e){var a=e.className,t=(e.history,e.isHCO),n=Object(k.a)(e,["className","history","isHCO"]),c=Wt(),i=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/pemesanan-mobil/search")}},"Tambah Pemesanan")})),l=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/mobil")}},"Mobil")}));return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement("div",{className:c.row},r.a.createElement("span",{className:c.spacer}),r.a.createElement(i,null),t?r.a.createElement(l,null):r.a.createElement("div",null)),r.a.createElement("div",{className:c.row}))},Yt=[{id:qa()(),name:"4 April 2020",address:{country:"Dinas",state:"",city:"",street:"2849 Fulton Street"},email:"Awan",phone:"Toyota",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5},{id:qa()(),name:"4 April 2020",address:{country:"Ekpedisi",state:"",city:"",street:"2849 Fulton Street"},email:"Tiara",phone:"Daihatsu",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5},{id:qa()(),name:"5 April 2020",address:{country:"Ekpedisi",state:"",city:"",street:"2849 Fulton Street"},email:"Dimitri",phone:"Toyota",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5},{id:qa()(),name:"6 April 2020",address:{country:"Dinas",state:"",city:"",street:"2849 Fulton Street"},email:"Dimitri",phone:"Suzuki",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5},{id:qa()(),name:"6 April 2020",address:{country:"Ekpedisi",state:"",city:"",street:"2849 Fulton Street"},email:"Awan",phone:"Suzuki",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5},{id:qa()(),name:"7 April 2020",address:{country:"Ekpedisi",state:"",city:"",street:"2849 Fulton Street"},email:"Tiara",phone:"Toyota",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5},{id:qa()(),name:"8 April 2020",address:{country:"Dinas",state:"",city:"",street:"2849 Fulton Street"},email:"Tiara",phone:"Toyota",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5},{id:qa()(),name:"9 April 2020",address:{country:"Dinas",state:"",city:"",street:"2849 Fulton Street"},email:"Dimitri",phone:"Toyota",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5},{id:qa()(),name:"10 April 2020",address:{country:"Dinas",state:"",city:"",street:"2849 Fulton Street"},email:"Dimitri",phone:"Suzuki",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5},{id:qa()(),name:"10 April 2020",address:{country:"Ekpedisi",state:"",city:"",street:"2849 Fulton Street"},email:"Awan",phone:"Suzuki",avatarUrl:"/images/avatars/avatar_3.png",createdAt:15550164e5}],Ht={server:"https://quiet-mesa-17901.herokuapp.com",name:"pemesanan-mobils",nameForLabelInfo:"Pemesanan Mobil",route:"pemesanan-mobil",label:{addNew:"Silahkan menginput informasi pemesanan mobil"},statusList:{submitted:"submitted"}},Jt=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),Ut=function(){var e=Jt(),a=Object(n.useState)(Yt),t=Object(l.a)(a,1)[0],c=Re($().authTokens),i=(c.id,c.name);return r.a.createElement("div",{className:e.root},r.a.createElement(Ft,{isHCO:Ie(i)}),r.a.createElement("div",{className:e.content},r.a.createElement(Bt,{users:t})))};function Gt(){return Math.round(20*Math.random())-10}function zt(){var e=50+Gt(),a=50+Gt();return{top:"".concat(e,"%"),left:"".concat(a,"%"),transform:"translate(-".concat(e,"%, -").concat(a,"%)")}}var Vt=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)}}})),Kt=function(e){var a=e.className,t=e.data,c=Object(k.a)(e,["className","data"]),i=$().authTokens,m=Vt(),u="tambah"===t.jenis_input,d="tambah"===t.jenis_input,p=Object(n.useState)({firstName:"",lastName:"",email:"",phone:"",state:"",country:"USA",mobil:"",tipePemesanan:"",tanggalPemesanan:va()().format("YYYY-MM-DD"),keterangan:""}),g=Object(l.a)(p,2),b=g[0],f=g[1];Object(n.useEffect)((function(){"ubah"===t.jenis_input?f(Object(o.a)({},b,{mobil:t.dataDefault.mobilId,tipePemesanan:t.dataDefault.tipe_pemesanan,tanggalPemesanan:va()(t.dataDefault.tanggal_pemesanan).format("YYYY-MM-DD"),keterangan:t.dataDefault.keterangan})):f(Object(o.a)({},b,{mobil:t.dataDefault.mobilId,tanggalPemesanan:va()(t.dataDefault.tanggal_pemesanan).format("YYYY-MM-DD")}))}),[]);var h=r.a.useState([]),v=Object(l.a)(h,2),E=v[0],j=v[1],O=function(e){f(Object(o.a)({},b,Object(W.a)({},e.target.name,e.target.value)))},y=r.a.useState(new Date("2014-08-18T21:11:54")),x=Object(l.a)(y,2),w=(x[0],x[1],function(){var e=Object(vt.a)(ht.a.mark((function e(a){var n,r,c,l;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(i),n=/"(.*?)"/g,r=i.match(n),c=r[0].replace(/\"/g,""),l=Pe()(c),e.prev=5,"ubah"!==t.jenis_input){e.next=12;break}return e.next=9,jt.a.put("".concat("https://quiet-mesa-17901.herokuapp.com","/pemesanan-mobils/").concat(t.dataDefault.id),{tanggal_pemesanan:va()(b.tanggalPemesanan).format(),tipe_pemesanan:b.tipePemesanan,keterangan:b.keterangan,mobilId:b.mobil,userId:parseInt(l.id),status_pemesanan:"submitted"});case 9:e.sent,e.next=15;break;case 12:return e.next=14,jt.a.post("".concat("https://quiet-mesa-17901.herokuapp.com","/pemesanan-mobils"),{tanggal_pemesanan:va()(b.tanggalPemesanan).format(),tipe_pemesanan:b.tipePemesanan,keterangan:b.keterangan,mobilId:b.mobil,userId:parseInt(l.id),status_pemesanan:"submitted"});case 14:e.sent;case 15:R(),a.push("/pemesanan-mobil"),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(5),alert("Terjadi kesalahan saat memproses permintaan Anda."),console.log("Axios request failed: ".concat(e.t0));case 23:case"end":return e.stop()}}),e,null,[[5,19]])})));return function(a){return e.apply(this,arguments)}}()),_=r.a.useState(!1),C=Object(l.a)(_,2),S=C[0],I=C[1],D=r.a.useState(zt),T=Object(l.a)(D,1)[0],R=function(){I(!0)},M=r.a.createElement("div",{style:T,className:m.paper},r.a.createElement("h2",{id:"simple-modal-title"},"Notifikasi"),r.a.createElement("p",{id:"simple-modal-description"},"Data tersimpan!")),A=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return w(a)}},"Simpan")}));return Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()("".concat("https://quiet-mesa-17901.herokuapp.com","/mobils"));case 2:a=e.sent,j([{nomor_polisi:"",tipe_mobil:""}].concat(a.data));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]),r.a.createElement(ua.a,Object.assign({},c,{className:Object(N.a)(m.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{subheader:"Silahkan menginput informasi pemesanan",title:"Pemesanan Mobil"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,readOnly:!0,label:"Tanggal Pemesanan",margin:"dense",name:"tanggal_pemesanan",type:"date",onChange:O,defaultValue:"2020-04-04",required:!0,value:b.tanggalPemesanan,variant:"outlined",InputLabelProps:{shrink:!0},InputProps:{readOnly:{tanggalPemesananReadOnly:u}}})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Mobil",margin:"dense",name:"mobil",required:!0,select:!0,SelectProps:{native:!0},value:b.mobil,variant:"outlined",InputLabelProps:{shrink:!0},InputProps:{readOnly:{mobilReadOnly:d}}},E.map((function(e){return r.a.createElement("option",{key:e.nomor_polisi,value:e.nomor_polisi},e.tipe_mobil," - ",e.nomor_polisi)})))),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Tipe pemesanan",margin:"dense",name:"tipePemesanan",onChange:O,required:!0,select:!0,SelectProps:{native:!0},value:b.tipePemesanan,variant:"outlined",InputLabelProps:{shrink:!0}},[{value:"",label:""},{value:"dinas",label:"Dinas"},{value:"ekpedisi",label:"Ekpedisi Barang"}].map((function(e){return r.a.createElement("option",{key:e.value,value:e.value},e.label)})))),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Keterangan",margin:"dense",name:"keterangan",onChange:O,required:!0,value:b.keterangan,variant:"outlined"})))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(A,null))),r.a.createElement(X.a,{open:S,onClose:function(){I(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},M))},Zt=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),$t=function(e){var a=Zt(),t=e.location,n=(Object(k.a)(e,["location"]),t.state);return r.a.createElement("div",{className:a.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(Kt,{data:n}))))},Qt=t(123),Xt=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),en=function(e){var a=e.className,t=e.data,c=e.selectMasterData,i=Object(k.a)(e,["className","data","selectMasterData"]),o=r.a.useState(!1),m=Object(l.a)(o,2),u=(m[0],m[1],r.a.useState(null)),d=Object(l.a)(u,2),p=(d[0],d[1],Object(n.useState)([])),g=Object(l.a)(p,2),b=(g[0],g[1],$().authTokens),f=Xt(),h=Object(n.useState)([]),v=Object(l.a)(h,2),E=v[0],j=(v[1],Object(n.useState)(10)),O=Object(l.a)(j,2),y=O[0],x=O[1],w=Object(n.useState)(0),_=Object(l.a)(w,2),C=_[0],S=_[1],I=Re(b).name,D=(Se(I),Ce(I),Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){c(a,t,n)}},"PILIH")})));return r.a.createElement(ua.a,Object.assign({},i,{className:Object(N.a)(f.root,a)}),r.a.createElement(pa.a,{className:f.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:f.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,null,"Nomor Polisi"),r.a.createElement(Pa.a,null,"Tipe Mobil"),r.a.createElement(Pa.a,null,"Merek Mobil"),r.a.createElement(Pa.a,null,"Jumlah Kursi"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,y).map((function(e,a){return r.a.createElement(Ta.a,{className:f.tableRow,hover:!0,key:e.id,selected:-1!==E.indexOf(e.id)},r.a.createElement(Pa.a,null,e.nomor_polisi),r.a.createElement(Pa.a,null,e.tipe_mobil),r.a.createElement(Pa.a,null,e.merek_mobil),r.a.createElement(Pa.a,null,e.jumlah_kursi),r.a.createElement(Pa.a,null,r.a.createElement(D,{datatransaksi:e,dataIndex:a})))}))))))),r.a.createElement(ga.a,{className:f.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){S(a)},onChangeRowsPerPage:function(e){x(e.target.value)},page:C,rowsPerPage:y,rowsPerPageOptions:[5,10,25]})))},an=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),tn=function(e){var a=e.className,t=e.data,c=e.cancelAction,i=e.approveAction,o=Object(k.a)(e,["className","data","cancelAction","approveAction"]),m=r.a.useState(!1),u=Object(l.a)(m,2),d=(u[0],u[1],r.a.useState(null)),p=Object(l.a)(d,2),g=(p[0],p[1],Object(n.useState)([])),b=Object(l.a)(g,2),f=(b[0],b[1],r.a.useState(!1)),h=Object(l.a)(f,2),v=h[0],E=h[1],j=r.a.useState({}),O=Object(l.a)(j,2),y=O[0],x=O[1],w=$().authTokens,_=an(),C=Object(n.useState)([]),S=Object(l.a)(C,2),I=S[0],D=(S[1],Object(n.useState)(10)),T=Object(l.a)(D,2),P=T[0],R=T[1],M=Object(n.useState)(0),A=Object(l.a)(M,2),L=A[0],q=A[1],B=Re(w),W=B.id;Se(B.name);console.log(B);Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){i(a,t,n)}},"Approve")}));var Y=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){return J(a,t,n)}},"Cancel")})),H=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){a.push("/".concat(ln.route,"/view"),{id_ruangan:t.ruangMeetingId,nama_ruangan:t.ruangMeeting.nama_ruangan,waktu_meeting:t.waktu_meeting,jenis_input:"ubah",dataDefault:t})}},"View")})),J=function(e,a,t){x({history:e,datatransaksi:a,dataIndex:t}),E(!0)};return r.a.createElement(ua.a,Object.assign({},o,{className:Object(N.a)(_.root,a)}),r.a.createElement(pa.a,{className:_.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:_.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,null,"Tanggal Meeting"),r.a.createElement(Pa.a,null,"Ruang Meeting"),r.a.createElement(Pa.a,null,"Status Pemesanan"),r.a.createElement(Pa.a,null,"Pemesan"),r.a.createElement(Pa.a,null,"Agenda"),r.a.createElement(Pa.a,null,"Start Meeting"),r.a.createElement(Pa.a,null,"Jam Mulai"),r.a.createElement(Pa.a,null,"Jam Selesai"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,P).map((function(e,a){return r.a.createElement(Ta.a,{className:_.tableRow,hover:!0,key:e.id,selected:-1!==I.indexOf(e.id)},r.a.createElement(Pa.a,null,r.a.createElement("div",{className:_.nameContainer},r.a.createElement(ce.a,{variant:"body1"}," ",va()(e.waktu_meeting).format("DD/MM/YYYY")))),r.a.createElement(Pa.a,null,e.ruangMeeting.nama_ruangan),r.a.createElement(Pa.a,null,e.status),r.a.createElement(Pa.a,null,e.user?e.user.username:""),r.a.createElement(Pa.a,null,e.agenda),r.a.createElement(Pa.a,null,va()(e.start_meeting).format("DD/MM/YYYY")),r.a.createElement(Pa.a,null,va()(e.start_meeting,"YYYY-MM-DD hh:mm:ss").format("hh:mm:ss")),r.a.createElement(Pa.a,null,va()(e.end_meeting,"YYYY-MM-DD hh:mm:ss").format("hh:mm:ss")),r.a.createElement(Pa.a,null,e.userId===parseInt(W)&&"schedule_available"===e.status?r.a.createElement("div",null,r.a.createElement(Y,{datatransaksi:e,dataIndex:a}),r.a.createElement(H,{datatransaksi:e,dataIndex:a})):r.a.createElement("div",null)))}))))))),r.a.createElement(ga.a,{className:_.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){q(a)},onChangeRowsPerPage:function(e){R(e.target.value)},page:L,rowsPerPage:P,rowsPerPageOptions:[5,10,25]})),r.a.createElement(te,{open:v,handleClose:function(){E(!1)},handleYes:function(){E(!1),c(y)},title:"Konfirmasi",content:"Anda yakin untuk membatalkan reservasi ini?"}))},nn=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),rn=function(e){var a=e.className,t=(e.history,e.rangedDataInputOnClick),n=Object(k.a)(e,["className","history","rangedDataInputOnClick"]),c=$().authTokens,i=nn(),l=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ln.route,"/search"))}},"Tambah Reservasi")})),o=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/ruang-meeting")}},"Ruang Meeting")})),m=Re(c),u=(m.id,Ie(m.name));return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(i.root,a)}),r.a.createElement("div",{className:i.row},r.a.createElement("span",{className:i.spacer}),r.a.createElement(l,null),u?r.a.createElement(o,null):r.a.createElement("div",null)),r.a.createElement("div",{className:i.row},r.a.createElement(U,{myLabel:"Filter Tanggal Meeting",className:i.searchInput,placeholder:"Search Pemesanan",onClick:t})))},cn=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),ln={server:"https://quiet-mesa-17901.herokuapp.com",name:"meeting-room-reservations",nameForLabelInfo:"Reservasi ruang meeting",route:"reservasi-ruang-meeting",label:{addNew:"Silahkan menginput informasi reservasi"},statusList:{available:"schedule_available"}},on=function(){var e=cn(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],$().authTokens),d=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),l=Object(o.a)({},r,{status_pemesanan:"approved",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),s=Object(o.a)({},t,{status_pemesanan:"approved"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(ln.server,"/").concat(ln.name,"/").concat(t.id),l);case 7:e.sent,alert("".concat(ln.nameForLabelInfo," berhasil di setujui.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}(),p=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n,r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.history,t=a.datatransaksi,n=a.dataIndex,t.user,t.ruangMeeting,r=Object(k.a)(t,["user","ruangMeeting"]),l=Object(o.a)({},r,{status:"cancelled"}),s=Object(o.a)({},t,{status:"cancelled"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=5,e.next=8,jt.a.put("".concat(ln.server,"/").concat(ln.name,"/").concat(t.id_meeting_room_res),l);case 8:e.sent,alert("".concat(ln.nameForLabelInfo," berhasil dibatalkan.")),i(m),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(5),console.log("Axios request failed: ".concat(e.t0));case 16:case"end":return e.stop()}}),e,null,[[5,13]])})));return function(a){return e.apply(this,arguments)}}(),g={include:[{relation:"user"},{relation:"ruangMeeting"}]},b=Re(u),f=b.id,h=b.name;Ie(h)||(g=Object(o.a)({},g,{where:{userId:{ilike:f}}})),Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(ln.server,"/").concat(ln.name,"?filter=").concat(JSON.stringify(g))});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]);var v=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(a),t=g,a.startDate&&a.endDate&&(t=Object(o.a)({},g,{where:Object(o.a)({},g.where,{and:[{waktu_meeting:{gt:new Date(va()(a.startDate).subtract(1,"seconds").format())}},{waktu_meeting:{lt:new Date(va()(a.endDate).add(1,"days").subtract(1,"seconds").format())}}]})})),e.next=5,jt()({method:"get",url:"".concat(ln.server,"/").concat(ln.name,"?filter=").concat(JSON.stringify(t))});case 5:n=e.sent,i(n.data);case 7:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:e.root},r.a.createElement(rn,{rangedDataInputOnClick:v}),r.a.createElement("div",{className:e.content},r.a.createElement(tn,{data:c,cancelAction:p,approveAction:d})))},sn=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),mn=function(e){var a=e.className,t=(e.history,e.searchMasterData),n=Object(k.a)(e,["className","history","searchMasterData"]),c=sn();Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ln.route,"/tambah"))}},"Tambah Reservasi")}));return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement("div",{className:c.row},r.a.createElement("span",{className:c.spacer})),r.a.createElement("div",{className:c.row},r.a.createElement("div",null,"Silahkan pilih mobil")),r.a.createElement("div",{className:c.row},r.a.createElement(L,{className:c.searchInput,placeholder:"Search",onChange:t,labelText:"Pilih tanggal pemakaian"})))},un=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),dn=function(e){var a=un(),t=Object(n.useState)([]),c=Object(l.a)(t,2),i=c[0],o=c[1],s=Object(n.useState)(null),m=Object(l.a)(s,2),u=m[0],d=m[1];Object(n.useEffect)((function(){}),[]);var p=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n,r,c,i,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(a),e.next=3,jt()({method:"get",url:"".concat(Ht.server,"/mobils")});case 3:return t=e.sent,n={where:{and:[{tanggal_pemesanan:{gt:new Date(va()(a).subtract(1,"seconds").format())}},{tanggal_pemesanan:{lt:new Date(va()(a).add(1,"days").subtract(1,"seconds").format())}}]}},e.next=7,jt()({method:"get",url:"".concat(Ht.server,"/").concat(Ht.name,"?filter=").concat(JSON.stringify(n))});case 7:r=e.sent,c=[],i=Object(Qt.a)(r.data);try{for(s=function(){var e=l.value;t.data.forEach((function(a){a.nomor_polisi===e.mobilId&&c.push(a.nomor_polisi)}))},i.s();!(l=i.n()).done;)s()}catch(u){i.e(u)}finally{i.f()}m=t.data.filter((function(e){return!c.includes(e.nomor_polisi)})),o(m);case 13:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),g=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.push("/".concat(Ht.route,"/tambah"),{jenis_input:"tambah",dataDefault:{mobilId:t.nomor_polisi,tanggal_pemesanan:u}});case 1:case"end":return e.stop()}}),e)})));return function(a,t,n){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:a.root},r.a.createElement(mn,{searchMasterData:p}),r.a.createElement("div",{className:a.content},r.a.createElement(en,{data:i,selectMasterData:g})))};function pn(){return Math.round(20*Math.random())-10}function gn(){var e=50+pn(),a=50+pn();return{top:"".concat(e,"%"),left:"".concat(a,"%"),transform:"translate(-".concat(e,"%, -").concat(a,"%)")}}var bn=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)}}})),fn=function(e){var a=e.className,t=e.simpan,c=e.data,i=Object(k.a)(e,["className","simpan","data"]),m=bn(),u=Object(n.useState)({waktuMeeting:null,startMeeting:null,endMeeting:null,agenda:"",deskripsi:"",waktu_meeting:"",nama_ruangan:"",id_ruangan:0,id_meeting_room_res:0,jam_mulai:null,jam_akhir:null}),d=Object(l.a)(u,2),p=d[0],g=d[1];Object(n.useEffect)((function(){g(Object(o.a)({},p,{waktu_meeting:c.waktu_meeting,nama_ruangan:c.nama_ruangan,waktuMeeting:c.waktu_meeting,startMeeting:c.waktu_meeting,endMeeting:c.waktu_meeting,id_ruangan:c.id_ruangan})),console.log(c.dataDefault),"ubah"===c.jenis_input&&(va.a.locale(),g(Object(o.a)({},p,{waktu_meeting:c.dataDefault.waktu_meeting,nama_ruangan:c.dataDefault.ruangMeeting.nama_ruangan,waktuMeeting:c.dataDefault.waktu_meeting,startMeeting:c.dataDefault.start_meeting,endMeeting:c.dataDefault.end_meeting,id_ruangan:c.dataDefault.ruangMeetingId,agenda:c.dataDefault.agenda,deskripsi:c.dataDefault.deskripsi,id_meeting_room_res:c.dataDefault.id_meeting_room_res,jam_mulai:va()(c.dataDefault.start_meeting,"YYYY-MM-DD hh:mm:ss").format("hh:mm:ss"),jam_akhir:va()(c.dataDefault.end_meeting,"YYYY-MM-DD hh:mm:ss").format("hh:mm:ss")})))}),[]);var b=function(e){g(Object(o.a)({},p,Object(W.a)({},e.target.name,e.target.value)))},f=r.a.useState(new Date("2014-08-18T21:11:54")),h=Object(l.a)(f,2),v=(h[0],h[1],r.a.useState(!1)),E=Object(l.a)(v,2),j=E[0],O=E[1],y=r.a.useState(gn),x=Object(l.a)(y,1)[0],w=r.a.createElement("div",{style:x,className:m.paper},r.a.createElement("h2",{id:"simple-modal-title"},"Notifikasi"),r.a.createElement("p",{id:"simple-modal-description"},"Data tersimpan!")),_=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return t(a,p)}},"Simpan")}));return r.a.createElement(ua.a,Object.assign({},i,{className:Object(N.a)(m.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{subheader:ln.label.addNew,title:ln.nameForLabelInfo}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Tanggal Reservasi",margin:"dense",name:"waktu_meeting",InputProps:{readOnly:!0},value:va()(p.waktu_meeting).format("DD-MM-YYYY"),variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Ruang Meeting",margin:"dense",name:"nama_ruangan",InputProps:{readOnly:!0},value:p.nama_ruangan,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Agenda",margin:"dense",name:"agenda",onChange:b,required:!0,value:p.agenda,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Tanggal Pakai Ruang Meeting",margin:"dense",name:"startMeeting",type:"date",onChange:b,required:!0,value:p.startMeeting,variant:"outlined",InputLabelProps:{shrink:!0}})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Jam Mulai",margin:"dense",name:"jam_mulai",type:"time",onChange:b,required:!0,value:p.jam_mulai,variant:"outlined",InputLabelProps:{shrink:!0}})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Jam Selesai",margin:"dense",name:"jam_akhir",type:"time",onChange:b,required:!0,value:p.jam_akhir,variant:"outlined",InputLabelProps:{shrink:!0}})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Deskripsi",margin:"dense",name:"deskripsi",onChange:b,required:!0,value:p.deskripsi,variant:"outlined"})))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(_,null))),r.a.createElement(X.a,{open:j,onClose:function(){O(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},w))},hn=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),vn=function(e){var a=e.location,t=(Object(k.a)(e,["location"]),a.state),n=hn(),c=$().authTokens,i=t.jenis_input,l=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t){var n,r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=/"(.*?)"/g,r=c.match(n),l=r[0].replace(/\"/g,""),s=Pe()(l),e.prev=4,m={waktu_meeting:va()(t.waktu_meeting,"YYYY-MM-DD").add(1,"days").format(),start_meeting:va()(t.startMeeting+" "+t.jam_mulai+":00").format(),end_meeting:va()(t.startMeeting+" "+t.jam_akhir+":00").format(),agenda:t.agenda,deskripsi:t.deskripsi,status:ln.statusList.available,userId:parseInt(s.id),ruangMeetingId:t.id_ruangan},"tambah"!==i){e.next=12;break}return e.next=9,jt.a.post("".concat(ln.server,"/").concat(ln.name),m);case 9:e.sent,e.next=16;break;case 12:return Object(o.a)({},m,{id_meeting_room_res:t.id_meeting_room_res}),e.next=15,jt.a.put("".concat(ln.server,"/").concat(ln.name,"/").concat(t.id_meeting_room_res),m);case 15:e.sent;case 16:a.push("/".concat(ln.route)),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(4),alert("Terjadi kesalahan saat memproses permintaan Anda."),console.log("Axios request failed: ".concat(e.t0));case 23:case"end":return e.stop()}}),e,null,[[4,19]])})));return function(a,t){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:n.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(fn,{simpan:l,data:t}))))},En=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),jn=function(e){var a=e.className,t=e.data,c=e.selectRuangMeeting,i=Object(k.a)(e,["className","data","selectRuangMeeting"]),o=r.a.useState(!1),m=Object(l.a)(o,2),u=(m[0],m[1],r.a.useState(null)),d=Object(l.a)(u,2),p=(d[0],d[1],Object(n.useState)([])),g=Object(l.a)(p,2),b=(g[0],g[1],$().authTokens),f=En(),h=Object(n.useState)([]),v=Object(l.a)(h,2),E=v[0],j=(v[1],Object(n.useState)(10)),O=Object(l.a)(j,2),y=O[0],x=O[1],w=Object(n.useState)(0),_=Object(l.a)(w,2),C=_[0],S=_[1],I=Re(b).name,D=(Se(I),Ce(I),Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){c(a,t,n)}},"PILIH")})));return r.a.createElement(ua.a,Object.assign({},i,{className:Object(N.a)(f.root,a)}),r.a.createElement(pa.a,{className:f.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:f.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,null,"Nama Ruangan"),r.a.createElement(Pa.a,null,"Status"),r.a.createElement(Pa.a,null,"Fasilitas Ruangan"),r.a.createElement(Pa.a,null,"Kapasitas"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,y).map((function(e,a){return r.a.createElement(Ta.a,{className:f.tableRow,hover:!0,key:e.id,selected:-1!==E.indexOf(e.id)},r.a.createElement(Pa.a,null,e.nama_ruangan),r.a.createElement(Pa.a,null,e.status_tersedia),r.a.createElement(Pa.a,null,e.fasilitas_ruangan),r.a.createElement(Pa.a,null,e.kapasitas),r.a.createElement(Pa.a,null,r.a.createElement(D,{datatransaksi:e,dataIndex:a})))}))))))),r.a.createElement(ga.a,{className:f.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){S(a)},onChangeRowsPerPage:function(e){x(e.target.value)},page:C,rowsPerPage:y,rowsPerPageOptions:[5,10,25]})))},On=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),yn=function(e){var a=e.className,t=(e.history,e.searchRuangMeeting),n=Object(k.a)(e,["className","history","searchRuangMeeting"]),c=On();Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ln.route,"/tambah"))}},"Tambah Reservasi")}));return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement("div",{className:c.row},r.a.createElement("span",{className:c.spacer})),r.a.createElement("div",{className:c.row},r.a.createElement("div",null,"1. Silahkan pilih ruang meeting")),r.a.createElement("div",{className:c.row},r.a.createElement(L,{className:c.searchInput,placeholder:"Search Ruang Meeting",onChange:t,labelText:"Pilih Tanggal Meeting"}),r.a.createElement(B,{className:c.searchInput,labelText:"Jam Mulai",onChange:t}),r.a.createElement(B,{className:c.searchInput,labelText:"Jam Selesai",onChange:t})))},xn=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),kn={server:"https://quiet-mesa-17901.herokuapp.com",name:"meeting-room-reservations",nameForLabelInfo:"Reservasi ruang meeting",route:"reservasi-ruang-meeting",label:{addNew:"Silahkan menginput informasi reservasi"},statusList:{available:"schedule_available"}},Nn=function(e){var a=xn(),t=Object(n.useState)([]),c=Object(l.a)(t,2),i=c[0],o=c[1],s=Object(n.useState)(null),m=Object(l.a)(s,2),u=m[0],d=m[1],p=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n,r,c,i,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(a),e.next=3,jt()({method:"get",url:"".concat(kn.server,"/ruang-meetings")});case 3:return t=e.sent,n={where:{and:[{waktu_meeting:{gt:new Date(va()(a).subtract(1,"seconds").format())}},{waktu_meeting:{lt:new Date(va()(a).add(1,"days").subtract(1,"seconds").format())}}]}},e.next=7,jt()({method:"get",url:"".concat(kn.server,"/").concat(kn.name,"?filter=").concat(JSON.stringify(n))});case 7:r=e.sent,c=[],i=Object(Qt.a)(r.data);try{for(s=function(){var e=l.value;t.data.forEach((function(a){a.id_ruangan===e.ruangMeetingId&&c.push(a.id_ruangan)}))},i.s();!(l=i.n()).done;)s()}catch(u){i.e(u)}finally{i.f()}m=t.data.filter((function(e){return!c.includes(e.id_ruangan)})),o(m);case 13:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),g=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.push("/".concat(kn.route,"/tambah"),{id_ruangan:t.id_ruangan,nama_ruangan:t.nama_ruangan,waktu_meeting:u,jenis_input:"tambah",dataDefault:{}});case 1:case"end":return e.stop()}}),e)})));return function(a,t,n){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:a.root},r.a.createElement(yn,{searchRuangMeeting:p}),r.a.createElement("div",{className:a.content},r.a.createElement(jn,{data:i,selectRuangMeeting:g})))},wn=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),_n=function(e){var a=e.className,t=e.data,c=e.cancelAction,i=e.approveAction,o=Object(k.a)(e,["className","data","cancelAction","approveAction"]),m=r.a.useState(!1),u=Object(l.a)(m,2),d=(u[0],u[1],r.a.useState(null)),p=Object(l.a)(d,2),g=(p[0],p[1],Object(n.useState)([])),b=Object(l.a)(g,2),f=(b[0],b[1],$().authTokens),h=wn(),v=Object(n.useState)([]),E=Object(l.a)(v,2),j=E[0],O=E[1],y=Object(n.useState)(10),x=Object(l.a)(y,2),w=x[0],_=x[1],C=Object(n.useState)(0),S=Object(l.a)(C,2),I=S[0],D=S[1],T=Re(f);T.id,Se(T.name);console.log(T);Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){i(a,t,n)}},"Approve")})),Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){c(a,t,n)}},"Remove")}));var P=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){a.push("/".concat(Dn.route,"/view"),{jenis_input:"ubah",dataDefault:t})}},"View")}));return r.a.createElement(ua.a,Object.assign({},o,{className:Object(N.a)(h.root,a)}),r.a.createElement(pa.a,{className:h.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:h.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,{padding:"checkbox"},r.a.createElement(st.a,{checked:j.length===t.length,color:"primary",indeterminate:j.length>0&&j.length<t.length,onChange:function(a){var t,n=e.data;t=a.target.checked?n.map((function(e){return e.id})):[],O(t)}})),r.a.createElement(Pa.a,null,"Nama Ruangan"),r.a.createElement(Pa.a,null,"Fasilitas"),r.a.createElement(Pa.a,null,"Kapasitas"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,w).map((function(e,a){return r.a.createElement(Ta.a,{className:h.tableRow,hover:!0,key:e.id,selected:-1!==j.indexOf(e.id)},r.a.createElement(Pa.a,{padding:"checkbox"},r.a.createElement(st.a,{checked:-1!==j.indexOf(e.id),color:"primary",onChange:function(a){return function(e,a){var t=j.indexOf(a),n=[];-1===t?n=n.concat(j,a):0===t?n=n.concat(j.slice(1)):t===j.length-1?n=n.concat(j.slice(0,-1)):t>0&&(n=n.concat(j.slice(0,t),j.slice(t+1))),O(n)}(0,e.id)},value:"true"})),r.a.createElement(Pa.a,null,e.nama_ruangan),r.a.createElement(Pa.a,null,e.fasilitas_ruangan),r.a.createElement(Pa.a,null,e.kapasitas),r.a.createElement(Pa.a,null,r.a.createElement(P,{datatransaksi:e,dataIndex:a})))}))))))),r.a.createElement(ga.a,{className:h.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){D(a)},onChangeRowsPerPage:function(e){_(e.target.value)},page:I,rowsPerPage:w,rowsPerPageOptions:[5,10,25]})))},Cn=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),Sn=function(e){var a=e.className,t=(e.history,Object(k.a)(e,["className","history"])),n=$().authTokens,c=Cn(),i=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(Dn.route,"/tambah"),{jenis_input:"tambah",dataDefault:{}})}},"Tambah Ruang Meeting")})),l=Re(n);l.id,Ie(l.name);return r.a.createElement("div",Object.assign({},t,{className:Object(N.a)(c.root,a)}),r.a.createElement("div",{className:c.row},r.a.createElement("span",{className:c.spacer}),r.a.createElement(i,null)),r.a.createElement("div",{className:c.row}))},In=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),Dn={server:"https://quiet-mesa-17901.herokuapp.com",name:"ruang-meetings",nameForLabelInfo:"Ruang Meeting",route:"ruang-meeting",label:{addNew:"Silahkan menginput informasi ruang meeting"},statusList:{available:"available"}},Tn=function(){var e=In(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),l=Object(o.a)({},r,{status_pemesanan:"approved",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),s=Object(o.a)({},t,{status_pemesanan:"approved"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Dn.server,"/").concat(Dn.name,"/").concat(t.id),l);case 7:e.sent,alert("".concat(Dn.nameForLabelInfo," berhasil di setujui.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}()),d=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.ruangMeeting,r=Object(k.a)(t,["user","ruangMeeting"]),l=Object(o.a)({},r,{status:"cancelled"}),s=Object(o.a)({},t,{status:"cancelled"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Dn.server,"/").concat(Dn.name,"/").concat(t.id_meeting_room_res),l);case 7:e.sent,alert("".concat(Dn.nameForLabelInfo," berhasil dibatalkan.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}();return Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(Dn.server,"/").concat(Dn.name)});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]),r.a.createElement("div",{className:e.root},r.a.createElement(Sn,null),r.a.createElement("div",{className:e.content},r.a.createElement(_n,{data:c,cancelAction:d,approveAction:u})))};function Pn(){return Math.round(20*Math.random())-10}function Rn(){var e=50+Pn(),a=50+Pn();return{top:"".concat(e,"%"),left:"".concat(a,"%"),transform:"translate(-".concat(e,"%, -").concat(a,"%)")}}var Mn=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)}}})),An=function(e){var a=e.className,t=e.simpan,c=e.data,i=Object(k.a)(e,["className","simpan","data"]);console.log(c);var m=Mn(),u=Object(n.useState)({id_ruangan:0,nama_ruangan:"",fasilitas_ruangan:"",kapasitas:"",foto:"foto",status_tersedia:"available"}),d=Object(l.a)(u,2),p=d[0],g=d[1];Object(n.useEffect)((function(){g(Object(o.a)({},p,{id_ruangan:c.dataDefault.id_ruangan,nama_ruangan:c.dataDefault.nama_ruangan,fasilitas_ruangan:c.dataDefault.fasilitas_ruangan,kapasitas:c.dataDefault.kapasitas}))}),[]);var b=function(e){g(Object(o.a)({},p,Object(W.a)({},e.target.name,e.target.value)))},f=r.a.useState(new Date("2014-08-18T21:11:54")),h=Object(l.a)(f,2),v=(h[0],h[1],r.a.useState(!1)),E=Object(l.a)(v,2),j=E[0],O=E[1],y=r.a.useState(Rn),x=Object(l.a)(y,1)[0],w=r.a.createElement("div",{style:x,className:m.paper},r.a.createElement("h2",{id:"simple-modal-title"},"Notifikasi"),r.a.createElement("p",{id:"simple-modal-description"},"Data tersimpan!")),_=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return t(a,p)}},"Simpan")}));return r.a.createElement(ua.a,Object.assign({},i,{className:Object(N.a)(m.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{subheader:ln.label.addNew,title:ln.nameForLabelInfo}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Nama Ruangan",margin:"dense",name:"nama_ruangan",onChange:b,required:!0,value:p.nama_ruangan,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Fasilitas Ruangan",margin:"dense",name:"fasilitas_ruangan",onChange:b,required:!0,value:p.fasilitas_ruangan,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Kapasitas",margin:"dense",name:"kapasitas",onChange:b,required:!0,value:p.kapasitas,variant:"outlined"})))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(_,null))),r.a.createElement(X.a,{open:j,onClose:function(){O(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},w))},Ln=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),qn=function(e){var a=e.location,t=(Object(k.a)(e,["location"]),a.state),n=Ln(),c=$().authTokens,i=t.jenis_input,l=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t){var n,r,l,s;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=/"(.*?)"/g,r=c.match(n),l=r[0].replace(/\"/g,""),Pe()(l),e.prev=4,s=Object(o.a)({},t,{kapasitas:parseInt(t.kapasitas)}),"tambah"!==i){e.next=12;break}return e.next=9,jt.a.post("".concat(Dn.server,"/").concat(Dn.name),s);case 9:e.sent,e.next=15;break;case 12:return e.next=14,jt.a.put("".concat(Dn.server,"/").concat(Dn.name,"/").concat(t.id_ruangan),s);case 14:e.sent;case 15:a.push("/".concat(Dn.route)),e.next=22;break;case 18:e.prev=18,e.t0=e.catch(4),alert("Terjadi kesalahan saat memproses permintaan Anda."),console.log("Axios request failed: ".concat(e.t0));case 22:case"end":return e.stop()}}),e,null,[[4,18]])})));return function(a,t){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:n.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(An,{simpan:l,data:t}))))},Bn=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Wn=function(e){var a=e.className,t=e.data,c=e.cancelAction,i=(e.approveAction,e.confirmAction),o=e.readyAction,m=Object(k.a)(e,["className","data","cancelAction","approveAction","confirmAction","readyAction"]),u=r.a.useState(!1),d=Object(l.a)(u,2),p=(d[0],d[1],r.a.useState(null)),g=Object(l.a)(p,2),b=(g[0],g[1],Object(n.useState)([])),f=Object(l.a)(b,2),h=(f[0],f[1],r.a.useState(!1)),v=Object(l.a)(h,2),E=v[0],j=v[1],O=r.a.useState({}),y=Object(l.a)(O,2),x=y[0],w=y[1],_=$().authTokens,C=Bn(),S=Object(n.useState)([]),I=Object(l.a)(S,2),D=I[0],T=(I[1],Object(n.useState)(10)),P=Object(l.a)(T,2),R=P[0],M=P[1],A=Object(n.useState)(0),L=Object(l.a)(A,2),q=L[0],B=L[1],W=Re(_),Y=W.id,H=W.name;Se(H);console.log(W);var J=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(Jn.route,"/approve"),{jenis_input:"approve",dataDefault:t})}},"CONTINUE")})),U=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){return K(a,t,n)}},"Cancel")})),G=Object(s.g)((function(e){var a=e.history,n=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){a.push("/".concat(Jn.route,"/view"),{id_inventory:t.id_inventory,nama_barang:t.nama_barang,jenis_input:"ubah",dataDefault:n})}},"View")})),z=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){i(a,t,n)}},"Confirm")})),V=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){o(a,t,n)}},"Ready")})),K=function(e,a,t){w({history:e,datatransaksi:a,dataIndex:t}),j(!0)};return r.a.createElement(ua.a,Object.assign({},m,{className:Object(N.a)(C.root,a)}),r.a.createElement(pa.a,{className:C.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:C.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,null,"Nomor Order"),r.a.createElement(Pa.a,null,"Status"),r.a.createElement(Pa.a,null,"Nama Barang"),r.a.createElement(Pa.a,null,"Jumlah"),r.a.createElement(Pa.a,null,"Pemesan"),r.a.createElement(Pa.a,null,"Waktu Ambil"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,R).map((function(e,a){return r.a.createElement(Ta.a,{className:C.tableRow,hover:!0,key:e.id,selected:-1!==D.indexOf(e.id)},r.a.createElement(Pa.a,null,e.nomor_order),r.a.createElement(Pa.a,null,e.status_order),r.a.createElement(Pa.a,null,e.inventory.nama_barang),r.a.createElement(Pa.a,null,e.jumlah),r.a.createElement(Pa.a,null,e.user?e.user.username:""),r.a.createElement(Pa.a,null,e.waktu_ambil?va()(e.waktu_ambil).format("DD/MM/YYYY"):""),r.a.createElement(Pa.a,null,e.userId===parseInt(Y)&&e.status_order===Jn.statusList.submitted?r.a.createElement("div",null,r.a.createElement(U,{datatransaksi:e,dataIndex:a}),r.a.createElement(G,{datatransaksi:e,dataIndex:a})):r.a.createElement("div",null),Se(H)&&e.status_order===Jn.statusList.submitted?r.a.createElement(J,{datatransaksi:e,dataIndex:a}):r.a.createElement("div",null),Ie(H)&&e.status_order===Jn.statusList.approved?r.a.createElement(z,{datatransaksi:e,dataIndex:a}):r.a.createElement("div",null),Ie(H)&&e.status_order===Jn.statusList.onprocess?r.a.createElement(V,{datatransaksi:e,dataIndex:a}):r.a.createElement("div",null)))}))))))),r.a.createElement(ga.a,{className:C.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){B(a)},onChangeRowsPerPage:function(e){M(e.target.value)},page:q,rowsPerPage:R,rowsPerPageOptions:[5,10,25]})),r.a.createElement(te,{open:E,handleClose:function(){j(!1)},handleYes:function(){j(!1),c(x)},title:"Konfirmasi",content:"Anda yakin untuk membatalkan permintaan inventaris ini?"}))},Fn=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),Yn=function(e){var a=e.className,t=(e.history,e.searchTransactionData),n=Object(k.a)(e,["className","history","searchTransactionData"]),c=$().authTokens,i=Fn(),l=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(Jn.route,"/search"))}},"Buat Permintaan")})),o=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/stock-inventory")}},"Stock Inventory")})),m=Re(c),u=(m.id,Ie(m.name));return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(i.root,a)}),r.a.createElement("div",{className:i.row},r.a.createElement("span",{className:i.spacer}),r.a.createElement(l,null),u?r.a.createElement(o,null):r.a.createElement("div",null)),r.a.createElement("div",{className:i.row},r.a.createElement(H,{className:i.searchInput,searchOnClick:t,placeHolderText:"Nomor Permintaan"})))},Hn=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),Jn={server:"https://quiet-mesa-17901.herokuapp.com",name:"order-inventories",nameForLabelInfo:"Order Inventory",route:"order-inventory",label:{addNew:"Silahkan menginput informasi order"},statusList:{submitted:"submitted",cancelled:"cancelled",approved:"approved",rejected:"rejected",onprocess:"on process",ready:"ready to pickup"}},Un=function(){var e=Hn(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],$().authTokens),d=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),l=Object(o.a)({},r,{status_pemesanan:"approved",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),s=Object(o.a)({},t,{status_pemesanan:"approved"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Jn.server,"/").concat(Jn.name,"/").concat(t.id),l);case 7:e.sent,alert("".concat(Jn.nameForLabelInfo," berhasil di setujui.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}(),p=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n,r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.history,t=a.datatransaksi,n=a.dataIndex,t.user,t.inventory,r=Object(k.a)(t,["user","inventory"]),l=Object(o.a)({},r,{status_order:Jn.statusList.cancelled}),s=Object(o.a)({},t,{status_order:Jn.statusList.cancelled}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=5,e.next=8,jt.a.put("".concat(Jn.server,"/").concat(Jn.name,"/").concat(t.id_order),l);case 8:e.sent,alert("".concat(Jn.nameForLabelInfo," berhasil dibatalkan.")),i(m),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(5),console.log("Axios request failed: ".concat(e.t0));case 16:case"end":return e.stop()}}),e,null,[[5,13]])})));return function(a){return e.apply(this,arguments)}}(),g=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.inventory,r=Object(k.a)(t,["user","inventory"]),l=Object(o.a)({},r,{status_order:Jn.statusList.onprocess}),s=Object(o.a)({},t,{status_order:Jn.statusList.onprocess}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Jn.server,"/").concat(Jn.name,"/").concat(t.id_order),l);case 7:e.sent,alert("".concat(Jn.nameForLabelInfo," berhasil dikonfirmasi.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}(),b=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.inventory,r=Object(k.a)(t,["user","inventory"]),l=Object(o.a)({},r,{status_order:Jn.statusList.ready}),s=Object(o.a)({},t,{status_order:Jn.statusList.ready}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Jn.server,"/").concat(Jn.name,"/").concat(t.id_order),l);case 7:e.sent,alert("".concat(Jn.nameForLabelInfo," berhasil siap di pick up.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}(),f={include:[{relation:"user"},{relation:"inventory"}]},h=Re(u),v=h.id,E=h.name,j=f;j=Ie(E)?Object(o.a)({},f,{where:{or:[{status_order:{ilike:Jn.statusList.approved}},{status_order:{ilike:Jn.statusList.onprocess}},{status_order:{ilike:Jn.statusList.ready}}]}}):Object(o.a)({},j,{where:Object(o.a)({},j.where,{userId:{ilike:v}})}),j=Object(o.a)({},j,{where:Object(o.a)({},j.where,{type_order:{ilike:"OUT"}})}),Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(Jn.server,"/").concat(Jn.name,"?filter=").concat(JSON.stringify(j))});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]);var O=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n,r,c;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a?a.filterData:null,n="".concat(Jn.server,"/").concat(Jn.name),t?(r=Object(o.a)({},j,{where:{nomor_order:{ilike:t}}}),n=n.concat("?filter=".concat(JSON.stringify(r)))):n=n.concat("?filter=".concat(JSON.stringify(j))),e.next=5,jt()({method:"get",url:n});case 5:c=e.sent,i(c.data);case 7:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:e.root},r.a.createElement(Yn,{searchTransactionData:O}),r.a.createElement("div",{className:e.content},r.a.createElement(Wn,{data:c,cancelAction:p,approveAction:d,confirmAction:g,readyAction:b})))};function Gn(){return Math.round(20*Math.random())-10}function zn(){var e=50+Gn(),a=50+Gn();return{top:"".concat(e,"%"),left:"".concat(a,"%"),transform:"translate(-".concat(e,"%, -").concat(a,"%)")}}var Vn=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)}}})),Kn=function(e){var a=e.className,t=e.simpan,c=e.data,i=Object(k.a)(e,["className","simpan","data"]),m=Vn(),u=Object(n.useState)({id_order:0,inventoryId:0,userId:0,nomor_order:"",jumlah:0,waktu_ambil:"",nama_barang:""}),d=Object(l.a)(u,2),p=d[0],g=d[1];Object(n.useEffect)((function(){g(Object(o.a)({},p,{inventoryId:c.id_inventory,nama_barang:c.nama_barang})),"ubah"===c.jenis_input&&g(Object(o.a)({},p,{id_order:c.dataDefault.id_order,waktu_ambil:c.dataDefault.waktu_ambil,nomor_order:c.dataDefault.nomor_order,jumlah:c.dataDefault.jumlah,inventoryId:c.dataDefault.inventory.id_inventory,nama_barang:c.dataDefault.inventory.nama_barang}))}),[]);var b=function(e){g(Object(o.a)({},p,Object(W.a)({},e.target.name,e.target.value)))},f=r.a.useState(new Date("2014-08-18T21:11:54")),h=Object(l.a)(f,2),v=(h[0],h[1],r.a.useState(!1)),E=Object(l.a)(v,2),j=E[0],O=E[1],y=r.a.useState(zn),x=Object(l.a)(y,1)[0],w=r.a.createElement("div",{style:x,className:m.paper},r.a.createElement("h2",{id:"simple-modal-title"},"Notifikasi"),r.a.createElement("p",{id:"simple-modal-description"},"Data tersimpan!")),_=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return t(a,p)}},"Simpan")}));return r.a.createElement(ua.a,Object.assign({},i,{className:Object(N.a)(m.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{subheader:Jn.label.addNew,title:Jn.nameForLabelInfo}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Nomor Order",margin:"dense",name:"nomor_order",onChange:b,required:!0,value:p.nomor_order,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Nama Barang",margin:"dense",name:"nama_barang",InputProps:{readOnly:!0},value:p.nama_barang,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Jumlah",margin:"dense",name:"jumlah",onChange:b,required:!0,value:p.jumlah,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Waktu Ambil",margin:"dense",name:"waktu_ambil",type:"date",onChange:b,required:!0,value:p.waktu_ambil,variant:"outlined",InputLabelProps:{shrink:!0}})))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(_,null))),r.a.createElement(X.a,{open:j,onClose:function(){O(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},w))},Zn=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),$n=function(e){var a=e.location,t=(Object(k.a)(e,["location"]),a.state),n=Zn(),c=$().authTokens,i=t.jenis_input,l=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t){var n,r,l,s,m,u;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=/"(.*?)"/g,r=c.match(n),l=r[0].replace(/\"/g,""),s=Pe()(l),e.prev=4,m=Date.parse(new Date)+"",u={waktu_ambil:va()(t.waktu_ambil,"YYYY-MM-DD").add(1,"days").format(),inventoryId:t.inventoryId,nomor_order:m,jumlah:parseInt(t.jumlah),userId:parseInt(s.id),status_order:Jn.statusList.submitted,tgl_input:va()().format(),type_order:"OUT"},"tambah"!==i){e.next=13;break}return e.next=10,jt.a.post("".concat(Jn.server,"/").concat(Jn.name),u);case 10:e.sent,e.next=17;break;case 13:return Object(o.a)({},u,{id_meeting_room_res:t.id_meeting_room_res}),e.next=16,jt.a.put("".concat(Jn.server,"/").concat(Jn.name,"/").concat(t.id_order),u);case 16:e.sent;case 17:a.push("/".concat(Jn.route)),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(4),alert("Terjadi kesalahan saat memproses permintaan Anda."),console.log("Axios request failed: ".concat(e.t0));case 24:case"end":return e.stop()}}),e,null,[[4,20]])})));return function(a,t){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:n.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(Kn,{simpan:l,data:t}))))},Qn=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Xn=function(e){var a=e.className,t=e.data,c=e.selectMasterData,i=Object(k.a)(e,["className","data","selectMasterData"]),o=r.a.useState(!1),m=Object(l.a)(o,2),u=(m[0],m[1],r.a.useState(null)),d=Object(l.a)(u,2),p=(d[0],d[1],Object(n.useState)([])),g=Object(l.a)(p,2),b=(g[0],g[1],$().authTokens),f=Qn(),h=Object(n.useState)([]),v=Object(l.a)(h,2),E=v[0],j=(v[1],Object(n.useState)(10)),O=Object(l.a)(j,2),y=O[0],x=O[1],w=Object(n.useState)(0),_=Object(l.a)(w,2),C=_[0],S=_[1],I=Re(b).name,D=(Se(I),Ce(I),Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){c(a,t,n)}},"PILIH")})));return r.a.createElement(ua.a,Object.assign({},i,{className:Object(N.a)(f.root,a)}),r.a.createElement(pa.a,{className:f.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:f.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,null,"Nama Barang"),r.a.createElement(Pa.a,null,"Stok"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,y).map((function(e,a){return r.a.createElement(Ta.a,{className:f.tableRow,hover:!0,key:e.id,selected:-1!==E.indexOf(e.id)},r.a.createElement(Pa.a,null,e.nama_barang),r.a.createElement(Pa.a,null,e.stok),r.a.createElement(Pa.a,null,r.a.createElement(D,{datatransaksi:e,dataIndex:a})))}))))))),r.a.createElement(ga.a,{className:f.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){S(a)},onChangeRowsPerPage:function(e){x(e.target.value)},page:C,rowsPerPage:y,rowsPerPageOptions:[5,10,25]})))},er=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),ar=function(e){var a=e.className,t=(e.history,e.searchMasterData),n=Object(k.a)(e,["className","history","searchMasterData"]),c=er();Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ln.route,"/tambah"))}},"Tambah Reservasi")}));return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement("div",{className:c.row},r.a.createElement("span",{className:c.spacer})),r.a.createElement("div",{className:c.row},r.a.createElement("div",null,"1. Silahkan pilih barang")),r.a.createElement("div",{className:c.row},r.a.createElement(H,{className:c.searchInput,searchOnClick:t,placeHolderText:"Nama Barang"})))},tr=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),nr=function(e){var a=tr(),t=Object(n.useState)([]),c=Object(l.a)(t,2),i=c[0],o=c[1],s=Object(n.useState)(null),m=Object(l.a)(s,2),u=(m[0],m[1]);Object(n.useEffect)((function(){d(null)}),[]);var d=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n,r,c;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(a),t=a?a.filterData:null,console.log(t),n="".concat(Jn.server,"/inventories"),t&&(r={where:{nama_barang:{ilike:t}}},n=n.concat("?filter=".concat(JSON.stringify(r)))),e.next=7,jt()({method:"get",url:n});case 7:c=e.sent,o(c.data);case 9:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),p=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.push("/".concat(Jn.route,"/tambah"),{id_inventory:t.id_inventory,nama_barang:t.nama_barang,jenis_input:"tambah",dataDefault:null});case 1:case"end":return e.stop()}}),e)})));return function(a,t,n){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:a.root},r.a.createElement(ar,{searchMasterData:d}),r.a.createElement("div",{className:a.content},r.a.createElement(Xn,{data:i,selectMasterData:p})))};function rr(){return Math.round(20*Math.random())-10}function cr(){var e=50+rr(),a=50+rr();return{top:"".concat(e,"%"),left:"".concat(a,"%"),transform:"translate(-".concat(e,"%, -").concat(a,"%)")}}var ir=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"1px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3),marginRight:e.spacing(1)}}})),lr=function(e){var a=e.className,t=e.simpan,c=e.data,i=e.style,m=Object(k.a)(e,["className","simpan","data","style"]),u=ir(),d=Object(n.useState)({alasan_persetujuan:"",status_persetujuan:""}),p=Object(l.a)(d,2),g=p[0],b=p[1];Object(n.useEffect)((function(){b(Object(o.a)({},g,{inventoryId:c.id_inventory,nama_barang:c.nama_barang})),"ubah"===c.jenis_input&&b(Object(o.a)({},g,{id_order:c.dataDefault.id_order,waktu_ambil:c.dataDefault.waktu_ambil,nomor_order:c.dataDefault.nomor_order,jumlah:c.dataDefault.jumlah,inventoryId:c.dataDefault.inventory.id_inventory,nama_barang:c.dataDefault.inventory.nama_barang}))}),[]);var f=r.a.useState(new Date("2014-08-18T21:11:54")),h=Object(l.a)(f,2),v=(h[0],h[1],r.a.useState(!1)),E=Object(l.a)(v,2),j=E[0],O=E[1],y=r.a.useState(cr),x=Object(l.a)(y,1)[0],w=r.a.createElement("div",{style:x,className:u.paper},r.a.createElement("h2",{id:"simple-modal-title"},"Notifikasi"),r.a.createElement("p",{id:"simple-modal-description"},"Data tersimpan!")),C=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){var e=Object(o.a)({},g,{status_persetujuan:Jn.statusList.approved});t(a,e)}},"Setuju")})),S=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"default",variant:"contained",onClick:function(){var e=Object(o.a)({},g,{status_persetujuan:Jn.statusList.rejected});t(a,e)}},"Tolak")}));return r.a.createElement(ua.a,Object.assign({},m,{className:Object(N.a)(u.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{title:"Persetujuan Permintaan Inventaris"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(_.a,{className:Object(N.a)(u.paper,a),style:i},r.a.createElement("p",null,"Nomor Order : ",c.dataDefault.nomor_order))),r.a.createElement("p",null,"\xa0",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement("p",null,"\xa0"),r.a.createElement("p",null,"\xa0"),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Catatan Persetujuan",margin:"dense",name:"alasan_persetujuan",onChange:function(e){b(Object(o.a)({},g,Object(W.a)({},e.target.name,e.target.value)))},required:!0,value:g.alasan_persetujuan,variant:"outlined"})))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(C,null),r.a.createElement(S,null))),r.a.createElement(X.a,{open:j,onClose:function(){O(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},w))},or=Object(w.a)((function(e){return{root:{padding:e.spacing(4)},rootPaper:{borderRadius:"4px",alignItems:"center",padding:e.spacing(1),display:"flex",flexBasis:320}}})),sr=function(e){var a=e.location,t=(Object(k.a)(e,["location"]),a.state),n=or(),c=$().authTokens,i=t.jenis_input,l=function(){var e=Object(vt.a)(ht.a.mark((function e(a,n){var r,l,s,m,u,d;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=/"(.*?)"/g,l=c.match(r),s=l[0].replace(/\"/g,""),Pe()(s),e.prev=4,Date.parse(new Date)+"",m=t.dataDefault,m.inventory,m.user,u=Object(k.a)(m,["inventory","user"]),d=Object(o.a)({},u,{status_order:n.status_persetujuan,catatan_persetujuan:n.catatan_persetujuan}),console.log(n),console.log(d),"approve"!==i){e.next=14;break}return e.next=13,jt.a.put("".concat(Jn.server,"/").concat(Jn.name,"/").concat(t.dataDefault.id_order),d);case 13:e.sent;case 14:a.push("/".concat(Jn.route)),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(4),alert("Terjadi kesalahan saat memproses permintaan Anda."),console.log("Axios request failed: ".concat(e.t0));case 21:case"end":return e.stop()}}),e,null,[[4,17]])})));return function(a,t){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:n.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(lr,{simpan:l,data:t}))))},mr=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),ur=function(e){var a=e.className,t=e.data,c=e.cancelAction,i=e.approveAction,o=Object(k.a)(e,["className","data","cancelAction","approveAction"]),m=r.a.useState(!1),u=Object(l.a)(m,2),d=(u[0],u[1],r.a.useState(null)),p=Object(l.a)(d,2),g=(p[0],p[1],Object(n.useState)([])),b=Object(l.a)(g,2),f=(b[0],b[1],$().authTokens),h=mr(),v=Object(n.useState)([]),E=Object(l.a)(v,2),j=E[0],O=(E[1],Object(n.useState)(10)),y=Object(l.a)(O,2),x=y[0],w=y[1],_=Object(n.useState)(0),C=Object(l.a)(_,2),S=C[0],I=C[1],D=Re(f);D.id,Se(D.name);console.log(D);Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){i(a,t,n)}},"Approve")})),Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){c(a,t,n)}},"Remove")}));var T=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){a.push("/".concat(br.route,"/view"),{jenis_input:"ubah",dataDefault:t})}},"Update Stock")}));return r.a.createElement(ua.a,Object.assign({},o,{className:Object(N.a)(h.root,a)}),r.a.createElement(pa.a,{className:h.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:h.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,null,"Nama Barang"),r.a.createElement(Pa.a,null,"Tipe Barang"),r.a.createElement(Pa.a,null,"Nomor Barang"),r.a.createElement(Pa.a,null,"Kode Barang"),r.a.createElement(Pa.a,null,"Stok"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,x).map((function(e,a){return r.a.createElement(Ta.a,{className:h.tableRow,hover:!0,key:e.id,selected:-1!==j.indexOf(e.id)},r.a.createElement(Pa.a,null,e.nama_barang),r.a.createElement(Pa.a,null,e.tipe_barang),r.a.createElement(Pa.a,null,e.nomor_barang),r.a.createElement(Pa.a,null,e.kode_barang),r.a.createElement(Pa.a,null,e.stok),r.a.createElement(Pa.a,null,r.a.createElement(T,{datatransaksi:e,dataIndex:a})))}))))))),r.a.createElement(ga.a,{className:h.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){I(a)},onChangeRowsPerPage:function(e){w(e.target.value)},page:S,rowsPerPage:x,rowsPerPageOptions:[5,10,25]})))},dr=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),pr=function(e){var a=e.className,t=(e.history,e.searchTransactionData),n=Object(k.a)(e,["className","history","searchTransactionData"]),c=$().authTokens,i=dr(),l=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(br.route,"/tambah"),{jenis_input:"tambah",dataDefault:{}})}},"Input Stock")})),o=Re(c);o.id,Ie(o.name);return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(i.root,a)}),r.a.createElement("div",{className:i.row},r.a.createElement("span",{className:i.spacer}),r.a.createElement(l,null)),r.a.createElement("div",{className:i.row},r.a.createElement(H,{className:i.searchInput,searchOnClick:t,placeHolderText:"Kode Barang"})))},gr=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),br={server:"https://quiet-mesa-17901.herokuapp.com",name:"inventories",nameForLabelInfo:"Stock",route:"stock-inventory",label:{addNew:"Silahkan menginput informasi stock"},statusList:{available:"available"}},fr=function(){var e=gr(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),l=Object(o.a)({},r,{status_pemesanan:"approved",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),s=Object(o.a)({},t,{status_pemesanan:"approved"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(br.server,"/").concat(br.name,"/").concat(t.id),l);case 7:e.sent,alert("".concat(br.nameForLabelInfo," berhasil di setujui.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}()),d=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.ruangMeeting,r=Object(k.a)(t,["user","ruangMeeting"]),l=Object(o.a)({},r,{status:"cancelled"}),s=Object(o.a)({},t,{status:"cancelled"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(br.server,"/").concat(br.name,"/").concat(t.id_meeting_room_res),l);case 7:e.sent,alert("".concat(br.nameForLabelInfo," berhasil dibatalkan.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}();Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(br.server,"/").concat(br.name)});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]);var p=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n,r,c;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a?a.filterData:null,n="".concat(br.server,"/").concat(br.name),t&&(r={where:{kode_barang:{ilike:t}}},n=n.concat("?filter=".concat(JSON.stringify(r)))),e.next=5,jt()({method:"get",url:n});case 5:c=e.sent,i(c.data);case 7:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:e.root},r.a.createElement(pr,{searchTransactionData:p}),r.a.createElement("div",{className:e.content},r.a.createElement(ur,{data:c,cancelAction:d,approveAction:u})))};function hr(){return Math.round(20*Math.random())-10}function vr(){var e=50+hr(),a=50+hr();return{top:"".concat(e,"%"),left:"".concat(a,"%"),transform:"translate(-".concat(e,"%, -").concat(a,"%)")}}var Er=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)}}})),jr=function(e){var a=e.className,t=e.simpan,c=e.data,i=Object(k.a)(e,["className","simpan","data"]),m=Er(),u=Object(n.useState)({id_inventory:0,nama_barang:"",stok:"",tipe_barang:"",nomor_barang:"",kode_barang:"",jumlah_kedatangan:0,nomor_do:"",nomor_po:""}),d=Object(l.a)(u,2),p=d[0],g=d[1],b=Object(n.useState)({nama_barang:!1,tipe_barang:!1,nomor_barang:!1,kode_barang:!1}),f=Object(l.a)(b,2),h=f[0],v=f[1];Object(n.useEffect)((function(){g(Object(o.a)({},p,{id_inventory:c.dataDefault.id_inventory,nama_barang:c.dataDefault.nama_barang,stok:c.dataDefault.stok,tipe_barang:c.dataDefault.tipe_barang,nomor_barang:c.dataDefault.nomor_barang,kode_barang:c.dataDefault.kode_barang,jumlah_kedatangan:"ubah"===c.jenis_input?"":c.dataDefault.jumlah_kedatangan,nomor_do:"ubah"===c.jenis_input?"":c.dataDefault.nomor_do,nomor_po:"ubah"===c.jenis_input?"":c.dataDefault.nomor_po})),"ubah"===c.jenis_input&&v(Object(o.a)({},h,{nama_barang:!0,tipe_barang:!0,nomor_barang:!0,kode_barang:!0}))}),[]);var E=function(e){"tipe_barang"===e.target.name?e.target.length>1&&g(Object(o.a)({},p,{tipe_barang:e.target.value,kode_barang:e.target.value.concat(va()().format("ss"))})):g(Object(o.a)({},p,Object(W.a)({},e.target.name,e.target.value)))},j=r.a.useState(new Date("2014-08-18T21:11:54")),O=Object(l.a)(j,2),y=(O[0],O[1],r.a.useState(!1)),x=Object(l.a)(y,2),w=x[0],_=x[1],C=r.a.useState(vr),S=Object(l.a)(C,1)[0],I=r.a.createElement("div",{style:S,className:m.paper},r.a.createElement("h2",{id:"simple-modal-title"},"Notifikasi"),r.a.createElement("p",{id:"simple-modal-description"},"Data tersimpan!")),D=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return t(a,p)}},"Simpan")}));return r.a.createElement(ua.a,Object.assign({},i,{className:Object(N.a)(m.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{subheader:br.label.addNew,title:br.nameForLabelInfo}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Nama Barang",margin:"dense",name:"nama_barang",onChange:E,required:!0,value:p.nama_barang,InputProps:{readOnly:h.nama_barang},variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Tipe barang",margin:"dense",name:"tipe_barang",onChange:E,required:!0,select:!0,SelectProps:{native:!0},value:p.tipe_barang,variant:"outlined",InputLabelProps:{shrink:!0},InputProps:{readOnly:h.tipe_barang}},[{value:"",label:""},{value:"Seragam",label:"Seragam"},{value:"ATK",label:"Atk"},{value:"Tumbler",label:"Tumbler"},{value:"Komputer",label:"Komputer"},{value:"Kursi",label:"Kursi"},{value:"Meja",label:"Meja"}].map((function(e){return r.a.createElement("option",{key:e.value,value:e.value},e.label)})))),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Kode barang",margin:"dense",name:"kode_barang",readOnly:!0,onChange:E,InputProps:{readOnly:h.kode_barang},required:!0,value:p.kode_barang,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Nomor barang",margin:"dense",name:"nomor_barang",onChange:E,required:!0,value:p.nomor_barang,InputProps:{readOnly:h.nomor_barang},variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Jumlah kedatangan",margin:"dense",name:"jumlah_kedatangan",onChange:E,required:!0,value:p.jumlah_kedatangan,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Nomor Delivery Order",margin:"dense",name:"nomor_do",onChange:E,required:!0,value:p.nomor_do,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Nomor Purchase Order",margin:"dense",name:"nomor_po",onChange:E,required:!0,value:p.nomor_po,variant:"outlined"})))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(D,null))),r.a.createElement(X.a,{open:w,onClose:function(){_(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},I))},Or=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),yr=function(e){var a=e.location,t=(Object(k.a)(e,["location"]),a.state),n=Or(),c=$().authTokens,i=t.jenis_input,l=function(){var e=Object(vt.a)(ht.a.mark((function e(a,n){var r,l,s,m,u;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=/"(.*?)"/g,l=c.match(r),s=l[0].replace(/\"/g,""),Pe()(s),e.prev=4,m=Object(o.a)({},n,{jumlah_kedatangan:parseInt(n.jumlah_kedatangan),stok:parseInt(n.jumlah_kedatangan)}),"tambah"!==i){e.next=12;break}return e.next=9,jt.a.post("".concat(br.server,"/").concat(br.name),m);case 9:e.sent,e.next=16;break;case 12:return u=Object(o.a)({},m,{stok:t.dataDefault.stok+parseInt(n.jumlah_kedatangan)}),e.next=15,jt.a.put("".concat(br.server,"/").concat(br.name,"/").concat(n.id_inventory),u);case 15:e.sent;case 16:a.push("/".concat(br.route)),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(4),alert("Terjadi kesalahan saat memproses permintaan Anda."),console.log("Axios request failed: ".concat(e.t0));case 23:case"end":return e.stop()}}),e,null,[[4,19]])})));return function(a,t){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:n.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(jr,{simpan:l,data:t}))))},xr=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),kr=function(e){var a=e.className,t=e.data,c=e.cancelAction,i=e.approveAction,o=Object(k.a)(e,["className","data","cancelAction","approveAction"]),m=r.a.useState(!1),u=Object(l.a)(m,2),d=(u[0],u[1],r.a.useState(null)),p=Object(l.a)(d,2),g=(p[0],p[1],Object(n.useState)([])),b=Object(l.a)(g,2),f=(b[0],b[1],$().authTokens),h=xr(),v=Object(n.useState)([]),E=Object(l.a)(v,2),j=E[0],O=(E[1],Object(n.useState)(10)),y=Object(l.a)(O,2),x=y[0],w=y[1],_=Object(n.useState)(0),C=Object(l.a)(_,2),S=C[0],I=C[1],D=Re(f),T=D.id;Se(D.name);console.log(D);Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){i(a,t,n)}},"Approve")})),Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){c(a,t,n)}},"Cancel")}));var P=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){a.push("/".concat(Cr.route,"/view"),{jenis_input:"ubah",dataDefault:t})}},"Update")}));return r.a.createElement(ua.a,Object.assign({},o,{className:Object(N.a)(h.root,a)}),r.a.createElement(pa.a,{className:h.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:h.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,null,"Tanggal Catering"),r.a.createElement(Pa.a,null,"Jumlah"),r.a.createElement(Pa.a,null,"Pemesan"),r.a.createElement(Pa.a,null,"Jenis Catering"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,x).map((function(e,a){return r.a.createElement(Ta.a,{className:h.tableRow,hover:!0,key:e.id,selected:-1!==j.indexOf(e.id)},r.a.createElement(Pa.a,null,r.a.createElement("div",{className:h.nameContainer},r.a.createElement(ce.a,{variant:"body1"}," ",va()(e.tanggal).format("DD/MM/YYYY")))),r.a.createElement(Pa.a,null,e.jumlah),r.a.createElement(Pa.a,null,e.user?e.user.username:""),r.a.createElement(Pa.a,null,e.jenis_catering),r.a.createElement(Pa.a,null,e.userId===parseInt(T)?r.a.createElement("div",null,r.a.createElement(P,{datatransaksi:e,dataIndex:a})):r.a.createElement("div",null)))}))))))),r.a.createElement(ga.a,{className:h.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){I(a)},onChangeRowsPerPage:function(e){w(e.target.value)},page:S,rowsPerPage:x,rowsPerPageOptions:[5,10,25]})))},Nr=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),wr=function(e){var a=e.className,t=(e.history,e.rangedDataInputOnClick),n=Object(k.a)(e,["className","history","rangedDataInputOnClick"]),c=$().authTokens,i=Nr(),l=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(Cr.route,"/tambah"),{jenis_input:"tambah",dataDefault:{}})}},"Pesan Catering")})),o=(Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/ruang-meeting")}},"Ruang Meeting")})),Re(c));o.id,Ie(o.name);return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(i.root,a)}),r.a.createElement("div",{className:i.row},r.a.createElement("span",{className:i.spacer}),r.a.createElement(l,null)),r.a.createElement("div",{className:i.row},r.a.createElement(U,{myLabel:"Filter Tanggal Catering",className:i.searchInput,placeholder:"Search Catering",onClick:t})))},_r=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),Cr={server:"https://quiet-mesa-17901.herokuapp.com",name:"caterings",nameForLabelInfo:"Catering",route:"catering",label:{addNew:"Silahkan menginput informasi catering"},statusList:{available:"available"}},Sr=function(){var e=_r(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],$().authTokens),d=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),l=Object(o.a)({},r,{status_pemesanan:"approved",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),s=Object(o.a)({},t,{status_pemesanan:"approved"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Cr.server,"/").concat(Cr.name,"/").concat(t.id),l);case 7:e.sent,alert("".concat(Cr.nameForLabelInfo," berhasil di setujui.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}(),p=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.ruangMeeting,r=Object(k.a)(t,["user","ruangMeeting"]),l=Object(o.a)({},r,{status:"cancelled"}),s=Object(o.a)({},t,{status:"cancelled"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Cr.server,"/").concat(Cr.name,"/").concat(t.id_meeting_room_res),l);case 7:e.sent,alert("".concat(Cr.nameForLabelInfo," berhasil dibatalkan.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}(),g={include:[{relation:"user"}]},b=Re(u),f=b.id,h=b.name;Ie(h)||(g=Object(o.a)({},g,{where:{userId:{ilike:f}}})),Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(Cr.server,"/").concat(Cr.name,"?filter=").concat(JSON.stringify(g))});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]);var v=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(a),t=g,a.startDate&&a.endDate&&(t=Object(o.a)({},g,{where:Object(o.a)({},g.where,{and:[{tanggal:{gt:new Date(va()(a.startDate).subtract(1,"seconds").format())}},{tanggal:{lt:new Date(va()(a.endDate).add(1,"days").subtract(1,"seconds").format())}}]})})),e.next=5,jt()({method:"get",url:"".concat(Cr.server,"/").concat(Cr.name,"?filter=").concat(JSON.stringify(t))});case 5:n=e.sent,i(n.data);case 7:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:e.root},r.a.createElement(wr,{rangedDataInputOnClick:v}),r.a.createElement("div",{className:e.content},r.a.createElement(kr,{data:c,cancelAction:p,approveAction:d})))};function Ir(){return Math.round(20*Math.random())-10}function Dr(){var e=50+Ir(),a=50+Ir();return{top:"".concat(e,"%"),left:"".concat(a,"%"),transform:"translate(-".concat(e,"%, -").concat(a,"%)")}}var Tr=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)}}})),Pr=function(e){var a=e.className,t=e.simpan,c=e.data,i=e.profileInfo,m=Object(k.a)(e,["className","simpan","data","profileInfo"]),u=Tr(),d=Object(n.useState)({id_catering:0,jumlah:0,jenis_catering:"",departemen:"",tanggal:""}),p=Object(l.a)(d,2),g=p[0],b=p[1];Object(n.useEffect)((function(){b(Object(o.a)({},g,{departemen:i.departemen,tanggal:new Date})),"ubah"===c.jenis_input&&b(Object(o.a)({},g,{id_catering:c.dataDefault.id_catering,jumlah:c.dataDefault.jumlah,jenis_catering:c.dataDefault.jenis_catering,departemen:c.dataDefault.departemen,tanggal:c.dataDefault.tanggal}))}),[]);var f=function(e){b(Object(o.a)({},g,Object(W.a)({},e.target.name,e.target.value)))},h=r.a.useState(new Date("2014-08-18T21:11:54")),v=Object(l.a)(h,2),E=(v[0],v[1],r.a.useState(!1)),j=Object(l.a)(E,2),O=j[0],y=j[1],x=r.a.useState(Dr),w=Object(l.a)(x,1)[0],_=r.a.createElement("div",{style:w,className:u.paper},r.a.createElement("h2",{id:"simple-modal-title"},"Notifikasi"),r.a.createElement("p",{id:"simple-modal-description"},"Data tersimpan!")),C=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return t(a,g)}},"Simpan")}));return r.a.createElement(ua.a,Object.assign({},m,{className:Object(N.a)(u.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{subheader:Cr.label.addNew,title:Cr.nameForLabelInfo}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Departemen",margin:"dense",name:"departemen",onChange:f,InputProps:{readOnly:!0},required:!0,value:g.departemen,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Tanggal Catering",margin:"dense",name:"tanggal",InputProps:{readOnly:!0},value:va()(g.tanggal).format("DD-MM-YYYY"),variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Jumlah",margin:"dense",name:"jumlah",onChange:f,value:g.jumlah,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Jenis Catering",margin:"dense",name:"jenis_catering",onChange:f,required:!0,select:!0,SelectProps:{native:!0},value:g.jenis_catering,variant:"outlined",InputLabelProps:{shrink:!0}},[{value:"",label:""},{value:"makan siang",label:"Makan Siang"},{value:"makan malam",label:"Makan Malam"}].map((function(e){return r.a.createElement("option",{key:e.value,value:e.value},e.label)})))))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(C,null))),r.a.createElement(X.a,{open:O,onClose:function(){y(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},_))},Rr=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),Mr=function(e){var a=e.location,t=(Object(k.a)(e,["location"]),a.state),n=Rr(),c=$().authTokens,i=t.jenis_input,l=De(Re(c).name),s=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t){var n,r,l,s,m,u;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=/"(.*?)"/g,r=c.match(n),l=r[0].replace(/\"/g,""),s=Pe()(l),e.prev=4,m=Object(o.a)({},t,{userId:parseInt(s.id),jumlah:parseInt(t.jumlah)}),"tambah"!==i){e.next=13;break}return m.id_catering,u=Object(k.a)(m,["id_catering"]),e.next=10,jt.a.post("".concat(Cr.server,"/").concat(Cr.name),u);case 10:e.sent,e.next=17;break;case 13:return Object(o.a)({},m,{id_meeting_room_res:t.id_meeting_room_res}),e.next=16,jt.a.put("".concat(Cr.server,"/").concat(Cr.name,"/").concat(t.id_catering),m);case 16:e.sent;case 17:a.push("/".concat(Cr.route)),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(4),alert("Terjadi kesalahan saat memproses permintaan Anda."),console.log("Axios request failed: ".concat(e.t0));case 24:case"end":return e.stop()}}),e,null,[[4,20]])})));return function(a,t){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:n.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(Pr,{simpan:s,data:t,profileInfo:l}))))},Ar=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Lr=function(e){var a=e.className,t=e.data,c=e.cancelAction,i=e.approveAction,o=Object(k.a)(e,["className","data","cancelAction","approveAction"]),m=r.a.useState(!1),u=Object(l.a)(m,2),d=(u[0],u[1],r.a.useState(null)),p=Object(l.a)(d,2),g=(p[0],p[1],Object(n.useState)([])),b=Object(l.a)(g,2),f=(b[0],b[1],$().authTokens),h=Ar(),v=Object(n.useState)([]),E=Object(l.a)(v,2),j=E[0],O=E[1],y=Object(n.useState)(10),x=Object(l.a)(y,2),w=x[0],_=x[1],C=Object(n.useState)(0),S=Object(l.a)(C,2),I=S[0],D=S[1],T=Re(f);T.id,Se(T.name);console.log(T);Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){i(a,t,n)}},"Approve")}));var P=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){c(a,t,n)}},"Delete")})),R=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){a.push("/".concat(Fr.route,"/view"),{jenis_input:"ubah",dataDefault:t})}},"View")}));return r.a.createElement(ua.a,Object.assign({},o,{className:Object(N.a)(h.root,a)}),r.a.createElement(pa.a,{className:h.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:h.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,{padding:"checkbox"},r.a.createElement(st.a,{checked:j.length===t.length,color:"primary",indeterminate:j.length>0&&j.length<t.length,onChange:function(a){var t,n=e.data;t=a.target.checked?n.map((function(e){return e.id})):[],O(t)}})),r.a.createElement(Pa.a,null,"Nama"),r.a.createElement(Pa.a,null,"Email"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,w).map((function(e,a){return r.a.createElement(Ta.a,{className:h.tableRow,hover:!0,key:e.id,selected:-1!==j.indexOf(e.id)},r.a.createElement(Pa.a,{padding:"checkbox"},r.a.createElement(st.a,{checked:-1!==j.indexOf(e.id),color:"primary",onChange:function(a){return function(e,a){var t=j.indexOf(a),n=[];-1===t?n=n.concat(j,a):0===t?n=n.concat(j.slice(1)):t===j.length-1?n=n.concat(j.slice(0,-1)):t>0&&(n=n.concat(j.slice(0,t),j.slice(t+1))),O(n)}(0,e.id)},value:"true"})),r.a.createElement(Pa.a,null,e.username),r.a.createElement(Pa.a,null,e.email),r.a.createElement(Pa.a,null,r.a.createElement(R,{datatransaksi:e,dataIndex:a})),r.a.createElement(Pa.a,null,r.a.createElement(P,{datatransaksi:e,dataIndex:a})))}))))))),r.a.createElement(ga.a,{className:h.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){D(a)},onChangeRowsPerPage:function(e){_(e.target.value)},page:I,rowsPerPage:w,rowsPerPageOptions:[5,10,25]})))},qr=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),Br=function(e){var a=e.className,t=(e.history,Object(k.a)(e,["className","history"])),n=$().authTokens,c=qr(),i=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(Fr.route,"/tambah"),{jenis_input:"tambah",dataDefault:{}})}},"Tambah User")})),l=Re(n);l.id,Ie(l.name);return r.a.createElement("div",Object.assign({},t,{className:Object(N.a)(c.root,a)}),r.a.createElement("div",{className:c.row},r.a.createElement("span",{className:c.spacer}),r.a.createElement(i,null)),r.a.createElement("div",{className:c.row}))},Wr=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),Fr={server:"https://quiet-mesa-17901.herokuapp.com",name:"user-management",nameForLabelInfo:"User",route:"user",label:{addNew:"Silahkan menginput informasi User"},statusList:{available:"available"}},Yr=function(){var e=Wr(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),l=Object(o.a)({},r,{status_pemesanan:"approved",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),s=Object(o.a)({},t,{status_pemesanan:"approved"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Fr.server,"/").concat(Fr.name,"/").concat(t.id),l);case 7:e.sent,alert("".concat(Fr.nameForLabelInfo," berhasil di setujui.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}()),d=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[].concat(Object(Dt.a)(c.slice(0,n)),Object(Dt.a)(c.slice(n+1))),e.prev=1,e.next=4,jt.a.delete("".concat(Fr.server,"/").concat(Fr.name,"/").concat(t.id));case 4:e.sent,alert("".concat(Fr.nameForLabelInfo," berhasil dihapus.")),i(r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),console.log("Axios request failed: ".concat(e.t0));case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(a,t,n){return e.apply(this,arguments)}}();return Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(Fr.server,"/").concat(Fr.name)});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]),r.a.createElement("div",{className:e.root},r.a.createElement(Br,null),r.a.createElement("div",{className:e.content},r.a.createElement(Lr,{data:c,cancelAction:d,approveAction:u})))};function Hr(){return Math.round(20*Math.random())-10}function Jr(){var e=50+Hr(),a=50+Hr();return{top:"".concat(e,"%"),left:"".concat(a,"%"),transform:"translate(-".concat(e,"%, -").concat(a,"%)")}}var Ur=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)}}})),Gr=function(e){var a=e.className,t=e.simpan,c=e.data,i=Object(k.a)(e,["className","simpan","data"]);console.log(c);var m=Ur(),u=Object(n.useState)({id:0,username:"",email:""}),d=Object(l.a)(u,2),p=d[0],g=d[1];Object(n.useEffect)((function(){g(Object(o.a)({},p,{id:c.dataDefault.id,username:c.dataDefault.username,email:c.dataDefault.email}))}),[]);var b=function(e){g(Object(o.a)({},p,Object(W.a)({},e.target.name,e.target.value)))},f=r.a.useState(new Date("2014-08-18T21:11:54")),h=Object(l.a)(f,2),v=(h[0],h[1],r.a.useState(!1)),E=Object(l.a)(v,2),j=E[0],O=E[1],y=r.a.useState(Jr),x=Object(l.a)(y,1)[0],w=r.a.createElement("div",{style:x,className:m.paper},r.a.createElement("h2",{id:"simple-modal-title"},"Notifikasi"),r.a.createElement("p",{id:"simple-modal-description"},"Data tersimpan!")),_=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return t(a,p)}},"Simpan")}));return r.a.createElement(ua.a,Object.assign({},i,{className:Object(N.a)(m.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{subheader:Fr.label.addNew,title:Fr.nameForLabelInfo}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Nama ",margin:"dense",name:"username",onChange:b,required:!0,value:p.username,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Email",margin:"dense",name:"email",onChange:b,required:!0,value:p.email,variant:"outlined"})))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(_,null))),r.a.createElement(X.a,{open:j,onClose:function(){O(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},w))},zr=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),Vr=function(e){var a=e.location,t=(Object(k.a)(e,["location"]),a.state),n=zr(),c=$().authTokens,i=t.jenis_input,l=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t){var n,r,l,s;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=/"(.*?)"/g,r=c.match(n),l=r[0].replace(/\"/g,""),Pe()(l),e.prev=4,s=Object(o.a)({},t),"tambah"!==i){e.next=12;break}return e.next=9,jt.a.post("".concat(Fr.server,"/").concat(Fr.name),s);case 9:e.sent,e.next=15;break;case 12:return e.next=14,jt.a.put("".concat(Fr.server,"/").concat(Fr.name,"/").concat(t.id),s);case 14:e.sent;case 15:a.push("/".concat(Fr.route)),e.next=22;break;case 18:e.prev=18,e.t0=e.catch(4),alert("Terjadi kesalahan saat memproses permintaan Anda."),console.log("Axios request failed: ".concat(e.t0));case 22:case"end":return e.stop()}}),e,null,[[4,18]])})));return function(a,t){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:n.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(Gr,{simpan:l,data:t}))))},Kr=(Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1),marginBottom:"40px"}}}))),Zr=function(e){var a=e.className,t=(e.history,e.rangedDataInputOnClick),n=Object(k.a)(e,["className","history","rangedDataInputOnClick"]),c=$().authTokens,i=Kr(),l=(Object(s.g)((function(e){var a=e.history,t=e.text,n=e.route;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ac.route,"/").concat(n))}},t)})),Re(c));l.id,Ie(l.name);return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(i.root,a)}),r.a.createElement("div",{className:i.row},r.a.createElement("span",{className:i.spacer})),r.a.createElement("div",{className:i.row},r.a.createElement(U,{myLabel:"Date Range",className:i.searchInput,placeholder:"Search Catering",buttonLabel:"Show Report",onClick:t})))},$r=(qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:800},statusContainer:{display:"flex",alignItems:"center"},status:{marginRight:e.spacing(1)},actions:{justifyContent:"flex-end"}}}))),Qr={submitted:"info",cancelled:"danger",approved:"success",rejected:"danger","on process":"warning","ready to pickup":"success"},Xr=function(e){var a=e.className,t=e.data,n=Object(k.a)(e,["className","data"]),c=$r();return r.a.createElement(ua.a,Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement(da.a,{title:"Permintaan Inventaris"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,{className:c.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:c.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Nomor Order"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Pemesan"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Nama Barang"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Status"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Waktu Ambil"))))),r.a.createElement(Aa.a,null,t.map((function(e){return r.a.createElement(Ta.a,{hover:!0,key:e.id_order},r.a.createElement(Pa.a,null,e.nomor_order),r.a.createElement(Pa.a,null,e.user?e.user.username:""),r.a.createElement(Pa.a,null,e.inventory.nama_barang),r.a.createElement(Pa.a,null,r.a.createElement("div",{className:c.statusContainer},r.a.createElement(V,{className:c.status,color:Qr[e.status_order],size:"sm"}),e.status_order)),r.a.createElement(Pa.a,null,e.waktu_ambil?va()(e.waktu_ambil).format("DD/MM/YYYY"):""))}))))))),r.a.createElement(me.a,null),r.a.createElement(ga.a,{className:c.actions}))},ec=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),ac={server:"https://quiet-mesa-17901.herokuapp.com",name:"-",nameForLabelInfo:"Laporan",route:"laporan",label:{addNew:"-"},statusList:{available:"available"}},tc=function(){var e=ec(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],{where:{type_order:{ilike:"OUT"}},include:[{relation:"user"},{relation:"inventory"}]});Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(ac.server,"/order-inventories?filter=").concat(JSON.stringify(u))});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]);var d=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u,a.startDate&&a.endDate&&(t=Object(o.a)({},u,{where:Object(o.a)({},u.where,{and:[{tgl_input:{gt:new Date(va()(a.startDate).subtract(1,"seconds").format())}},{tgl_input:{lt:new Date(va()(a.endDate).add(1,"days").subtract(1,"seconds").format())}}]})})),e.next=4,jt()({method:"get",url:"".concat(ac.server,"/order-inventories?filter=").concat(JSON.stringify(t))});case 4:n=e.sent,i(n.data);case 6:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:e.root},r.a.createElement(Zr,{rangedDataInputOnClick:d}),r.a.createElement("div",{className:e.content},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:12,md:12,xl:3,xs:12},r.a.createElement(Xr,{data:c})))))},nc=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)},rangeDate:{height:"42px",display:"flex",alignItems:"center",marginBottom:"40px"}}})),rc=function(e){var a=e.className,t=(e.history,e.rangedDataInputOnClick),n=Object(k.a)(e,["className","history","rangedDataInputOnClick"]),c=$().authTokens,i=nc(),l=(Object(s.g)((function(e){var a=e.history,t=e.text,n=e.route;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ac.route,"/").concat(n))}},t)})),Re(c));l.id,Ie(l.name);return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(i.root,a)}),r.a.createElement("div",{className:i.row},r.a.createElement("span",{className:i.spacer})),r.a.createElement("div",{className:i.rangeDate},r.a.createElement(U,{myLabel:"Date Range",className:i.searchInput,placeholder:"Search Catering",buttonLabel:"Show Report",onClick:t})))},cc=Object(w.a)((function(e){return{root:{height:"100%"},content:{alignItems:"center",display:"flex"},title:{fontWeight:700},avatar:{backgroundColor:e.palette.error.main,height:56,width:56},icon:{height:32,width:32},difference:{marginTop:e.spacing(2),display:"flex",alignItems:"center"},differenceIcon:{color:e.palette.error.dark},differenceValue:{color:e.palette.error.dark,marginRight:e.spacing(1)}}})),ic=function(e){var a=e.className,t=e.total,n=Object(k.a)(e,["className","total"]),c=cc();return r.a.createElement(ua.a,Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,justify:"space-between"},r.a.createElement(ma.a,{item:!0},r.a.createElement(ce.a,{className:c.title,color:"textSecondary",gutterBottom:!0,variant:"body2"},"TOTAL TRANSACTION"),r.a.createElement(ce.a,{variant:"h3"},t)),r.a.createElement(ma.a,{item:!0},r.a.createElement(Ae.a,{className:c.avatar},r.a.createElement(_a.a,{className:c.icon}))))))},lc=(qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:800},statusContainer:{display:"flex",alignItems:"center"},status:{marginRight:e.spacing(1)},actions:{justifyContent:"flex-end"}}})),qa()(),va()().subtract(2,"hours"),qa()(),va()().subtract(2,"hours"),qa()(),va()().subtract(3,"hours"),qa()(),va()().subtract(5,"hours"),qa()(),va()().subtract(9,"hours"),Object(w.a)((function(){return{root:{height:"100%"},content:{padding:0},image:{height:48,width:48},actions:{justifyContent:"flex-end"}}})),E.primary.main,{responsive:!0,maintainAspectRatio:!1,animation:!1,legend:{display:!1},cornerRadius:20,tooltips:{enabled:!0,mode:"index",intersect:!1,borderWidth:1,borderColor:E.divider,backgroundColor:E.white,titleFontColor:E.text.primary,bodyFontColor:E.text.secondary,footerFontColor:E.text.secondary},layout:{padding:0},scales:{xAxes:[{barThickness:12,maxBarThickness:10,barPercentage:.5,categoryPercentage:.5,ticks:{fontColor:E.text.secondary},gridLines:{display:!1,drawBorder:!1}}],yAxes:[{ticks:{fontColor:E.text.secondary,beginAtZero:!0,min:0},gridLines:{borderDash:[2],borderDashOffset:[2],color:E.divider,drawBorder:!1,zeroLineBorderDash:[2],zeroLineBorderDashOffset:[2],zeroLineColor:E.divider}}]}}),oc=Object(w.a)((function(){return{root:{},chartContainer:{height:400,position:"relative"},actions:{justifyContent:"flex-end"}}})),sc=function(e){var a=e.className,t=e.data,n=Object(k.a)(e,["className","data"]),c=oc();return r.a.createElement(ua.a,Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement(da.a,{title:"Total Transaction"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement("div",{className:c.chartContainer},r.a.createElement(u.a,{data:t,options:lc}))),r.a.createElement(me.a,null),r.a.createElement(ga.a,{className:c.actions}))},mc=Object(w.a)((function(e){return{root:{height:"100%"},content:{alignItems:"center",display:"flex"},title:{fontWeight:700},avatar:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,height:56,width:56},icon:{height:32,width:32},progress:{marginTop:e.spacing(3)}}})),uc=function(e){var a=e.className,t=e.total,n=Object(k.a)(e,["className","total"]),c=mc();return r.a.createElement(ua.a,Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,justify:"space-between"},r.a.createElement(ma.a,{item:!0},r.a.createElement(ce.a,{className:c.title,color:"textSecondary",gutterBottom:!0,variant:"body2"},"INVENTORY OUT"),r.a.createElement(ce.a,{variant:"h3"},t)),r.a.createElement(ma.a,{item:!0},r.a.createElement(Ae.a,{className:c.avatar},r.a.createElement(Wa.a,{className:c.icon}))))))},dc=(Object(w.a)((function(e){return{root:{height:"100%",backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},content:{alignItems:"center",display:"flex"},title:{fontWeight:700},avatar:{backgroundColor:e.palette.white,color:e.palette.primary.main,height:56,width:56},icon:{height:32,width:32}}})),Object(w.a)((function(e){return{root:{height:"100%"},content:{alignItems:"center",display:"flex"},title:{fontWeight:700},avatar:{backgroundColor:e.palette.success.main,height:56,width:56},icon:{height:32,width:32},difference:{marginTop:e.spacing(2),display:"flex",alignItems:"center"},differenceIcon:{color:e.palette.success.dark},differenceValue:{color:e.palette.success.dark,marginRight:e.spacing(1)}}}))),pc=function(e){var a=e.className,t=e.total,n=Object(k.a)(e,["className","total"]),c=dc();return r.a.createElement(ua.a,Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,justify:"space-between"},r.a.createElement(ma.a,{item:!0},r.a.createElement(ce.a,{className:c.title,color:"textSecondary",gutterBottom:!0,variant:"body2"},"INVENTORY IN"),r.a.createElement(ce.a,{variant:"h3"},t)),r.a.createElement(ma.a,{item:!0},r.a.createElement(Ae.a,{className:c.avatar},r.a.createElement(Na.a,{className:c.icon}))))))},gc=t(298),bc=t.n(gc),fc=Object(w.a)((function(e){return{root:{height:"100%"},chartContainer:{position:"relative",height:"300px"},stats:{marginTop:e.spacing(2),display:"flex",justifyContent:"center"},device:{textAlign:"center",padding:e.spacing(1)},deviceIcon:{color:e.palette.icon}}})),hc=function(e){for(var a=e.className,t=e.title,n=e.graphData,c=Object(k.a)(e,["className","title","graphData"]),i=fc(),l=Object(ne.a)(),o={datasets:[{data:n.percentList,backgroundColor:[l.palette.primary.main,l.palette.error.main,l.palette.warning.main,l.palette.success.main,l.palette.info.main],borderWidth:8,borderColor:l.palette.white,hoverBorderColor:l.palette.white}],labels:n.labelList},s={legend:{display:!1},responsive:!0,maintainAspectRatio:!1,animation:!1,cutoutPercentage:80,layout:{padding:0},tooltips:{enabled:!0,mode:"index",intersect:!1,borderWidth:1,borderColor:l.palette.divider,backgroundColor:l.palette.white,titleFontColor:l.palette.text.primary,bodyFontColor:l.palette.text.secondary,footerFontColor:l.palette.text.secondary}},m=[l.palette.primary.main,l.palette.error.main,l.palette.warning.main,l.palette.success.main,l.palette.info.main],d=[],p=0;p<n.percentList.length;p++)d.push({title:n.labelList[p],value:n.percentList[p],icon:r.a.createElement(bc.a,null),color:m[p]});return r.a.createElement(ua.a,Object.assign({},c,{className:Object(N.a)(i.root,a)}),r.a.createElement(da.a,{title:t}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement("div",{className:i.chartContainer},r.a.createElement(u.c,{data:o,options:s})),r.a.createElement("div",{className:i.stats},d.map((function(e){return r.a.createElement("div",{className:i.device,key:e.title},r.a.createElement("span",{className:i.deviceIcon},e.icon),r.a.createElement(ce.a,{variant:"body1"},e.title),r.a.createElement(ce.a,{style:{color:e.color},variant:"h2"},e.value,"%"))})))))},vc=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),Ec={server:"https://quiet-mesa-17901.herokuapp.com",name:"-",nameForLabelInfo:"Laporan",route:"laporan",label:{addNew:"-"},statusList:{available:"available"}},jc=function(){var e=vc(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1]),d=Object(n.useState)([]),p=Object(l.a)(d,2),g=(p[0],p[1],Object(n.useState)({totalIn:0,totalOut:0})),b=Object(l.a)(g,2),f=b[0],h=b[1],v=Object(n.useState)({percentList:[],labelList:[]}),j=Object(l.a)(v,2),O=j[0],y=j[1],x=Object(n.useState)({percentList:[],labelList:[]}),k=Object(l.a)(x,2),N=k[0],w=k[1],_=Object(n.useState)({labels:[],datasets:[{label:"Inventory IN",backgroundColor:E.primary.main,data:[]},{label:"Inventory Out",backgroundColor:E.neutral,data:[]}]}),C=Object(l.a)(_,2),S=C[0],I=C[1];Object(n.useEffect)((function(){var e={include:[{relation:"inventory"}]},a={},t=function(e){e.forEach((function(e){e.type_order in a?e.inventory.tipe_barang in a[e.type_order]?a[e.type_order][e.inventory.tipe_barang].jumlah=a[e.type_order][e.inventory.tipe_barang].jumlah+1:a[e.type_order][e.inventory.tipe_barang]={jumlah:1}:(a[e.type_order]={},a[e.type_order][e.inventory.tipe_barang]={jumlah:1})}))};(function(){var n=Object(vt.a)(ht.a.mark((function n(){var r,c,s,m,u,d,p,g,b,v,j;return ht.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,jt()({method:"get",url:"".concat(Ec.server,"/order-inventories?filter=").concat(JSON.stringify(e))});case 2:for(r=n.sent,c=r.data.filter((function(e){return"IN"===e.type_order})),s=r.data.filter((function(e){return"OUT"===e.type_order})),h(Object(o.a)({},f,{totalIn:c.length,totalOut:s.length})),t(r.data),P(a.IN,O,y,c),P(a.OUT,N,w,s),m=[],u=[],d=[],p=0,g=Object.entries(a.IN);p<g.length;p++)b=Object(l.a)(g[p],2),v=b[0],j=b[1],m.push(v),u.push(j.jumlah),d.push(a.OUT.hasOwnProperty(v)?a.OUT[v].jumlah:0);I(Object(o.a)({},S,{labels:m,datasets:[{label:"Inventory IN",backgroundColor:E.primary.main,data:u},{label:"Inventory Out",backgroundColor:E.neutral,data:d}]})),i(r.data);case 15:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}})()(),function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(Ec.server,"/inventories")});case 2:a=e.sent,u(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[]);var D=function(e){var a={},t=e.filter((function(e){return"IN"===e.type_order})),n=e.filter((function(e){return"OUT"===e.type_order}));h(Object(o.a)({},f,{totalIn:t.length,totalOut:n.length})),T(e,a),P(a.IN,O,y,t),P(a.OUT,N,w,n);for(var r=[],c=[],i=[],s=0,m=Object.entries(a.IN);s<m.length;s++){var u=Object(l.a)(m[s],2),d=u[0],p=u[1];r.push(d),c.push(p.jumlah),i.push(a.OUT.hasOwnProperty(d)?a.OUT[d].jumlah:0)}I(Object(o.a)({},S,{labels:r,datasets:[{label:"Inventory IN",backgroundColor:E.primary.main,data:c},{label:"Inventory Out",backgroundColor:E.neutral,data:i}]}))},T=function(e,a){e.forEach((function(e){e.type_order in a?e.inventory.tipe_barang in a[e.type_order]?a[e.type_order][e.inventory.tipe_barang].jumlah=a[e.type_order][e.inventory.tipe_barang].jumlah+1:a[e.type_order][e.inventory.tipe_barang]={jumlah:1}:(a[e.type_order]={},a[e.type_order][e.inventory.tipe_barang]={jumlah:1})}))},P=function(e,a,t,n){for(var r=[],c=[],i=0,s=Object.entries(e);i<s.length;i++){var m=Object(l.a)(s[i],2),u=m[0],d=m[1];r.push(Math.ceil(d.jumlah/n.length*100)),c.push(u)}t(Object(o.a)({},a,{percentList:r,labelList:c}))},R=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n,r;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t={include:[{relation:"inventory"}]},a.startDate&&a.endDate&&(n=Object(o.a)({},t,{where:{and:[{tgl_input:{gt:new Date(va()(a.startDate).subtract(1,"seconds").format())}},{tgl_input:{lt:new Date(va()(a.endDate).add(1,"days").subtract(1,"seconds").format())}}]}})),e.next=5,jt()({method:"get",url:"".concat(Ec.server,"/order-inventories?filter=").concat(JSON.stringify(n))});case 5:r=e.sent,D(r.data),i(r.data);case 8:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:e.root},r.a.createElement(rc,{rangedDataInputOnClick:R}),r.a.createElement("div",{className:e.content},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:4,sm:6,xl:3,xs:12},r.a.createElement(ic,{total:c.length})),r.a.createElement(ma.a,{item:!0,lg:4,sm:6,xl:3,xs:12},r.a.createElement(pc,{total:f.totalIn})),r.a.createElement(ma.a,{item:!0,lg:4,sm:6,xl:3,xs:12},r.a.createElement(uc,{total:f.totalOut})),r.a.createElement(ma.a,{item:!0,lg:6,md:12,xl:9,xs:12},r.a.createElement(sc,{data:S})),r.a.createElement(ma.a,{item:!0,lg:3,md:6,xl:3,xs:12},r.a.createElement(hc,{title:"Inventory In",graphData:O})),r.a.createElement(ma.a,{item:!0,lg:3,md:6,xl:3,xs:12},r.a.createElement(hc,{title:"Inventory Out",graphData:N})))))},Oc=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),yc=function(e){var a=e.className,t=e.data,c=e.cancelAction,i=e.approveAction,o=Object(k.a)(e,["className","data","cancelAction","approveAction"]),m=r.a.useState(!1),u=Object(l.a)(m,2),d=(u[0],u[1],r.a.useState(null)),p=Object(l.a)(d,2),g=(p[0],p[1],Object(n.useState)([])),b=Object(l.a)(g,2),f=(b[0],b[1],$().authTokens),h=Oc(),v=Object(n.useState)([]),E=Object(l.a)(v,2),j=E[0],O=E[1],y=Object(n.useState)(10),x=Object(l.a)(y,2),w=x[0],_=x[1],C=Object(n.useState)(0),S=Object(l.a)(C,2),I=S[0],D=S[1],T=Re(f);T.id,Se(T.name);console.log(T);Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){i(a,t,n)}},"Approve")})),Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){c(a,t,n)}},"Remove")}));var P=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){a.push("/".concat(Dn.route,"/view"),{jenis_input:"ubah",dataDefault:t})}},"View")}));return r.a.createElement(ua.a,Object.assign({},o,{className:Object(N.a)(h.root,a)}),r.a.createElement(pa.a,{className:h.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:h.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,{padding:"checkbox"},r.a.createElement(st.a,{checked:j.length===t.length,color:"primary",indeterminate:j.length>0&&j.length<t.length,onChange:function(a){var t,n=e.data;t=a.target.checked?n.map((function(e){return e.id})):[],O(t)}})),r.a.createElement(Pa.a,null,"Nama Ruangan"),r.a.createElement(Pa.a,null,"Fasilitas"),r.a.createElement(Pa.a,null,"Kapasitas"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,w).map((function(e,a){return r.a.createElement(Ta.a,{className:h.tableRow,hover:!0,key:e.id,selected:-1!==j.indexOf(e.id)},r.a.createElement(Pa.a,{padding:"checkbox"},r.a.createElement(st.a,{checked:-1!==j.indexOf(e.id),color:"primary",onChange:function(a){return function(e,a){var t=j.indexOf(a),n=[];-1===t?n=n.concat(j,a):0===t?n=n.concat(j.slice(1)):t===j.length-1?n=n.concat(j.slice(0,-1)):t>0&&(n=n.concat(j.slice(0,t),j.slice(t+1))),O(n)}(0,e.id)},value:"true"})),r.a.createElement(Pa.a,null,e.nama_ruangan),r.a.createElement(Pa.a,null,e.fasilitas_ruangan),r.a.createElement(Pa.a,null,e.kapasitas),r.a.createElement(Pa.a,null,r.a.createElement(P,{datatransaksi:e,dataIndex:a})))}))))))),r.a.createElement(ga.a,{className:h.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){D(a)},onChangeRowsPerPage:function(e){_(e.target.value)},page:I,rowsPerPage:w,rowsPerPageOptions:[5,10,25]})))},xc=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),kc=function(e){var a=e.className,t=(e.history,Object(k.a)(e,["className","history"])),n=$().authTokens,c=xc(),i=Object(s.g)((function(e){var a=e.history,t=e.text,n=e.route;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ac.route,"/").concat(n))}},t)})),l=Re(n);l.id,Ie(l.name);return r.a.createElement("div",Object.assign({},t,{className:Object(N.a)(c.root,a)}),r.a.createElement("div",{className:c.row},r.a.createElement("span",{className:c.spacer}),r.a.createElement(i,{route:"inventaris",text:"Permintaan Inventaris"}),r.a.createElement(i,{route:"ruang-meeting",text:"Ruang Meeting"}),r.a.createElement(i,{route:"catering",text:"Catering"}),r.a.createElement(i,{route:"pemesanan-mobil",text:"Pemesanaan Mobil"})),r.a.createElement("div",{className:c.row},r.a.createElement("h3",null,"Laporan Permintaan Inventaris")))},Nc=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),wc={server:"https://quiet-mesa-17901.herokuapp.com",name:"-",nameForLabelInfo:"Laporan",route:"laporan",label:{addNew:"-"},statusList:{available:"available"}},_c=function(){var e=Nc(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),l=Object(o.a)({},r,{status_pemesanan:"approved",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),s=Object(o.a)({},t,{status_pemesanan:"approved"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(wc.server,"/").concat(wc.name,"/").concat(t.id),l);case 7:e.sent,alert("".concat(wc.nameForLabelInfo," berhasil di setujui.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}()),d=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.ruangMeeting,r=Object(k.a)(t,["user","ruangMeeting"]),l=Object(o.a)({},r,{status:"cancelled"}),s=Object(o.a)({},t,{status:"cancelled"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(wc.server,"/").concat(wc.name,"/").concat(t.id_meeting_room_res),l);case 7:e.sent,alert("".concat(wc.nameForLabelInfo," berhasil dibatalkan.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}();return Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(wc.server,"/").concat(wc.name)});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]),r.a.createElement("div",{className:e.root},r.a.createElement(kc,null),r.a.createElement("div",{className:e.content},r.a.createElement(yc,{data:c,cancelAction:d,approveAction:u})))},Cc=Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Sc=function(e){var a=e.className,t=e.data,c=e.cancelAction,i=e.approveAction,o=Object(k.a)(e,["className","data","cancelAction","approveAction"]),m=r.a.useState(!1),u=Object(l.a)(m,2),d=(u[0],u[1],r.a.useState(null)),p=Object(l.a)(d,2),g=(p[0],p[1],Object(n.useState)([])),b=Object(l.a)(g,2),f=(b[0],b[1],$().authTokens),h=Cc(),v=Object(n.useState)([]),E=Object(l.a)(v,2),j=E[0],O=(E[1],Object(n.useState)(10)),y=Object(l.a)(O,2),x=y[0],w=y[1],_=Object(n.useState)(0),C=Object(l.a)(_,2),S=C[0],I=C[1],D=Re(f);D.id,Se(D.name);console.log(D);Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){i(a,t,n)}},"Approve")})),Object(s.g)((function(e){var a=e.history,t=e.datatransaksi,n=e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){c(a,t,n)}},"Remove")}));var T=Object(s.g)((function(e){var a=e.history,t=e.datatransaksi;e.dataIndex;return r.a.createElement(F.a,{color:"secondary",variant:"contained",onClick:function(){a.push("/".concat(Pc.route,"/view"),{jenis_input:"ubah",dataDefault:t})}},"View")}));return r.a.createElement(ua.a,Object.assign({},o,{className:Object(N.a)(h.root,a)}),r.a.createElement(pa.a,{className:h.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:h.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,null,"Nomor Polisi"),r.a.createElement(Pa.a,null,"Tipe Mobil"),r.a.createElement(Pa.a,null,"Merek Mobil"),r.a.createElement(Pa.a,null,"Jumlah Kuris"),r.a.createElement(Pa.a,null,"Status Mobil"),r.a.createElement(Pa.a,null,"\xa0"))),r.a.createElement(Aa.a,null,t.slice(0,x).map((function(e,a){return r.a.createElement(Ta.a,{className:h.tableRow,hover:!0,key:e.id,selected:-1!==j.indexOf(e.id)},r.a.createElement(Pa.a,null,e.nomor_polisi),r.a.createElement(Pa.a,null,e.tipe_mobil),r.a.createElement(Pa.a,null,e.merek_mobil),r.a.createElement(Pa.a,null,e.jumlah_kursi),r.a.createElement(Pa.a,null,e.status_mobil),r.a.createElement(Pa.a,null,r.a.createElement(T,{datatransaksi:e,dataIndex:a})))}))))))),r.a.createElement(ga.a,{className:h.actions},r.a.createElement(It.a,{component:"div",count:t.length,onChangePage:function(e,a){I(a)},onChangeRowsPerPage:function(e){w(e.target.value)},page:S,rowsPerPage:x,rowsPerPageOptions:[5,10,25]})))},Ic=Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1)}}})),Dc=function(e){var a=e.className,t=(e.history,Object(k.a)(e,["className","history"])),n=$().authTokens,c=Ic(),i=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(Pc.route,"/tambah"),{jenis_input:"tambah",dataDefault:{}})}},"Tambah Mobil")})),l=Re(n);l.id,Ie(l.name);return r.a.createElement("div",Object.assign({},t,{className:Object(N.a)(c.root,a)}),r.a.createElement("div",{className:c.row},r.a.createElement("span",{className:c.spacer}),r.a.createElement(i,null)),r.a.createElement("div",{className:c.row}))},Tc=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),Pc={server:"https://quiet-mesa-17901.herokuapp.com",name:"mobils",nameForLabelInfo:"Mobil",route:"mobil",label:{addNew:"Silahkan menginput informasi mobil"},statusList:{available:"available",booked:"booked"}},Rc=function(){var e=Tc(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.mobil,r=Object(k.a)(t,["user","mobil"]),l=Object(o.a)({},r,{status_pemesanan:"approved",userId:t.user.id,mobilId:t.mobil.nomor_polisi}),s=Object(o.a)({},t,{status_pemesanan:"approved"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Pc.server,"/").concat(Pc.name,"/").concat(t.id),l);case 7:e.sent,alert("".concat(Pc.nameForLabelInfo," berhasil di setujui.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}()),d=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t,n){var r,l,s,m;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.user,t.ruangMeeting,r=Object(k.a)(t,["user","ruangMeeting"]),l=Object(o.a)({},r,{status:"cancelled"}),s=Object(o.a)({},t,{status:"cancelled"}),m=[].concat(Object(Dt.a)(c.slice(0,n)),[s],Object(Dt.a)(c.slice(n+1))),e.prev=4,e.next=7,jt.a.put("".concat(Pc.server,"/").concat(Pc.name,"/").concat(t.id_meeting_room_res),l);case 7:e.sent,alert("".concat(Pc.nameForLabelInfo," berhasil dibatalkan.")),i(m),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Axios request failed: ".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(a,t,n){return e.apply(this,arguments)}}();return Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(Pc.server,"/").concat(Pc.name)});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]),r.a.createElement("div",{className:e.root},r.a.createElement(Dc,null),r.a.createElement("div",{className:e.content},r.a.createElement(Sc,{data:c,cancelAction:d,approveAction:u})))};function Mc(){return Math.round(20*Math.random())-10}function Ac(){var e=50+Mc(),a=50+Mc();return{top:"".concat(e,"%"),left:"".concat(a,"%"),transform:"translate(-".concat(e,"%, -").concat(a,"%)")}}var Lc,qc=Object(w.a)((function(e){return{root:{},paper:{position:"absolute",width:400,backgroundColor:e.palette.background.paper,border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)}}})),Bc=function(e){var a=e.className,t=e.simpan,c=e.data,i=Object(k.a)(e,["className","simpan","data"]);console.log(c);var m=qc(),u=!1;"tambah"!==c.jenis_input&&(u=!0);var d=Object(n.useState)({nomor_polisi:"",tipe_mobil:"",merek_mobil:"",jumlah_kursi:"",status_mobil:""}),p=Object(l.a)(d,2),g=p[0],b=p[1];Object(n.useEffect)((function(){b(Object(o.a)({},g,{nomor_polisi:c.dataDefault.nomor_polisi,tipe_mobil:c.dataDefault.tipe_mobil,merek_mobil:c.dataDefault.merek_mobil,jumlah_kursi:c.dataDefault.jumlah_kursi,status_mobil:c.dataDefault.status_mobil}))}),[]);var f=function(e){b(Object(o.a)({},g,Object(W.a)({},e.target.name,e.target.value)))},h=r.a.useState(new Date("2014-08-18T21:11:54")),v=Object(l.a)(h,2),E=(v[0],v[1],r.a.useState(!1)),j=Object(l.a)(E,2),O=j[0],y=j[1],x=r.a.useState(Ac),w=Object(l.a)(x,1)[0],_=r.a.createElement("div",{style:w,className:m.paper},r.a.createElement("h2",{id:"simple-modal-title"},"Notifikasi"),r.a.createElement("p",{id:"simple-modal-description"},"Data tersimpan!")),C=Object(s.g)((function(e){var a=e.history;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){return t(a,g)}},"Simpan")}));return r.a.createElement(ua.a,Object.assign({},i,{className:Object(N.a)(m.root,a)}),r.a.createElement("form",{autoComplete:"off",noValidate:!0},r.a.createElement(da.a,{subheader:Pc.label.addNew,title:Pc.nameForLabelInfo}),r.a.createElement(me.a,null),r.a.createElement(pa.a,null,r.a.createElement(ma.a,{container:!0,spacing:3},r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Nomor Polisi",margin:"dense",name:"nomor_polisi",InputProps:{readOnly:{nomorPolisiReadOnly:u}},onChange:f,required:!0,value:g.nomor_polisi,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Tipe Mobil",margin:"dense",name:"tipe_mobil",onChange:f,required:!0,value:g.tipe_mobil,variant:"outlined"})),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Merek Mobil",margin:"dense",name:"merek_mobil",onChange:f,required:!0,select:!0,SelectProps:{native:!0},value:g.merek_mobil,variant:"outlined",InputLabelProps:{shrink:!0}},[{value:"",label:""},{value:"Daihatsu",label:"Daihatsu"},{value:"Mitsubishi",label:"Mitsubishi"},{value:"Toyota",label:"Toyota"},{value:"Honda",label:"Honda"},{value:"Suzuki",label:"Suzuki"}].map((function(e){return r.a.createElement("option",{key:e.value,value:e.value},e.label)})))),r.a.createElement(ma.a,{item:!0,md:12,xs:12},r.a.createElement(P.a,{fullWidth:!0,label:"Jumlah Kursi",margin:"dense",name:"jumlah_kursi",onChange:f,required:!0,select:!0,SelectProps:{native:!0},value:g.jumlah_kursi,variant:"outlined",InputLabelProps:{shrink:!0}},[{value:"",label:""},{value:"5",label:"5"},{value:"6",label:"6"},{value:"7",label:"7"},{value:"8",label:"8"},{value:"9",label:"9"}].map((function(e){return r.a.createElement("option",{key:e.value,value:e.value},e.label)})))))),r.a.createElement(me.a,null),r.a.createElement(ga.a,null,r.a.createElement(C,null))),r.a.createElement(X.a,{open:O,onClose:function(){y(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},_))},Wc=Object(w.a)((function(e){return{root:{padding:e.spacing(4)}}})),Fc=function(e){var a=e.location,t=(Object(k.a)(e,["location"]),a.state),n=Wc(),c=$().authTokens,i=t.jenis_input,l=function(){var e=Object(vt.a)(ht.a.mark((function e(a,t){var n,r,l,s,m,u,d;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=/"(.*?)"/g,r=c.match(n),l=r[0].replace(/\"/g,""),Pe()(l),e.prev=4,t.nomor_polisi,s=Object(k.a)(t,["nomor_polisi"]),m=Object(o.a)({},s,{jumlah_kursi:parseInt(t.jumlah_kursi),temp_nomor_polisi:t.nomor_polisi}),"tambah"!==i){e.next=14;break}return u=Object(o.a)({},m,{status_mobil:Pc.statusList.available}),e.next=11,jt.a.post("".concat(Pc.server,"/").concat(Pc.name),u);case 11:e.sent,e.next=18;break;case 14:return d=Object(o.a)({},m,{nomor_polisi:t.nomor_polisi}),e.next=17,jt.a.put("".concat(Pc.server,"/").concat(Pc.name,"/").concat(t.nomor_polisi),d);case 17:e.sent;case 18:a.push("/".concat(Pc.route)),e.next=25;break;case 21:e.prev=21,e.t0=e.catch(4),alert("Terjadi kesalahan saat memproses permintaan Anda."),console.log("Axios request failed: ".concat(e.t0));case 25:case"end":return e.stop()}}),e,null,[[4,21]])})));return function(a,t){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:n.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:8,md:6,xl:8,xs:12},r.a.createElement(Bc,{simpan:l,data:t}))))},Yc=Object(w.a)((function(e){return{root:{padding:e.spacing(4)},buttonGrid:{margin:"200px 10px"},buttonButton:{padding:e.spacing(4),marginBottom:"20px",marginRight:"50px"}}})),Hc=function(){var e=Yc(),a=Object(s.g)((function(a){var t=a.history,n=a.myLabel,c=a.myLink;return r.a.createElement(F.a,{className:e.buttonButton,color:"primary",variant:"contained",onClick:function(){t.push(c)}},n)}));return r.a.createElement("div",{className:e.root},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement("h2",null,"Silahkan pilih laporan")),r.a.createElement(ma.a,{container:!0,spacing:4,className:e.buttonGrid},[{label:"Permintaan Inventaris",link:"/laporan-detail/inventaris"},{label:"Permintaan Ruang Meeting",link:"/laporan-detail/ruang-meeting"},{label:"Permintaan Catering",link:"/laporan-detail/catering"},{label:"Permintaan Mobil",link:"/laporan-detail/mobil"}].map((function(e){return r.a.createElement(a,{myLabel:e.label,myLink:e.link})}))))},Jc=(Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1),marginBottom:"40px"}}}))),Uc=function(e){var a=e.className,t=(e.history,e.rangedDataInputOnClick),n=Object(k.a)(e,["className","history","rangedDataInputOnClick"]),c=$().authTokens,i=Jc(),l=(Object(s.g)((function(e){var a=e.history,t=e.text,n=e.route;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ac.route,"/").concat(n))}},t)})),Re(c));l.id,Ie(l.name);return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(i.root,a)}),r.a.createElement("div",{className:i.row},r.a.createElement("span",{className:i.spacer})),r.a.createElement("div",{className:i.row},r.a.createElement(U,{myLabel:"Date Range",className:i.searchInput,placeholder:"Search Catering",buttonLabel:"Show Report",onClick:t})))},Gc=(qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:800},statusContainer:{display:"flex",alignItems:"center"},status:{marginRight:e.spacing(1)},actions:{justifyContent:"flex-end"}}}))),zc=(Lc={submitted:"info",cancelled:"danger",approved:"success",rejected:"danger"},Object(W.a)(Lc,"cancelled","warning"),Object(W.a)(Lc,"schedule_available","success"),Lc),Vc=function(e){var a=e.className,t=e.data,n=Object(k.a)(e,["className","data"]),c=Gc();return r.a.createElement(ua.a,Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement(da.a,{title:"Permintaan Ruang Meeting"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,{className:c.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:c.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Ruang Meeting"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Pemesan"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Agenda"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Tanggal Meeting"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Jam Mulai"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Jam Selesai"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Keterangan"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Status"))))),r.a.createElement(Aa.a,null,t.map((function(e){return r.a.createElement(Ta.a,{hover:!0,key:e.id_order},r.a.createElement(Pa.a,null,e.ruangMeeting?e.ruangMeeting.nama_ruangan:""),r.a.createElement(Pa.a,null,e.user?e.user.username:""),r.a.createElement(Pa.a,null,e.agenda),r.a.createElement(Pa.a,null,e.start_meeting?va()(e.start_meeting).format("DD/MM/YYYY"):""),r.a.createElement(Pa.a,null,e.start_meeting?va()(e.start_meeting).format("hh:mm:ss"):""),r.a.createElement(Pa.a,null,e.start_meeting?va()(e.end_meeting).format("hh:mm:ss"):""),r.a.createElement(Pa.a,null,e.keterangan),r.a.createElement(Pa.a,null,r.a.createElement("div",{className:c.statusContainer},r.a.createElement(V,{className:c.status,color:zc[e.status],size:"sm"}),e.status)))}))))))),r.a.createElement(me.a,null),r.a.createElement(ga.a,{className:c.actions}))},Kc=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),Zc={server:"https://quiet-mesa-17901.herokuapp.com",name:"-",nameForLabelInfo:"Laporan",route:"laporan",label:{addNew:"-"},statusList:{available:"available"}},$c=function(){var e=Kc(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],{include:[{relation:"user"},{relation:"ruangMeeting"}]});Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(Zc.server,"/meeting-room-reservations?filter=").concat(JSON.stringify(u))});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]);var d=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u,a.startDate&&a.endDate&&(t=Object(o.a)({},u,{where:Object(o.a)({},u.where,{and:[{waktu_meeting:{gt:new Date(va()(a.startDate).subtract(1,"seconds").format())}},{waktu_meeting:{lt:new Date(va()(a.endDate).add(1,"days").subtract(1,"seconds").format())}}]})})),e.next=4,jt()({method:"get",url:"".concat(Zc.server,"/meeting-room-reservations?filter=").concat(JSON.stringify(t))});case 4:n=e.sent,i(n.data);case 6:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:e.root},r.a.createElement(Uc,{rangedDataInputOnClick:d}),r.a.createElement("div",{className:e.content},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:12,md:12,xl:3,xs:12},r.a.createElement(Vc,{data:c})))))},Qc=(Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1),marginBottom:"40px"}}}))),Xc=function(e){var a=e.className,t=(e.history,e.rangedDataInputOnClick),n=Object(k.a)(e,["className","history","rangedDataInputOnClick"]),c=$().authTokens,i=Qc(),l=(Object(s.g)((function(e){var a=e.history,t=e.text,n=e.route;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ac.route,"/").concat(n))}},t)})),Re(c));l.id,Ie(l.name);return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(i.root,a)}),r.a.createElement("div",{className:i.row},r.a.createElement("span",{className:i.spacer})),r.a.createElement("div",{className:i.row},r.a.createElement(U,{myLabel:"Date Range",className:i.searchInput,placeholder:"Search Catering",buttonLabel:"Show Report",onClick:t})))},ei=(qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:800},statusContainer:{display:"flex",alignItems:"center"},status:{marginRight:e.spacing(1)},actions:{justifyContent:"flex-end"}}}))),ai=function(e){var a=e.className,t=e.data,n=Object(k.a)(e,["className","data"]),c=ei();return r.a.createElement(ua.a,Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement(da.a,{title:"Permintaan Catering"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,{className:c.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:c.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Departemen"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Pemesan"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Jumlah"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Jenis"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Tanggal"))))),r.a.createElement(Aa.a,null,t.map((function(e){return r.a.createElement(Ta.a,{hover:!0,key:e.id_catering},r.a.createElement(Pa.a,null,e.departemen),r.a.createElement(Pa.a,null,e.user?e.user.username:""),r.a.createElement(Pa.a,null,e.jumlah),r.a.createElement(Pa.a,null,e.jenis_catering),r.a.createElement(Pa.a,null,e.tanggal?va()(e.tanggal).format("DD/MM/YYYY"):""))}))))))),r.a.createElement(me.a,null),r.a.createElement(ga.a,{className:c.actions}))},ti=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),ni={server:"https://quiet-mesa-17901.herokuapp.com",name:"-",nameForLabelInfo:"Laporan",route:"laporan",label:{addNew:"-"},statusList:{available:"available"}},ri=function(){var e=ti(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],{include:[{relation:"user"}]});Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(ni.server,"/caterings?filter=").concat(JSON.stringify(u))});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]);var d=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u,a.startDate&&a.endDate&&(t=Object(o.a)({},u,{where:Object(o.a)({},u.where,{and:[{tanggal:{gt:new Date(va()(a.startDate).subtract(1,"seconds").format())}},{tanggal:{lt:new Date(va()(a.endDate).add(1,"days").subtract(1,"seconds").format())}}]})})),e.next=4,jt()({method:"get",url:"".concat(ni.server,"/caterings?filter=").concat(JSON.stringify(t))});case 4:n=e.sent,i(n.data);case 6:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:e.root},r.a.createElement(Xc,{rangedDataInputOnClick:d}),r.a.createElement("div",{className:e.content},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:12,md:12,xl:3,xs:12},r.a.createElement(ai,{data:c})))))},ci=(Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:1050},nameContainer:{display:"flex",alignItems:"center"},avatar:{marginRight:e.spacing(2)},actions:{justifyContent:"flex-end"}}})),Object(w.a)((function(e){return{root:{},row:{height:"42px",display:"flex",alignItems:"center",marginTop:e.spacing(1)},spacer:{flexGrow:1},importButton:{marginRight:e.spacing(1)},exportButton:{marginRight:e.spacing(1)},searchInput:{marginRight:e.spacing(1),marginBottom:"40px"}}}))),ii=function(e){var a=e.className,t=(e.history,e.rangedDataInputOnClick),n=Object(k.a)(e,["className","history","rangedDataInputOnClick"]),c=$().authTokens,i=ci(),l=(Object(s.g)((function(e){var a=e.history,t=e.text,n=e.route;return r.a.createElement(F.a,{color:"primary",variant:"contained",onClick:function(){a.push("/".concat(ac.route,"/").concat(n))}},t)})),Re(c));l.id,Ie(l.name);return r.a.createElement("div",Object.assign({},n,{className:Object(N.a)(i.root,a)}),r.a.createElement("div",{className:i.row},r.a.createElement("span",{className:i.spacer})),r.a.createElement("div",{className:i.row},r.a.createElement(U,{myLabel:"Date Range",className:i.searchInput,placeholder:"Search Catering",buttonLabel:"Show Report",onClick:t})))},li=(qa()(),qa()(),qa()(),qa()(),qa()(),qa()(),Object(w.a)((function(e){return{root:{},content:{padding:0},inner:{minWidth:800},statusContainer:{display:"flex",alignItems:"center"},status:{marginRight:e.spacing(1)},actions:{justifyContent:"flex-end"}}}))),oi={submitted:"info",cancelled:"danger",approved:"success",rejected:"danger",alocated:"warning","ready to pickup":"success"},si=function(e){var a=e.className,t=e.data,n=Object(k.a)(e,["className","data"]),c=li();return r.a.createElement(ua.a,Object.assign({},n,{className:Object(N.a)(c.root,a)}),r.a.createElement(da.a,{title:"Permintaan Mobil"}),r.a.createElement(me.a,null),r.a.createElement(pa.a,{className:c.content},r.a.createElement(Sa.a,null,r.a.createElement("div",{className:c.inner},r.a.createElement(Ia.a,null,r.a.createElement(Da.a,null,r.a.createElement(Ta.a,null,r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Mobil"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Pemesan"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Tipe Pemesanan"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Status"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Tanggal Pemesanan"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Supir"))),r.a.createElement(Pa.a,{sortDirection:"desc"},r.a.createElement(Ra.a,{enterDelay:300,title:"Sort"},r.a.createElement(Ma.a,{active:!0,direction:"desc"},"Keterangan"))))),r.a.createElement(Aa.a,null,t.map((function(e){return r.a.createElement(Ta.a,{hover:!0,key:e.id},r.a.createElement(Pa.a,null,e.mobil?e.mobil.nomor_polisi:""),r.a.createElement(Pa.a,null,e.user?e.user.username:""),r.a.createElement(Pa.a,null,e.tipe_pemesanan),r.a.createElement(Pa.a,null,r.a.createElement("div",{className:c.statusContainer},r.a.createElement(V,{className:c.status,color:oi[e.status_pemesanan],size:"sm"}),e.status_pemesanan)),r.a.createElement(Pa.a,null,e.tanggal_pemesanan?va()(e.tanggal_pemesanan).format("DD/MM/YYYY"):""),r.a.createElement(Pa.a,null,e.supir?e.supir.nama:""),r.a.createElement(Pa.a,null,e.keterangan))}))))))),r.a.createElement(me.a,null),r.a.createElement(ga.a,{className:c.actions}))},mi=Object(w.a)((function(e){return{root:{padding:e.spacing(3)},content:{marginTop:e.spacing(2)}}})),ui={server:"https://quiet-mesa-17901.herokuapp.com",name:"-",nameForLabelInfo:"Laporan",route:"laporan",label:{addNew:"-"},statusList:{available:"available"}},di=function(){var e=mi(),a=Object(n.useState)([]),t=Object(l.a)(a,2),c=t[0],i=t[1],s=Object(n.useState)([]),m=Object(l.a)(s,2),u=(m[0],m[1],{include:[{relation:"user"},{relation:"mobil"},{relation:"supir"}]});Object(n.useEffect)((function(){(function(){var e=Object(vt.a)(ht.a.mark((function e(){var a;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt()({method:"get",url:"".concat(ui.server,"/pemesanan-mobils?filter=").concat(JSON.stringify(u))});case 2:a=e.sent,i(a.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[]);var d=function(){var e=Object(vt.a)(ht.a.mark((function e(a){var t,n;return ht.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u,a.startDate&&a.endDate&&(t=Object(o.a)({},u,{where:Object(o.a)({},u.where,{and:[{tanggal_pemesanan:{gt:new Date(va()(a.startDate).subtract(1,"seconds").format())}},{tanggal_pemesanan:{lt:new Date(va()(a.endDate).add(1,"days").subtract(1,"seconds").format())}}]})})),e.next=4,jt()({method:"get",url:"".concat(ui.server,"/pemesanan-mobils?filter=").concat(JSON.stringify(t))});case 4:n=e.sent,i(n.data);case 6:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return r.a.createElement("div",{className:e.root},r.a.createElement(ii,{rangedDataInputOnClick:d}),r.a.createElement("div",{className:e.content},r.a.createElement(ma.a,{container:!0,spacing:4},r.a.createElement(ma.a,{item:!0,lg:12,md:12,xl:3,xs:12},r.a.createElement(si,{data:c})))))};var pi=function(){return r.a.createElement(s.d,null,r.a.createElement(s.a,{exact:!0,from:"/",to:"/dashboard"}),r.a.createElement(Q,{component:Ya,exact:!0,layout:ca,path:"/dashboard"}),r.a.createElement(Q,{component:Ja,exact:!0,layout:ca,path:"/inventory"}),r.a.createElement(Q,{component:lt,exact:!0,layout:ca,path:"/tidak-dipakai-plv"}),r.a.createElement(Q,{component:Tn,exact:!0,layout:ca,path:"/ruang-meeting"}),r.a.createElement(Q,{component:qn,exact:!0,layout:ca,path:"/ruang-meeting/tambah"}),r.a.createElement(Q,{component:qn,exact:!0,layout:ca,path:"/ruang-meeting/view"}),r.a.createElement(Q,{component:vn,exact:!0,layout:ca,path:"/reservasi-ruang-meeting/view"}),r.a.createElement(Q,{component:on,exact:!0,layout:ca,path:"/reservasi-ruang-meeting"}),r.a.createElement(Q,{component:vn,exact:!0,layout:ca,path:"/reservasi-ruang-meeting/tambah"}),r.a.createElement(Q,{component:Nn,exact:!0,layout:ca,path:"/reservasi-ruang-meeting/search"}),r.a.createElement(Q,{component:$n,exact:!0,layout:ca,path:"/order-inventory/view"}),r.a.createElement(Q,{component:Un,exact:!0,layout:ca,path:"/order-inventory"}),r.a.createElement(Q,{component:$n,exact:!0,layout:ca,path:"/order-inventory/tambah"}),r.a.createElement(Q,{component:nr,exact:!0,layout:ca,path:"/order-inventory/search"}),r.a.createElement(Q,{component:sr,exact:!0,layout:ca,path:"/order-inventory/approve"}),r.a.createElement(Q,{component:Ut,exact:!0,layout:ca,path:"/pemesanan-mobil"}),r.a.createElement(Q,{component:$t,exact:!0,layout:ca,path:"/pemesanan-mobil/tambah"}),r.a.createElement(Q,{component:$t,exact:!0,layout:ca,path:"/pemesanan-mobil/view"}),r.a.createElement(Q,{component:dn,exact:!0,layout:ca,path:"/pemesanan-mobil/search"}),r.a.createElement(Q,{component:Rc,exact:!0,layout:ca,path:"/mobil"}),r.a.createElement(Q,{component:Fc,exact:!0,layout:ca,path:"/mobil/tambah"}),r.a.createElement(Q,{component:Fc,exact:!0,layout:ca,path:"/mobil/view"}),r.a.createElement(Q,{component:fr,exact:!0,layout:ca,path:"/stock-inventory"}),r.a.createElement(Q,{component:yr,exact:!0,layout:ca,path:"/stock-inventory/tambah"}),r.a.createElement(Q,{component:yr,exact:!0,layout:ca,path:"/stock-inventory/view"}),r.a.createElement(Q,{component:Sr,exact:!0,layout:ca,path:"/catering"}),r.a.createElement(Q,{component:Mr,exact:!0,layout:ca,path:"/catering/tambah"}),r.a.createElement(Q,{component:Mr,exact:!0,layout:ca,path:"/catering/view"}),r.a.createElement(Q,{component:Yr,exact:!0,layout:ca,path:"/user"}),r.a.createElement(Q,{component:Vr,exact:!0,layout:ca,path:"/user/tambah"}),r.a.createElement(Q,{component:Vr,exact:!0,layout:ca,path:"/user/view"}),r.a.createElement(Q,{component:jc,exact:!0,layout:ca,path:"/laporan-summary"}),r.a.createElement(Q,{component:tc,exact:!0,layout:ca,path:"/laporan-detail/inventaris"}),r.a.createElement(Q,{component:$c,exact:!0,layout:ca,path:"/laporan-detail/ruang-meeting"}),r.a.createElement(Q,{component:ri,exact:!0,layout:ca,path:"/laporan-detail/catering"}),r.a.createElement(Q,{component:di,exact:!0,layout:ca,path:"/laporan-detail/mobil"}),r.a.createElement(Q,{component:Hc,exact:!0,layout:ca,path:"/laporan"}),r.a.createElement(Q,{component:_c,exact:!0,layout:ca,path:"/laporan/inventaris"}),r.a.createElement(Q,{component:tc,exact:!0,layout:ca,path:"/laporan/ruang-meeting"}),r.a.createElement(Q,{component:tc,exact:!0,layout:ca,path:"/laporan/catering"}),r.a.createElement(Q,{component:tc,exact:!0,layout:ca,path:"/laporan/pemesanan-mobil"}),r.a.createElement(K,{component:bt,exact:!0,layout:ca,path:"/settings"}),r.a.createElement(K,{component:St,exact:!0,layout:sa,path:"/sign-up"}),r.a.createElement(K,{component:xt,exact:!0,layout:sa,path:"/sign-in"}),r.a.createElement(K,{component:xa,exact:!0,layout:ca,path:"/contoh-form"}),r.a.createElement(K,{component:Ga,exact:!0,layout:sa,path:"/not-found"}),r.a.createElement(s.a,{to:"/not-found"}))},gi=Object(m.a)();function bi(){var e=JSON.parse(localStorage.getItem("tokens")),a=Object(n.useState)(e),t=Object(l.a)(a,2),c=t[0],i=t[1];return r.a.createElement(d.a,{theme:y},r.a.createElement(Z.Provider,{value:{authTokens:c,setAuthTokens:function(e){localStorage.setItem("tokens",JSON.stringify(e)),i(e)}}},r.a.createElement(s.c,{history:gi},r.a.createElement(pi,null))))}u.b.helpers.extend(u.b.elements.Rectangle.prototype,{draw:b.draw}),g.a.validators=Object(o.a)({},g.a.validators,{},x),i.a.render(r.a.createElement(bi,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[307,1,2]]]);
  //# sourceMappingURL=main.e8cf58dc.chunk.js.map