1"use strict";(globalThis["webpackChunkfrontend"]=globalThis["webpackChunkfrontend"]||[]).push([[1427],{31427:(e,i,n)=>{n.r(i),n.d(i,{default:()=>N});var s=n(61758),t=n(58790);const l={key:0,class:"order-label-print q-pa-md"},r={class:"row no-wrap justify-between"},a={class:"q-mb-sm",style:{"text-decoration":"underline"}},o={class:"row no-wrap justify-between"},d=(0,s.Lk)("span",null,"User: ",-1),c=(0,s.Lk)("br",null,null,-1),u=(0,s.Lk)("span",null,"Seller: ",-1),p=(0,s.Lk)("br",null,null,-1),h=(0,s.Lk)("span",null," Order name: ",-1),m={class:"column items-end text-right"},g={class:"column full-width q-mt-lg"},k={class:"flex flex-center col-auto index-number"},v={class:"row no-wrap full-width col q-pa-sm",style:{border:"3px solid #8e8e8e","border-radius":"0 8px 8px 8px"}},f={class:"column"},w={class:"row no-wrap full-width"},y={key:0},b={key:1,class:"row full-width"},L=(0,s.Lk)("span",{class:"q-mr-xs"},"UPC:",-1),_={key:0},x={class:"row no-wrap full-width"},q={class:"row no-wrap q-mr-sm",style:{"white-space":"nowrap"}},C={class:"q-ml-xs"},A={class:"row no-wrap",style:{"white-space":"nowrap"}},Q={class:"q-ml-xs"};function X(e,i,n,X,I,j){const E=(0,s.g2)("q-img"),O=(0,s.g2)("qrcode-vue"),F=(0,s.g2)("q-page");return(0,s.uX)(),(0,s.Wv)(F,{class:"row justify-center"},{default:(0,s.k6)((()=>[e.loading<1?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("div",r,[(0,s.bF)(E,{src:"./png/odb-logo.png","no-spinner":"","no-transition":"",fit:"contain",loading:"eager",width:"120px",style:{filter:"brightness(0%)",opacity:"0.8"}}),(0,s.Lk)("b",a,(0,t.v_)(e.order.short_id),1)]),(0,s.Lk)("div",o,[(0,s.Lk)("div",null,[d,(0,s.Lk)("b",null,(0,t.v_)(e.order.user_details),1),c,u,(0,s.Lk)("b",null,(0,t.v_)(e.order.seller_details),1),p,h,(0,s.Lk)("b",null,(0,t.v_)(e.order.name||"-"),1)]),(0,s.Lk)("div",m,[(0,s.bF)(O,{value:e.generateLink(),size:96,level:"L"},null,8,["value"])])]),(0,s.Lk)("div",g,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.order.lines,((e,i)=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:"row full-width q-mb-sm print-item"},[(0,s.Lk)("div",k,[(0,s.Lk)("b",null,(0,t.v_)(i+1),1)]),(0,s.Lk)("div",v,[e.image?((0,s.uX)(),(0,s.Wv)(E,{key:0,src:"https://images-na.ssl-images-amazon.com/images/I/"+e.image,ratio:1,"spinner-color":"high-orange","spinner-size":"32px",fit:"contain",class:"amz-item-image",loading:"eager","no-native-menu":"","no-transition":""},null,8,["src"])):(0,s.Q3)("",!0),(0,s.Lk)("div",f,[(0,s.Lk)("div",w,[(0,s.Lk)("b",null,(0,t.v_)(e.title),1)]),e.dimension&&e.dimension.width&&e.dimension.height&&e.dimension.length?((0,s.uX)(),(0,s.CE)("div",y,[(0,s.eW)(" Size: "),(0,s.Lk)("b",null,(0,t.v_)(e.dimension.width)+" x "+(0,t.v_)(e.dimension.height)+" x "+(0,t.v_)(e.dimension.length)+" "+(0,t.v_)("american"==e.dimension.dimension_type?"in":"cm"),1)])):(0,s.Q3)("",!0),e.packages_upc&&e.packages_upc.length>0?((0,s.uX)(),(0,s.CE)("div",b,[L,((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.packages_upc,((i,n)=>((0,s.uX)(),(0,s.CE)("div",{key:i,class:(0,t.C4)({"q-mr-xs":n+1!=e.packages_upc.length})},[(0,s.eW)((0,t.v_)(i||"-"),1),n+1!=e.packages_upc.length?((0,s.uX)(),(0,s.CE)("span",_,",")):(0,s.Q3)("",!0)],2)))),128))])):(0,s.Q3)("",!0),(0,s.Lk)("div",x,[(0,s.Lk)("div",q,[(0,s.eW)(" QTY dispatched: "),(0,s.Lk)("b",C,(0,t.v_)(e.quantity_dispatched),1)]),(0,s.Lk)("div",A,[(0,s.eW)(" QTY to dispatch: "),(0,s.Lk)("b",Q,(0,t.v_)(e.quantity),1)])])])])])))),128))])])):(0,s.Q3)("",!0)])),_:1})}var I=n(74850),j=n(86729),E=n(9789),O=n(42815),F=n(81360),P=n(12150),S=n(34867),W=function(e,i,n,s){function t(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,l){function r(e){try{o(s.next(e))}catch(i){l(i)}}function a(e){try{o(s["throw"](e))}catch(i){l(i)}}function o(e){e.done?n(e.value):t(e.value).then(r,a)}o((s=s.apply(e,i||[])).next())}))};const z=(0,s.pM)({name:"OrdersIdPrintLabel",components:{QrcodeVue:S.A},props:{slug:{type:String,required:!0}},data(){return{order:{},loading:0}},beforeMount(){return W(this,void 0,void 0,(function*(){try{this.loading++,this.order=yield(0,I.A)(!0,{},yield this.ordersStore.fetchOrder(this.slug)),this.order.lines&&
1(yield Promise.all(this.order.lines.map((e=>W(this,void 0,void 0,(function*(){let i=null,n=null;try{i=yield this.fetchSupplierItem(e.seller_item),i&&(n="supplier")}catch(s){i=yield this.fetchFbmItem(e.seller_item),i&&(n="fbm")}if(e.title=i.title,e.dimension=i.dimension,e.packages_upc="supplier"===n?i.packages_upc:Array(i.upc),"supplier"===n){const i=yield this.fetchAsins(e.seller_item);if(i.length>0){e.asin=i[0].asin;const n=yield this.searchByAsin(e.asin);e.image=null===n||void 0===n?void 0:n.image}}return e}))))).then((e=>{this.order.lines=e}))),setTimeout((()=>{window.print()}),1e3)}catch(e){this.order||(this.$router.push("/"),this.$q.notify({type:"error-dense",message:"Not found!",position:this.$q.screen.gt.xs?"top-right":"top"}))}finally{this.loading--}}))},computed:Object.assign({},(0,P.n2)(j.ef)),methods:Object.assign(Object.assign(Object.assign(Object.assign({},(0,P.i0)(E.P,["fetchSupplierItem","fetchAsins"])),(0,P.i0)(O.q,["searchByAsin"])),(0,P.i0)(F.a,["fetchFbmItem","searchByFbmAsin"])),{generateLink(){return window.location.origin+"/orders/"+this.order.id}})});var T=n(12807),B=n(77716),$=n(330),K=n(45205),M=n(98582),U=n.n(M);const Y=(0,T.A)(z,[["render",X]]),N=Y;U()(z,"components",{QPage:B.A,QImg:$.A,QPageContainer:K.A})}}]);
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.