PageSourceSearch

https://app.tradesnest.com/_next/static/chunks/pages/order/view/[orderId]-f0a0fc35827e9a4e.js

js tradesnest.com collected 2026-10-06 18:04:17 UTC 16,566 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5164],{25224:function(e,n,r){"use strict";r.d(n,{t:function(){return t}});r(67294);var s=r(13945),a=r(85893),t=function(e){var n=e.label,r=e.value,t=e.labelSpan,l=void 0===t?6:t,c=e.valueSpan,i=void 0===c?6:c;return(0,a.jsxs)(s.J2,{className:"row",children:[(0,a.jsx)("div",{className:"col-".concat(l),children:(0,a.jsxs)("label",{children:[n,":"]})}),(0,a.jsx)("div",{className:"col-".concat(i),children:(0,a.jsx)("span",{children:r})})]})}},13945:function(e,n,r){"use strict";r.d(n,{J2:function(){return p},Pu:function(){return d},rZ:function(){return u},y8:function(){return m}});var s,a,t,l,c=r(71383),i=r(39261),o=r(30411),d=o.ZP.div(s||(s=(0,c.Z)(["\n  span {\n    font-size: 0.9rem;\n  }\n\n  a {\n    color: black;\n  }\n\n  label {\n    font-size: 0.9rem;\n    color: ",";\n    margin-bottom: 0.25rem;\n  }\n\n  span {\n    display: block;\n  }\n"])),i.Il.darkGray),u=o.ZP.h6(a||(a=(0,c.Z)(["\n  font-size: 1rem;\n  margin-bottom: 1rem;\n"]))),m=o.ZP.span(t||(t=(0,c.Z)(["\n  && {\n    font-size: 1.25rem;\n    font-weight: 500;\n  }\n"]))),p=o.ZP.div(l||(l=(0,c.Z)(["\n  &,\n  span {\n    color: ",";\n    font-size: 0.9rem;\n  }\n\n  label {\n    margin-right: 0.25rem;\n  }\n"])),i.Il.darkGray)},90269:function(e,n,r){"use strict";r.d(n,{A:function(){return i},D:function(){return d}});var s=r(50029),a=r(87794),t=r.n(a),l=r(9669),c=r.n(l);function i(e){return o.apply(this,arguments)}function o(){return(o=(0,s.Z)(t().mark((function e(n){var r,s;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.offerId,s=n.distributorInput,e.next=3,c().post("/api/order/create",{offerId:r,distributorInput:s});case 3:return e.abrupt("return",e.sent.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return u.apply(this,arguments)}function u(){return(u=(0,s.Z)(t().mark((function e(n){var r,s,a,l;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.orderId,l=n.state,null===(r=window)||void 0===r||null===(s=r.dataLayer)||void 0===s||s.push({event:"updateOrderState",eventData:{orderState:l}}),e.next=4,c().post("/api/order/state",{orderId:a,state:l});case 4:return e.abrupt("return",e.sent.data);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},47325:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSP:function(){return oe},default:function(){return de}});var s,a,t,l,c,i,o,d,u,m,p,h=r(67294),f=r(41664),v=r.n(f),x=r(29015),j=r(5517),b=r(69634),y=r(15504),g=r(59122),N=r(11163),w=r(85836),P=r(17834),k=r(85893),Z={success:{color:"success",message:"Thank you for your order! Your payment has been successfully processed."},cancelled:{color:"warning",message:"The payment has been cancelled. Please finalize payment to complete your order."},failed:{color:"danger",message:(0,k.jsxs)(k.Fragment,{children:["Something went wrong in processing the payment. If your payment came through, please"," ",(0,k.jsx)("a",{href:"mailto:[email protected]",children:"contact us"})," ","and your order will be amended."]})}},F=function(e){var n=e.paymentStatus,r=Z[n],s=r.message,a=r.color;return(0,k.jsx)(P.Z,{color:a,children:s})},I=r(81463),_=r.n(I),T=r(25977),D=r(71383),S=r(39261),C=r(30411),z=C.ZP.h4(s||(s=(0,D.Z)(["\n  font-size: 1.3rem;\n  font-weight: bold;\n  margin-bottom: 0;\n  word-wrap: break-word;\n"]))),M=C.ZP.span(a||(a=(0,D.Z)(["\n  font-size: 0.85rem;\n\n  &,\n  a {\n    color: ",";\n  }\n"])),S.Il.darkGray),O=function(e){var n,r=e.order,s=e.manufacturer,a=s.companyName,t=s.id,l=r.complete_order,c=l.terms,i=l.offer;return(0,k.jsx)("div",{className:"row",children:(0,k.jsx)("div",{className:"col-12",children:(0,k.jsxs)("div",{className:"row",children:[(0,k.jsxs)("div",{className:"col-12 col-sm-8",children:[(0,k.jsxs)(z,{children:["Order ",(0,w.F$)(r)]}),(0,k.jsxs)(M,{children:["Manufacturer:",(0,k.jsx)(v(),{href:"/user/".concat(t),className:"ml-1",children:a})]})]}),(0,k.jsxs)("div",{className:"col-12 col-sm-4 text-sm-right",children:[(0,k.jsxs)(z,{children:[(0,k.jsx)("span",{className:"mr-1",children:_()(c.currency)}),null===(n=(0,T.gf)({offer:i,terms:c}))||void 0===n?void 0:n.toFixed(2)]}),"overdue"===(0,w.u6)(r)&&(0,k.jsx)("span",{className:"ml-2 badge badge-danger",children:"Payment overdue"})]})]})})})},E=r(93967),G=r.n(E),Y=r(13945),A=function(e){var n=e.manufacturer,r=e.terms,s=e.className;
1return(0,k.jsx)("div",{className:G()("card shadow-sm mb-3",s),children:(0,k.jsx)("div",{className:"card-body",children:(0,k.jsxs)("div",{className:"row",children:[(0,k.jsxs)(Y.Pu,{className:"col-sm-12 col-md-3",children:[(0,k.jsx)("label",{children:"Contact person"}),(0,k.jsx)("span",{children:(0,k.jsx)(v(),{href:"/user/".concat(n.id),children:n.companyName})}),(0,k.jsxs)("span",{children:[n.name," ",n.surname]})]}),(0,k.jsxs)(Y.Pu,{className:"col-sm-12 col-md-5",children:[(0,k.jsx)("label",{children:"Supplier address"}),(0,k.jsx)("pre",{children:"".concat(n.address,"\n").concat(n.postalCode," ").concat(n.city,"\n").concat(n.countryName)})]}),(0,k.jsx)(Y.Pu,{className:"col-sm-12 col-md-4",children:"delivery"===r.deliveryOrPickup?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("label",{children:"Ship to"}),(0,k.jsx)("pre",{children:r.shippingAddress})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("label",{children:"Delivery method"}),(0,k.jsx)("span",{children:"Pick-up"})]})})]})})})},X=r(25675),R=r.n(X),J=r(30381),$=r.n(J),V=r(33413),B=r(25224),H=function(e){var n=e.offeredProduct,r=e.products,s=e.terms,a=n.productId,t=n.price,l=n.quantity,c=n.estimatedDelivery,i=s.currency,o=null===r||void 0===r?void 0:r.find((function(e){return e.id===a}));return(0,k.jsx)("div",{className:"card shadow-sm mb-3",children:(0,k.jsx)("div",{className:"card-body",children:(0,k.jsxs)("div",{className:"row flex-d justify-content-end",children:[(null===o||void 0===o?void 0:o.mainImagePath)&&(0,k.jsx)("div",{className:"col-12 col-md-4 col-lg-3 mb-3",children:(0,k.jsx)(v(),{href:"/product/".concat(a),children:(0,k.jsx)(V.Fj,{className:"d-flex justify-content-center align-items-center",children:(0,k.jsx)(R(),{width:250,height:250,alt:"".concat(null===o||void 0===o?void 0:o.name," image"),src:(0,g.Gk)(null===o||void 0===o?void 0:o.mainImagePath,"product-gallery")})})})}),(0,k.jsxs)(Y.Pu,{className:G()("col-12 mb-4",{"col-md-8 col-lg-7":null===o||void 0===o?void 0:o.mainImagePath,"col-lg-10":!(null!==o&&void 0!==o&&o.mainImagePath)}),children:[(0,k.jsx)(v(),{href:"/product/".concat(a),children:(0,k.jsx)(Y.rZ,{children:(null===o||void 0===o?void 0:o.name)||"Product no longer exists"})}),(0,k.jsx)(B.t,{label:"Model number",value:null===o||void 0===o?void 0:o.modelNumber}),(0,k.jsx)(B.t,{label:"Country of production",value:null===o||void 0===o?void 0:o.countryName}),(0,k.jsx)(B.t,{label:"Price per item",value:"".concat(_()(i)," ").concat(t.toFixed(2))}),(0,k.jsx)(B.t,{label:"Total amount",value:"".concat(_()(i)," ").concat((0,T.lp)([n]).toFixed(2))})]}),(0,k.jsx)(Y.Pu,{className:G()("col-12 col-lg-2 text-lg-right mb-2",{"col-md-8":null===o||void 0===o?void 0:o.mainImagePath}),children:(0,k.jsxs)("div",{className:"row",children:[(0,k.jsxs)("div",{className:"col-6 col-lg-12 mb-lg-3",children:[(0,k.jsx)("label",{children:"Order Quantity"}),(0,k.jsx)(Y.y8,{children:l})]}),(0,k.jsxs)("div",{className:"col-6 col-lg-12",children:[(0,k.jsx)("label",{children:"Est. delivery"}),(0,k.jsx)(Y.y8,{title:$()(c).format("YYYY-MM-DD"),children:$()(c).format("MMM. D")})]})]})})]})})},a)},L=r(9774),q=(C.ZP.div(t||(t=(0,D.Z)(["\n  span {\n    font-size: 0.9rem;\n  }\n\n  a {\n    color: black;\n  }\n\n  label {\n    font-size: 0.9rem;\n    color: ",";\n    margin-bottom: 0.25rem;\n  }\n\n  span {\n    display: block;\n  }\n"])),S.Il.darkGray),C.ZP.h6(l||(l=(0,D.Z)(["\n  font-size: 1.25rem;\n  margin-bottom: 1rem;\n"]))),C.ZP.span(c||(c=(0,D.Z)(["\n  && {\n    font-size: 1.25rem;\n    font-weight: 500;\n  }\n"]))),C.ZP.div(i||(i=(0,D.Z)(["\n  font-size: 0.9rem;\n\n  span {\n    color: black;\n    font-size: 0.9rem;\n    font-weight: 500;\n  }\n\n  label {\n    color: ",";\n  }\n\n  &.highlight {\n    span {\n      color: red;\n    }\n  }\n"])),S.Il.darkGray)),Q=C.ZP.div(o||(o=(0,D.Z)(["\n  &&& {\n    label,\n    span {\n      color: black;\n      font-size: 1.1rem;\n    }\n  }\n"]))),U=function(e){var n=e.label,r=e.value,s=e.className;return(0,k.jsxs)(q,{className:G()("row",s),children:[(0,k.jsx)("div",{className:"col col-sm-6",children:(0,k.jsx)("label",{children:n})}),(0,k.jsx)("div",{className:"col col-sm-6 text-right",children:(0,k.jsx)("span",{children:r})})]})},W=function(e){var n,r,s,a,t,l,c=e.order,i=e.className,o=e.showTnFees,d=c.payment_due,u=c.complete_order,m=u.offer,p=u.terms;return(0,k.jsx)("div",{className:i,children:(0,k.jsx)("div",{className:"card shadow-sm",children:(0,k.jsxs)("div",{className:"card-body",children:[(0,k.jsx)(U,{label:"Product subtotal",value:"".concat(_()(p.currency)," ").concat((0,T.lp)(m).toFixed(2))}),p.VAT&&(0,k.jsx)(U,{label:"VAT",value:"".concat(_()(p.currency)," ").concat(null===(n=p.VAT)||void 0===n?void 0:n.toFixed(2))}),p.shippingHandlingCost&&(0,k.jsx)(U,{label:"Shipping and handling",value:"".concat(_()(p.currency)," ").concat(null===(r=p.shippingHandlingCost)||void 0===r?void 0:r.toFixed(2))}),S.oX.serviceFee&&(0,k.jsx)(U,{label:"Service fee",value:"".concat(_()(p.currency)," ").concat(null===(s=S.oX.serviceFee)||void 0===s?void 0:s.toFixed(2))}),(0,k.jsx)("hr",{}),(0,k.jsx)(Q,{children:(0,k.jsx)(U,{label:"Total",value:"".concat(_()(p.currency)," ").concat(null===(a=(0,T.gf)({offer:m,terms:p}))||void 0===a?void 0:a.toFixed(2))})}),(0,k.jsx)("hr",{}),o&&(0,k.jsx)(U,{label:"Tradesnest processing fees*",value:"\n                ".concat(_()(p.currency)," ").concat(null===(t=(0,L.B)({totalAmount:(0,T.lp)(m),variableTNFee:null===c||void 0===c?void 0:c.variableTNFee}))||void 0===t?void 0:t.toFixed(2))}),(0,k.jsx)(U,{label:"Delivery / Pick-up",value:"delivery"===p.deliveryOrPickup?"Delivery":"Pick-up"}),(0,k.jsx)(U,{label:"INCO terms",value:null===(l=S.oX.incoTerms.find((function(e){return p.incoTerms===e.value})))||void 0===l?void 0:l.label}),(0,k.jsx)(U,{label:"Payment terms",value:(0,w.rJ)(p.paymentTerms),className:G()({highlight:"overdue"===(0,w.u6)(c)})}),(0,k.jsx)(U,{label:"Payment due",value:$()(d).format("YYYY-MM-DD"),className:G()({highlight:"overdue"===(0,w.u6)(c)})}),o&&(0,k.jsx)(U,{label:"*Including payment partner fees",value:null})]})})})},K=function(e){var n,r=e.order,s=e.products,a=e.className,t=e.manufacturer,l=e.showTnFees;return(0,k.jsxs)("div",{className:a,children:[null===(n=r.complete_order.offer)||void 0===n?void 0:n.map((function(e){return(0,k.jsx)(H,{products:s,terms:r.complete_order.terms,offeredProduct:e},null===r||void 0===r?void 0:r.id)})),(0,k.jsx)(W,{order:r,showTnFees:l}),(0,k.jsx)(A,{manufacturer:t,terms:r.complete_order.terms,className:"mt-3"})]})},ee=C.ZP.div(d||(d=(0,D.Z)(["\n  position: relative;\n  user-select: none;\n\n  .stepper-wrapper {\n    display: flex;\n    justify-content: space-between;\n    flex-direction: column;\n  }\n\n  .stepper-item {\n    position: relative;\n    display: flex;\n    flex-direction: column;
1\n    align-items: center;\n    flex: 1;\n    color: ",";\n    font-size: 0.9rem;\n    margin-bottom: 20px;\n  }\n\n  .stepper-item .step-counter {\n    position: relative;\n    z-index: 5;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    width: 40px;\n    height: 40px;\n    border-radius: 50%;\n    background: ",";\n    color: ",";\n    margin-bottom: 6px;\n  }\n\n  .stepper-item.completed .step-counter {\n    background: #28a745;\n    color: white;\n  }\n\n  .stepper-item.completed .step-name {\n    color: #28a745;\n  }\n"])),S.Il.darkGray,S.Il.lighterGray,S.Il.darkGray),ne=function(e){var n=e.steps;return(0,k.jsx)(ee,{children:(0,k.jsx)("div",{className:"stepper-wrapper",children:n.map((function(e,n){var r=e.key,s=e.completed;return(0,k.jsxs)("div",{className:G()("stepper-item",{completed:s}),children:[(0,k.jsx)("div",{className:"step-counter",children:s?(0,k.jsx)("i",{className:"fa fa-check"}):n+1}),(0,k.jsx)("div",{className:"step-name",children:S.oX.orderStates[r]})]},r)}))})})}
1,re=r(66030),se=r(90269),ae=C.ZP.div(u||(u=(0,D.Z)(["\n  .btn {\n    display: block;\n    margin-bottom: 0.5rem;\n  }\n"]))),te=function(e){var n=e.order,r=e.user,s=e.router,a=e.handlePayNowClick,t=e.error;return(0,k.jsxs)(ae,{children:[(0,g.$e)(r)&&["created","paid"].includes(n.state)&&(0,k.jsx)(re.f,{label:"Shipped",className:function(){return{"full btn btn-primary":!0}},onClick:function(){return(0,se.D)({orderId:n.id,state:"shipped"})},onFinish:function(){return null===s||void 0===s?void 0:s.reload()}}),(0,g.wf)(r)&&"shipped"===n.state&&(0,k.jsx)(re.f,{label:"Received",className:function(){return{"full btn btn-primary":!0}},onClick:function(){return(0,se.D)({orderId:n.id,state:"received"})},onFinish:function(){return null===s||void 0===s?void 0:s.reload()}}),(0,g.GJ)(r)&&!["cancelled","completed"].includes(n.state)&&(0,k.jsx)(re.f,{label:"Admin cancel",className:function(){return{"full btn btn-danger":!0}},onClick:function(){return(0,se.D)({orderId:n.id,state:"cancelled"})},onFinish:function(){return null===s||void 0===s?void 0:s.reload()}}),t&&(0,k.jsx)(P.Z,{color:"danger",className:"text-center",children:t}),(0,g.wf)(r)&&["created","shipped","received"].includes(n.state)&&!n.isPaid&&(0,k.jsx)(re.f,{label:"Pay now",className:function(){return{"full btn btn-success":!0}},onClick:a})]})},le=C.ZP.div(m||(m=(0,D.Z)(["\n  position: absolute;\n  left: -10000px;\n  width: 794px; // Width of A4 page\n"]))),ce=C.ZP.div(p||(p=(0,D.Z)(["\n  min-height: 60px;\n"]))),ie=function(e){var n=e.order,r=e.manufacturer,s=e.products,a=e.user,t=e.timeline,l=e.router,c=e.toPDF,i=e.error,o=e.handlePayNowClick;return(0,k.jsx)(k.Fragment,{children:(0,k.jsxs)("div",{className:"row",children:[(0,k.jsxs)("div",{className:"col-12 col-md-12 col-lg-9",children:[(0,k.jsx)(ce,{className:" mb-2 mb-md-0",children:(0,k.jsx)(O,{order:n,manufacturer:r})}),(0,k.jsx)(K,{order:n,products:s,manufacturer:r,showTnFees:(0,g.$e)(a)})]}),(0,k.jsxs)("div",{className:"col-12 col-md-12 col-lg-3",children:[(0,k.jsx)(ce,{className:"d-flex justify-content-center align-items-center align-items-lg-start",children:(0,k.jsx)(z,{children:"Order status"})}),(0,k.jsx)("div",{className:"card shadow-sm",children:(0,k.jsxs)("div",{className:"card-body",children:[(0,k.jsx)(ne,{steps:t}),(0,k.jsx)("div",{className:"mb-3"}),(0,k.jsx)(te,{order:n,user:a,router:l,handlePayNowClick:o,error:i})]})}),c&&(0,k.jsx)("div",{className:"text-center mt-3",children:(0,k.jsx)("button",{className:"btn btn-link",onClick:function(){return c()},children:"Download Invoice"})})]})]})})},oe=!0;function de(e){var n=e.order,r=e.manufacturer,s=e.products,a=e.user,t=e.showTimeline,l=e.paymentStatus,c=e.isBankTransfer,i=(0,N.useRouter)(),o=(0,w._r)({order:n}),d=(0,h.useState)(""),u=d[0],m=d[1],p=(null===n||void 0===n?void 0:n.isPaid)&&(0,g.wf)(a),f=(0,x.Eb)({method:"save",filename:"".concat((0,w.F$)(n),".pdf"),page:{margin:x.Zt.MEDIUM}}),P=f.toPDF,Z=f.targetRef;return(0,k.jsxs)("main",{id:"main",className:"mt-3 mx-3",children:[(0,k.jsx)(j.Z,{title:"Orders",className:"mb-4"}),t&&(0,k.jsx)("div",{className:"mt-3 mb-3",children:(0,k.jsx)("div",{className:"row py-3",children:(0,k.jsx)("div",{className:"col-12 col-md-8 offset-md-2",children:(0,k.jsx)(b.T,{steps:y.ORDER_STEPS,router:i,activeStepIndex:2,stepLinks:["/offer/summary/".concat(n.offer_id)]})})})}),l&&(0,k.jsx)(F,{paymentStatus:l}),p&&(0,k.jsx)(le,{ref:Z,children:(0,k.jsx)(ie,{user:a,order:n,manufacturer:r,products:s,timeline:o,router:i})}),(0,k.jsx)("div",{children:(0,k.jsx)(ie,{user:a,order:n,manufacturer:r,products:s,timeline:o,router:i,toPDF:p?P:null,error:u,handlePayNowClick:function(){c?i.push("/order/pay/".concat(n.id)):m("Currently, it is not possible to pay for this order via bank transfer. Please contact us for assistance!")}})}),(0,k.jsx)("div",{className:"col-12 col-md-12 col-lg-9",children:(0,k.jsx)("div",{className:"full text-center pt-3 mb-4",children:(0,g.wf)(a)&&(0,k.jsx)(v(),{href:"/inbox/".concat(r.id),type:"button",className:"btn py-2 px-4 btn-primary",children:"Chat with manufacturer"})})})]})}},86118:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/order/view/[orderId]",function(){return r(47325)}])}},function(e){e.O(0,[4885,3714,6054,7847,5443,8544,9630,7115,8909,1664,646,9638,5675,7446,5828,3763,6157,5401,1362,5504,9774,2888,179],(function(){return n=86118,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

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.