1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1660],{3856:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/members/order-history",function(){return a(963)}])},2520:function(e,t,a){"use strict";a.d(t,{h:function(){return m}});var l=a(5893),r=a(512),s=a(3519),n=a(6309),i=a(1664),c=a.n(i),d=a(9332),o=a(7294);function m(e){let{className:t,children:a,navItems:i,currentPage:m,hideHeader:u,showBreadcrumbs:x,showCurrent:h}=e,g=(0,d.usePathname)(),p=g.split("/"),f=[];for(let e=0;e<p.length;++e){let t=p[e],a="";if(""!=t){if(1==e){a="/"+t+"/";let e=i.filter(e=>e.route.path==a)[0];if(null!=e){let t=e.name,a=e.route.path;f.push({pageName:t,pagePath:a})}}if(2==e&&3==p.length){a=g+"/";let e=i.filter(e=>e.route.path==a)[0];if(null!=e){let t=e.name,a=e.route.path;f.push({pageName:t,pagePath:a})}m&&(a=g,f.push({pageName:m,pagePath:g}))}if(2==e&&p.length>3){a="/"+p[1]+"/"+t+"/";let e=i.filter(e=>e.route.path==a)[0];if(null!=e){let t=e.name,a=e.route.path;f.push({pageName:t,pagePath:a})}}3==e&&p.length>3&&(a=g,f.push({pageName:m,pagePath:g}))}}return(0,l.jsxs)("div",{children:[!u&&(0,l.jsx)("div",{className:"relative bg-accent-lightest text-center -mt-24 !pt-20 -top-1",children:(0,l.jsx)(s.W,{children:(0,l.jsx)("div",{className:"max-w-4xl mx-auto",children:a})})}),x&&(0,l.jsx)("div",{className:(0,r.W)("bg-accent-light/10 -mt-1"),children:(0,l.jsx)("div",{className:"pt-0 pb-0",children:(0,l.jsx)("div",{className:"max-w-full lg:max-w-7xl lg:mx-auto",children:(0,l.jsx)("div",{className:"relative py-4 px-6 w-full text-lg",children:(0,l.jsx)("nav",{className:"flex","aria-label":"Breadcrumb",children:(0,l.jsx)("ol",{role:"list",className:"flex items-center space-x-4",children:i&&i.length>0&&f&&f.length>0&&(0,l.jsx)(o.Fragment,{children:f.map((e,t)=>(0,l.jsx)("li",{children:(0,l.jsxs)("div",{className:"flex items-center",children:[0!=t&&(0,l.jsx)(n.Z,{className:"h-5 w-5 flex-shrink-0 text-gray-400","aria-hidden":"true"}),(0,l.jsx)(c(),{href:e.pagePath,className:(0,r.W)(g+"/"==e.pagePath||e.pageName==m?"font-medium text-black pointer-events-none":"accent-link","ml-4 text-base"),children:e.pageName})]})},"bcitem"+t))})})})})})})})]})}},3519:function(e,t,a){"use strict";a.d(t,{W:function(){return s}});var l=a(5893),r=a(512);function s(e){let{className:t,children:a,full:s=!1,gradientBurst:n=!1,gradientColor:i}=e;return(0,l.jsxs)("section",{className:(0,r.W)(t,n&&"relative overflow-hidden last:overflow-visible","py-8 px-4 sm:px-6 lg:py-12 lg:px-8"),children:[n&&(0,l.jsx)("div",{className:(0,r.W)(i?"from-"+i:"from-[#DC4194]","top-full -translate-y-1/3 left-1/2 -z-10 -translate-x-1/2 rounded-full aspect-[1/1] w-[150%] absolute bg-gradient-radial opacity-25 via-white to-white")}),(0,l.jsx)("div",{className:(0,r.W)(!s&&"lg:max-w-7xl","max-w-full lg:mx-auto"),children:(0,l.jsx)("div",{className:"relative md:p-6 w-full text-lg",children:a})})]})}},5635:function(e,t,a){"use strict";a.d(t,{i:function(){return o}});var l=a(5893),r=a(512),s=a(7294),n=a(6671),i=a(1664),c=a.n(i),d=a(9332);function o(e){let{feed:t,title:a}=e,[i,o]=(0,s.useState)([]),m=(0,d.usePathname)();return(0,s.useEffect)(()=>{(async()=>{try{let e=await n.c.fetchPageContent("2411ae4c-eba9-4574-b928-04d0c61ad6ba");o(e.navigationItems.items)}catch(e){console.error("Error fetching data:",e)}})()},[]),(0,l.jsxs)("div",{className:"block block-account-navigation rounded-lg bg-gray-50 px-4 py-6 sm:p-6 lg:p-8 sticky top-28",children:[(0,l.jsx)("div",{className:"title text-2xl font-semibold text-black font-header",children:"My account"}),i&&i.length>0&&(0,l.jsx)("div",{className:"listbox mt-2",children:(0,l.jsx)("ul",{className:"list unstyled space-y-2",children:i.map((e,t)=>{var a;return(0,l.jsx)("li",{className:(0,r.W)(m&&m==e.content.properties.navitemurl&&"text-black font-medium"),children:(0,l.jsxs)(c(),{onClick:()=>{var t;return e.content.properties.navitemurl.includes("http")&&(t=e.content.properties.navitemurl,void(window.confirm("You are being forwarded to Member Settings at member.oqcc.ca. You may be required to sign in again.")&&(window.location.href=t)))},className:"accent-link flex items-center gap-2",target:e.content.properties.navitemurl.includes("http")?"_blank":"_self",href:e.content.properties.navitemurl.includes("http")?"#":e.content.properties.navitemurl,children:[e.content.properties.navitemtext,(null===(a=e.content.properties.navitemurl)||void 0===a?void 0:a.includes("http"))&&(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-4",children:[(0,l.jsx)("path",{d:"M6.22 8.72a.75.75 0 0 0 1.06 1.06l5.22-5.22v1.69a.75.75 0 0 0 1.5 0v-3.5a.75.75 0 0 0-.75-.75h-3.5a.75.75 0 0 0 0 1.5h1.69L6.22 8.72Z"}),(0,l.jsx)("path",{d:"M3.5 6.75c0-.69.56-1.25 1.25-1.25H7A.75.75 0 0 0 7 4H4.75A2.75 2.75 0 0 0 2 6.75v4.5A2.75 2.75 0 0 0 4.75 14h4.5A2.75 2.75 0 0 0 12 11.25V9a.75.75 0 0 0-1.5 0v2.25c0 .69-.56 1.25-1.25 1.25h-4.5c-.69 0-1.25-.56-1.25-1.25v-4.5Z"})]})]})})})})})]})}},963:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return u},default:function(){return h},dynamic:function(){return x}});var l=a(5893),r=a(9008),s=a.n(r),n=a(3519),i=a(2520),c=a(9946),d=a(3403),o=a(5635),m=a(7294),u=!0;let x="force-dynamic";function h(e){let{seo:t,heroData:a,brand:r,navItems:u,footerNavItems:x,globalSeo:h}=e,[g,p]=(0,m.useState)([]),[f,v]=(0,m.useState)(!0),[j,b]=(0,m.useState)(null);return(0,m.useEffect)(()=>{(async()=>{try{let e=localStorage.getItem("member_email");if(!e){b("Not logged in."),v(!1);return}let t=await fetch("/api/orders?customerReference=".concat(encodeURIComponent(e)));if(!t.ok)throw Error("Failed to fetch orders");let a=await t.json();p((null==a?void 0:a.items)||a||[])}catch(e){console.error("Error fetching orders:",e),b("Could not load orders.")}finally{v(!1)}})()},[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s(),{children:[(0,l.jsx)("title",{children:(null==t?void 0:t.pageTitle)&&t.pageTitle+((null==h?void 0:h.pageTitle)?" | "+h.pageTitle:"")}),t&&h&&(0,l.jsx)("meta",{name:"description",content:t.metaDescription||h.metaDescription})]}),(0,l.jsx)(c.J,{brand:r,scroll:!1}),a&&u&&u.length>0&&(0,l.jsx)(i.h,{navItems:u,children:(0,l.jsx)("h1",{children:a.title})}),(0,l.jsx)(n.W,{children:(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-x-16 gap-y-10 lg:grid-cols-4 border-b pb-12",children:[(0,l.jsx)("div",{children:(0,l.jsx)(o.i,{feed:null})}),(0,l.jsxs)("div",{className:"lg:col-span-3",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-6",children:"Order History"}),f&&(0,l.jsx)("p",{className:"text-gray-500",children:"Loading your orders..."}),j&&(0,l.jsx)("p",{className:"text-red-500",children:j}),!f&&!j&&0===g.length&&(0,l.jsx)("p",{className:"text-gray-500",children:"You have no orders yet."}),!f&&!j&&g.length>0&&(0,l.jsx)("div",{className:"mx-auto max-w-7xl",children:(0,l.jsx)("div",{className:"mx-auto max-w-2xl space-y-8 lg:max-w-4xl",children:g.map(e=>{var t,a,r,s,n,i,c;return(0,l.jsxs)("div",{className:"border-b border-t border-gray-200 bg-white shadow-sm sm:rounded-lg sm:border",children:[(0,l.jsxs)("div",{className:"flex items-center border-b border-gray-200 p-4 sm:grid sm:grid-cols-4 sm:gap-x-6 sm:p-6",children:[(0,l.jsxs)("dl",{className:"grid flex-1 grid-cols-2 gap-x-6 text-sm sm:col-span-3 sm:grid-cols-3 lg:col-span-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{className:"font-medium text-gray-900",children:"Order number"}),(0,l.jsx)("dd",{className:"mt-1 text-gray-500",children:e.orderNumber||e.cartNumber})]}),(0,l.jsxs)("div",{className:"hidden sm:block",children:[(0,l.jsx)("dt",{className:"font-medium text-gray-900",children:"Date placed"}),(0,l.jsx)("dd",{className:"mt-1 text-gray-500",children:e.finalizedDate?new Date(e.finalizedDate).toLocaleDateString("en-CA",{year:"numeric",month:"short",day:"numeric"}):new Date(e.createDate).toLocaleDateString("en-CA",{year:"numeric",month:"short",day:"numeric"})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{className:"font-medium text-gray-900",children:"Total amount"}),(0,l.jsx)("dd",{className:"mt-1 font-medium text-gray-900",children:null===(r=e.totalPrice)||void 0===r?void 0:null===(a=r.value)||void 0===a?void 0:null===(t=a.formatted)||void 0===t?void 0:t.withTax})]})]}),(0,l.jsxs)("div",{className:"hidden lg:col-span-2 lg:flex lg:items-center lg:justify-end lg:space-x-4",children:[(0,l.jsx)("span",{className:["inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",(null===(s=e.transactionInfo)||void 0===s?void 0:s.paymentStatus)==="Captured"?"bg-green-100 text-green-800":(null===(n=e.transactionInfo)||void 0===n?void 0:n.paymentStatus)==="Authorized"?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"].join(" "),children:(null===(i=e.transactionInfo)||void 0===i?void 0:i.paymentStatus)||"Processing"}),(0,l.jsx)("a",{href:"/members/order-history/".concat(e.id),className:"flex items-center justify-center rounded-md border border-gray-300 bg-white px-2.5 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50",children:"View Order"})]})]}),(0,l.jsx)("ul",{role:"list",className:"divide-y divide-gray-200 unstyled",children:null===(c=e.orderLines)||void 0===c?void 0:c.map(e=>{var t,a,r;return(0,l.jsx)("li",{className:"p-4 sm:p-6",children:(0,l.jsx)("div",{className:"flex items-center sm:items-start",children:(0,l.jsxs)("div",{className:"flex-1 text-sm",children:[(0,l.jsxs)("div",{className:"font-medium text-gray-900 sm:flex sm:justify-between",children:[(0,l.jsx)("h5",{children:e.name}),(0,l.jsx)("p",{className:"mt-2 sm:mt-0",children:null===(r=e.totalPrice)||void 0===r?void 0:null===(a=r.value)||void 0===a?void 0:null===(t=a.formatted)||void 0===t?void 0:t.withoutTax})]}),(0,l.jsxs)("p",{className:"mt-1 text-gray-500",children:["Qty: ",e.quantity]})]})})},e.id)})})]},e.id)})})})]})]})}),(0,l.jsx)(d.$,{cookiePolicy:!0,brand:r,navItems:x})]})}},6309:function(e,t,a){"use strict";var l=a(7294);let r=l.forwardRef(function(e,t){let{title:a,titleId:r,...s}=e;return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},s),a?l.createElement("title",{id:r},a):null,l.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))});t.Z=r}},function(e){e.O(0,[8802,6342,5516,8867,2888,9774,179],function(){return e(e.s=3856)}),_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.