PageSourceSearch

https://www.hbclark.co.uk/_next/static/chunks/pages/account/orders-f74ade5e5be0cdaa.js

js hbclark.co.uk collected 2026-10-05 22:58:04 UTC 10,982 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7619],{11453:(e,t,l)=>{"use strict";l.d(t,{I:()=>a,n:()=>r});var s=l(61138);let r=(e,t)=>(0,s.A)().get("/orders/".concat(e,"/sales-order"),{params:t}).then(e=>e.data),a=(e,t)=>(0,s.A)().get("/orders/".concat(e,"/sales-order/").concat(t)).then(e=>e.data)},14012:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>Y});var s=l(37876),r=l(14232);let a=r.forwardRef(function(e,t){let{title:l,titleId:s,...a}=e;return r.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":s},a),l?r.createElement("title",{id:s},l):null,r.createElement("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z",clipRule:"evenodd"}))});var d=l(62932),i=l(29978);let n=r.forwardRef(function(e,t){let{title:l,titleId:s,...a}=e;return r.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":s},a),l?r.createElement("title",{id:s},l):null,r.createElement("path",{fillRule:"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))});var c=l(57555),o=l(69241);function x(e){let{pagination:t,onPageChange:l}=e,r=e=>{e&&l(parseInt(new URL(e).searchParams.get("page")||"1"))};return(0,s.jsxs)("div",{className:"flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6",children:[(0,s.jsxs)("div",{className:"flex flex-1 justify-between lg:hidden",children:[(0,s.jsx)("button",{onClick:()=>r(t.links[0].url),disabled:1===t.current_page,className:"relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50",children:"Previous"}),(0,s.jsx)("button",{onClick:()=>r(t.links[t.links.length-1].url),disabled:t.current_page===t.last_page,className:"relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50",children:"Next"})]}),(0,s.jsxs)("div",{className:"hidden lg:flex lg:flex-1 lg:items-center lg:justify-between",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("p",{className:"text-sm text-gray-700",children:["Showing ",(0,s.jsx)("span",{className:"font-medium",children:t.from})," to"," ",(0,s.jsx)("span",{className:"font-medium",children:t.to})," of"," ",(0,s.jsx)("span",{className:"font-medium",children:t.total})," results"]})}),(0,s.jsx)("div",{children:(0,s.jsx)("nav",{"aria-label":"Pagination",className:"isolate inline-flex gap-0 -space-x-px rounded-md shadow-sm",children:t.links.map((e,t)=>(0,s.jsx)("button",{disabled:!e.url,className:(0,o.A)("relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20 focus:outline-offset-0",{"bg-primary-600 text-white":e.active,"text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50":!e.active,"rounded-l-md":e.label.includes("Previous"),"rounded-r-md":e.label.includes("Next")}),onClick:()=>e.url&&r(e.url),children:e.label.includes("Previous")?(0,s.jsx)(n,{"aria-hidden":"true",className:"size-5"}):e.label.includes("Next")?(0,s.jsx)(c.A,{"aria-hidden":"true",className:"size-5"}):e.label},t))})})]})]})}function u(e){let{children:t}=e;return(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsx)("table",{className:"table w-full",children:t})})}function m(e){let{children:t}=e;return(0,s.jsx)("thead",{className:"bg-gray-50 text-left text-sm",children:t})}function h(e){let{children:t}=e;return(0,s.jsx)("tbody",{className:"divide-y divide-gray-100 bg-white text-left text-sm",children:t})}function f(e){let{children:t,className:l}=e;return(0,s.jsx)("th",{className:(0,o.A)("cursor-pointer select-none px-3 py-4 text-xs font-medium uppercase text-defgray-500 first:pl-6 last:pr-6 last:text-right",l),children:t})}function p(e){let{children:t,className:l}=e;return(0,s.jsx)("td",{className:(0,o.A)("px-3 py-4 first:pl-6 last:pr-6",l),children:t})}var j=l(62109),g=l(75266),b=l(66950),v=l(55218),w=l(84892),N=l(11453),y=l(55937),_=l(74360),A=l(47689),k=l(74486),C=l(69870),O=l(4917),E=l.n(O),S=l(3738),T=l(62867),P=l(77328),R=l.n(P),D=l(48230),z=l.n(D);let Y=e=>{let{accountCode:t}=e,{data:l,isLoading:n}=(0,y.oV)(),{accountDetails:c}=(0,_.X)(),[o,O]=(0,r.useState)(c.accountCode),[P,D]=(0,r.useState)(0),[Y,B]=(0,r.useState)(""),F=E()(e=>{Q(1),B(e)},300);(0,r.useEffect)(()=>{c&&l&&O(c.accountCode)},[c,l]);let I=(0,b.G)({sourceType:"page",pageTitle:"Orders",pageType:"account-orders"}),H=E()(()=>{v.Ay.publish("page-viewed",new v.wO(I,"Orders"))},500),[M,G]=(0,r.useState)([]),[L,V]=(0,r.useState)(null),[W,X]=(0,r.useState)(!0),[Z,Q]=(0,r.useState)(1),[J,U]=(0,r.useState)(!1),q=!1===c.hidePricing;return(0,r.useEffect)(()=>{(null==c?void 0:c.accountCode)&&(null==c?void 0:c.accountCode)!=="WEBPRC"&&(X(!0),U(!1),(0,N.n)(c.accountCode,{page:Z,"filter[search]":Y}).then(e=>{G(e.data),V(e.meta),e.data.find(e=>e.status)&&U(!0)}).finally(()=>{X(!1)}))},[c,Z,Y]),(0,r.useEffect)(()=>{H()},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(R(),{children:(0,s.jsx)("meta",{name:"robots",content:"noindex, nofollow"})}),(0,s.jsx)(T.bV,{title:"Your Orders | ".concat("HB Clark"),canonical:"".concat("https://www.hbclark.co.uk/","account/orders"),openGraph:{url:"".concat("https://www.hbclark.co.uk/","account/orders"),title:"Your Orders",images:[{url:(0,C.Hs)(),alt:"Your Orders "}]},twitter:{cardType:"summary_large_image",site:(0,C.Qw)()}}),(0,s.jsx)(i.A,{children:(0,s.jsxs)(d.A,{page:"orders",children:[(0,s.jsx)(w.A,{}),(0,s.jsx)("div",{className:"flex",children:(0,s.jsx)(g.A,{children:"Your Orders"})}),(0,s.jsxs)("p",{className:"mb-4 mt-1 text-sm text-defgray-500",children:[Y&&(0,s.jsx)(s.Fragment,{children:"".concat(null==L?void 0:L.total," orders (filtered)")}),!Y&&(0,s.jsxs)(s.Fragment,{children:[(null==L?void 0:L.total)?"".concat(null==L?void 0:L.total," orders"):"Online orders will appear here.",(0,s.jsx)(s.Fragment,{children:Y&&" (filtered)"})]})]}),(0,s.jsxs)("div",{className:"text-clip rounded-md border",children:[(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(j.A,{name:"search",placeholder:"Search by order ID, user or total",icon:(0,s.jsx)(a,{className:"size-4 text-gray-400"}),onChange:e=>F(e.target.value)})}),(0,s.jsxs)(u,{children:[(0,s.jsx)(m,{children:(0,s.jsxs)("tr",{className:"hidden md:table-row",children:[(0,s.jsx)(f,{className:"md:hidden",children:"Mobile Cell"}),(0,s.jsx)(f,{children:"Order ID"}),(0,s.jsx)(f,{children:"Order Date"}),(0,s.jsx)(f,{children:"Account"}),J&&(0,s.jsx)(f,{children:"Status"}
1),(0,s.jsx)(A.W,{features:[k.O.ClickAndCollect],children:(0,s.jsx)(f,{children:"Type"})}),(0,s.jsx)(f,{children:"Source"}),(0,s.jsx)(f,{children:"Placed By"}),(0,s.jsx)(f,{children:"Delivery Date"}),q&&(0,s.jsx)(f,{className:"text-right",children:"Total"}),(0,s.jsx)(f,{children:"Actions"})]})}),(0,s.jsx)(h,{children:M.map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)(p,{className:"md:hidden",children:(0,s.jsxs)(z(),{className:"flex justify-between",href:"/account/orders/view?uid=".concat(e.uuid),children:[(0,s.jsxs)("div",{className:"grow",children:[(0,s.jsxs)("p",{className:"text-base font-semibold",children:["Delivery:"," ",e.date_estimated_delivery_formatted]}),(0,s.jsxs)("p",{className:"mt-1 text-sm font-semibold",children:["Order ",e.web_order_number_formatted]}),(0,s.jsxs)("p",{className:"mt-1 text-sm font-semibold",children:["Source",": ",e.source_formatted]}),e.status&&(0,s.jsxs)("p",{className:"mt-1 text-sm font-semibold",children:["Status",": ",e.status]}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-defgray-500",children:["Ordered by ",e.placed_by,"on ",e.created_at_formatted]}),(0,s.jsx)("p",{className:"mt-1 text-sm font-semibold",children:e.total_due_formatted})]}),(0,s.jsx)("div",{className:"ml-auto shrink-0 grow-0 self-center fill-defgray-500 text-defgray-500",children:(0,s.jsx)(S.A,{className:"size-6"})})]})}),(0,s.jsx)(p,{className:"hidden md:table-cell",children:e.web_order_number_formatted}),(0,s.jsx)(p,{className:"hidden md:table-cell",children:e.created_at_formatted}),(0,s.jsx)(p,{className:"hidden md:table-cell",children:e.account}),J&&(0,s.jsx)(p,{className:"hidden md:table-cell",children:e.status}),(0,s.jsx)(A.W,{features:[k.O.ClickAndCollect],children:(0,s.jsx)(p,{className:"hidden md:table-cell",children:"collection"===e.delivery_type?"Collection":"Delivery"})}),(0,s.jsx)(p,{className:"hidden md:table-cell",children:e.source_formatted}),(0,s.jsx)(p,{className:"hidden md:table-cell",children:e.placed_by}),(0,s.jsx)(p,{className:"hidden md:table-cell",children:e.date_estimated_delivery_formatted}),q&&(0,s.jsx)(p,{className:"hidden text-right md:table-cell",children:e.total_due_formatted}),(0,s.jsx)(p,{className:"hidden text-right md:table-cell",children:(0,s.jsx)(z(),{className:"font-medium text-blue-500 hover:text-blue-700",href:"/account/orders/view?uid=".concat(e.uuid),children:"View"})})]},e.id))})]}),L&&(0,s.jsx)(x,{pagination:L,onPageChange:Q})]})]})})]})}},32462:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/orders",function(){return l(14012)}])},62932:(e,t,l)=>{"use strict";l.d(t,{A:()=>x});var s=l(37876),r=l(13557),a=l(62667),d=l(11972),i=l(17757),n=l(69557),c=l(69241),o=l(89099);let x=e=>{let{children:t,page:l,width:x="max-w-6xl"}=e,{userAuthDetails:u}=(0,d.r)();return((0,o.useRouter)(),(null==u?void 0:u.uId)==="")?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)("div",{className:"flex px-1 lg:px-0",children:[(0,s.jsx)("div",{className:(0,c.A)("mr-6 hidden w-sidebar flex-none lg:pb-8 xl:block",(0,n.PJ)()?"mr-[15px] pr-[15px]":"mr-6 border-r pr-6"),children:(0,s.jsx)(r.A,{page:l,showHeader:!0,shouldShow:!0,sideType:"sidebar"})}),(0,s.jsxs)("div",{className:(0,c.A)("flex w-full flex-col gap-3 lg:py-6",x),children:[(0,s.jsx)(a.A,{blockArea:i.G.YourAccountTop}),t]})]})}},69870:(e,t,l)=>{"use strict";l.d(t,{Hs:()=>r,Qw:()=>a});var s=l(93056);let r=()=>"https://www.hbclark.co.uk/".slice(0,-1)+(0,s.h)(!1),a=()=>""},84892:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var s=l(37876),r=l(78928),a=l(6832);l(14232);var d=l(92776);let i=()=>{let{openAccounts:e}=(0,d.E)();return(0,s.jsx)("div",{className:"flex w-fit xl:hidden",children:(0,s.jsx)(r.A,{colorScheme:"neutral",variant:"outlined",className:"bg-pill-default fill-pill-text text-pill-text hover:bg-pill-hover hover:text-pill-hoverText hover:fill-pill-hoverText !rounded-pill mb-1 flex items-center justify-start self-center whitespace-nowrap rounded-full px-4 py-2.5 text-xs transition-all",icon:(0,s.jsx)(a.A,{icon:"arrow forward ios",size:10,className:"mr-0.5 rotate-180"}),onClick:()=>void e({page:"account",sideType:"menu"}),children:"Your Account"})})}}},e=>{e.O(0,[5569,2867,6637,9978,636,6593,8792],()=>e(e.s=32462)),_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.