1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552],{2754:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/order/[orderHashId]",function(){return l(1514)}])},20743:function(e,s,l){"use strict";l.d(s,{T:function(){return d}});var r=l(85893),a=l(67294),t=l(94184),n=l.n(t),i=l(79127);let d=e=>{var s,l;let{brand:t}=(0,a.useContext)(i.I),d=null!==(l=null!==(s=e.url)&&void 0!==s?s:t.background)&&void 0!==l?l:"/images/default-brand-background.png";return(0,r.jsxs)("div",{className:n()("text-white flex flex-col text-3xl z-10 relative w-full",e.className),style:{...e.style,backgroundImage:"url(".concat(d,")"),backgroundSize:"cover",zIndex:1,backgroundPosition:"center"},children:[(0,r.jsx)("div",{className:"absolute top-0 left-0 bg-black bg-opacity-60 z-20 w-full h-full",style:{zIndex:-1}}),(0,r.jsx)("div",{className:"relative z-30 flex justify-center items-center flex-grow",children:e.children})]})}},4703:function(e,s,l){"use strict";l.d(s,{b:function(){return o}});var r=l(85893),a=l(67294),t=l(87399),n=l(50948),i=l(76822);let d=e=>{let{label:s,value:l,tooltip:a}=e;return(0,r.jsxs)("div",{className:"border-b border-dashed justify-between flex items-center text-sm",children:[a?(0,r.jsxs)("div",{className:"flex justify-center items-center space-x-2",children:[(0,r.jsx)("div",{children:s}),(0,r.jsx)(n.Icon,{src:i.Z,tooltip:a})]}):(0,r.jsx)("div",{children:s}),(0,r.jsx)("div",{children:l})]})};var c=l(79127);let o=e=>{let{order:s}=e,{brand:l}=(0,a.useContext)(c.I);return s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{label:"Sub Total",value:(0,t.CZ)(null==s?void 0:s.sub_total,!1)}),(null==s?void 0:s.rewards_discount)&&s.rewards_discount<0?(0,r.jsx)(d,{label:"Rewards Discount",value:(0,t.CZ)(s.rewards_discount)}):null,(null==s?void 0:s.coupon_discount)&&s.coupon_discount<0?(0,r.jsx)(d,{label:"Coupon Discount",value:(0,t.CZ)(s.coupon_discount)}):null,!l.has_tips||(null==s?void 0:s.third_party_delivery_tip)?null:(0,r.jsx)(d,{label:"Tip",value:(0,t.CZ)(null==s?void 0:s.tip,!1)}),(null==s?void 0:s.third_party_delivery_tip)?(0,r.jsx)(d,{label:"Third Party Delivery Tip",value:(0,t.CZ)(null==s?void 0:s.third_party_delivery_tip)}):null,(0,r.jsx)(d,{label:"Taxes and Fees",value:(0,t.CZ)((null==s?void 0:s.sales_tax)+(null==s?void 0:s.customer_service_fee),!1),tooltip:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:"Sales Tax: ".concat((0,t.CZ)(null==s?void 0:s.sales_tax,!1))}),(null==s?void 0:s.customer_service_fee)?(0,r.jsx)("div",{children:"Platform Fee: ".concat((0,t.CZ)(s.customer_service_fee,!1)," (This helps maintain our website)")}):null]})}),(null==s?void 0:s.third_party_delivery_fee)?(0,r.jsx)(d,{label:"Third Party Delivery Fee",value:(0,t.CZ)(null==s?void 0:s.third_party_delivery_fee,!1)}):null,(null==s?void 0:s.delivery_fee)?(0,r.jsx)(d,{label:"Delivery Fee",value:(0,t.CZ)(null==s?void 0:s.delivery_fee,!1)}):null,(null==s?void 0:s.gratuity_fee)?(0,r.jsx)(d,{tooltip:(0,r.jsx)("div",{children:"Certain items in your cart have a gratuity fee attached to them."}),label:"Gratuity Fee",value:(0,t.CZ)(null==s?void 0:s.gratuity_fee,!1)}):null,(0,r.jsx)(d,{label:"Total",value:(0,t.CZ)(null==s?void 0:s.total,!1)})]}):null}},1514:function(e,s,l){"use strict";l.r(s),l.d(s,{OrderDetailPanel:function(){return y},__N_SSP:function(){return _},default:function(){return b}});var r=l(85893),a=l(50948),t=l(67294),n=l(94184),i=l.n(n),d=l(9826),c=l(82849),o=l(87399),u=l(56126),x=l(32728);let h=e=>{let{checked:s,label:l,noBar:t}=e;return(0,r.jsxs)("div",{className:i()("flex flex-grow items-start flex-col space-x-1",{"text-gray-300":!s}),children:[(0,r.jsxs)("div",{className:"flex items-center flex-grow w-full",children:[(0,r.jsx)(a.Icon,{className:i()({"text-green-300":s}),src:s?u.Z:x.Z}),!t&&(0,r.jsx)("div",{className:i()("w-full h-1 rounded",{"bg-green-300":s,"bg-gray-200":!s})})]}),(0,r.jsx)("span",{children:l})]})},m=e=>{let{label:s,value:l}=e;return l?(0,r.jsxs)("div",{className:"border-b border-dashed py-1",children:[(0,r.jsxs)("div",{className:"text-sm font-bold",children:[s,":"]}),(0,r.jsx)("div",{children:l})]}):null};var v=l(20743),j=l(4703);let f=e=>{let{order:s}=e,[l={},t,n]=(0,a.useFetch)({url:"/api/delivery-quote/".concat(s.delivery_quote_hash_id)});return(0,r.jsxs)(y,{className:"flex flex-col",children:[(0,r.jsx)("h2",{children:"DoorDash Delivery"}),"unassigned"===l.status?(0,r.jsx)("div",{children:(0,r.jsx)("span",{children:"Waiting for DoorDash to assign a driver."})}):(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{children:"Delivery expected to be around "}),(0,r.jsx)(a.DateFormat,{format:"h:mma",value:l.dropoff_time_estimated_at}),(0,r.jsx)("span",{children:" (".concat(l.status,")")})]}),(0,r.jsx)(a.Button,{href:{target:"_blank",href:l.tracking_url},children:"Track Delivery"})]})};var p=l(79821),_=!0;let y=e=>(0,r.jsx)("div",{...e,className:i()("w-full flex justify-center items-center border-dashed p-4 border-gray border-b-2",e.className)});var b=e=>{let{order:s,brand:l}=e,[n,i]=(0,t.useState)(s),u=new Date(n.placed_at);u.setMinutes(u.getMinutes()+n.wait_minutes);let x=new Date(u);x.setMinutes(x.getMinutes()+15),n.scheduled_at&&(x=new Date(n.scheduled_at),u=new Date(n.scheduled_at));let _="confirmed"===n.status&&x<new Date,b=new Date;b.setHours(b.getHours()+2);let w=0;_&&x<b?w=3:_?w=2:("confirmed"===n.status||"upcoming"===n.status)&&(w=1),(0,t.useEffect)(()=>
1{if(!n)return;let e=setInterval(()=>{(0,a.enhancedFetch)("/api/order/".concat(n.hash_id,"/order-page")).then(e=>{let{order:s}=e;return i(s)}).catch(console.error)},2e4);return()=>clearInterval(e)},[n]);let N=!!n.delivery_quote_hash_id,g=async()=>{let e=prompt("How much do you want to tip?",Math.round(.2*n.total/100).toFixed(2));e&&i(await a.Journey.post("/api/order/".concat(n.hash_id,"/add-tip"),{tip:100*parseFloat(e)}))};return(0,r.jsxs)(c.n,{brand:l,title:n.name,description:"View your order's status and order summary.",className:"full-screen",children:[(0,r.jsx)(v.T,{className:"h-40",children:(0,r.jsx)("h2",{className:"text-3xl z-20 font-bold",children:"".concat((0,o.kC)(n.type)," Order")})}),(0,r.jsxs)("div",{className:"flex text-center justify-center items-center flex-col flex-nowrap",children:[l.has_rewards?(0,r.jsxs)(y,{className:"font-bold text-lg flex justify-center items-center flex-nowrap space-x-2 py-4",children:[(0,r.jsx)("span",{children:"You earned ".concat(n.earned_points," points")}),(0,r.jsx)(a.Button,{className:"size-sm primary px-4",href:"/user/rewards",children:"My Rewards"})]}):null,n.canceled_at?(0,r.jsx)(y,{className:"py-4",children:"Sorry, your order has been canceled. Please allow up to 48 hours for the refund to show on your credit card statement."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(y,{className:"flex flex-shrink-0",children:[(0,r.jsx)(h,{checked:!0,label:"Sent"}),(0,r.jsx)(h,{checked:w>=1,label:"Confirmed"}),(0,r.jsx)(h,{checked:w>=2,label:"Ready"}),(0,r.jsx)(h,{checked:w>=3,label:"Completed"})]}),(0,r.jsxs)(y,{className:"space-y-4 flex flex-col justify-center items-center text-lg",children:[0===w&&(0,r.jsx)("div",{children:"Your order has been sent, waiting for confirmation from the restaurant."}),(1===w||2===w)&&(n.scheduled_at?(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{children:"Your order has been scheduled for "}),(0,r.jsx)(a.DateFormat,{value:n.scheduled_at,format:"M/d/yy h:mma"})]}):(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{children:"Your order will be ready around "}),(0,r.jsx)(a.DateFormat,{value:u,format:"h:mma"}),(0,r.jsx)("span",{children:" to "}),(0,r.jsx)(a.DateFormat,{value:x,format:"h:mma"}),(0,r.jsx)("span",{children:"."})]})),3===w&&(0,r.jsx)("div",{children:"Thank you for your order and supporting local business!"}),0===n.third_party_delivery_tip&&N?(0,r.jsxs)(a.Button,{className:"size-lg overflow-visible",onClick:g,children:[(0,r.jsx)(p.U,{}),"Add Tip"]}):null,0===w?(0,r.jsx)(a.Spinner,{}):null]})]}),n.delivery_quote_hash_id?(0,r.jsx)(f,{order:n}):null]}),(0,r.jsxs)("div",{className:"space-y-2 my-2",children:[(0,r.jsxs)(a.Accordion,{openByDefault:!0,children:[(0,r.jsxs)(a.AccordionHeader,{className:"rounded-none",children:[(0,r.jsx)("span",{children:"Customer Details"}),(0,r.jsx)(a.AccordionCaret,{})]}),(0,r.jsxs)(a.AccordionContent,{className:"p-2 space-y-2",children:[(0,r.jsx)(m,{label:"Name",value:n.name}),(0,r.jsx)(m,{label:"Placed At",value:(0,r.jsx)(a.DateFormat,{value:n.placed_at,format:"M/d/yy h:mma"})}),(0,r.jsx)(m,{label:"Phone",value:n.phone_number}),(0,r.jsx)(m,{label:"Email",value:n.email}),(0,r.jsx)(m,{label:"Instructions",value:n.instructions}),"delivery"===n.type?(0,r.jsx)(m,{label:"Delivery Address",value:n.address}):null]})]}),(0,r.jsxs)(a.Accordion,{openByDefault:!0,children:[(0,r.jsxs)(a.AccordionHeader,{className:"rounded-none",children:[(0,r.jsx)("span",{children:"Items"}),(0,r.jsx)(a.AccordionCaret,{})]}),(0,r.jsxs)(a.AccordionContent,{className:"space-y-2 p-2",children:[(0,r.jsx)("div",{className:"mb-6",children:n.items.map(e=>(0,r.jsxs)("div",{className:"border-b border-dashed",children:[(0,r.jsxs)("div",{className:"flex p-1 justify-between w-full",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-1",children:[e.parent_hash_id?(0,r.jsx)(a.Icon,{className:"ml-4",src:d.Z}):null,(0,r.jsxs)("span",{children:[e.quantity>1?"".concat(e.quantity,"x "):"",e.size_name," ",e.name]})]}),(0,r.jsx)("span",{children:(0,o.CZ)(e.price)})]}),e.details.map(e=>(0,r.jsxs)("div",{className:"ml-7 flex items-center space-x-2",children:[(0,r.jsx)(a.Icon,{src:d.Z}),(0,r.jsx)("span",{children:e})]},e))]},e.hash_id))}),(0,r.jsx)(j.b,{order:n})]})]})]})]})}}},function(e){e.O(0,[849,888,774,179],function(){return e(e.s=2754)}),_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.