1 line
35 KiB
JavaScript
1 line
35 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),f=r(76035),Z=r(58873),p=r(26446),g=r(10165),j=r(94469),m=r(42832),b=r(48119),v=r(61113),w=r(96467),y=r(99881),S=r(33249),Y=r(90891),C=r(16783),k=r(69099),D=r(33604),z=r(9019),I=r(85281),M=r(51629),A=r(66835),H=r(23477),W=r(24076),P=r(67478),R=r(57861),T=r(66212),F=r(44758),O=r(61689),E=r(47131),_=r(4117),L=r(84488),N=r(1550),U=r(65033),K=r(19536),B=r(43909),q=r(25718),G=r(97316),V=r(11577),$=r(10658),J=r.n($),Q=r(19860),X=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);J().extend(ae);var ce=16,le="0 8px 24px rgba(15, 23, 42, 0.08)",de="#0f172a",xe="#64748b",he="#94a3b8",ue="#e2e8f0",fe="#f8fafc",Ze=function(e,n){return"".concat(e).concat(n)},pe=function(e){return Ze(e,"08")},ge=function(e){return Ze(e,"26")},je=function(e){return Ze(e,"55")},me="#662582",be="#9255AB",ve={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}},we=function(e){var n=e.status,r=e.size,i=void 0===r?"md":r;if(!n)return null;var t=ve[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:pe(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],$=n[1],ae=(0,c.useState)(!0),he=(0,a.Z)(ae,2),Ze=he[0],ve=he[1],ye=(0,l.TH)(),Se=(0,c.useState)(""),Ye=(0,a.Z)(Se,2),Ce=Ye[0],ke=Ye[1],De=(0,c.useState)(""),ze=(0,a.Z)(De,2),Ie=ze[0],Me=ze[1],Ae=(0,c.useState)(""),He=(0,a.Z)(Ae,2),We=He[0],Pe=He[1],Re=(0,c.useState)(""),Te=(0,a.Z)(Re,2),Fe=Te[0],Oe=Te[1],Ee=(0,c.useState)(!1),_e=(0,a.Z)(Ee,2),Le=_e[0],Ne=_e[1],Ue=(0,c.useState)(""),Ke=(0,a.Z)(Ue,2),Be=Ke[0],qe=Ke[1],Ge=(0,c.useState)(""),Ve=(0,a.Z)(Ge,2),$e=Ve[0],Je=Ve[1],Qe=(0,c.useState)(!1),Xe=(0,a.Z)(Qe,2),en=Xe[0],nn=Xe[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],fn=(0,c.useState)(""),Zn=(0,a.Z)(fn,2),pn=Zn[0],gn=Zn[1],jn=(0,c.useState)(""),mn=(0,a.Z)(jn,2),bn=mn[0],vn=mn[1],wn=(0,c.useState)(""),yn=(0,a.Z)(wn,2),Sn=yn[0],Yn=yn[1],Cn=(0,c.useState)([]),kn=(0,a.Z)(Cn,2),Dn=kn[0],zn=kn[1],In=(0,c.useState)(""),Mn=(0,a.Z)(In,2),An=Mn[0],Hn=Mn[1],Wn=(0,c.useState)(""),Pn=(0,a.Z)(Wn,2),Rn=Pn[0],Tn=Pn[1],Fn=(0,c.useState)([]),On=(0,a.Z)(Fn,2),En=On[0],_n=On[1],Ln=(0,c.useState)([]),Nn=(0,a.Z)(Ln,2),Un=Nn[0],Kn=Nn[1],Bn=(0,c.useState)(""),qn=(0,a.Z)(Bn,2),Gn=qn[0],Vn=qn[1],$n=(0,c.useState)(""),Jn=(0,a.Z)($n,2),Qn=Jn[0],Xn=Jn[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)("")),fr=(0,a.Z)(ur,2),Zr=fr[0],pr=(fr[1],(0,c.useState)([])),gr=(0,a.Z)(pr,2),jr=gr[0],mr=gr[1],br=(0,c.useState)({shifts:0,assigned:0,remaining:0,shiftid:0,price:0}),vr=(0,a.Z)(br,2),wr=vr[0],yr=vr[1],Sr=(0,c.useState)(0),Yr=(0,a.Z)(Sr,2),Cr=(Yr[0],Yr[1]),kr=(0,l.TH)().state,Dr=(0,c.useState)(""),zr=(0,a.Z)(Dr,2),Ir=zr[0],Mr=zr[1],Ar=(0,l.s0)(),Hr=(0,c.useState)(["",""]),Wr=(0,a.Z)(Hr,2),Pr=Wr[0],Rr=Wr[1],Tr=(0,c.useState)(""),Fr=(0,a.Z)(Tr,2),Or=Fr[0],Er=Fr[1],_r=(0,c.useState)(!1),Lr=(0,a.Z)(_r,2),Nr=Lr[0],Ur=Lr[1];(0,c.useEffect)((function(){console.log("categoryarr"),console.log(r,Ie,Sn,rr,sr)}),[jr]),(0,c.useEffect)((function(){kr&&(Vn(kr.orderheaderid),Xn(kr.tenantid)),console.log(kr),console.log(Date.now())}),[]),(0,c.useEffect)((function(){kr&&(Vn(kr.orderheaderid),Xn(kr.tenantid)),console.log(kr),console.log(Date.now())}),[kr.orderheaderid,kr.tenantid]);var Kr=(0,Q.Z)(),Br=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 ve(!0),e.next=3,d.Z.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getordersbystatus?tenantid=").concat(Qn)).then((function(e){console.log(e);var n=e.data.Details.find((function(e){return e.orderheaderid==Gn}));console.log("result"),console.log(n),zn(n.orderaddons),Yn(n.venuetype),Hn(n.remarks),Er(n.startdate),qe(n.tenantname),Me(""),Je(n.tenantaddress),Oe(n.eventname),Pe(J()(n.orderdate).format("MM/DD/YYYY")||""),ke(n.orderid),on(n.orderstatus),un(n.taxamount),gn(n.orderamount),vn(n.ordervalue),Tn(J()(n.cancelled).format("MM/DD/YYYY")||""),lr(n.pending),ve(!1)})).catch((function(e){console.log(e),ve(!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(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ve(!0),e.next=3,d.Z.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getorderdetails?orderheaderid=").concat(Gn)).then((function(e){console.log("res"),console.log(e),$(e.data.Details||[]),console.log("categoryarr"),mr(e.data.Details),console.log(e.data.Details),ve(!1)})).catch((function(e){console.log(e),ve(!1)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Gr=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 ve(!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&&_n(e.data.Details),ve(!1)})).catch((function(e){console.log(e),ve(!1)}));case 4:e.next=10;break;case 6:e.prev=6,e.t0=e.catch(1),console.log(e.t0),ve(!1);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(n){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 e.next=2,d.Z.put("".concat("https://jupiter.nearle.app/live/api/v2","/orders/cancel"),{orderheaderid:parseInt(Gn),orderstatus:"cancelled",cancelled:J()().format("YYYY-MM-DD HH:mm:ss"),unserviceable:Nr?0:1}).then((function(e){console.log(e),e.data.status&&Gn&&Qn&&(Br(),qr())})).catch((function(e){console.log(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$r=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:Gn,orderprocessid:n.orderprocessid,orderdetailid:n.orderdetailid,orderstatus:"pending",pending:J()().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}),wr.assigned>wr.shifts&&Jr(n),Br(),qr(),Ne(!1),ri(),Qr(),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)}}(),Jr=function(e){console.log(e);var n=[e.userfcmtoken],r={notifications:[{notificationid:0,notificationdate:J()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Un-Asigned",message:"".concat(e.firstname," has been Un-assigned to the order ").concat(Ce),configid:2,tenantid:Qn,orderheaderid:Gn,orderprocessid:e.orderprocessid,shiftid:e.shiftid,userid:e.userid,orderid:Ce,success:0,orderstatus:"assigned",processing:J()().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(Ce),tenantid:Qn,orderheaderid:Gn,orderid:Ce,configid:2},notification:{body:"An order has been Un-assigned ".concat(Ce),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(Gn),Gn&&Qn?(Br(),qr(),ri(),console.log(ye.state||"")):ve(!1),console.log(Gn,Qn)}),[Gn,Qn,Ir]);var Qr=function(){nn(!1),Kn([]),Rr(["",""])};(0,c.useEffect)((function(){console.log(wr)}));var Xr=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=[],Un.map((function(e){n.push({orderprocessid:0,processdate:J()().format("YYYY-MM-DD HH:mm:ss"),tenantid:Qn,orderheaderid:Gn,orderdetailid:e.orderdetailid,productid:e.productid,userid:e.userid,orderstatus:"pending",pending:"".concat(J()(cr).format("YYYY-MM-DD")," ").concat(J()(cr).format("HH:mm:ss")),starttime:"".concat(J()(rr).format("YYYY-MM-DD")," ").concat(J()(rr).format("HH:mm:ss")),endtime:"".concat(J()(sr).format("YYYY-MM-DD")," ").concat(J()(sr).format("HH:mm:ss")),appuserid:parseInt(localStorage.getItem("appuserid")),shiftid:e.shiftid,userrate:e.userrate,productrate:e.productrate}),Un.map((function(e){r.push({notificationid:0,notificationdate:J()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Asigned",message:"A Staff has been assigned to the order ".concat(Ce),configid:2,tenantid:Qn,orderheaderid:Gn,orderprocessid:0,shiftid:e.shiftid,userid:e.userid,orderid:Ce,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(Zr,"","",Gn,r[0].shiftid),nn(!1),qr(),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:J()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Asigned",message:"A Staff has been assigned to the order ".concat(Ce),configid:2,tenantid:Qn,orderheaderid:Gn,orderprocessid:n.orderprocessid,shiftid:n.shiftid,userid:n.userid,orderid:Ce,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(Ce),title:"Legendary",sound:"ring",content_available:!0}},{headers:{Authorization:"Bearer ".concat("")}}).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("")}}).then((function(e){console.log(e),e.data.status&&((0,re.yv)("Notification sent successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),Br())})).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(Gn)).then((function(e){e.data.status?(console.log(e),Mr(e.data.pendingcount),Br()):(Mr(e.data.pendingcount),Br())})).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(pe("#ef4444")," 0%, ").concat(pe("#f59e0b")," 100%)"),borderBottom:"1px solid ".concat(ue)},children:(0,oe.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,oe.jsx)(b.Z,{sx:{bgcolor:"#ef4444",color:"#fff",width:40,height:40},children:(0,oe.jsx)(p.Z,{})}),(0,oe.jsxs)(m.Z,{children:[(0,oe.jsx)(v.Z,{variant:"h5",sx:{fontWeight:800,color:de},children:"Cancel Order"}),(0,oe.jsx)(v.Z,{variant:"caption",sx:{color:xe,fontWeight:600},children:"Confirm to permanently cancel this order"})]})]})}),(0,oe.jsx)(w.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:pe("#f59e0b"),border:"1px solid ".concat(je("#f59e0b")),color:"#f59e0b",fontSize:12,fontWeight:800},children:[(0,oe.jsx)(ie.VHP,{size:12})," ",Ce.slice(4)]}),Nr&&(0,oe.jsxs)(y.Z,{color:"warning",variant:"border",icon:(0,oe.jsx)(X.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)(Y.Z,{href:"https://thelegendarystaff.com/",target:"_blank",children:"Terms & Condition link"})]}),(0,oe.jsx)(v.Z,{variant:"body1",align:"center",sx:{color:xe,fontWeight:600},children:"Please type in the order number to confirm."}),(0,oe.jsx)(C.Z,{type:"text",fullWidth:!0,onChange:function(e){return o(e.target.value)},error:s!==Ce.slice(4),value:s,placeholder:Ce.slice(4)}),(0,oe.jsxs)(m.Z,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,oe.jsx)(k.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:fe}},children:"No"}),(0,oe.jsx)(k.Z,{fullWidth:!0,variant:"contained",autoFocus:!0,onClick:function(){s===Ce.slice(4)&&(Vr(),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:[Ze&&(0,oe.jsx)(V.Z,{}),(0,oe.jsx)(ii,{open:Le,handleClose:function(){Ne(!1)}}),(0,oe.jsxs)(j.Z,{maxWidth:!1,fullWidth:!0,open:en,onClose:Qr,scroll:"paper",TransitionComponent:B.S,children:[(0,oe.jsxs)(D.Z,{sx:{background:"linear-gradient(135deg, ".concat(pe(me)," 0%, ").concat(pe(be)," 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)(b.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)(v.Z,{variant:"h4",sx:{fontWeight:800,color:de,lineHeight:1.1},children:"Assign Roles"}),(0,oe.jsxs)(v.Z,{variant:"caption",sx:{color:xe,fontWeight:600},children:[Be," \xb7 ",ln]})]})]}),(0,oe.jsxs)(te.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1.25,py:.5,borderRadius:999,bgcolor:pe("#f59e0b"),border:"1px solid ".concat(je("#f59e0b")),color:"#f59e0b",fontSize:12,fontWeight:800},children:[(0,oe.jsx)(ie.VHP,{size:12})," ",Ce]})]}),(0,oe.jsxs)(z.ZP,{container:!0,sx:{pt:2},spacing:1.5,children:[(0,oe.jsx)(z.ZP,{item:!0,sm:6,xs:12,children:(0,oe.jsxs)(te.Z,{onClick:function(){return Cr((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)(b.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)(z.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:wr.shifts,color:me},{label:"Assigned",value:wr.assigned,color:"#10b981"},{label:"Remaining",value:wr.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:pe(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)(w.Z,{dividers:!0,children:0===En.length?(0,oe.jsx)(oe.Fragment,{children:Ze?(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(m.Z,{alignItems:"center",children:(0,oe.jsx)(I.Z,{})})}):(0,oe.jsx)(v.Z,{children:"No Staffs Available"})}):(0,oe.jsx)(M.Z,{children:(0,oe.jsxs)(A.Z,{children:[(0,oe.jsx)(H.Z,{children:(0,oe.jsxs)(W.Z,{children:[(0,oe.jsx)(P.Z,{children:"#"}),(0,oe.jsx)(P.Z,{children:"Staff"}),(0,oe.jsx)(P.Z,{children:"Category"}),(0,oe.jsx)(P.Z,{children:"Price"}),(0,oe.jsx)(P.Z,{children:"Experience"}),(0,oe.jsx)(P.Z,{children:"Level"}),(0,oe.jsx)(P.Z,{children:"City"}),(0,oe.jsx)(P.Z,{children:"Action"}),(0,oe.jsx)(P.Z,{})]})}),(0,oe.jsx)(R.Z,{children:En.map((function(e,n){return(0,oe.jsx)(c.Fragment,{children:(0,oe.jsxs)(W.Z,{sx:{backgroundColor:Un.find((function(n){return n.userid==e.userid}))?"#f5f5f5":"",":hover":{backgroundColor:Un.find((function(n){return n.userid==e.userid}))?"#f5f5f5 !important":""}},children:[(0,oe.jsx)(P.Z,{component:"th",scope:"row",padding:"none",children:n+1}),(0,oe.jsx)(P.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)(b.Z,{alt:"",size:"sm",src:"",sx:{width:"25px",height:"25px"}}),(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(v.Z,{variant:"caption",children:e.firstname}),(0,oe.jsx)(v.Z,{variant:"caption",color:"textSecondary",children:e.contactno})]})]})}),(0,oe.jsx)(P.Z,{align:"left",children:(0,oe.jsxs)(m.Z,{direction:"column",alignItems:"flex-start",children:[(0,oe.jsx)(v.Z,{variant:"caption",color:"textSecondary",children:e.cateoryname}),(0,oe.jsx)(T.Z,{label:e.subcategoryname,color:"info",size:"small",variant:"light"})]})}),(0,oe.jsx)(P.Z,{children:e.rolecost}),(0,oe.jsxs)(P.Z,{align:"left",children:[e.experience," Years"]}),(0,oe.jsx)(P.Z,{align:"left",children:(0,oe.jsx)(T.Z,{label:e.levelofexperience,size:"small",color:"primary",variant:"light"})}),(0,oe.jsx)(P.Z,{align:"left",children:e.city}),(0,oe.jsx)(P.Z,{align:"left",children:e.orderdetailid!==hr?(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(F.Z,{disabled:0!==e.orderdetailid,checked:!!Un.find((function(n){return n.userid==e.userid})),onClick:function(n){if(console.log(wr),wr.remaining>=0){if(n.target.checked&&0!=wr.remaining){var r=Un;r.push({userid:e.userid,orderdetailid:hr,productid:Zr,shiftid:wr.shiftid,userrate:wr.price,productrate:e.rolecost,firstname:e.firstname}),Kn((0,t.Z)(r));var s=wr;s.assigned++,s.remaining=s.shifts-s.assigned,yr((0,i.Z)({},s))}else if(wr.assigned!=wr.shifts||0===wr.remaining&&!n.target.checked){var o=Un,a=o.findIndex((function(n){return n.userid===e.userid}));o.splice(a,1),Kn((0,t.Z)(o));var c=wr;c.assigned--,c.remaining=c.shifts-c.assigned,yr((0,i.Z)({},c))}console.log(Un)}}})}):(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(T.Z,{label:"Assigned",color:"success",size:"small",sx:{mr:1}}),(0,oe.jsx)(O.Z,{title:"Unassign",children:(0,oe.jsx)(E.Z,{color:"error",onClick:function(){console.log(e),$r(e)},children:(0,oe.jsx)(ee.Z,{})})}),(0,oe.jsx)(O.Z,{title:"Send Notification",children:(0,oe.jsx)(E.Z,{color:"info",onClick:function(){console.log(e),ei(e)},children:(0,oe.jsx)(g.Z,{})})})]})}),(0,oe.jsx)(P.Z,{children:e.orderid&&(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(T.Z,{label:e.orderid,color:"warning",size:"small",variant:"light"})})})]})},n)}))})]})})}),(0,oe.jsx)(_.Z,{children:(0,oe.jsxs)(m.Z,{sx:{mt:2},direction:"row",justifyContent:"flex-end",spacing:5,children:[En.length>0&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(k.Z,{sx:{width:"130px"},variant:"contained",onClick:Xr,children:"OK"}),(0,oe.jsx)(k.Z,{sx:{width:"130px"},color:"warning",variant:"contained",onClick:function(){Kn([]);var e=wr;e.remaining=e.shifts,e.assigned=0,yr(e)},children:"clear"})]}),(0,oe.jsx)(k.Z,{sx:{width:"130px"},color:"error",variant:"contained",onClick:function(){Qr()},children:"Close"})]})})]}),(0,oe.jsxs)(z.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(pe(me)," 0%, ").concat(pe(be)," 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)(E.Z,{onClick:function(){return history.back()},sx:{bgcolor:"#fff",border:"1px solid ".concat(ue),borderRadius:999,color:de,"&:hover":{bgcolor:pe(me),borderColor:je(me),color:me}},children:(0,oe.jsx)(ie.KYK,{size:18})}),(0,oe.jsx)(b.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)(v.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:pe("#f59e0b"),border:"1px solid ".concat(je("#f59e0b")),color:"#f59e0b",fontSize:11,fontWeight:800},children:[(0,oe.jsx)(ie.VHP,{size:11}),""===Ce?(0,oe.jsx)(L.Z,{sx:{width:80},animation:"wave"}):Ce]}),(0,oe.jsxs)(te.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:pe(me),border:"1px solid ".concat(je(me)),color:me,fontSize:11,fontWeight:800},children:[(0,oe.jsx)(ie.dKE,{size:11}),""===We?(0,oe.jsx)(L.Z,{sx:{width:80},animation:"wave"}):We]}),(0,oe.jsx)(we,{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)(k.Z,{variant:"outlined",sx:{borderRadius:999,borderColor:je(me),color:me,fontWeight:700,px:2,"&:hover":{borderColor:me,bgcolor:pe(me),boxShadow:"0 0 0 3px ".concat(ge(me))}},startIcon:(0,oe.jsx)(ie.zmo,{size:16}),onClick:function(e){e.stopPropagation(),J()(J()().format("MM-DD-YYYY")).isBefore(J()(J()(Or).format("MM-DD-YYYY")))?Ar("/editorder",{state:{orderheaderid:Gn,tenantid:Qn}}):(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)(k.Z,{variant:"outlined",sx:{borderRadius:999,borderColor:je("#ef4444"),color:"#ef4444",fontWeight:700,px:2,"&:hover":{borderColor:"#ef4444",bgcolor:pe("#ef4444"),boxShadow:"0 0 0 3px ".concat(ge("#ef4444"))}},onClick:function(){J()(Or).diff(J()(),"m")/60>24?(Ur(!1),Ne(!0)):(Ur(!0),Ne(!0))},startIcon:(0,oe.jsx)(q.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:pe("#ef4444"),border:"1px solid ".concat(je("#ef4444")),color:"#ef4444",fontSize:12,fontWeight:800},children:[(0,oe.jsx)(ie.B4e,{size:12})," Cancelled on ",Rn]})]})]})}),(0,oe.jsx)(z.ZP,{item:!0,xs:12,sx:{mt:-2},children:(0,oe.jsx)(G.Z,{content:!1,width:"100%",children:(0,oe.jsxs)(z.ZP,{container:!0,spacing:2.5,sx:{p:2.5},children:[(0,oe.jsx)(z.ZP,{item:!0,xs:12,sm:6,children:(0,oe.jsx)(G.Z,{sx:{height:"100%"},children:(0,oe.jsxs)(m.Z,{spacing:1,children:[(0,oe.jsx)(v.Z,{variant:"h5",children:"Client"}),(0,oe.jsx)(v.Z,{color:"secondary",children:""===Be?(0,oe.jsx)(L.Z,{sx:{width:"40%"},animation:"wave"}):Be}),(0,oe.jsx)(N.Z,{sx:{width:"100%"},children:(0,oe.jsx)(v.Z,{color:"secondary",children:""===$e?(0,oe.jsx)(L.Z,{sx:{width:"90%"},animation:"wave"}):$e})})]})})}),(0,oe.jsx)(z.ZP,{item:!0,xs:12,sm:6,children:(0,oe.jsx)(G.Z,{sx:{height:"100%"},children:(0,oe.jsxs)(m.Z,{spacing:1,children:[(0,oe.jsx)(v.Z,{variant:"h5",children:"Event"}),(0,oe.jsx)(N.Z,{sx:{width:"100%"},children:(0,oe.jsx)(v.Z,{color:"secondary",children:""===Fe?(0,oe.jsx)(L.Z,{sx:{width:"40%"},animation:"wave"}):Fe})})]})})}),jr.map((function(e,n){return(0,oe.jsx)(c.Fragment,{children:(0,oe.jsx)(z.ZP,{item:!0,xs:12,children:(0,oe.jsxs)(G.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)(v.Z,{variant:"h5",children:["Shift ",n+1]}),(0,oe.jsxs)(v.Z,{color:"secondary",children:[(0,oe.jsx)(x.Z,{})," ","",e.locationaddress]}),1===e.shiftstatus&&(0,oe.jsx)(T.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)(b.Z,{sx:{bgcolor:"#2196f3",width:30,height:30},alt:"A",children:e.contactname.charAt(0).toUpperCase()})})})}))})]}),(0,oe.jsx)(M.Z,{children:(0,oe.jsxs)(A.Z,{children:[(0,oe.jsx)(H.Z,{children:(0,oe.jsxs)(W.Z,{children:[(0,oe.jsx)(P.Z,{children:"#"}),(0,oe.jsx)(P.Z,{children:"Role"}),(0,oe.jsx)(P.Z,{children:"Start Date"}),(0,oe.jsx)(P.Z,{children:"End Date"}),(0,oe.jsx)(P.Z,{children:"Unpaid break"}),(0,oe.jsx)(P.Z,{children:"Count"}),(0,oe.jsx)(P.Z,{children:"Assigned"}),(0,oe.jsx)(P.Z,{children:"Attire"}),(0,oe.jsx)(P.Z,{children:"Price"}),(0,oe.jsx)(P.Z,{children:"Amount"}),(0,oe.jsx)(P.Z,{children:"Action"})]})}),(0,oe.jsxs)(R.Z,{children:[0===e.orderdetails.length&&(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsxs)(W.Z,{children:[(0,oe.jsx)(P.Z,{children:(0,oe.jsx)(L.Z,{animation:"wave"})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsx)(L.Z,{animation:"wave"})}),(0,oe.jsxs)(P.Z,{children:[(0,oe.jsx)(L.Z,{animation:"wave"}),(0,oe.jsx)(L.Z,{animation:"wave"})]}),(0,oe.jsxs)(P.Z,{children:[(0,oe.jsx)(L.Z,{animation:"wave"}),(0,oe.jsx)(L.Z,{animation:"wave"})]}),(0,oe.jsx)(P.Z,{children:(0,oe.jsx)(L.Z,{animation:"wave"})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsx)(L.Z,{animation:"wave"})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsx)(L.Z,{animation:"wave"})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsx)(L.Z,{animation:"wave"})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsx)(L.Z,{animation:"wave"})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsx)(L.Z,{animation:"wave"})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsx)(L.Z,{animation:"wave"})})]})}),e.orderdetails.map((function(e,r){return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(W.Z,{sx:{"&:last-child td, &:last-child th":{border:0},opacity:0==e.status?"":"0.7"},children:[(0,oe.jsx)(P.Z,{children:r+1}),(0,oe.jsx)(P.Z,{children:e.productname}),(0,oe.jsx)(P.Z,{children:(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(v.Z,{variant:"body1",children:J()(e.starttime).format("MM/DD/YYYY")}),(0,oe.jsx)(v.Z,{variant:"body2",children:J()(e.starttime).format("hh:mm A")})]})}),(0,oe.jsxs)(P.Z,{children:[" ",(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(v.Z,{variant:"body1",children:J()(e.endtime).format("MM/DD/YYYY")}),(0,oe.jsx)(v.Z,{variant:"body2",children:J()(e.endtime).format("hh:mm A")})]})]}),(0,oe.jsx)(P.Z,{children:e.unpaidbreak||0}),(0,oe.jsx)(P.Z,{align:"center",children:(0,oe.jsx)(T.Z,{label:e.orderqty,color:"success",variant:"light",size:"small"})}),(0,oe.jsx)(P.Z,{align:"center",children:(0,oe.jsx)(T.Z,{label:e.supplyqty,color:0===e.supplyqty?"error":"warning",variant:"light",size:"small"})}),(0,oe.jsx)(P.Z,{width:"100px"}),(0,oe.jsxs)(P.Z,{children:["$",e.price]}),(0,oe.jsxs)(P.Z,{children:["$",e.landingamount]}),(0,oe.jsx)(P.Z,{children:(0,oe.jsxs)(m.Z,{direction:"row",children:[(0,oe.jsx)(O.Z,{title:"Expand",children:(0,oe.jsx)(E.Z,{"aria-label":"expand row",style:{color:Kr.palette.primary.main},onClick:function(){_n([]),Rr(Pr[0]===n&&Pr[1]===r?["",""]:[n,r]),Gr(e.orderdetailid)},children:Pr[0]===n&&Pr[1]===r?(0,oe.jsx)(f.Z,{}):(0,oe.jsx)(Z.Z,{})})}),"cancelled"===sn&&(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(E.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)(E.Z,{sx:{minWidth:"10px !important"},children:(0,oe.jsx)(q.Z,{color:"error"})})}),e.supplyqty>e.orderqty&&(0,oe.jsx)(O.Z,{title:"Assigned count is greater than ordered count",children:(0,oe.jsx)(E.Z,{color:"warning",children:(0,oe.jsx)(ne.Z,{})})})]})})]},r+1),(0,oe.jsx)(W.Z,{sx:{p:2},children:(0,oe.jsx)(P.Z,{style:{paddingBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0},colSpan:11,sx:{width:"100%"},children:(0,oe.jsx)(U.Z,{in:Pr[0]===n&&Pr[1]===r,timeout:"auto",unmountOnExit:!0,children:(0,oe.jsx)(G.Z,{sx:{width:"100%"},children:0===En.length?(0,oe.jsx)(oe.Fragment,{children:Ze?(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(m.Z,{alignItems:"center",children:(0,oe.jsx)(I.Z,{})})}):(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(m.Z,{sx:{p:1},children:(0,oe.jsx)(v.Z,{children:"No Staffs has been Assigned"})})})}):(0,oe.jsx)(M.Z,{children:(0,oe.jsxs)(A.Z,{children:[(0,oe.jsx)(H.Z,{children:(0,oe.jsxs)(W.Z,{children:[(0,oe.jsx)(P.Z,{children:"#"}),(0,oe.jsx)(P.Z,{children:"Staff"}),(0,oe.jsx)(P.Z,{children:"Start Time"}),(0,oe.jsx)(P.Z,{children:"End Time"}),(0,oe.jsx)(P.Z,{children:"Pay Rate"}),(0,oe.jsx)(P.Z,{align:"center",children:"Clockin"}),(0,oe.jsx)(P.Z,{align:"center",children:"Clockout"}),(0,oe.jsx)(P.Z,{children:"Hours Worked"}),(0,oe.jsx)(P.Z,{children:"Status"})]})}),(0,oe.jsx)(R.Z,{children:En.map((function(e,n){return(0,oe.jsx)(c.Fragment,{children:(0,oe.jsxs)(W.Z,{sx:{},children:[(0,oe.jsx)(P.Z,{component:"th",scope:"row",padding:"none",children:n+1}),(0,oe.jsx)(P.Z,{align:"left",children:(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(v.Z,{variant:"caption",children:e.staffname}),(0,oe.jsx)(z.ZP,{children:(0,oe.jsx)(T.Z,{label:e.productname,color:"info",variant:"light",size:"small"})})]})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(v.Z,{variant:"body2",children:J()(e.Starttime).format("MM/DD/YYYY")}),(0,oe.jsx)(v.Z,{variant:"caption",children:J()(e.Starttime).format("hh:mm A")})]})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsxs)(m.Z,{direction:"column",children:[(0,oe.jsx)(v.Z,{variant:"body2",children:J()(e.Endtime).format("MM/DD/YYYY")}),(0,oe.jsx)(v.Z,{variant:"caption",children:J()(e.Endtime).format("hh:mm A")})]})}),(0,oe.jsx)(P.Z,{children:e.rolecost}),(0,oe.jsx)(P.Z,{children:(0,oe.jsxs)(m.Z,{spacing:.5,alignItems:"center",children:[(0,oe.jsx)(T.Z,{label:e.clockin?J()(e.clockin).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,oe.jsx)(T.Z,{label:e.clockin?J()(e.clockin).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,oe.jsx)(P.Z,{children:(0,oe.jsxs)(m.Z,{spacing:.5,alignItems:"center",children:[(0,oe.jsx)(T.Z,{label:e.clockout?J()(e.clockout).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,oe.jsx)(T.Z,{label:e.clockout?J()(e.clockout).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,oe.jsx)(P.Z,{children:e.hoursworked}),(0,oe.jsx)(P.Z,{align:"left",children:(0,oe.jsxs)(m.Z,{direction:"row",children:["pending"===e.orderstatus&&(0,oe.jsx)(T.Z,{label:"Pending",color:"error",size:"small"}),"cancelled"===e.orderstatus&&(0,oe.jsx)(T.Z,{label:"Cancelled",color:"secondary",size:"small"}),"completed"===e.orderstatus&&(0,oe.jsx)(T.Z,{label:"Completed",color:"primary",size:"small"}),"processing"===e.orderstatus&&(0,oe.jsx)(T.Z,{label:"Processing",color:"primary",size:"small"}),"assigned"===e.orderstatus&&(0,oe.jsx)(T.Z,{label:"Assigned",color:"warning",size:"small"}),"confirmed"===e.orderstatus&&(0,oe.jsx)(T.Z,{label:"Confirmed",color:"success",size:"small"}),"active"===e.orderstatus&&(0,oe.jsx)(T.Z,{label:"Active",color:"info",size:"small"}),"closed"===e.orderstatus&&(0,oe.jsx)(T.Z,{label:"Closed",color:"info",size:"small"})]})})]})},n)}))})]})})})})})})]})}))]})]})})]})})},e.locationaddress)})),(0,oe.jsx)(z.ZP,{item:!0,xs:12,children:(0,oe.jsx)(K.Z,{sx:{borderWidth:1}})}),(0,oe.jsx)(z.ZP,{item:!0,xs:12,sm:6,children:(0,oe.jsx)(G.Z,{title:"Order Addons",sx:{height:"100%"},children:(0,oe.jsx)(z.ZP,{container:!0,spacing:2,children:(Dn||[]).map((function(e){return(0,oe.jsx)(c.Fragment,{children:(0,oe.jsx)(z.ZP,{item:!0,children:(0,oe.jsx)(T.Z,{icon:(0,oe.jsx)(u.Z,{}),variant:"outlined",color:"error",label:e.addon})})},e.addon)}))})})}),(0,oe.jsx)(z.ZP,{item:!0,xs:12,sm:6,children:(0,oe.jsx)(G.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)(v.Z,{color:Kr.palette.grey[500],children:"Sub Total:"}),(0,oe.jsxs)(v.Z,{children:["$",""===pn?(0,oe.jsx)(L.Z,{sx:{width:"30px"}}):pn]})]}),(0,oe.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,oe.jsx)(v.Z,{color:Kr.palette.grey[500],children:"Tax:"}),(0,oe.jsx)(v.Z,{children:""===hn?(0,oe.jsx)(L.Z,{sx:{width:"30px"}}):hn})]}),(0,oe.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,oe.jsx)(v.Z,{variant:"subtitle1",children:"Grand Total:"}),(0,oe.jsx)(v.Z,{variant:"subtitle1",children:""===bn?(0,oe.jsx)(L.Z,{sx:{width:"30px"}}):"$".concat(bn)})]})]})})}),(0,oe.jsx)(z.ZP,{item:!0,xs:12,children:(0,oe.jsxs)(m.Z,{direction:"column",sx:{mt:2},children:[(0,oe.jsx)(v.Z,{color:"secondary",children:"Other Instructions:"}),(0,oe.jsx)(v.Z,{sx:{ml:3},children:An})]})})]})})})]})]})}}}]); |