Files
dailygrubs_console_build/build/static/js/4776.39420fa7.chunk.js

1 line
37 KiB
JavaScript

"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4776],{84776:function(e,n,r){r.r(n);var i=r(1413),t=r(93433),s=r(74165),o=r(15861),a=r(29439),c=r(47313),l=r(58467),d=r(56573),x=r(42897),h=r(41627),u=r(24904),p=r(76035),f=r(58873),Z=r(26446),g=r(10165),j=r(94469),m=r(42832),v=r(48119),A=r(61113),b=r(96467),_=r(99881),S=r(33249),C=r(90891),E=r(16783),P=r(69099),y=r(33604),w=r(9019),R=r(85281),T=r(51629),I=r(66835),Y=r(23477),D=r(24076),k=r(67478),M=r(57861),z=r(66212),H=r(44758),O=r(61689),F=r(47131),L=r(4117),U=r(84488),W=r(1550),N=r(65033),B=r(19536),K=r(43909),V=r(25718),q=r(97316),G=r(11577),X=r(10658),Q=r.n(X),$=r(19860),J=r(50661),ee=r(11829),ne=r(25057),re=r(90842),ie=r(22539),te=r(57829),se=r(70501),oe=r(46417),ae=r(91635);Q().extend(ae);var ce=16,le="0 8px 24px rgba(15, 23, 42, 0.08)",de="#0f172a",xe="#64748b",he="#94a3b8",ue="#e2e8f0",pe="#f8fafc",fe=function(e,n){return"".concat(e).concat(n)},Ze=function(e){return fe(e,"08")},ge=function(e){return fe(e,"26")},je=function(e){return fe(e,"55")},me="#662582",ve="#9255AB",Ae={pending:{label:"Pending",color:"#f59e0b",icon:ie.Ley},assigned:{label:"Assigned",color:"#0ea5e9",icon:ie.Z5O},confirmed:{label:"Confirmed",color:"#10b981",icon:ie.ZSR},modified:{label:"Modified",color:"#06b6d4",icon:ie.Y8K},processing:{label:"Processing",color:me,icon:ie.dKE},active:{label:"Active",color:"#8b5cf6",icon:ie.ili},closed:{label:"Closed",color:"#06b6d4",icon:ie.ZSR},completed:{label:"Completed",color:"#10b981",icon:ie.ZSR},cancelled:{label:"Cancelled",color:"#ef4444",icon:ie.B4e}},be=function(e){var n=e.status,r=e.size,i=void 0===r?"md":r;if(!n)return null;var t=Ae[String(n).toLowerCase()]||{label:n,color:he,icon:ie.Y8K},s=t.icon,o="lg"===i?1.25:1,a="lg"===i?.5:.375,c="lg"===i?12:11;return(0,oe.jsxs)(te.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:o,py:a,borderRadius:999,bgcolor:Ze(t.color),border:"1px solid ".concat(je(t.color)),color:t.color,fontSize:c,fontWeight:800,whiteSpace:"nowrap"},children:[(0,oe.jsx)(s,{size:12})," ",t.label]})};n.default=function(){var e=(0,c.useState)([]),n=(0,a.Z)(e,2),r=n[0],X=n[1],ae=(0,c.useState)(!0),he=(0,a.Z)(ae,2),fe=he[0],Ae=he[1],_e=(0,l.TH)(),Se=(0,c.useState)(""),Ce=(0,a.Z)(Se,2),Ee=Ce[0],Pe=Ce[1],ye=(0,c.useState)(""),we=(0,a.Z)(ye,2),Re=we[0],Te=we[1],Ie=(0,c.useState)(""),Ye=(0,a.Z)(Ie,2),De=Ye[0],ke=Ye[1],Me=(0,c.useState)(""),ze=(0,a.Z)(Me,2),He=ze[0],Oe=ze[1],Fe=(0,c.useState)(!1),Le=(0,a.Z)(Fe,2),Ue=Le[0],We=Le[1],Ne=(0,c.useState)(""),Be=(0,a.Z)(Ne,2),Ke=Be[0],Ve=Be[1],qe=(0,c.useState)(""),Ge=(0,a.Z)(qe,2),Xe=Ge[0],Qe=Ge[1],$e=(0,c.useState)(!1),Je=(0,a.Z)($e,2),en=Je[0],nn=Je[1],rn=(0,c.useState)(""),tn=(0,a.Z)(rn,2),sn=tn[0],on=tn[1],an=(0,c.useState)(""),cn=(0,a.Z)(an,2),ln=cn[0],dn=(cn[1],(0,c.useState)("")),xn=(0,a.Z)(dn,2),hn=xn[0],un=xn[1],pn=(0,c.useState)(""),fn=(0,a.Z)(pn,2),Zn=fn[0],gn=fn[1],jn=(0,c.useState)(""),mn=(0,a.Z)(jn,2),vn=mn[0],An=mn[1],bn=(0,c.useState)(""),_n=(0,a.Z)(bn,2),Sn=_n[0],Cn=_n[1],En=(0,c.useState)([]),Pn=(0,a.Z)(En,2),yn=Pn[0],wn=Pn[1],Rn=(0,c.useState)(""),Tn=(0,a.Z)(Rn,2),In=Tn[0],Yn=Tn[1],Dn=(0,c.useState)(""),kn=(0,a.Z)(Dn,2),Mn=kn[0],zn=kn[1],Hn=(0,c.useState)([]),On=(0,a.Z)(Hn,2),Fn=On[0],Ln=On[1],Un=(0,c.useState)([]),Wn=(0,a.Z)(Un,2),Nn=Wn[0],Bn=Wn[1],Kn=(0,c.useState)(""),Vn=(0,a.Z)(Kn,2),qn=Vn[0],Gn=Vn[1],Xn=(0,c.useState)(""),Qn=(0,a.Z)(Xn,2),$n=Qn[0],Jn=Qn[1],er=(0,c.useState)(""),nr=(0,a.Z)(er,2),rr=nr[0],ir=(nr[1],(0,c.useState)("")),tr=(0,a.Z)(ir,2),sr=tr[0],or=(tr[1],(0,c.useState)("")),ar=(0,a.Z)(or,2),cr=ar[0],lr=ar[1],dr=(0,c.useState)(""),xr=(0,a.Z)(dr,2),hr=xr[0],ur=(xr[1],(0,c.useState)("")),pr=(0,a.Z)(ur,2),fr=pr[0],Zr=(pr[1],(0,c.useState)([])),gr=(0,a.Z)(Zr,2),jr=gr[0],mr=gr[1],vr=(0,c.useState)({shifts:0,assigned:0,remaining:0,shiftid:0,price:0}),Ar=(0,a.Z)(vr,2),br=Ar[0],_r=Ar[1],Sr=(0,c.useState)(0),Cr=(0,a.Z)(Sr,2),Er=(Cr[0],Cr[1]),Pr=(0,l.TH)().state,yr=(0,c.useState)(""),wr=(0,a.Z)(yr,2),Rr=wr[0],Tr=wr[1],Ir=(0,l.s0)(),Yr=(0,c.useState)(["",""]),Dr=(0,a.Z)(Yr,2),kr=Dr[0],Mr=Dr[1],zr=(0,c.useState)(""),Hr=(0,a.Z)(zr,2),Or=Hr[0],Fr=Hr[1],Lr=(0,c.useState)(!1),Ur=(0,a.Z)(Lr,2),Wr=Ur[0],Nr=Ur[1];(0,c.useEffect)((function(){console.log("categoryarr"),console.log(r,Re,Sn,rr,sr)}),[jr]),(0,c.useEffect)((function(){Pr&&(Gn(Pr.orderheaderid),Jn(Pr.tenantid)),console.log(Pr),console.log(Date.now())}),[]),(0,c.useEffect)((function(){Pr&&(Gn(Pr.orderheaderid),Jn(Pr.tenantid)),console.log(Pr),console.log(Date.now())}),[Pr.orderheaderid,Pr.tenantid]);var Br=(0,$.Z)(),Kr=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ae(!0),e.next=3,d.Z.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getordersbystatus?tenantid=").concat($n)).then((function(e){console.log(e);var n=e.data.Details.find((function(e){return e.orderheaderid==qn}));console.log("result"),console.log(n),wn(n.orderaddons),Cn(n.venuetype),Yn(n.remarks),Fr(n.startdate),Ve(n.tenantname),Te(""),Qe(n.tenantaddress),Oe(n.eventname),ke(Q()(n.orderdate).format("MM/DD/YYYY")||""),Pe(n.orderid),on(n.orderstatus),un(n.taxamount),gn(n.orderamount),An(n.ordervalue),zn(Q()(n.cancelled).format("MM/DD/YYYY")||""),lr(n.pending),Ae(!1)})).catch((function(e){console.log(e),Ae(!1)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Vr=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ae(!0),e.next=3,d.Z.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getorderdetails?orderheaderid=").concat(qn)).then((function(e){console.log("res"),console.log(e),X(e.data.Details||[]),console.log("categoryarr"),mr(e.data.Details),console.log(e.data.Details),Ae(!1)})).catch((function(e){console.log(e),Ae(!1)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),qr=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(n){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ae(!0),e.prev=1,e.next=4,d.Z.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getassignedinfo?orderdetailid=").concat(n)).then((function(e){console.log(e),e.data.status&&Ln(e.data.Details),Ae(!1)})).catch((function(e){console.log(e),Ae(!1)}));case 4:e.next=10;break;case 6:e.prev=6,e.t0=e.catch(1),console.log(e.t0),Ae(!1);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(n){return e.apply(this,arguments)}}(),Gr=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.Z.put("".concat("https://jupiter.nearle.app/live/api/v2","/orders/cancel"),{orderheaderid:parseInt(qn),orderstatus:"cancelled",cancelled:Q()().format("YYYY-MM-DD HH:mm:ss"),unserviceable:Wr?0:1}).then((function(e){console.log(e),e.data.status&&qn&&$n&&(Kr(),Vr())})).catch((function(e){console.log(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xr=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(n){var r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={orderheaderid:qn,orderprocessid:n.orderprocessid,orderdetailid:n.orderdetailid,orderstatus:"pending",pending:Q()().format("YYYY-MM-DD HH:mm:ss"),status:1},console.log(r),e.next=4,d.Z.put("".concat("https://jupiter.nearle.app/live/api/v2","/orders/updateprocessstatus"),r).then((function(e){console.log(e),"Successful"===e.data.message&&((0,re.yv)("Role unassigned successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),br.assigned>br.shifts&&Qr(n),Kr(),Vr(),We(!1),ri(),$r(),setTimeout((function(){ri()}),2e3))})).catch((function(e){console.log(e)}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Qr=function(e){console.log(e);var n=[e.userfcmtoken],r={notifications:[{notificationid:0,notificationdate:Q()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Un-Asigned",message:"".concat(e.firstname," has been Un-assigned to the order ").concat(Ee),configid:2,tenantid:$n,orderheaderid:qn,orderprocessid:e.orderprocessid,shiftid:e.shiftid,userid:e.userid,orderid:Ee,success:0,orderstatus:"assigned",processing:Q()().format("YYYY-MM-DD HH:mm:ss"),notifytype:2,notifyreason:"Staff Un-Assigned"}],fcmmodel:{priority:"high",registration_ids:n,data:{Title:"Staff Un-Asigned",message:"A Staff has been Un-assigned to the order ".concat(Ee),tenantid:$n,orderheaderid:qn,orderid:Ee,configid:2},notification:{body:"An order has been Un-assigned ".concat(Ee),title:"Legendary",sound:"ring",content_available:!0,click_action:"FLUTTER_NOTIFICATION_CLICK"}}};console.log("grpnotifyobj unassign"),console.log(r),ni(r)};(0,c.useEffect)((function(){console.log(qn),qn&&$n?(Kr(),Vr(),ri(),console.log(_e.state||"")):Ae(!1),console.log(qn,$n)}),[qn,$n,Rr]);var $r=function(){nn(!1),Bn([]),Mr(["",""])};(0,c.useEffect)((function(){console.log(br)}));var Jr=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(){var n,r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],r=[],Nn.map((function(e){n.push({orderprocessid:0,processdate:Q()().format("YYYY-MM-DD HH:mm:ss"),tenantid:$n,orderheaderid:qn,orderdetailid:e.orderdetailid,productid:e.productid,userid:e.userid,orderstatus:"pending",pending:"".concat(Q()(cr).format("YYYY-MM-DD")," ").concat(Q()(cr).format("HH:mm:ss")),starttime:"".concat(Q()(rr).format("YYYY-MM-DD")," ").concat(Q()(rr).format("HH:mm:ss")),endtime:"".concat(Q()(sr).format("YYYY-MM-DD")," ").concat(Q()(sr).format("HH:mm:ss")),appuserid:parseInt(localStorage.getItem("appuserid")),shiftid:e.shiftid,userrate:e.userrate,productrate:e.productrate}),Nn.map((function(e){r.push({notificationid:0,notificationdate:Q()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Asigned",message:"A Staff has been assigned to the order ".concat(Ee),configid:2,tenantid:$n,orderheaderid:qn,orderprocessid:0,shiftid:e.shiftid,userid:e.userid,orderid:Ee,sound:"ring",click_action:"FLUTTER_NOTIFICATION_CLICK",firstname:e.firstname})}))})),console.log("arr"),console.log(n),e.next=7,d.Z.post("".concat("https://jupiter.nearle.app/live/api/v2","/orders/createorderprocess"),n).then((function(e){console.log(e),"Successfully created"===e.data.message&&((0,re.yv)("Roles assigned successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),console.log(fr,"","",qn,r[0].shiftid),nn(!1),Vr(),ri())})).catch((function(e){console.log(e)}));case 7:console.log(n);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ei=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(n){var r,i;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.userfcmtoken,i={notificationid:0,notificationdate:Q()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Asigned",message:"A Staff has been assigned to the order ".concat(Ee),configid:2,tenantid:$n,orderheaderid:qn,orderprocessid:n.orderprocessid,shiftid:n.shiftid,userid:n.userid,orderid:Ee,sound:"ring",click_action:"FLUTTER_NOTIFICATION_CLICK"},console.log(i,r),e.next=5,d.Z.post("".concat("https://jupiter.nearle.app/live/api/v2","/utils/notification/send"),{priority:"high",registration_ids:[r],data:i,notification:{body:"A Staff has been assigned to ".concat(Ee),title:"Legendary",sound:"ring",content_available:!0}},{headers:{Authorization:"Bearer ".concat({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://mock-data-api-nextjs.vercel.app/",REACT_APP_AUTH0_CLIENT_ID:"",REACT_APP_AUTH0_DOMAIN:"",REACT_APP_AWS_APP_CLIENT_ID:"",REACT_APP_AWS_POOL_ID:"",REACT_APP_FIREBASE_API_KEY:"",REACT_APP_FIREBASE_APP_ID:"",REACT_APP_FIREBASE_AUTH_DOMAIN:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"",REACT_APP_FIREBASE_PROJECT_ID:"",REACT_APP_FIREBASE_STORAGE_BUCKET:"",REACT_APP_RIDER_ACCESS_ID:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk",REACT_APP_URL:"https://jupiter.nearle.app/live/api/v1",REACT_APP_URL2:"https://jupiter.nearle.app/live/api/v2",REACT_APP_URL3:"https://jupiter.nearle.app/live/api/v3",REACT_APP_VERSION:"v2.1.0"}.REACT_APP_STAFF_TOKEN)}}).then((function(e){console.log(e),(0,re.yv)("Notification sent successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})})).catch((function(e){console.log(e)}));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ni=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(n){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(n),e.next=3,d.Z.post("".concat("https://jupiter.nearle.app/live/api/v2","/utils/notification/sendall"),n,{headers:{Authorization:"Bearer ".concat({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://mock-data-api-nextjs.vercel.app/",REACT_APP_AUTH0_CLIENT_ID:"",REACT_APP_AUTH0_DOMAIN:"",REACT_APP_AWS_APP_CLIENT_ID:"",REACT_APP_AWS_POOL_ID:"",REACT_APP_FIREBASE_API_KEY:"",REACT_APP_FIREBASE_APP_ID:"",REACT_APP_FIREBASE_AUTH_DOMAIN:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"",REACT_APP_FIREBASE_PROJECT_ID:"",REACT_APP_FIREBASE_STORAGE_BUCKET:"",REACT_APP_RIDER_ACCESS_ID:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk",REACT_APP_URL:"https://jupiter.nearle.app/live/api/v1",REACT_APP_URL2:"https://jupiter.nearle.app/live/api/v2",REACT_APP_URL3:"https://jupiter.nearle.app/live/api/v3",REACT_APP_VERSION:"v2.1.0"}.REACT_APP_STAFF_TOKEN)}}).then((function(e){console.log(e),e.data.status&&((0,re.yv)("Notification sent successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),Kr())})).catch((function(e){console.log(e)}));case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ri=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.Z.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getorderstatuscount?orderheaderid=").concat(qn)).then((function(e){e.data.status?(console.log(e),Tr(e.data.pendingcount),Kr()):(Tr(e.data.pendingcount),Kr())})).catch((function(e){console.log(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function ii(e){var n=e.open,r=e.handleClose,i=(0,c.useState)(""),t=(0,a.Z)(i,2),s=t[0],o=t[1];return(0,oe.jsxs)(j.Z,{open:n,onClose:function(){return r(!1)},maxWidth:"xs",PaperProps:{sx:{borderRadius:3}},children:[(0,oe.jsx)(te.Z,{sx:{p:2.5,background:"linear-gradient(135deg, ".concat(Ze("#ef4444")," 0%, ").concat(Ze("#f59e0b")," 100%)"),borderBottom:"1px solid ".concat(ue)},children:(0,oe.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,oe.jsx)(v.Z,{sx:{bgcolor:"#ef4444",color:"#fff",width:40,height:40},children:(0,oe.jsx)(Z.Z,{})}),(0,oe.jsxs)(m.Z,{children:[(0,oe.jsx)(A.Z,{variant:"h5",sx:{fontWeight:800,color:de},children:"Cancel Order"}),(0,oe.jsx)(A.Z,{variant:"caption",sx:{color:xe,fontWeight:600},children:"Confirm to permanently cancel this order"})]})]})}),(0,oe.jsx)(b.Z,{sx:{pt:3},children:(0,oe.jsxs)(m.Z,{alignItems:"center",spacing:2.5,children:[(0,oe.jsxs)(te.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1.25,py:.5,borderRadius:999,bgcolor:Ze("#f59e0b"),border:"1px solid ".concat(je("#f59e0b")),color:"#f59e0b",fontSize:12,fontWeight:800},children:[(0,oe.jsx)(ie.VHP,{size:12})," ",Ee.slice(4)]}),Wr&&(0,oe.jsxs)(_.Z,{color:"warning",variant:"border",icon:(0,oe.jsx)(J.Z,{}),children:[(0,oe.jsx)(S.Z,{children:"Order is within 24Hrs time frame. The order will be invoiced with standard pricing as agreed."}),(0,oe.jsx)(C.Z,{href:"https://thelegendarystaff.com/",target:"_blank",children:"Terms & Condition link"})]}),(0,oe.jsx)(A.Z,{variant:"body1",align:"center",sx:{color:xe,fontWeight:600},children:"Please type in the order number to confirm."}),(0,oe.jsx)(E.Z,{type:"text",fullWidth:!0,onChange:function(e){return o(e.target.value)},error:s!==Ee.slice(4),value:s,placeholder:Ee.slice(4)}),(0,oe.jsxs)(m.Z,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,oe.jsx)(P.Z,{fullWidth:!0,onClick:function(){return r(!1)},variant:"outlined",sx:{borderRadius:999,py:1,borderColor:ue,color:xe,fontWeight:700,"&:hover":{borderColor:xe,bgcolor:pe}},children:"No"}),(0,oe.jsx)(P.Z,{fullWidth:!0,variant:"contained",autoFocus:!0,onClick:function(){s===Ee.slice(4)&&(Gr(),r(!0))},sx:{borderRadius:999,py:1,bgcolor:"#ef4444",fontWeight:700,boxShadow:"0 6px 18px ".concat(ge("#ef4444")),"&:hover":{bgcolor:"#dc2626"}},children:"Yes, Cancel"})]})]})})]})}return(0,oe.jsxs)(oe.Fragment,{children:[fe&&(0,oe.jsx)(G.Z,{}),(0,oe.jsx)(ii,{open:Ue,handleClose:function(){We(!1)}}),(0,oe.jsxs)(j.Z,{maxWidth:!1,fullWidth:!0,open:en,onClose:$r,scroll:"paper",TransitionComponent:K.S,children:[(0,oe.jsxs)(y.Z,{sx:{background:"linear-gradient(135deg, ".concat(Ze(me)," 0%, ").concat(Ze(ve)," 100%)"),borderBottom:"1px solid ".concat(ue),p:{xs:2,sm:2.5}},children:[(0,oe.jsxs)(m.Z,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,children:[(0,oe.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,oe.jsx)(v.Z,{sx:{bgcolor:me,color:"#fff",width:40,height:40,boxShadow:"0 6px 18px ".concat(ge(me))},children:(0,oe.jsx)(ie.Z5O,{size:20})}),(0,oe.jsxs)(m.Z,{children:[(0,oe.jsx)(A.Z,{variant:"h4",sx:{fontWeight:800,color:de,lineHeight:1.1},children:"Assign Roles"}),(0,oe.jsxs)(A.Z,{variant:"caption",sx:{color:xe,fontWeight:600},children:[Ke," \xb7 ",ln]})]})]}),(0,oe.jsxs)(te.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1.25,py:.5,borderRadius:999,bgcolor:Ze("#f59e0b"),border:"1px solid ".concat(je("#f59e0b")),color:"#f59e0b",fontSize:12,fontWeight:800},children:[(0,oe.jsx)(ie.VHP,{size:12})," ",Ee]})]}),(0,oe.jsxs)(w.ZP,{container:!0,sx:{pt:2},spacing:1.5,children:[(0,oe.jsx)(w.ZP,{item:!0,sm:6,xs:12,children:(0,oe.jsxs)(te.Z,{onClick:function(){return Er((function(e){return 0===e?1:0}))},sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.625,borderRadius:999,cursor:"pointer",bgcolor:me,color:"#fff",fontWeight:800,fontSize:12,boxShadow:"0 6px 18px ".concat(ge(me))},children:[(0,oe.jsx)(v.Z,{sx:{width:22,height:22,bgcolor:"rgba(255,255,255,0.22)",color:"#fff"},children:(0,oe.jsx)(ie.Z5O,{size:12})}),ln||"Role"]})}),(0,oe.jsx)(w.ZP,{item:!0,sm:6,xs:12,children:(0,oe.jsx)(m.Z,{direction:"row",justifyContent:{xs:"flex-start",sm:"flex-end"},spacing:1,flexWrap:"wrap",useFlexGap:!0,children:[{label:"Required",value:br.shifts,color:me},{label:"Assigned",value:br.assigned,color:"#10b981"},{label:"Remaining",value:br.remaining,color:"#ef4444"}].map((function(e){var n;return(0,oe.jsxs)(te.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.625,px:1,py:.5,borderRadius:999,bgcolor:Ze(e.color),border:"1px solid ".concat(je(e.color)),color:e.color,fontSize:11.5,fontWeight:800},children:[e.label,(0,oe.jsx)(te.Z,{sx:{minWidth:22,height:18,px:.5,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:11,fontWeight:800,bgcolor:"#fff",color:e.color,border:"1px solid ".concat(je(e.color))},children:null!==(n=e.value)&&void 0!==n?n:0})]},e.label)}))})})]})]}),(0,oe.jsx)(b.Z,{dividers:!0,children:0===Fn.length?(0,oe.jsx)(oe.Fragment,{children:fe?(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(m.Z,{alignItems:"center",children:(0,oe.jsx)(R.Z,{})})}):(0,oe.jsx)(A.Z,{children:"No Staffs Available"})}):(0,oe.jsx)(T.Z,{children:(0,oe.jsxs)(I.Z,{children:[(0,oe.jsx)(Y.Z,{children:(0,oe.jsxs)(D.Z,{children:[(0,oe.jsx)(k.Z,{children:"#"}),(0,oe.jsx)(k.Z,{children:"Staff"}),(0,oe.jsx)(k.Z,{children:"Category"}),(0,oe.jsx)(k.Z,{children:"Price"}),(0,oe.jsx)(k.Z,{children:"Experience"}),(0,oe.jsx)(k.Z,{children:"Level"}),(0,oe.jsx)(k.Z,{children:"City"}),(0,oe.jsx)(k.Z,{children:"Action"}),(0,oe.jsx)(k.Z,{})]})}),(0,oe.jsx)(M.Z,{children:Fn.map((function(e,n){return(0,oe.jsx)(c.Fragment,{children:(0,oe.jsxs)(D.Z,{sx:{backgroundColor:Nn.find((function(n){return n.userid==e.userid}))?"#f5f5f5":"",":hover":{backgroundColor:Nn.find((function(n){return n.userid==e.userid}))?"#f5f5f5 !important":""}},children:[(0,oe.jsx)(k.Z,{component:"th",scope:"row",padding:"none",children:n+1}),(0,oe.jsx)(k.Z,{align:"left",sx:{paddingLeft:"0px !important"},children:(0,oe.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,justifyContent:"flex-start",children:[(0,oe.jsx)(v.Z,{alt:"",size:"sm",src:"",sx:{width:"25px",height:"25px"}}),(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(A.Z,{variant:"caption",children:e.firstname}),(0,oe.jsx)(A.Z,{variant:"caption",color:"textSecondary",children:e.contactno})]})]})}),(0,oe.jsx)(k.Z,{align:"left",children:(0,oe.jsxs)(m.Z,{direction:"column",alignItems:"flex-start",children:[(0,oe.jsx)(A.Z,{variant:"caption",color:"textSecondary",children:e.cateoryname}),(0,oe.jsx)(z.Z,{label:e.subcategoryname,color:"info",size:"small",variant:"light"})]})}),(0,oe.jsx)(k.Z,{children:e.rolecost}),(0,oe.jsxs)(k.Z,{align:"left",children:[e.experience," Years"]}),(0,oe.jsx)(k.Z,{align:"left",children:(0,oe.jsx)(z.Z,{label:e.levelofexperience,size:"small",color:"primary",variant:"light"})}),(0,oe.jsx)(k.Z,{align:"left",children:e.city}),(0,oe.jsx)(k.Z,{align:"left",children:e.orderdetailid!==hr?(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(H.Z,{disabled:0!==e.orderdetailid,checked:!!Nn.find((function(n){return n.userid==e.userid})),onClick:function(n){if(console.log(br),br.remaining>=0){if(n.target.checked&&0!=br.remaining){var r=Nn;r.push({userid:e.userid,orderdetailid:hr,productid:fr,shiftid:br.shiftid,userrate:br.price,productrate:e.rolecost,firstname:e.firstname}),Bn((0,t.Z)(r));var s=br;s.assigned++,s.remaining=s.shifts-s.assigned,_r((0,i.Z)({},s))}else if(br.assigned!=br.shifts||0===br.remaining&&!n.target.checked){var o=Nn,a=o.findIndex((function(n){return n.userid===e.userid}));o.splice(a,1),Bn((0,t.Z)(o));var c=br;c.assigned--,c.remaining=c.shifts-c.assigned,_r((0,i.Z)({},c))}console.log(Nn)}}})}):(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(z.Z,{label:"Assigned",color:"success",size:"small",sx:{mr:1}}),(0,oe.jsx)(O.Z,{title:"Unassign",children:(0,oe.jsx)(F.Z,{color:"error",onClick:function(){console.log(e),Xr(e)},children:(0,oe.jsx)(ee.Z,{})})}),(0,oe.jsx)(O.Z,{title:"Send Notification",children:(0,oe.jsx)(F.Z,{color:"info",onClick:function(){console.log(e),ei(e)},children:(0,oe.jsx)(g.Z,{})})})]})}),(0,oe.jsx)(k.Z,{children:e.orderid&&(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(z.Z,{label:e.orderid,color:"warning",size:"small",variant:"light"})})})]})},n)}))})]})})}),(0,oe.jsx)(L.Z,{children:(0,oe.jsxs)(m.Z,{sx:{mt:2},direction:"row",justifyContent:"flex-end",spacing:5,children:[Fn.length>0&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(P.Z,{sx:{width:"130px"},variant:"contained",onClick:Jr,children:"OK"}),(0,oe.jsx)(P.Z,{sx:{width:"130px"},color:"warning",variant:"contained",onClick:function(){Bn([]);var e=br;e.remaining=e.shifts,e.assigned=0,_r(e)},children:"clear"})]}),(0,oe.jsx)(P.Z,{sx:{width:"130px"},color:"error",variant:"contained",onClick:function(){$r()},children:"Close"})]})})]}),(0,oe.jsxs)(w.ZP,{container:!0,rowSpacing:2,columnSpacing:2.75,children:[(0,oe.jsx)(se.Z,{elevation:0,sx:{position:"sticky",top:"60px",zIndex:5,mb:2,p:{xs:1.5,sm:2,md:2.5},borderRadius:ce/8,border:"1px solid",borderColor:ue,background:"linear-gradient(135deg, ".concat(Ze(me)," 0%, ").concat(Ze(ve)," 100%)"),boxShadow:le},children:(0,oe.jsxs)(m.Z,{direction:{xs:"column",md:"row"},alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",spacing:{xs:1.5,md:2},children:[(0,oe.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,oe.jsx)(F.Z,{onClick:function(){return history.back()},sx:{bgcolor:"#fff",border:"1px solid ".concat(ue),borderRadius:999,color:de,"&:hover":{bgcolor:Ze(me),borderColor:je(me),color:me}},children:(0,oe.jsx)(ie.KYK,{size:18})}),(0,oe.jsx)(v.Z,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:me,color:"#fff",boxShadow:"0 6px 18px ".concat(ge(me))},children:(0,oe.jsx)(ie.VHP,{size:22})}),(0,oe.jsxs)(m.Z,{children:[(0,oe.jsx)(A.Z,{variant:"h3",sx:{fontWeight:800,color:de,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Order Details"}),(0,oe.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,flexWrap:"wrap",useFlexGap:!0,sx:{mt:.75},children:[(0,oe.jsxs)(te.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:Ze("#f59e0b"),border:"1px solid ".concat(je("#f59e0b")),color:"#f59e0b",fontSize:11,fontWeight:800},children:[(0,oe.jsx)(ie.VHP,{size:11}),""===Ee?(0,oe.jsx)(U.Z,{sx:{width:80},animation:"wave"}):Ee]}),(0,oe.jsxs)(te.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:Ze(me),border:"1px solid ".concat(je(me)),color:me,fontSize:11,fontWeight:800},children:[(0,oe.jsx)(ie.dKE,{size:11}),""===De?(0,oe.jsx)(U.Z,{sx:{width:80},animation:"wave"}):De]}),(0,oe.jsx)(be,{status:sn})]})]})]}),(0,oe.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[("pending"===sn||"assigned"===sn||"confirmed"===sn||"modified"===sn)&&(0,oe.jsx)(O.Z,{title:"Edit",children:(0,oe.jsx)(P.Z,{variant:"outlined",sx:{borderRadius:999,borderColor:je(me),color:me,fontWeight:700,px:2,"&:hover":{borderColor:me,bgcolor:Ze(me),boxShadow:"0 0 0 3px ".concat(ge(me))}},startIcon:(0,oe.jsx)(ie.zmo,{size:16}),onClick:function(e){e.stopPropagation(),Q()(Q()().format("MM-DD-YYYY")).isBefore(Q()(Q()(Or).format("MM-DD-YYYY")))?Ir("/editorder",{state:{orderheaderid:qn,tenantid:$n}}):(0,re.yv)("Order cannot be edited.\n Order date is not valid at this time",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:4e3,style:{whiteSpace:"pre-line"}})},children:"Edit Order"})}),"cancelled"!==sn&&""!==sn&&"completed"!==sn&&"closed"!==sn&&(0,oe.jsx)(P.Z,{variant:"outlined",sx:{borderRadius:999,borderColor:je("#ef4444"),color:"#ef4444",fontWeight:700,px:2,"&:hover":{borderColor:"#ef4444",bgcolor:Ze("#ef4444"),boxShadow:"0 0 0 3px ".concat(ge("#ef4444"))}},onClick:function(){Q()(Or).diff(Q()(),"m")/60>24?(Nr(!1),We(!0)):(Nr(!0),We(!0))},startIcon:(0,oe.jsx)(V.Z,{}),children:"Cancel Order"}),"cancelled"===sn&&(0,oe.jsxs)(te.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1.25,py:.5,borderRadius:999,bgcolor:Ze("#ef4444"),border:"1px solid ".concat(je("#ef4444")),color:"#ef4444",fontSize:12,fontWeight:800},children:[(0,oe.jsx)(ie.B4e,{size:12})," Cancelled on ",Mn]})]})]})}),(0,oe.jsx)(w.ZP,{item:!0,xs:12,sx:{mt:-2},children:(0,oe.jsx)(q.Z,{content:!1,width:"100%",children:(0,oe.jsxs)(w.ZP,{container:!0,spacing:2.5,sx:{p:2.5},children:[(0,oe.jsx)(w.ZP,{item:!0,xs:12,sm:6,children:(0,oe.jsx)(q.Z,{sx:{height:"100%"},children:(0,oe.jsxs)(m.Z,{spacing:1,children:[(0,oe.jsx)(A.Z,{variant:"h5",children:"Client"}),(0,oe.jsx)(A.Z,{color:"secondary",children:""===Ke?(0,oe.jsx)(U.Z,{sx:{width:"40%"},animation:"wave"}):Ke}),(0,oe.jsx)(W.Z,{sx:{width:"100%"},children:(0,oe.jsx)(A.Z,{color:"secondary",children:""===Xe?(0,oe.jsx)(U.Z,{sx:{width:"90%"},animation:"wave"}):Xe})})]})})}),(0,oe.jsx)(w.ZP,{item:!0,xs:12,sm:6,children:(0,oe.jsx)(q.Z,{sx:{height:"100%"},children:(0,oe.jsxs)(m.Z,{spacing:1,children:[(0,oe.jsx)(A.Z,{variant:"h5",children:"Event"}),(0,oe.jsx)(W.Z,{sx:{width:"100%"},children:(0,oe.jsx)(A.Z,{color:"secondary",children:""===He?(0,oe.jsx)(U.Z,{sx:{width:"40%"},animation:"wave"}):He})})]})})}),jr.map((function(e,n){return(0,oe.jsx)(c.Fragment,{children:(0,oe.jsx)(w.ZP,{item:!0,xs:12,children:(0,oe.jsxs)(q.Z,{sx:{opacity:0==e.shiftstatus?"":"0.7"},children:[(0,oe.jsxs)(m.Z,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{md:"center",xs:"flex-start"},spacing:2,sx:{p:2},children:[(0,oe.jsxs)(m.Z,{direction:{xs:"column",md:"row"},spacing:2,alignItems:{md:"center",xs:"flex-start"},children:[(0,oe.jsxs)(A.Z,{variant:"h5",children:["Shift ",n+1]}),(0,oe.jsxs)(A.Z,{color:"secondary",children:[(0,oe.jsx)(x.Z,{})," ","",e.locationaddress]}),1===e.shiftstatus&&(0,oe.jsx)(z.Z,{label:"Cancelled",color:"secondary"})]}),(0,oe.jsx)(m.Z,{direction:"row",spacing:1,children:e.ordercontacts.map((function(e){return(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(O.Z,{title:e.contactname,children:(0,oe.jsx)(v.Z,{sx:{bgcolor:"#2196f3",width:30,height:30},alt:"A",children:e.contactname.charAt(0).toUpperCase()})})})}))})]}),(0,oe.jsx)(T.Z,{children:(0,oe.jsxs)(I.Z,{children:[(0,oe.jsx)(Y.Z,{children:(0,oe.jsxs)(D.Z,{children:[(0,oe.jsx)(k.Z,{children:"#"}),(0,oe.jsx)(k.Z,{children:"Role"}),(0,oe.jsx)(k.Z,{children:"Start Date"}),(0,oe.jsx)(k.Z,{children:"End Date"}),(0,oe.jsx)(k.Z,{children:"Unpaid break"}),(0,oe.jsx)(k.Z,{children:"Count"}),(0,oe.jsx)(k.Z,{children:"Assigned"}),(0,oe.jsx)(k.Z,{children:"Attire"}),(0,oe.jsx)(k.Z,{children:"Price"}),(0,oe.jsx)(k.Z,{children:"Amount"}),(0,oe.jsx)(k.Z,{children:"Action"})]})}),(0,oe.jsxs)(M.Z,{children:[0===e.orderdetails.length&&(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsxs)(D.Z,{children:[(0,oe.jsx)(k.Z,{children:(0,oe.jsx)(U.Z,{animation:"wave"})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsx)(U.Z,{animation:"wave"})}),(0,oe.jsxs)(k.Z,{children:[(0,oe.jsx)(U.Z,{animation:"wave"}),(0,oe.jsx)(U.Z,{animation:"wave"})]}),(0,oe.jsxs)(k.Z,{children:[(0,oe.jsx)(U.Z,{animation:"wave"}),(0,oe.jsx)(U.Z,{animation:"wave"})]}),(0,oe.jsx)(k.Z,{children:(0,oe.jsx)(U.Z,{animation:"wave"})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsx)(U.Z,{animation:"wave"})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsx)(U.Z,{animation:"wave"})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsx)(U.Z,{animation:"wave"})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsx)(U.Z,{animation:"wave"})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsx)(U.Z,{animation:"wave"})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsx)(U.Z,{animation:"wave"})})]})}),e.orderdetails.map((function(e,r){return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(D.Z,{sx:{"&:last-child td, &:last-child th":{border:0},opacity:0==e.status?"":"0.7"},children:[(0,oe.jsx)(k.Z,{children:r+1}),(0,oe.jsx)(k.Z,{children:e.productname}),(0,oe.jsx)(k.Z,{children:(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(A.Z,{variant:"body1",children:Q()(e.starttime).format("MM/DD/YYYY")}),(0,oe.jsx)(A.Z,{variant:"body2",children:Q()(e.starttime).format("hh:mm A")})]})}),(0,oe.jsxs)(k.Z,{children:[" ",(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(A.Z,{variant:"body1",children:Q()(e.endtime).format("MM/DD/YYYY")}),(0,oe.jsx)(A.Z,{variant:"body2",children:Q()(e.endtime).format("hh:mm A")})]})]}),(0,oe.jsx)(k.Z,{children:e.unpaidbreak||0}),(0,oe.jsx)(k.Z,{align:"center",children:(0,oe.jsx)(z.Z,{label:e.orderqty,color:"success",variant:"light",size:"small"})}),(0,oe.jsx)(k.Z,{align:"center",children:(0,oe.jsx)(z.Z,{label:e.supplyqty,color:0===e.supplyqty?"error":"warning",variant:"light",size:"small"})}),(0,oe.jsx)(k.Z,{width:"100px"}),(0,oe.jsxs)(k.Z,{children:["$",e.price]}),(0,oe.jsxs)(k.Z,{children:["$",e.landingamount]}),(0,oe.jsx)(k.Z,{children:(0,oe.jsxs)(m.Z,{direction:"row",children:[(0,oe.jsx)(O.Z,{title:"Expand",children:(0,oe.jsx)(F.Z,{"aria-label":"expand row",style:{color:Br.palette.primary.main},onClick:function(){Ln([]),Mr(kr[0]===n&&kr[1]===r?["",""]:[n,r]),qr(e.orderdetailid)},children:kr[0]===n&&kr[1]===r?(0,oe.jsx)(p.Z,{}):(0,oe.jsx)(f.Z,{})})}),"cancelled"===sn&&(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(F.Z,{sx:{minWidth:"10px !important"},disabled:!0,children:(0,oe.jsx)(h.Z,{})})}),1===e.status&&(0,oe.jsx)(O.Z,{title:"Cancelled",children:(0,oe.jsx)(F.Z,{sx:{minWidth:"10px !important"},children:(0,oe.jsx)(V.Z,{color:"error"})})}),e.supplyqty>e.orderqty&&(0,oe.jsx)(O.Z,{title:"Assigned count is greater than ordered count",children:(0,oe.jsx)(F.Z,{color:"warning",children:(0,oe.jsx)(ne.Z,{})})})]})})]},r+1),(0,oe.jsx)(D.Z,{sx:{p:2},children:(0,oe.jsx)(k.Z,{style:{paddingBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0},colSpan:11,sx:{width:"100%"},children:(0,oe.jsx)(N.Z,{in:kr[0]===n&&kr[1]===r,timeout:"auto",unmountOnExit:!0,children:(0,oe.jsx)(q.Z,{sx:{width:"100%"},children:0===Fn.length?(0,oe.jsx)(oe.Fragment,{children:fe?(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(m.Z,{alignItems:"center",children:(0,oe.jsx)(R.Z,{})})}):(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(m.Z,{sx:{p:1},children:(0,oe.jsx)(A.Z,{children:"No Staffs has been Assigned"})})})}):(0,oe.jsx)(T.Z,{children:(0,oe.jsxs)(I.Z,{children:[(0,oe.jsx)(Y.Z,{children:(0,oe.jsxs)(D.Z,{children:[(0,oe.jsx)(k.Z,{children:"#"}),(0,oe.jsx)(k.Z,{children:"Staff"}),(0,oe.jsx)(k.Z,{children:"Start Time"}),(0,oe.jsx)(k.Z,{children:"End Time"}),(0,oe.jsx)(k.Z,{children:"Pay Rate"}),(0,oe.jsx)(k.Z,{align:"center",children:"Clockin"}),(0,oe.jsx)(k.Z,{align:"center",children:"Clockout"}),(0,oe.jsx)(k.Z,{children:"Hours Worked"}),(0,oe.jsx)(k.Z,{children:"Status"})]})}),(0,oe.jsx)(M.Z,{children:Fn.map((function(e,n){return(0,oe.jsx)(c.Fragment,{children:(0,oe.jsxs)(D.Z,{sx:{},children:[(0,oe.jsx)(k.Z,{component:"th",scope:"row",padding:"none",children:n+1}),(0,oe.jsx)(k.Z,{align:"left",children:(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(A.Z,{variant:"caption",children:e.staffname}),(0,oe.jsx)(w.ZP,{children:(0,oe.jsx)(z.Z,{label:e.productname,color:"info",variant:"light",size:"small"})})]})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(A.Z,{variant:"body2",children:Q()(e.Starttime).format("MM/DD/YYYY")}),(0,oe.jsx)(A.Z,{variant:"caption",children:Q()(e.Starttime).format("hh:mm A")})]})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(A.Z,{variant:"body2",children:Q()(e.Endtime).format("MM/DD/YYYY")}),(0,oe.jsx)(A.Z,{variant:"caption",children:Q()(e.Endtime).format("hh:mm A")})]})}),(0,oe.jsx)(k.Z,{children:e.rolecost}),(0,oe.jsx)(k.Z,{children:(0,oe.jsxs)(m.Z,{spacing:.5,alignItems:"center",children:[(0,oe.jsx)(z.Z,{label:e.clockin?Q()(e.clockin).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,oe.jsx)(z.Z,{label:e.clockin?Q()(e.clockin).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,oe.jsx)(k.Z,{children:(0,oe.jsxs)(m.Z,{spacing:.5,alignItems:"center",children:[(0,oe.jsx)(z.Z,{label:e.clockout?Q()(e.clockout).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,oe.jsx)(z.Z,{label:e.clockout?Q()(e.clockout).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,oe.jsx)(k.Z,{children:e.hoursworked}),(0,oe.jsx)(k.Z,{align:"left",children:(0,oe.jsxs)(m.Z,{direction:"row",children:["pending"===e.orderstatus&&(0,oe.jsx)(z.Z,{label:"Pending",color:"error",size:"small"}),"cancelled"===e.orderstatus&&(0,oe.jsx)(z.Z,{label:"Cancelled",color:"secondary",size:"small"}),"completed"===e.orderstatus&&(0,oe.jsx)(z.Z,{label:"Completed",color:"primary",size:"small"}),"processing"===e.orderstatus&&(0,oe.jsx)(z.Z,{label:"Processing",color:"primary",size:"small"}),"assigned"===e.orderstatus&&(0,oe.jsx)(z.Z,{label:"Assigned",color:"warning",size:"small"}),"confirmed"===e.orderstatus&&(0,oe.jsx)(z.Z,{label:"Confirmed",color:"success",size:"small"}),"active"===e.orderstatus&&(0,oe.jsx)(z.Z,{label:"Active",color:"info",size:"small"}),"closed"===e.orderstatus&&(0,oe.jsx)(z.Z,{label:"Closed",color:"info",size:"small"})]})})]})},n)}))})]})})})})})})]})}))]})]})})]})})},e.locationaddress)})),(0,oe.jsx)(w.ZP,{item:!0,xs:12,children:(0,oe.jsx)(B.Z,{sx:{borderWidth:1}})}),(0,oe.jsx)(w.ZP,{item:!0,xs:12,sm:6,children:(0,oe.jsx)(q.Z,{title:"Order Addons",sx:{height:"100%"},children:(0,oe.jsx)(w.ZP,{container:!0,spacing:2,children:(yn||[]).map((function(e){return(0,oe.jsx)(c.Fragment,{children:(0,oe.jsx)(w.ZP,{item:!0,children:(0,oe.jsx)(z.Z,{icon:(0,oe.jsx)(u.Z,{}),variant:"outlined",color:"error",label:e.addon})})},e.addon)}))})})}),(0,oe.jsx)(w.ZP,{item:!0,xs:12,sm:6,children:(0,oe.jsx)(q.Z,{title:"Total",sx:{height:"100%"},children:(0,oe.jsxs)(m.Z,{spacing:2,children:[(0,oe.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,oe.jsx)(A.Z,{color:Br.palette.grey[500],children:"Sub Total:"}),(0,oe.jsxs)(A.Z,{children:["$",""===Zn?(0,oe.jsx)(U.Z,{sx:{width:"30px"}}):Zn]})]}),(0,oe.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,oe.jsx)(A.Z,{color:Br.palette.grey[500],children:"Tax:"}),(0,oe.jsx)(A.Z,{children:""===hn?(0,oe.jsx)(U.Z,{sx:{width:"30px"}}):hn})]}),(0,oe.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,oe.jsx)(A.Z,{variant:"subtitle1",children:"Grand Total:"}),(0,oe.jsx)(A.Z,{variant:"subtitle1",children:""===vn?(0,oe.jsx)(U.Z,{sx:{width:"30px"}}):"$".concat(vn)})]})]})})}),(0,oe.jsx)(w.ZP,{item:!0,xs:12,children:(0,oe.jsxs)(m.Z,{direction:"column",sx:{mt:2},children:[(0,oe.jsx)(A.Z,{color:"secondary",children:"Other Instructions:"}),(0,oe.jsx)(A.Z,{sx:{ml:3},children:In})]})})]})})})]})]})}}}]);