1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5875],{81069:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/web/my/orders",function(){return r(59387)}])},59387:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return w}});var n=r(52903),i=r(2784),o=r(16421),d=r(79006),c=r(5632),a=r(45745),l=r(63197),s=r(15446),u=r(69692),h=r(41478);function UserActionCardShimmer(){return(0,n.BX)(u.Z,{sx:{boxShadow:"0px 8px 16px rgba(34, 34, 34, 0.08)",borderRadius:"16px",overflow:"hidden",position:"relative",mb:"20px"},children:[(0,n.BX)(l.Z,{direction:"row",sx:{background:(0,s.L)("Gray -6"),padding:"24px 20px"},justifyContent:"space-between",alignItems:"flex-start",children:[(0,n.BX)(l.Z,{children:[(0,n.tZ)(h.Z,{variant:"circular",width:24,height:24}),(0,n.BX)(u.Z,{sx:{ml:"12px"},children:[(0,n.tZ)(h.Z,{variant:"rounded",width:200,height:14}),(0,n.tZ)(h.Z,{variant:"rounded",width:100,height:10,sx:{mt:"8px"}})]})]}),(0,n.tZ)(h.Z,{variant:"rounded",width:100,height:14})]}),(0,n.BX)(u.Z,{sx:{background:(0,s.L)(""),position:"relative"},children:[(0,n.BX)(l.Z,{direction:"row",sx:{padding:"20px",paddingBottom:"20px"},justifyContent:"start",children:[(0,n.tZ)(h.Z,{variant:"rounded",width:45,height:43}),(0,n.BX)(u.Z,{sx:{ml:"12px"},children:[(0,n.tZ)(h.Z,{variant:"rounded",width:"100%",height:12}),(0,n.tZ)(h.Z,{variant:"rounded",width:250,height:10,sx:{mt:"6px"}})]})]}),(0,n.BX)(l.Z,{direction:"row",sx:{padding:"16px 20px",backgroundColor:(0,s.L)("Gray -4")},justifyContent:"spaceBetween",alignItems:"center",children:[(0,n.tZ)(h.Z,{variant:"rounded",width:80,height:10}),(0,n.tZ)(h.Z,{variant:"rounded",width:80,height:10})]})]})]})}var shimmer=function(){return(0,n.BX)(u.Z,{width:"100%",children:[(0,n.tZ)(UserActionCardShimmer,{}),(0,n.tZ)(UserActionCardShimmer,{}),(0,n.tZ)(UserActionCardShimmer,{})]})},p=r(42289),g=r(62197),x=r(86738),y=r(75350),Z=r(26116),m=r(62071),v=r(39097),O=r.n(v),orderDetailsV2=e=>{let{icon:t,displayId:r,status:i,dateOrdered:o,type:d,redirectUrl:c}=e;return(0,n.BX)(u.Z,{sx:{background:(0,s.L)(""),p:"16px",mb:"24px",borderRadius:"12px",boxShadow:"0px 0 4px 0px rgba(0, 0, 0, 0.15)"},children:[(0,n.BX)(u.Z,{sx:{display:"flex",gap:"12px",pb:"16px",borderBottom:"1px dashed ".concat((0,s.L)("Gray -5"))},children:[(0,n.tZ)(u.Z,{sx:{width:"56px",height:"56px"},children:(0,n.tZ)(m.x,{url:t,alt:"Order Image"})}),(0,n.BX)(u.Z,{children:[(0,n.tZ)(g.Z,{sx:{...(0,Z.C2)("H14_SemiBold"),pb:"4px"},children:r}),(0,n.BX)(g.Z,{sx:{...(0,Z.C2)("P_Regular"),color:(0,s.L)("Gray -2")},children:["Placed on ",o]})]}),(0,n.BX)(u.Z,{sx:{background:i.background,display:"flex",height:"fit-content",alignItems:"center",ml:"auto",borderRadius:"14px",padding:"4px 16px"},children:[(0,n.tZ)(u.Z,{sx:{width:"12px",height:"12px"},children:(0,n.tZ)(m.x,{url:i.icon,alt:"Status Icon"})}),(0,n.BX)(g.Z,{sx:{color:i.textColor,...(0,Z.C2)("Small_Regular"),ml:"4px"},children:[i.label," "]})]})]}),(0,n.BX)(u.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mt:"16px"},children:[(0,n.BX)(u.Z,{sx:{display:"flex",gap:"4px"},children:[(0,n.tZ)(u.Z,{sx:{width:"24px",height:"24px",mt:"4px"},children:(0,n.tZ)(m.x,{url:d.icon,alt:"Type Icon"})}),(0,n.BX)(u.Z,{sx:{color:d.textColor},children:[(0,n.tZ)(g.Z,{sx:{...(0,Z.C2)("P_SemiBold")},children:d.label}),(0,n.BX)(g.Z,{sx:{...(0,Z.C2)("Small_Regular")},children:[d.itemCount," items"]}),(0,n.BX)(g.Z,{sx:{...(0,Z.C2)("Small_Regular")},children:["Total Amount:"," ",(0,n.tZ)(g.Z,{component:"span",sx:{...(0,Z.C2)("Small_SemiBold")},children:d.totalAmount})]})]})]}),(0,n.tZ)(O(),{href:c,children:(0,n.tZ)(g.Z,{sx:{...(0,Z.C2)("P_Regular"),color:(0,s.L)("Blue +2"),textDecoration:"underline"},children:"View Details"})})]})]})};let OrdersListing=()=>{let[e,t]=(0,i.useState)(),[r,h]=(0,i.useState)(),[p,m]=(0,i.useState)(a.g.LOADING),[v,O]=(0,i.useState)(a.g.LOADING),[w,C]=(0,i.useState)({});(0,c.useRouter)();let f=p==a.g.LOADING||v==a.g.LOADING,L=new Map([["RETURN","returns"],["CART_CHECKOUT","cart
1-checkouts"],["REPLACEMENT","replacements"],["SERVICE_REQUEST","service-requests"]]);async function getMyOrders(){var e,t,r,n,i,d,c,l,s;try{m(a.g.LOADING);let d=await o.X.getOrdersV2();(null===(t=d.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.orders.activeOrders.length)>0||(null===(n=d.data)||void 0===n?void 0:null===(r=n.data)||void 0===r?void 0:r.orders.pastOrders.length)>0?(h(null===(i=d.data)||void 0===i?void 0:i.data),(0,y.Jh)("My Orders Page Opened")):C({description:"Looks like you haven't placed any order yet"})}catch(e){console.error(e),C({description:null!==(s=null==e?void 0:null===(l=e.response)||void 0===l?void 0:null===(c=l.data)||void 0===c?void 0:null===(d=c.error)||void 0===d?void 0:d.message)&&void 0!==s?s:"Something went wrong"})}m(a.g.COMPLETED)}async function getMyOrdersLayout(){try{var e,r;O(a.g.LOADING);let n=await d.J.getLayout("MY_ORDERS");t(null!==(r=null===(e=n.data)||void 0===e?void 0:e.data)&&void 0!==r?r:[])}catch(e){console.error(e)}O(a.g.COMPLETED)}if((0,i.useEffect)(()=>{getMyOrdersLayout(),getMyOrders()},[]),w.description)return(0,n.tZ)(u.Z,{width:"630px",children:(0,n.tZ)(x.Z,{description:w.description})});function getRedirectUrl(e){let{userActionType:t,userActionId:r}=e;return"SWAP"===t?"/feature-unavailable":"/my/orders/".concat(L.get(t),"/").concat(r)}return(0,n.tZ)(l.Z,{direction:"column",sx:{width:"694px",ml:"-64px"},children:f?(0,n.tZ)(u.Z,{sx:{m:"40px"},children:(0,n.tZ)(shimmer,{})}):(0,n.BX)(n.HY,{children:[!!(null==r?void 0:r.orders.activeOrders.length)&&(0,n.BX)(u.Z,{sx:{width:"100%",background:"linear-gradient(180deg, #FFFFFF, ".concat((0,s.L)("Minty -3"),")"),p:"40px"},children:[(0,n.tZ)(g.Z,{sx:{...(0,Z.C2)("H10_Medium"),color:(0,s.L)("Gray 0"),margin:"0px 0 24px 0",fontFamily:"Recline"},children:"Active Orders"}),p==a.g.COMPLETED&&(null==r?void 0:r.orders.activeOrders.map(e=>(0,n.tZ)(orderDetailsV2,{icon:e.icon||"",displayId:e.displayId,status:e.status,dateOrdered:e.dateOrdered,type:e.type,redirectUrl:getRedirectUrl({userActionType:e.userActionType,userActionId:e.userActionId})},e.id)))]}),!!(null==r?void 0:r.orders.pastOrders.length)&&(0,n.BX)(u.Z,{sx:{width:"100%",p:"40px",mb:"32px"},children:[(0,n.tZ)(g.Z,{sx:{...(0,Z.C2)("H10_Medium"),color:(0,s.L)("Gray 0"),margin:"0px 0 24px 0",fontFamily:"Recline"},children:"Past Orders"}),p==a.g.COMPLETED&&(null==r?void 0:r.orders.pastOrders.map(e=>(0,n.tZ)(orderDetailsV2,{icon:e.icon||"",displayId:e.displayId,status:e.status,dateOrdered:e.dateOrdered,type:e.type,redirectUrl:getRedirectUrl({userActionType:e.userActionType,userActionId:e.userActionId})},e.id)))]})]})})};var w=OrdersListing;OrdersListing.getLayout=function(e){return(0,n.tZ)(p.Z,{loginRequired:!0,children:e})}},79006:function(e,t,r){"use strict";r.d(t,{J:function(){return i}});var n=r(77229);let LayoutService=class LayoutService extends n.Z{getLayout(e,t,r){return this.client.get("/layout/v2?type=".concat(e).concat(t?"&isVideoSupported=true":""),r)}getLayoutV2(e,t){return this.client.get("/layout/v2?type=".concat(e).concat(t?"&isVideoSupported=true":""))}getFallbackLayout(e){return this.client.get("/layout/fallback/".concat(e))}getHomeLayout(e,t){return this.client.get("layout/v2?type=".concat(e).concat(t?"&isVideoSupported=true":""))}getRentLayout(e,t){return this.client.get("/layout/v2?type=".concat(e).concat(t?"&isVideoSupported=true":""))}getGlobalHomeLayout(){return this.client.get("/layout?type=HOME_WEB_AB_1")}getBuyLayout(e,t){return this.client.get("/layout/v2?type=".concat(e).concat(t?"&isVideoSupported=true":""))}getSeoContent(e){return this.client.get("/layout/key/".concat(e))}getKeys(e){return this.client.get("/layout/key/".concat(e))}getProductBadges(){return this.client.get("/layout/key/Badge_V1")}constructor(){super({serviceName:"Layout Service"})}};let i=new LayoutService},16421:function(e,t,r){"use strict";r.d(t,{X:function(){return o}});var n=r(77229),i=r(73083);let OrderService=class OrderService extends n.Z{getOrders(){return this.client.get("/orders")}getOrdersV2(){return this.client.get("".concat("https://ciago.furlenco.com","/api/v2/orders"))}getCartCheckoutDetails(e){return this.client.get("/orders/cart-checkouts/".concat(e))}
1getActionDetails(e,t){return this.client.get("/orders/".concat(e,"/").concat(t))}initCheckoutOrderCancellation(e){return this.client.get("/orders/".concat(e,"/cancel"))}getCancelEnrichments(e){return this.client.get("/../v3/orders/".concat(e,"/cancel/enrichments"))}cancelOrder(e,t){return this.client.post("/orders/".concat(t,"/cancel"),{...e})}rentCancelOrder(e,t,r){return this.client.post("/../v3/orders/".concat(t,"/cancel").concat(r?"?withRetentionAttempt=true":""),{...e})}getOrderSummary(e){let t=(0,i.Vc)(),{cityId:r,pincode:n}=t;return this.client.get("/carts/payments/".concat(e,"/summary?cityId=").concat(r,"&pincode=").concat(n))}constructor(){super({serviceName:"Orders"})}};let o=new OrderService}},function(e){e.O(0,[204,8742,9774,2888,179],function(){return e(e.s=81069)}),_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.