1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[227],{15554:function(e,i,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/track-order",function(){return r(94092)}])},94092:function(e,i,r){"use strict";r.r(i);var t=r(85893),s=r(7207),n=r(47109),l=r(87386),a=r(55406),o=r(86886),d=r(94054),c=r(50135),x=r(56815),h=r(83321),m=r(99226),p=r(15861),u=r(44267),f=r(67720),j=r(32045),y=r(67294),Z=r(87536),g=r(74231),b=r(47533),v=r(78945),w=r(54e3),I=r(80008),C=r.n(I),W=r(1954),k=r(78462),S=r(90948),P=r(70891);let E=g.Ry().shape({incrementId:g.Z_().required("This is required"),customerEmail:g.Z_().required("This is required")}),q=(0,S.ZP)(k.Z)(e=>{let{theme:i}=e;return{padding:0,display:"flex",borderRadius:6,border:"1px solid ".concat(i.palette.divider),"& .MuiListItem-root":{padding:i.spacing(5),"&:not(:last-of-type)":{borderRight:"1px solid ".concat(i.palette.divider)}},[i.breakpoints.down("md")]:{display:"block","& .MuiListItem-root":{"&:not(:last-of-type)":{borderRight:0,borderBottom:"1px solid ".concat(i.palette.divider)}}}}}),D=()=>{var e,i,r,g;let[I,k]=(0,y.useState)(),[S,D]=(0,y.useState)(!0),[O,_]=(0,y.useState)(0),[T,A]=(0,y.useState)(0),[N,z]=(0,y.useState)(0),[F,R]=(0,y.useState)(0),[Y,J]=(0,y.useState)(0),[M,B]=(0,y.useState)(0),{control:L,handleSubmit:X,watch:G,setValue:H,formState:{errors:Q}}=(0,Z.cI)({mode:"onChange",resolver:(0,b.X)(E)}),K=async e=>{let i={customerEmail:e.customerEmail,incrementId:e.incrementId};try{let r=await (0,v.Z)({method:"post",url:"".concat("https://www.flaberry.com","/api/web-service/order/track"),data:i});console.log(r.data),D(!1),k(r.data.data);var t=0;r.data.data.finalPrice.forEach(e=>{"shipping"===e.type?(t+=e.value,R(e.value)):"timeslot"===e.type?(t+=e.value,z(e.value)):"seasonal"===e.type?(t+=e.value,J(e.value)):"subTotal"===e.type?(t+=e.value,A(e.value)):"total"===e.type||"discount"===e.type&&(t-=e.value,B(e.value)),_(t)})}catch(s){console.log(s)}};return(0,t.jsxs)(n.Z,{children:[(0,t.jsx)(l.Z,{title:"Flaberry - Track Your Order",description:"Flaberry - Track Your Order"}),(0,t.jsxs)(j.Z,{sx:{mt:S?"20vh":"5vh",mb:"20vh"},children:[S&&(0,t.jsxs)(o.ZP,{container:!0,children:[(0,t.jsx)(o.ZP,{item:!0,xs:4}),(0,t.jsx)(o.ZP,{item:!0,xs:4,children:(0,t.jsxs)(s.Z,{children:[(0,t.jsx)(a.H1,{fontFamily:"Gotham-Light",textAlign:"center",children:" Track Your Order"}),(0,t.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:X(K),children:[(0,t.jsxs)(d.Z,{sx:{p:3},fullWidth:!0,children:[(0,t.jsx)(Z.Qr,{name:"customerEmail",control:L,rules:{required:!0},render:e=>{let{field:{value:i,onChange:r}}=e;return(0,t.jsx)(c.Z,{size:"medium",fullWidth:!0,label:"Email",placeholder:"Email",sx:{backgroundColor:"white !important"},value:i||"",onChange:r,error:Boolean(Q.customerEmail)})}}),Q.customerEmail&&(0,t.jsx)(x.Z,{sx:{color:"error.main"},children:Q.customerEmail.message})]}),(0,t.jsxs)(d.Z,{sx:{p:3},fullWidth:!0,children:[(0,t.jsx)(Z.Qr,{name:"incrementId",control:L,rules:{required:!0},render:e=>{let{field:{value:i,onChange:r}}=e;return(0,t.jsx)(c.Z,{size:"medium",fullWidth:!0,label:"OrderId",placeholder:"Order Id",sx:{backgroundColor:"white !important"},value:i||"",onChange:r,error:Boolean(Q.incrementId)})}}),Q.incrementId&&(0,t.jsx)(x.Z,{sx:{color:"error.main"},children:Q.incrementId.message})]}),(0,t.jsx)(d.Z,{sx:{p:3},fullWidth:!0,children:(0,t.jsx)(h.Z,{type:"submit",fullWidth:!0,style:{backgroundColor:"#36337a",color:"#fff"},variant:"contained",size:"large",children:"Track Order"})})]})]})}),(0,t.jsx)(o.ZP,{item:!0,xs:4})]}),!S&&(0,t.jsxs)(o.ZP,{container:!0,spacing:6,children:[(0,t.jsx)(o.ZP,{item:!0,xs:12,lg:8,children:(0,t.jsxs)(q,{children:[(0,t.jsxs)(P.ZP,{sx:{flexDirection:"column",alignItems:"flex-start"},children:[(0,t.jsxs)(m.Z,{sx:{mb:4,display:"flex",alignItems:"center"},children:[(0,t.jsx)(m.Z,{sx:{mr:1.5,display:"flex"},children:(0,t.jsx)(W.JO,{icon:"mdi:flower-outline",fontSize:20})}),(0,t.jsxs)(p.Z,{sx:{fontWeight:600},children:["#",I.incrementId]})]}),(0,t.jsxs)(p.Z,{sx:{color:"#fff !important",fontSize:18,bgcolor:"#36337a",p:1,borderRadius:5},children:[" ",I.status]}),(0,t.jsxs)(m.Z,{sx:{mb:4,mt:4,display:"flex",alignItems:"center"},children:[(0,t.jsx)(m.Z,{sx:{mr:1.5,display:"flex"},children:(0,t.jsx)(W.JO,{icon:"mdi:credit-card-outline",fontSize:20})}),(0,t.jsx)(p.Z,{sx:{fontWeight:600},children:"Billing"})]}),(0,t.jsx)(p.Z,{sx:{color:"text.secondary"},children:I.billing.customerName}),(0,t.jsx)(p.Z,{sx:{color:"text.secondary"},children:I.billing.customerEmail}),(0,t.jsxs)(p.Z,{sx:{fontWeight:600,color:"text.secondary"},children:["+",I.billing.customerPhone]})]}
1),(0,t.jsxs)(P.ZP,{sx:{flexDirection:"column",alignItems:"flex-start"},children:[(0,t.jsxs)(m.Z,{sx:{mb:4,display:"flex",alignItems:"center"},children:[(0,t.jsx)(m.Z,{sx:{mr:1.5,display:"flex"},children:(0,t.jsx)(W.JO,{icon:"mdi:map-marker-outline",fontSize:20})}),(0,t.jsx)(p.Z,{sx:{fontWeight:600},children:"Shipping"})]}),(0,t.jsx)(p.Z,{sx:{color:"text.secondary"},children:I.shipping.recipientName}),(0,t.jsxs)(p.Z,{sx:{color:"text.secondary"},children:[I.shipping.recipientAddress,","]}),(0,t.jsxs)(p.Z,{sx:{color:"text.secondary"},children:[I.shipping.recipientCity,", ",I.shipping.recipientState," ",I.shipping.recipientPincode,","]}),(0,t.jsx)(p.Z,{sx:{mb:4,color:"text.secondary"},children:"India"}),(0,t.jsxs)(p.Z,{sx:{fontWeight:600,color:"text.secondary"},children:["+",I.shipping.recipientPhone]})]})]})}),(0,t.jsx)(o.ZP,{item:!0,xs:12,lg:4,children:(0,t.jsxs)(m.Z,{sx:{mb:4,backgroundColor:"#fff",borderRadius:1,border:e=>"1px solid ".concat(e.palette.divider)},children:[(0,t.jsx)(u.Z,{children:(null==I?void 0:I.items)&&(null==I?void 0:null===(e=I.items)||void 0===e?void 0:e.map((e,i)=>(0,t.jsxs)(m.Z,{sx:{mb:4,display:"flex"},children:[(0,t.jsx)(m.Z,{sx:{mr:4},children:(0,t.jsx)("img",{width:50,src:e.thumbnail.replace("https://ik.imagekit.io/flaberry/media/","https://cdn.flaberry.com/media/").replace("https://ik.imagekit.io/flaberry/transify-product/","https://d465cf4gxq669.cloudfront.net/"),alt:"Google Home"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Z,{variant:"body2",children:e.name}),(0,t.jsx)(p.Z,{variant:"body2",sx:{fontWeight:600},children:(0,w.Aq)(e.amount.total)})]})]},i)))}),(0,t.jsx)(f.Z,{sx:{m:"0 !important"}}),(null==I?void 0:null===(i=I.delivery)||void 0===i?void 0:i.dod)&&(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(p.Z,{sx:{mb:4,fontWeight:600},children:"Delivery Details"}),(0,t.jsxs)(m.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,t.jsxs)(m.Z,{sx:{mb:2,gap:2,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(p.Z,{variant:"body2",sx:{color:"text.primary"},children:"Date of Delivery"}),(0,t.jsx)(p.Z,{variant:"body2",children:C()(null==I?void 0:null===(r=I.delivery)||void 0===r?void 0:r.dod).tz("Asia/Kolkata").format("DD MMM YYYY")})]}),(0,t.jsxs)(m.Z,{sx:{gap:2,mb:2,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(p.Z,{variant:"body2",sx:{color:"text.primary"},children:"Time Slot"}),(0,t.jsx)(m.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,t.jsx)(p.Z,{variant:"body2",children:null==I?void 0:null===(g=I.delivery)||void 0===g?void 0:g.timeslot})})]})]})]}),(0,t.jsx)(f.Z,{sx:{m:"0 !important"}}),(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(p.Z,{sx:{mb:4,fontWeight:600},children:"Price Details"}),(0,t.jsxs)(m.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,t.jsxs)(m.Z,{sx:{mb:2,gap:2,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(p.Z,{variant:"body2",sx:{color:"text.primary"},children:"Subtotal"}),(0,t.jsx)(p.Z,{variant:"body2",children:(0,w.Aq)(T||0)})]}),F>0&&(0,t.jsxs)(m.Z,{sx:{gap:2,mb:2,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(p.Z,{variant:"body2",sx:{color:"text.primary"},children:"Shipping Charges"}),(0,t.jsx)(m.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,t.jsx)(p.Z,{variant:"body2",children:(0,w.Aq)(F||0)})})]}),Y>0&&(0,t.jsxs)(m.Z,{sx:{gap:2,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsxs)(p.Z,{variant:"body2",sx:{color:"text.primary",display:"flex"},children:["Season Surcharge ",(0,t.jsx)(W.JO,{icon:"mdi:flash",color:"red"})]}),(0,t.jsx)(m.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,t.jsx)(p.Z,{variant:"body2",children:(0,w.Aq)(Y)})})]}),N>0&&(0,t.jsxs)(m.Z,{sx:{gap:2,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsxs)(p.Z,{variant:"body2",sx:{color:"text.primary",display:"flex"},children:["Timeslot Charges ",(0,t.jsx)(W.JO,{icon:"mdi:flash",color:"red"})]}),(0,t.jsx)(m.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,t.jsx)(p.Z,{variant:"body2",children:(0,w.Aq)(N)})})]}),M>0&&(0,t.jsxs)(m.Z,{sx:{gap:2,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsxs)(p.Z,{variant:"body2",sx:{color:"text.primary",display:"flex"},children:["Discount ",(0,t.jsx)(W.JO,{icon:"mdi:flash",color:"red"})]}),(0,t.jsx)(m.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,t.jsx)(p.Z,{variant:"body2",children:(0,w.Aq)(M)})})]})]})]}),(0,t.jsx)(f.Z,{sx:{m:"0 !important"}}),(0,t.jsx)(u.Z,{sx:{py:e=>"".concat(e.spacing(3.5)," !important")},children:(0,t.jsxs)(m.Z,{sx:{gap:2,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(p.Z,{sx:{fontWeight:600},children:"Total"}),(0,t.jsx)(p.Z,{sx:{fontWeight:600},children:(0,w.Aq)(O)})]})})]})})]})]})]})};i.default=D},7207:function(e,i,r){"use strict";var t=r(85893),s=r(90948),n=r(66242);let l=(0,s.ZP)(e=>{let{hoverEffect:i,children:r,...s}=e;return(0,t.jsx)(n.Z,{...s,children:r})})(e=>{let{theme:i,hoverEffect:r}=e;return{overflow:"unset",borderRadius:"8px",transition:"all 250ms ease-in-out","&:hover":{...r&&{boxShadow:i.shadows[3]}}}});l.defaultProps={hoverEffect:!1},i.Z=l},54e3:function(e,i,r){"use strict";r.d(i,{Aq:function(){return l},Et:function(){return n}});var t=r(11752),s=r.n(t);function n(e,i){let r=Number((e-e*(i/100)).toFixed(2));return l(r)}function l(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,{publicRuntimeConfig:r}=s()(),t=new Intl.NumberFormat(void 0,{style:"currency",currency:r.currency,maximumFractionDigits:i,minimumFractionDigits:i});return t.format(e)}r(8342)}},function(e){e.O(0,[586,885,678,106,515,789,985,300,320,231,204,774,888,179],function(){return e(e.s=15554)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.