PageSourceSearch

https://regalflowers.com.ng/_next/static/chunks/pages/order-tracker/result-e8d1ce84a25e5a56.js

js regalflowers.com.ng collected 2026-09-29 15:36:09 UTC 19,121 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[218],{6720:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/order-tracker/result",function(){return t(3317)}])},4355:function(e,r,t){"use strict";var a=t(5893),s=t(2719),c=t.n(s);r.Z=function(e){var r=e.onChange,t=void 0===r?function(){}:r,s=e.text,n=e.name,i=e.checked,d=e.className,o=e.type,l=e.disabled;return(0,a.jsxs)("label",{className:[c().wrapper,l&&c().disabled].join(" "),children:[(0,a.jsx)("input",{name:n,className:c().checkbox,checked:i,onChange:function(e){return t(e.target.checked)},type:"checkbox",disabled:l}),(0,a.jsx)("span",{className:[c()["check-wrapper"],d,c()[o||"primary"]].join(" "),children:(0,a.jsx)("span",{className:c()["check-icon"]})}),s&&(0,a.jsx)("span",{className:c().text,children:s})]})}},3317:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSG:function(){return P},default:function(){return Z}});var a=t(7568),s=t(4924),c=t(6042),n=t(9396),i=t(9815),d=t(92),o=t(5893),l=t(1163),u=t(7294),_=t(3660),p=t(2524),m=t(4386),h=t(2776),v=t.n(h),g=t(2159),x=t(1664),k=t.n(x),N=t(4355),j=t(3419),f=t(5472),b=t(1010),y=t(7664),w=t(866),D=t(253),S=t(1945),O=t.n(S),C={1:"Terrible",2:"Bad",3:"Okay",4:"Good",5:"Excellent"},I=function(e){var r=e.value,t=e.onChange,a=e.showLabel,s=(0,u.useState)(null),c=s[0],n=s[1],i=null!==c&&void 0!==c?c:r;return(0,o.jsxs)("div",{className:O()["stars-container"],children:[a&&(0,o.jsx)("div",{className:O()["rating-labels"],children:Object.entries(C).map((function(e){var r=(0,D.Z)(e,2),t=r[0],a=r[1];return(0,o.jsx)("span",{className:[O()["rating-label"],Number(t)===i?O().active:""].join(" "),children:a},t)}))}),(0,o.jsx)("span",{className:O().stars,children:Array(5).fill("").map((function(e,a){return(0,o.jsx)("img",{src:a<(i||0)?"/icons/star.svg":"/icons/star-outline.svg",alt:"star",className:[O()["star-icon"],a<(r||0)?O().filled:O().unfilled].join(" "),onClick:function(){t(a+1),n(a+1)},onMouseEnter:function(){return n(a+1)},onMouseLeave:function(){return n(null)}},a)}))})]})},A=t(6026),R={"Not Arranged":"Order Received",Arranged:"Order Arranged","Arranged and Sorted":"Order Arranged","Arranged and Inspected":"Order Arranged","Despatched (given to driver/trip not started)":"Despatched",Despatched:"Despatched","Despatched and Client Notified":"Despatched","Despatched (drivers update)":"Despatched","Delivered (drivers update)":"Delivered",Delivered:"Delivered","Delivered and Client Notified":"Delivered","Delivery Failed/Issues with Delivery":"Delivery Failed"},F={"Not Arranged":"Order Received",Arranged:"Flowers Arranged","Arranged and Sorted":"Other items included (if any) e.g Message, Gifts etc","Arranged and Inspected":"Arranged and Inspected","Despatched (given to driver/trip not started)":"Item given to Driver",Despatched:"Driver enroute to Recipient","Despatched and Client Notified":"Driver enroute to Recipient","Despatched (drivers update)":"Driver enroute to Recipient","Delivered (drivers update)":"Delivered",Delivered:"Delivered","Delivered and Client Notified":"Delivered","Delivery Failed/Issues with Delivery":"Delivery Failed/ Issues with Delivery"},T=function(e){return/ikoyi/i.test(e)?"Despatch/Pickup from Ikoyi store":/lekki/i.test(e)?"Despatch/Pickup from Lekki store":/abuja/i.test(e)?"Despatch/Pickup from Abuja store":/unselected/i.test(e)?"":e},E={"Order Created":20,"Order Received":40,"Order Arranged":60,Despatched:80,Delivered:100},P=!0,Z=function(){var e,r,t,h,x=(0,u.useState)(null),D=x[0],S=x[1],O=(0,u.useState)(!1),C=O[0],P=O[1],Z=(0,u.useState)(!0),L=Z[0],G=Z[1],z=(0,u.useState)(null),B=z[0],H=z[1],M=(0,u.useState)(""),Q=M[0],Y=M[1],q=(0,u.useState)({}),V=q[0],U=q[1],W=(0,u.useState)(!1),X=W[0],J=W[1],K=(0,l.useRouter)().query.orderNumber,$=(0,u.useContext)(g.Z),ee=$.notify,re=$.currency,te=(0,b.Z)(),ae=(0,u.useRef)(null),se=function(){var e=(0,a.Z)((function(){var e,r,t,a;return(0,d.__generator)(this,(function(s){switch(s.label){case 0:return K?(P(!0),[4,(0,_.sd)(K)]):[2];case 1:return e=s.sent(),r=e.error,t=e.data,a=e.message,r||!t?(ee("error","Failed to fetch order details: ".concat(a)),S(null)):S(t),P(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){se()}),[K]);var ce=Boolean(null===D||void 0===D||null===(e=D.orderProducts)||void 0===e||null===(r=e[0])||void 0===r||null===(t=r.image)||void 0===t?void 0:t.src);(0,u.useEffect)((function(){var e=function(){var e=(0,a.Z)((function(){var e,r,t,a,i,o;return(0,d.__generator)(this,(function(d){switch(d.label){case 0:return ce&&(r=(null===D||void 0===D||null===(e=D.orderProducts)||void 0===e?void 0:e.map((function(e){return e.id})))||[]).length?[4,(0,y.aN)(r)]:[2];case 1:return t=d.sent(),a=t.error,i=t.data,o=t.message,a||!i?(ee("error","Failed to fetch products: ".concat(o)),[2]):(U(i.reduce((function(e,r){return(0,n.Z)((0,c.Z)({},e),(0,s.Z)({},r.id,r))}),{})),[2])}}))}));return function(){return e.apply(this,arguments)}}();e()}),[D,ce]);var ne=(0,u.useMemo)((function(){var e=(0,i.Z)((null===D||void 0===D?void 0:D.statusChangesTrail)||[]);if(!e.some((function(e){return e.paymentChange}))&&(null===D||void 0===D?void 0:D.timestamp)){var r={date:new Date(1e3*D.timestamp._seconds+D.timestamp._nanoseconds/1e6).toISOString(),newDespatchFrom:"",newStatus:"Not Arranged",paymentChange:!1};e.push(r)}var t=L?e.slice(0,1):e;return t.length?t:[{date:(null===D||void 0===D?void 0:D.timestamp)?new Date(1e3*(null===D||void 0===D?void 0:D.timestamp._seconds)+(null===D||void 0===D?void 0:D.timestamp._nanoseconds)/1e6).toISOString():"",newDespatchFrom:(null===D||void 0===D?void 0:D.despatchFrom)||"",newStatus:(null===D||void 0===D?void 0:D.deliveryStatus)||""}]}),[D,L]),ie=(0,f.F3)((null===D||void 0===D?void 0:D.orderProducts)||[],"mobile"===te?1:2),de=!ce&&(null===D||void 0===D?void 0:D.orderDetails)?(0,f.F3)((0,w.Y4)(D.orderDetails),"mobile"===te?1:2):[],oe=function(){var e=(0,a.Z)((function(){var e,r,t;return(0,d.__generator)(this,(function(a){switch(a.label){case 0:return B?(J(!0),[4,(0,_.dD)({orderId:null===D||void 0===D?void 0:D.id,rating:B,comment:Q})]):[2];case 1:return e=a.sent(),r=e.error,t=e.message,J(!1),r?(ee("error","Failed to submit rating: ".concat(t)),[2]):(ee("success","Rating submitted successfully"),se(),[2])}}))}));return function(){return e.apply(this,arguments)}}();if(C)return(0,o.jsxs)("div",{className:v().loader,children:[(0,o.jsx)("img",{src:"/images/spinner.svg",alt:"loader",className:v().icon}),(0,o.jsx)("span",{className:v()["load-intro"],children:"Loading order details..."})]});if(!D)return(0,o.jsx)("div",{children:"Order not found"});var le=new Date(D.deliveryDate),ue=/delivery\s+failed/i.test(D.deliveryStatus||""),_e=(0,w.wc)(D);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.Z,{title:"Order ".concat(D.fullOrderId," | Track Your Order | Regal Flowers"),description:"Track your flower delivery order ".concat(D.fullOrderId,". See the current status and delivery details."),canonicalUrl:"".concat(A.B5,"/order-tracker/result?orderNumber=").concat(D.fullOrderId),children:(0,o.jsx)(m.Z,{items:[{name:"Home",url:"".concat(A.B5)},{name:"Track Order",url:"".concat(A.B5,"/order-tracker")},{name:"Order ".concat(D.fullOrderId),url:"".concat(A.B5,"/order-tracker/result?orderNumber=").concat(D.fullOrderId)}]})}),(0,o.jsxs)("section",{className:v()["track-result-wrapper"],children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:v()["bread-crumb"],children:[(0,o.jsx)(k(),{href:"/order-tracker",children:"Track Order"}),(0,o.jsx)("img",{src:"/icons/caret-right.svg",alt:"caret-right"}),(0,o.jsx)("span",{children:D.fullOrderId})]}),(0,o.jsx)("h1",{className:v()["status-title"],children:_e?R[D.deliveryStatus||"Not Arranged"]||"Order Received":"Order Created"}),(0,o.jsx)("div",{className:v()["progress-bar-wrapper"],children:(0,o.jsx)("div",{className:[v()["progress-bar"],ue?v().failed:""].join(" "),style:{width:_e?"".concat(ue?75:E[R[D.deliveryStatus||"Not Arranged"]],"%"):"20%"}})}),(0,o.jsx)("div",{className:v()["progress-bar-labels"],children:Object.keys(E).map((function(e,r){var t=20*(r+1),a=E[R[D.deliveryStatus||"Not Arranged"]]>=t;return ue&&(a=r<=3),_e||(a=0===r),(0,o.jsxs)("span",{className:[v()["progress-bar-label"],a?v().active:""].join(" "),children:[(0,o.jsx)(N.Z,{checked:a,className:[v()["progress-bar-label-checkbox"],a?v().active:"",ue?v().failed:""].join(" "),onChange:function(){}}),(0,o.jsx)("span",{children:e})]},e)}))})]}),(0,o.jsxs)("div",{className:v()["order-details-card"],children:[(0,o.jsx)("h2",{className:v()["order-details-card-title"],children:"DELIVERY DETAILS"}),(0,o.jsxs)("div",{className:v()["order-details-card-content"],
1children:[(0,o.jsxs)("div",{className:v().left,children:[(0,o.jsx)("span",{className:v().weekday,children:le.toLocaleDateString("en-GB",{weekday:"long"})}),(0,o.jsx)("span",{className:v().month,children:le.toLocaleDateString("en-GB",{month:"short"})}),(0,o.jsx)("span",{className:v().day,children:le.toLocaleDateString("en-GB",{day:"numeric"})}),(0,o.jsx)("span",{className:v().label,children:"Delivery date"})]}),(0,o.jsx)("div",{className:v().vr}),(0,o.jsxs)("div",{className:v().right,children:[(0,o.jsxs)("div",{className:"flex spaced",children:[(0,o.jsx)("span",{className:v()["history-title"],children:L?"LATEST UPDATE":"SHIPPING HISTORY"}),(0,o.jsx)(j.Z,{onClick:function(){return G(!L)},type:"plain",className:v()["minimize-toggle-button"],children:L?"Show Full History":"Hide Shipping History"})]}),(0,o.jsx)("div",{className:v()["history-list"],children:null===ne||void 0===ne?void 0:ne.map((function(e,r){return(0,o.jsxs)("div",{className:v()["history-item"],children:[(0,o.jsxs)("span",{children:[(0,o.jsx)("span",{className:v()["history-item-date"],children:new Date(e.date).toLocaleDateString("en-GB",{weekday:"long",month:"long",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase()}),!e.paymentChange&&T(e.newDespatchFrom)&&(0,o.jsx)("span",{className:v()["history-item-location"],children:T(e.newDespatchFrom)})]}),(0,o.jsx)("span",{children:e.paymentChange?"Order Created ".concat(_e?"":"(Payment Pending)"):F[e.newStatus]})]},r)}))}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:v().hr}),(0,o.jsxs)("div",{className:v()["history-footer"],children:[(0,o.jsx)("img",{src:"/icons/order-package.svg",alt:"order-package",className:"generic-icon"}),(0,o.jsxs)("span",{className:"flex column gap-sm",children:[(0,o.jsx)("span",{children:"Order Number:"}),(0,o.jsx)("span",{className:"underline",children:D.fullOrderId})]}),D.noteToClient&&(0,o.jsxs)("div",{className:v()["note-to-client"],children:[(0,o.jsx)("img",{src:"/icons/info.svg",alt:"note",className:"generic-icon"}),D.noteToClient]})]})]})]})]})]}),ce&&ie.length>0&&(0,o.jsxs)("div",{className:v()["order-details-card"],children:[(0,o.jsx)("h2",{className:v()["order-details-card-title"],children:"ITEMS IN ORDER"}),(0,o.jsx)("div",{className:v()["order-details-card-content"],children:(0,o.jsx)("div",{className:v()["order-products"],children:ie.map((function(e,r){return(0,o.jsx)("div",{className:v()["order-product-row"],children:e.map((function(e){var r,t,a;return(0,o.jsxs)("div",{className:v()["order-product-card"],children:[(0,o.jsx)("img",{src:null===(r=e.image)||void 0===r?void 0:r.src,alt:(null===(t=e.image)||void 0===t?void 0:t.alt)||e.nameClient||e.name,className:v()["order-product-image"]}),(0,o.jsxs)("div",{className:v()["order-product-details"],children:[(0,o.jsx)("span",{className:v()["order-product-name"],children:e.nameClient||e.name}),(0,o.jsx)("span",{className:v()["order-product-subtitle"],children:null===(a=V[e.id])||void 0===a?void 0:a.subtitle}),(0,o.jsxs)("div",{className:"flex column",children:[(0,o.jsxs)("span",{className:v()["order-product-summary"],children:[(0,o.jsxs)("span",{className:v()["order-product-details-quantity"],children:["Qty: ",e.quantity]}),(0,o.jsx)("span",{className:v()["order-product-details-size"],children:e.size}),e.design&&(0,o.jsx)("span",{className:v()["order-product-details-design"],children:e.design})]}),(0,o.jsx)("span",{className:v()["order-product-price"],children:(0,f.j$)(e.price,re)})]})]})]},e.id)}))},r)}))})})]}),!ce&&de.length>0&&(0,o.jsxs)("div",{className:v()["order-details-card"],children:[(0,o.jsx)("h2",{className:v()["order-details-card-title"],children:"ITEMS IN ORDER"}),(0,o.jsx)("div",{className:v()["order-details-card-content"],children:(0,o.jsx)("div",{className:v()["order-products"],children:de.map((function(e,r){return(0,o.jsx)("div",{className:v()["order-product-row"],children:e.map((function(e){var r;return(0,o.jsxs)("div",{className:[v()["order-product-card"],v()["non-web-order-product"]].join(" "),children:[(0,o.jsx)("img",{src:"/icons/regal-flowers-gifts-logo-small.png",alt:"product placeholder",className:v()["order-product-image"]}),(0,o.jsxs)("div",{className:v()["order-product-details"],children:[(0,o.jsx)("span",{className:v()["order-product-name"],children:e}),(0,o.jsx)("span",{className:v()["order-product-subtitle"],children:e}),(0,o.jsx)("div",{className:"flex column",children:(0,o.jsx)("span",{className:v()["order-product-price"],children:null===(r=e.match(/\((.*?)\)/))||void 0===r?void 0:r[1]})})]})]},e)}))},r)}))})})]}),(0,o.jsx)("div",{className:v()["order-details-card"],children:(0,o.jsx)("div",{className:v()["order-review-section"],children:(null===D||void 0===D||null===(h=D.feedbackClient)||void 0===h?void 0:h.rating)?(0,o.jsxs)("div",{className:v()["review-success"],children:[(0,o.jsx)("img",{src:"/icons/check-circle.svg",alt:"check",className:v()["review-success-icon"]}
1),(0,o.jsxs)("div",{className:v()["review-success-content"],children:[(0,o.jsx)("h2",{className:v()["success-title"],children:"We appreciate your feedback!"}),(0,o.jsx)("p",{className:v()["success-message"],children:"While we're not able to respond to individual feedback, we look closely at each comment and rating to improve your shopping experience."})]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h3",{className:v()["order-review-title"],children:"How Was Your Overall Experience?"}),(0,o.jsx)("div",{className:v()["rating-section"],children:B?(0,o.jsxs)("div",{className:v()["post-rating"],children:[(0,o.jsxs)("div",{className:v()["rating-header"],children:[(0,o.jsx)("span",{className:v()["rating-value"],children:B.toFixed(1)}),(0,o.jsx)("button",{className:v()["change-rating"],onClick:function(){return H(null)},children:"Change"})]}),(0,o.jsxs)("div",{className:v()["comment-section"],children:[(0,o.jsx)("input",{type:"text",placeholder:"Leave a comment",value:Q,onChange:function(e){return Y(e.target.value)},className:v()["comment-input"],ref:ae}),(0,o.jsx)(j.Z,{className:v()["submit-button"],onClick:oe,type:"primary",loading:X,children:"Submit"})]})]}):(0,o.jsx)(I,{value:B,onChange:function(e){H(e),setTimeout((function(){var e;null===(e=ae.current)||void 0===e||e.focus()}))},showLabel:!0})})]})})})]})]})}},2719:function(e){e.exports={wrapper:"Checkbox_wrapper__5SOt6",disabled:"Checkbox_disabled__T2YTz",checkbox:"Checkbox_checkbox__V1vfZ",text:"Checkbox_text__X8oxa","check-wrapper":"Checkbox_check-wrapper__Sq1Ad","check-icon":"Checkbox_check-icon__b_Qiu",transparent:"Checkbox_transparent__zNX9_"}},1945:function(e){e.exports={"stars-container":"StarRating_stars-container__vuCH7","rating-labels":"StarRating_rating-labels__EsBrA","rating-label":"StarRating_rating-label__AtNQA",active:"StarRating_active__xbz_u",stars:"StarRating_stars__bBzTa","star-icon":"StarRating_star-icon__tNYfP",unfilled:"StarRating_unfilled__MQ192"}},2776:function(e){e.exports={"hero-bg":"order-tracker_hero-bg__WUIXx",title:"order-tracker_title__nnnEh",subtitle:"order-tracker_subtitle__1W8qR","search-container":"order-tracker_search-container__0NFYg",input:"order-tracker_input__HaQGU",button:"order-tracker_button__gFYl1",loader:"order-tracker_loader__0aDKN",icon:"order-tracker_icon__nvi8r","load-intro":"order-tracker_load-intro__6YxZa","track-result-wrapper":"order-tracker_track-result-wrapper__H79GQ","bread-crumb":"order-tracker_bread-crumb__53Gxa","status-title":"order-tracker_status-title__lO8i6","progress-bar-wrapper":"order-tracker_progress-bar-wrapper__CpzAN","progress-bar":"order-tracker_progress-bar__jdeuP",failed:"order-tracker_failed__r4kcR","progress-bar-labels":"order-tracker_progress-bar-labels__OOMrS","progress-bar-label":"order-tracker_progress-bar-label__GFJr_",active:"order-tracker_active__Wp6M1","progress-bar-label-checkbox":"order-tracker_progress-bar-label-checkbox__qD_TD","order-details-card":"order-tracker_order-details-card__yhLkK","order-details-card-title":"order-tracker_order-details-card-title__e9QH1","order-details-card-content":"order-tracker_order-details-card-content__68q1r",left:"order-tracker_left__jIa9b",weekday:"order-tracker_weekday__W26TV",month:"order-tracker_month__Cs5J0",day:"order-tracker_day__OEdEe",label:"order-tracker_label__QQKsz",right:"order-tracker_right__lhiK6","history-title":"order-tracker_history-title__7L1O_","minimize-toggle-button":"order-tracker_minimize-toggle-button__pSuPg","history-list":"order-tracker_history-list__XFtK7","history-item":"order-tracker_history-item___1hNu","history-item-location":"order-tracker_history-item-location__6HX9g","history-footer":"order-tracker_history-footer__luZLS","note-to-client":"order-tracker_note-to-client__wTUvC","order-products":"order-tracker_order-products__G6z5u","order-product-row":"order-tracker_order-product-row__0hnNP","order-product-card":"order-tracker_order-product-card__V0VMQ","order-product-image":"order-tracker_order-product-image__ySCJy","order-product-details":"order-tracker_order-product-details__tq602","order-product-name":"order-tracker_order-product-name__mPuUt","order-product-subtitle":"order-tracker_order-product-subtitle__YN9oR","order-product-summary":"order-tracker_order-product-summary__zvMJP","order-product-price":"order-tracker_order-product-price__127_O","non-web-order-product":"order-tracker_non-web-order-product__uNcGQ","order-product-group-controls":"order-tracker_order-product-group-controls__x0vnP","order-product-group-control-button":"order-tracker_order-product-group-control-button__rHnMD",disabled:"order-tracker_disabled__cgSnw",vr:"order-tracker_vr__7kUZc",hr:"order-tracker_hr__rjFIp","order-review-section":"order-tracker_order-review-section__O3qnD","review-success":"order-tracker_review-success__5VLy3","review-success-icon":"order-tracker_review-success-icon__sFJyS","review-success-content":"order-tracker_review-success-content__yk_gf","success-title":"order-tracker_success-title__956S5","success-message":"order-tracker_success-message__VOV55","order-review-title":"order-tracker_order-review-title__l6I53","rating-section":"order-tracker_rating-section__5IV8B","post-rating":"order-tracker_post-rating__aPFP3","rating-header":"order-tracker_rating-header__bF_jQ","rating-value":"order-tracker_rating-value__Ad7ns","change-rating":"order-tracker_change-rating__vhqPV","comment-section":"order-tracker_comment-section__R1RE_","comment-input"
1:"order-tracker_comment-input__DDnWT"}}},function(e){e.O(0,[774,888,179],(function(){return r=6720,e(e.s=r);var r}));var r=e.O();_N_E=r}]);

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.