PageSourceSearch

https://panel.bookzpro.com/Boxing.pf8jE1.js

js bookzpro.com collected 2026-09-24 19:02:28 UTC 51,926 bytes, 1 lines download raw bytes

1import{B as re,U as de}from"./UnpackedShipmentsDialog.pf8jE1.js";import{_ as U,ad as ue,cl as Y,c as I,w as r,V as N,r as y,o as m,a as n,b as w,i as T,d as i,t as f,m as H,e as P,g as p,h as B,j as b,l as k,a2 as Q,aM as A,aq as F,x as V,ar as L,a6 as M,q as S,F as D,k as q,cM as me,c1 as he,I as ge,a3 as _,cN as pe,f as fe,cO as ce,cP as xe,b9 as ye,ba as z,W as X,X as G,n as be,L as ve,u as Ie,cf as Se,B as Be,bh as ke,S as we,p as J,s as R,$ as K,ac as Z,al as De,bv as _e}from"./index.pf8jE1.js";import{A as E}from"./AbsoluteLoader.pf8jE1.js";import{f as Ve}from"./srUtils.pf8jE1.js";import{B as Ce}from"./BookzyForLister.pf8jE1.js";import{P as $}from"./PrinterManager.pf8jE1.js";import{L as Fe}from"./LabelPrinterSettings.pf8jE1.js";import{N as ee}from"./NoItemsFound.pf8jE1.js";import{S as Te}from"./scanner.pf8jE1.js";import{p as Le}from"./stringUtils.pf8jE1.js";import"./EditAddressDialog.pf8jE1.js";import"./BCard.pf8jE1.js";import"./BPrimarySecondaryBtnGroup.pf8jE1.js";import"./BBtnPrimary.pf8jE1.js";import"./BBtnSecondaryOutlined.pf8jE1.js";import"./warehouseAddress.pf8jE1.js";import"./PhoneNumberInput.pf8jE1.js";import"./FormElementWrapper.pf8jE1.js";import"./us-states.pf8jE1.js";import"./LoadingIndicator.pf8jE1.js";import"./itemIdValidation.pf8jE1.js";import"./mappers.pf8jE1.js";import"./cost_calculation.pf8jE1.js";import"./constants.pf8jE1.js";import"./random_asins.pf8jE1.js";import"./scUtils.pf8jE1.js";import"./OtherProducts.pf8jE1.js";import"./AsinLabelActionsMenu.pf8jE1.js";import"./labelPrintQueue.pf8jE1.js";import"./qzTrayManager.pf8jE1.js";import"./jspdf.es.min.pf8jE1.js";import"./bwip-js.pf8jE1.js";import"./BRadioSwitch.pf8jE1.js";const Ne={name:"MoreInfoDialog",components:{BookzyForLister:Ce},props:{item:{type:Object,required:!0}},data(){return{dialog:!0}},watch:{dialog(t){t||this.$emit("more-info-dialog",!1)}},mounted(){this.loadBookzy()},methods:{loadBookzy(){const t=this.item?.bookDetail?.asin;this.$refs.moreInfoBookzy.simpleSearch(t)},nullFilter:function(t){return t||"-"},conditionFilter:function(t){return Y[t]||"-"},srFilter:function(t){return Ve(t)||"-"},priceFilter:function(t){return t?`$ ${ue(t)}`:"-"}}},Ue={class:"d-flex"},Pe={class:"flex-grow-1"},qe={class:"more-info-bookzy"};function Ee(t,e,a,d,s,o){const h=y("bookzy-for-lister");return m(),I(N,{modelValue:s.dialog,"onUpdate:modelValue":e[0]||(e[0]=c=>s.dialog=c),width:"850"},{default:r(()=>[n(w,{height:"80vh"},{default:r(()=>[n(w,{flat:""},{default:r(()=>[n(T,null,{default:r(()=>[i("div",Ue,[i("div",Pe,[i("table",null,[i("tbody",null,[i("tr",null,[e[1]||(e[1]=i("td",{class:"text-brand"}," SKU ",-1)),i("td",null,f(o.nullFilter(a.item.sku)),1)]),i("tr",null,[e[2]||(e[2]=i("td",{class:"text-brand"}," FNSKU ",-1)),i("td",null,f(a.item.fnsku),1)]),i("tr",null,[e[3]||(e[3]=i("td",{class:"text-brand"}," ASR ",-1)),i("td",null,f(a.item.salesVolume&&a.item.salesVolume.lastSixMonthSr?a.item.salesVolume.lastSixMonthSr|o.srFilter:"-"),1)]),i("tr",null,[e[4]||(e[4]=i("td",{class:"text-brand"}," Condition ",-1)),i("td",null,f(o.conditionFilter(a.item.condition)),1)]),i("tr",null,[e[5]||(e[5]=i("td",{class:"text-brand"}," Qty ",-1)),i("td",null,f(a.item.quantity),1)]),i("tr",null,[e[6]||(e[6]=i("td",{class:"text-brand"}," Title ",-1)),i("td",null,f(a.item.bookDetail?a.item.bookDetail.title:"-"),1)]),i("tr",null,[e[7]||(e[7]=i("td",{class:"text-brand"}," Price ",-1)),i("td",null,f(o.priceFilter(a.item.price)),1)]),i("tr",null,[e[8]||(e[8]=i("td",{class:"text-brand"}," Source ",-1)),i("td",null,f(o.nullFilter(a.item.source)),1)]),e[12]||(e[12]=i("tr",null,[i("td",{class:"text-brand"}," Cost per Unit "),i("td",null,"-")],-1)),i("tr",null,[e[9]||(e[9]=i("td",{class:"text-brand"}," Freeze Price ",-1)),i("td",null,f(o.nullFilter(a.item.fixedPrice)),1)]),i("tr",null,[e[10]||(e[10]=i("td",{class:"text-brand"}," Repricer Min ",-1)),i("td",null,f(o.priceFilter(a.item.minPrice)),1)]),i("tr",null,[e[11]||(e[11]=i("td",{class:"text-brand"}," Repricer Max ",-1)),i("td",null,f(o.priceFilter(a.item.maxPrice)),1)])])])]),i("div",qe,[n(h,{ref:"moreInfoBookzy",sticky:!0,"scan-mode":!1},null,512)])])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Ae=U(Ne,[["render",Ee],["__scopeId","data-v-892df72b"]]),Qe={name:"ChangeQtyForSessionDialog",components:{AbsoluteLoader:E},props:{item:{type:Object,required:!0},onSubmit:{type:Function}},emits:["change-qty-dialog"],data(){return{dialog:!0,qty:1,submitHigherQtyDialog:!1,selectedShipment:null,loading:!1}},mounted(){this.qty=this.getUnboxedQty()},methods:{...H(["updateItemQuantityInBoxingForSession"]),async submitQty(){const{valid:t}=await this.$refs.changeQtyForSessionForm.validate();if(!this.errorExist&&t){if(Number(this.qty)>this.item.quantity){this.submitHigherQtyDialog=!0;return}this.changeQty()}},async changeQty(t){this.loading=!0;const{sessionId:e}=this.$route.params,a=Number(this.qty)+Number(this.getBoxedQty()),d=await this.updateItemQuantityInBoxingForSession({sessionId:e,itemId:this.item.id,quantity:a,shipmentId:this.selectedShipment});if(t&&d.data.success){const s=this.item.fnsku,o=this.item.labelPrepType,h=this.item.bookDetail.title||"",c=Y[this.item.condition]||"";for(let l=0;l<this.qty-this.item.quantity;l++)await $.printFbaLabel({fnsku:s,title:h,condition:c,labelPrepType:o});this.submitHigherQtyDialog=!0}this.loading=!1,this.dialog=!1},getUnboxedQty(){if(!this.selectedShipment||!this.item?.shipmentParts||this.item?.shipmentParts<1)return 0;let t=this.item.shipmentParts.find(e=>e.shipment.id===this.selectedShipment);return t.quantity-t.boxedQuantity},getBoxedQty(){return!this.selectedShipment||!this.item?.shipmentParts||this.item?.shipmentParts<1?0:this.item.shipmentParts.find(e=>e.shipment.id===this.selectedShipment).boxedQuantity}},computed:{errorExist(){return!this.qty||isNaN(this.qty)},availableShipments(){let t=[];
1return this.item.shipmentParts?.forEach(e=>{e.shipment.status==="BOXING"&&t.push({value:e.shipment.id,title:e.shipment.shipmentName})}),t}},watch:{dialog(t){t||this.$emit("change-qty-dialog",!1)},selectedShipment(){this.qty=this.getUnboxedQty()}}},Me={key:0,class:"table"},Re={class:"table-row"},Oe={class:"text-center"},He={class:"text-center"};function We(t,e,a,d,s,o){const h=y("absolute-loader"),c=y("icon-button");return m(),I(N,{modelValue:s.dialog,"onUpdate:modelValue":e[7]||(e[7]=l=>s.dialog=l),width:"680"},{default:r(()=>[n(w,null,{default:r(()=>[n(h,{value:s.loading},null,8,["value"]),n(P,{class:"pr-3"},{default:r(()=>[e[8]||(e[8]=p(" Change Qty ")),n(B),n(c,{icon:"mdi-close",onClick:e[0]||(e[0]=()=>s.dialog=!1)})]),_:1}),n(T,null,{default:r(()=>[n(Q,{ref:"changeQtyForSessionForm"},{default:r(()=>[n(A,{modelValue:s.selectedShipment,"onUpdate:modelValue":e[1]||(e[1]=l=>s.selectedShipment=l),label:"Please select a shipment",items:o.availableShipments,rules:[l=>!!l||"This field is required"],class:"mb-3"},null,8,["modelValue","items","rules"])]),_:1},512),s.selectedShipment?(m(),b("div",Me,[e[10]||(e[10]=i("div",{class:"table-header bg-surface_subtle"},[i("div",{class:"text-center"}," # "),i("div",null,"SKU"),i("div",null,"FNSKU"),i("div",{class:"text-center"}," Unboxed Qty "),i("div",{class:"text-center"}," Boxed Qty "),i("div",null,"Title")],-1)),i("div",Re,[e[9]||(e[9]=i("div",{class:"text-center"}," 1 ",-1)),i("div",null,f(a.item.sku),1),i("div",null,f(a.item.fnsku),1),i("div",Oe,[F(i("input",{"onUpdate:modelValue":e[2]||(e[2]=l=>s.qty=l),class:V(["table-input",{"input-error":o.errorExist}])},null,2),[[L,s.qty]])]),i("div",He,f(o.getBoxedQty()),1),i("div",null,f(a.item.bookDetail?a.item.bookDetail.title:"-"),1)])])):k("",!0)]),_:1}),n(M,null,{default:r(()=>[n(B),n(S,{text:"",onClick:e[3]||(e[3]=l=>s.dialog=!1)},{default:r(()=>e[11]||(e[11]=[p(" cancel ")])),_:1}),n(S,{color:"brand",class:"white--text",disabled:!s.selectedShipment,onClick:o.submitQty},{default:r(()=>e[12]||(e[12]=[p(" re-submit qty to amazon ")])),_:1},8,["disabled","onClick"])]),_:1})]),_:1}),n(N,{modelValue:s.submitHigherQtyDialog,"onUpdate:modelValue":e[6]||(e[6]=l=>s.submitHigherQtyDialog=l),width:"500"},{default:r(()=>[n(w,null,{default:r(()=>[n(h,{value:s.loading},null,8,["value"]),n(T,{class:"pt-6 font-weight-medium"},{default:r(()=>[p(" You have added "+f(s.qty-o.getUnboxedQty())+" NEW ITEM to shipment. Do you want to print sticker? ",1)]),_:1}),n(M,null,{default:r(()=>[n(B),n(S,{text:"",onClick:e[4]||(e[4]=l=>o.changeQty(!1))},{default:r(()=>e[13]||(e[13]=[p(" do not print ")])),_:1}),n(S,{class:"_accent white--text",onClick:e[5]||(e[5]=l=>o.changeQty(!0))},{default:r(()=>e[14]||(e[14]=[p(" print sticker ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}const ze=U(Qe,[["render",We],["__scopeId","data-v-caf84911"]]),Ke={name:"ChangeQtyForBoxDialog",components:{AbsoluteLoader:E},props:{item:{type:Object,required:!0}},data(){return{dialog:!0,qty:1,loading:!1}},mounted(){this.qty=this.item.quantity},methods:{...H(["removeFromCurrentBox"]),submitQty(){this.error||this.changeQuantity()},async changeQuantity(){this.loading=!0;const{sessionId:t,shipmentId:e}=this.$route.params,{fnsku:a}=this.item;await this.removeFromCurrentBox({sessionId:t,shipmentId:e,fnsku:a,quantity:Number(this.item.quantity)-Number(this.qty)}),this.loading=!1,this.dialog=!1}},computed:{error(){return!this.qty||isNaN(this.qty)||this.qty>=this.item.quantity}},watch:{dialog(t){t||this.$emit("change-qty-dialog",!1)}}},je={class:"table"},Xe={class:"table-row"},Ge={class:"text-center"};function Ye(t,e,a,d,s,o){const h=y("absolute-loader"),c=y("icon-button");return m(),I(N,{modelValue:s.dialog,"onUpdate:modelValue":e[3]||(e[3]=l=>s.dialog=l),width:"680"},{default:r(()=>[n(w,null,{default:r(()=>[n(h,{value:s.loading},null,8,["value"]),n(P,{class:"pr-3"},{default:r(()=>[e[4]||(e[4]=p(" Change Qty ")),n(B),n(c,{icon:"mdi-close",onClick:e[0]||(e[0]=()=>s.dialog=!1)})]),_:1}),n(T,null,{default:r(()=>[i("div",je,[e[6]||(e[6]=i("div",{class:"table-header _background"},[i("div",{class:"text-center"}," # "),i("div",null,"SKU"),i("div",null,"FNSKU"),i("div",{class:"text-center"}
1," Qty "),i("div",null,"Title")],-1)),i("div",Xe,[e[5]||(e[5]=i("div",{class:"text-center"}," 1 ",-1)),i("div",null,f(a.item.sku),1),i("div",null,f(a.item.fnsku),1),i("div",Ge,[F(i("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>s.qty=l),class:V(["table-input",{"input-error":o.error}])},null,2),[[L,s.qty]])]),i("div",null,f(a.item.bookDetail?a.item.bookDetail.title:"-"),1)])])]),_:1}),n(M,null,{default:r(()=>[n(B),n(S,{text:"",onClick:e[2]||(e[2]=l=>s.dialog=!1)},{default:r(()=>e[7]||(e[7]=[p(" cancel ")])),_:1}),n(S,{color:"brand",class:"white--text",onClick:o.submitQty},{default:r(()=>e[8]||(e[8]=[p(" re-submit qty for box ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Je=U(Ke,[["render",Ye],["__scopeId","data-v-eaf2b94e"]]),Ze={name:"TransferItemToAnotherBoxDialog",components:{AbsoluteLoader:E},props:{boxes:{type:Array},selectedBox:{type:Object},items:{type:Array}},data(){return{dialog:!0,targetBox:null,loading:!1,itemsCopy:[]}},mounted(){this.itemsCopy=[...this.items],this.itemsCopy.forEach(t=>{t.transferQuantity=t.quantity})},methods:{...H(["transferToAnotherBox"]),async transferItem(){const{valid:t}=await this.$refs.transferItemToAnotherBoxForm.validate();if(t){this.loading=!0;const{sessionId:e,shipmentId:a}=this.$route.params,d=this.$store.getters.selectedBox.id;let s=this.itemsCopy.reduce((h,c)=>(h[c.fnsku]=c.transferQuantity,h),{}),o={targetBoxId:this.targetBox,fnskuQuantityMap:s};await this.transferToAnotherBox({sessionId:e,shipmentId:a,boxId:d,payload:o}),this.loading=!1,this.dialog=!1}}},watch:{dialog(t){t||this.$emit("transfer-item-to-another-box",!1)}}},$e={key:0},et={key:1},tt={class:"transfer-items-table"},st={class:"text-center"},it={class:"wrap-text"},lt={class:"text-center"},nt=["onUpdate:modelValue"],ot=["value"],at={key:0},rt={key:1};function dt(t,e,a,d,s,o){const h=y("absolute-loader"),c=y("icon-button");return m(),I(N,{modelValue:s.dialog,"onUpdate:modelValue":e[3]||(e[3]=l=>s.dialog=l),width:"600"},{default:r(()=>[n(w,null,{default:r(()=>[n(h,{value:s.loading},null,8,["value"]),n(P,{class:"pr-3"},{default:r(()=>[a.items.length>1?(m(),b("span",$e,"Transfer Items to Another Box")):(m(),b("span",et,"Transfer Item to Another Box")),n(B),n(c,{icon:"mdi-close",onClick:e[0]||(e[0]=()=>s.dialog=!1)})]),_:1}),n(T,null,{default:r(()=>[n(Q,{ref:"transferItemToAnotherBoxForm"},{default:r(()=>[n(A,{modelValue:s.targetBox,"onUpdate:modelValue":e[1]||(e[1]=l=>s.targetBox=l),class:"mt-5 mb-3",label:"Please select target box",dense:"",items:a.boxes&&a.boxes.length>0?a.boxes.filter(l=>l.id!==(a.selectedBox&&a.selectedBox.id)):[],"item-title":"name","item-value":"id",rules:[l=>!!l||"Please select a box"]},null,8,["modelValue","items","rules"]),i("div",tt,[e[4]||(e[4]=i("div",{class:"transfer-items-table-header bg-surface_subtle"},[i("div",{class:"text-center"}," # "),i("div",null,"Title"),i("div",{class:"text-center"}," Quantity ")],-1)),(m(!0),b(D,null,q(s.itemsCopy,(l,x)=>(m(),b("div",{key:x,class:"transfer-items-table-content"},[i("div",st,f(x+1),1),i("div",it,f(l.bookDetail?l.bookDetail.title:"-"),1),i("div",lt,[F(i("select",{"onUpdate:modelValue":g=>l.transferQuantity=g},[(m(!0),b(D,null,q(l.quantity,g=>(m(),b("option",{key:g,value:g},f(g),9,ot))),128))],8,nt),[[me,l.transferQuantity]])])]))),128))])]),_:1},512)]),_:1}),n(M,null,{default:r(()=>[n(B),n(S,{onClick:e[2]||(e[2]=l=>s.dialog=!1)},{default:r(()=>e[5]||(e[5]=[p(" cancel ")])),_:1}),n(S,{disabled:!s.targetBox,onClick:o.transferItem},{default:r(()=>[a.items.length>1?(m(),b("span",at,"Transfer items")):(m(),b("span",rt,"Transfer item"))]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ut=U(Ze,[["render",dt],["__scopeId","data-v-a34a9887"]]),mt="Unpacked Items",ht="Unknown Box Name",gt={name:"SessionItemLocatorDialog",components:{NoItemsFound:ee,AbsoluteLoader:E},emits:["session-item-locator-dialog"],data(){return{dialog:!0,inputModel:"",loading:!1,resultData:[],resultList:[]}},watch:{dialog(t){t||this.$emit("session-item-locator-dialog",!1)}},methods:{async searchItem(){const t=this.inputModel.trim();if(t==="")return;this.loading=!0;const{sessionId:e}=this.$route.params,d=await he(e,{searchText:t,pageSize:100});if(d?.data?.success){this.resultData=d.data.data;let o=d.data?.data?.content||[];this.resultList=this.parseList(o)}document.getElementById("session-item-locator-input").select(),this.loading=!1},parseList(t){let e=[];return t.forEach(a=>
1{const{fnsku:d}=a,s=a.bookDetail?.title||"";let o=a.shipmentParts;o&&o.length>0&&o.forEach(h=>{const c=h.shipment?.shipmentName,{boxedQuantity:l,quantity:x}=h;if(x-l>0&&e.push(this.getNewParsedListItem(d,x-l,s,c,`<span>${mt}</span>`)),l>0){const{boxParts:g}=h;g&&g.length>0&&g.forEach(O=>{const W=O.box?.name||ht;e.push(this.getNewParsedListItem(d,O.quantity,s,c,`${c} (<span>${W}</span>)`))})}})}),e},getNewParsedListItem(t,e,a,d,s){return{fnsku:t,qty:e,title:a,location:s}}}},pt={class:"search-area-wrapper"},ft={class:"card-content"},ct={class:"text-center"},xt={class:"text-ellipsis"},yt=["innerHTML"];function bt(t,e,a,d,s,o){const h=y("absolute-loader"),c=y("NoItemsFound");return m(),I(N,{modelValue:s.dialog,"onUpdate:modelValue":e[1]||(e[1]=l=>s.dialog=l),width:"700"},{default:r(()=>[n(w,null,{default:r(()=>[n(h,{value:s.loading},null,8,["value"]),n(T,{class:"mb-4"},{default:r(()=>[n(Q,{onSubmit:ge(o.searchItem,["prevent"])},{default:r(()=>[i("div",pt,[n(_,{id:"session-item-locator-input",modelValue:s.inputModel,"onUpdate:modelValue":e[0]||(e[0]=l=>s.inputModel=l),label:"Search FNKSU/SKU/ISBN/Title",class:"mb-0 flex-grow-1","prepend-inner-icon":"mdi-magnify",autocomplete:"off",autofocus:"","hide-details":""},null,8,["modelValue"]),n(S,{type:"submit",class:"ml-6"},{default:r(()=>e[2]||(e[2]=[p(" search ")])),_:1})])]),_:1},8,["onSubmit"])]),_:1}),i("div",ft,[e[3]||(e[3]=i("div",{class:"card-content-row card-content-header"},[i("div",null,"FNSKU"),i("div",{class:"text-center"}," Qty "),i("div",null,"Title"),i("div",null,"Location")],-1)),s.resultList.length>0?(m(!0),b(D,{key:0},q(s.resultList,(l,x)=>(m(),b("div",{key:x,class:"card-content-row highlight-on-hover"},[i("div",null,f(l.fnsku),1),i("div",ct,f(l.qty),1),i("div",xt,f(l.title),1),i("div",{class:"highlight-location",innerHTML:l.location},null,8,yt)]))),128)):(m(),I(c,{key:1}))])]),_:1})]),_:1},8,["modelValue"])}const vt=U(gt,[["render",bt],["__scopeId","data-v-ab33bf58"]]),It={name:"ReviewBoxSpecsDialog",components:{AbsoluteLoader:E,NoItemsFound:ee},props:{onSubmitSuccess:{type:Function,default:()=>{}},sessionId:{type:[String,Number]},shipmentId:{type:[String,Number]},boxes:{type:Array,default:()=>[]},loadingProp:{type:Boolean,default:!1}},data(){return{dialog:!0,loading:!1,parsedBoxList:[],defaultDimensions:{width:"",height:"",length:"",weight:""}}},computed:{anyEmptyDimensionOrWeight(){return!!this.parsedBoxList.find(t=>!t.width||!t.height||!t.length||!t.weight)}},watch:{dialog(t){t||this.$emit("review-box-specs-dialog",!1)},boxes:{handler:function(t){t&&t.length>0&&this.parseBoxList(t)},immediate:!0}},mounted(){this.addDimensionInputListener()},beforeUnmount(){let t=document.getElementsByClassName("dimension-input");for(let e=0;e<t.length;e++)t[e].removeEventListener("input",this.inputChangeHandler)},methods:{addDimensionInputListener(){let t=document.getElementsByClassName("dimension-input");for(let e=0;e<t.length;e++)t[e].addEventListener("input",this.inputChangeHandler)},parseBoxList(t){let e=JSON.parse(JSON.stringify(t));e.forEach(a=>{a.width=a.width?(a.width/10).toFixed(0):"",a.height=a.height?(a.height/10).toFixed(0):"",a.length=a.length?(a.length/10).toFixed(0):"",a.weight=a.weight?(a.weight/10).toFixed(0):""}),e.sort((a,d)=>{const s=a.name.replace("Box",""),o=d.name.replace("Box","");return Number(s)>Number(o)?1:-1}),this.parsedBoxList=e},getFormattedBoxList(){let t=JSON.parse(JSON.stringify(this.parsedBoxList));return t.forEach(e=>{e.width=(e.width*10).toFixed(0),e.height=(e.height*10).toFixed(0),e.length=(e.length*10).toFixed(0),e.weight=(e.weight*10).toFixed(0)}),t.reduce((e,a)=>(e[a.id]={width:a.width,height:a.height,length:a.length,weight:a.weight},e),{})},handleDefaultDimensionChange(t,e){const a=t.value;t.value=a,this.parsedBoxList.forEach(d=>{d[e]=a})},handleDefaultInputView(t,e){const a=document.getElementById(t);
1e==="mixed"?(a.value="",a.placeholder="mixed"):(a.placeholder="",a.value=e)},inputChangeHandler(){let t=!!this.parsedBoxList.find(d=>this.parsedBoxList[0].width!==d.width);this.handleDefaultInputView("default-width-input",t?"mixed":this.parsedBoxList[0].width);let e=!!this.parsedBoxList.find(d=>this.parsedBoxList[0].height!==d.height);this.handleDefaultInputView("default-height-input",e?"mixed":this.parsedBoxList[0].height);let a=!!this.parsedBoxList.find(d=>this.parsedBoxList[0].length!==d.length);this.handleDefaultInputView("default-length-input",a?"mixed":this.parsedBoxList[0].length)},async sendBoxSpecs(){if(this.anyEmptyDimensionOrWeight)return;this.loading=!0;const t={idBoxMap:this.getFormattedBoxList()},e=await pe(this.sessionId,this.shipmentId,t);e?.data?.success&&(this.$store.commit("SET_BOXES",e.data.data),this.onSubmitSuccess()),this.loading=!1}}},St={class:"box-list-container"},Bt={class:"box-list-item",style:{position:"sticky",top:"0",right:"0","z-index":"2","min-height":"42px"}},kt={class:"box-list-item-dimensions"},wt={class:"box-list-item-dimensions"},Dt=["onUpdate:modelValue"],_t=["onUpdate:modelValue"],Vt=["onUpdate:modelValue"],Ct={class:"text-right"},Ft=["onUpdate:modelValue"];function Tt(t,e,a,d,s,o){const h=y("absolute-loader"),c=y("NoItemsFound");return m(),I(N,{modelValue:s.dialog,"onUpdate:modelValue":e[11]||(e[11]=l=>s.dialog=l),width:"494"},{default:r(()=>[n(h,{value:s.loading||a.loadingProp},null,8,["value"]),n(w,null,{default:r(()=>[n(P,null,{default:r(()=>e[12]||(e[12]=[p(" Review Box Specs ")])),_:1}),n(T,null,{default:r(()=>[i("div",St,[i("div",Bt,[e[15]||(e[15]=i("div",null,null,-1)),i("div",kt,[F(i("input",{id:"default-width-input","onUpdate:modelValue":e[0]||(e[0]=l=>s.defaultDimensions.width=l),class:V({"grey--text":s.defaultDimensions.width==="mixed"}),onInput:e[1]||(e[1]=l=>o.handleDefaultDimensionChange(l.target,"width"))},null,34),[[L,s.defaultDimensions.width]]),e[13]||(e[13]=i("div",null,"X",-1)),F(i("input",{id:"default-height-input","onUpdate:modelValue":e[2]||(e[2]=l=>s.defaultDimensions.height=l),class:V({"grey--text":s.defaultDimensions.height==="mixed"}),onInput:e[3]||(e[3]=l=>o.handleDefaultDimensionChange(l.target,"height"))},null,34),[[L,s.defaultDimensions.height]]),e[14]||(e[14]=i("div",null,"X",-1)),F(i("input",{id:"default-length-input","onUpdate:modelValue":e[4]||(e[4]=l=>s.defaultDimensions.length=l),class:V({"grey--text":s.defaultDimensions.length==="mixed"}),onInput:e[5]||(e[5]=l=>o.handleDefaultDimensionChange(l.target,"length"))},null,34),[[L,s.defaultDimensions.length]])])]),s.parsedBoxList&&s.parsedBoxList.length>0?(m(!0),b(D,{key:0},q(s.parsedBoxList,(l,x)=>(m(),b("div",{key:x,class:"box-list-item"},[i("div",null,f(l.name),1),i("div",wt,[F(i("input",{"onUpdate:modelValue":g=>l.width=g,class:V(["dimension-input",{"input-error":!l.width}]),onClick:e[6]||(e[6]=g=>g.target.select())},null,10,Dt),[[L,l.width]]),e[16]||(e[16]=i("div",null,"X",-1)),F(i("input",{"onUpdate:modelValue":g=>l.height=g,class:V(["dimension-input",{"input-error":!l.height}]),onClick:e[7]||(e[7]=g=>g.target.select())},null,10,_t),[[L,l.height]]),e[17]||(e[17]=i("div",null,"X",-1)),F(i("input",{"onUpdate:modelValue":g=>l.length=g,class:V(["dimension-input",{"input-error":!l.length}]),onClick:e[8]||(e[8]=g=>g.target.select())},null,10,Vt),[[L,l.length]])]),i("div",Ct,[F(i("input",{"onUpdate:modelValue":g=>l.weight=g,class:V(["dimension-input",{"input-error":!l.weight}]),onClick:e[9]||(e[9]=g=>g.target.select())},null,10,Ft),[[L,l.weight]]),e[18]||(e[18]=p(" lbs. "))])]))),128)):(m(),I(c,{key:1,"item-type":"box"}))])]),_:1}),n(M,{class:"pt-0"},{default:r(()=>[n(B),n(S,{text:"",onClick:e[10]||(e[10]=l=>s.dialog=!1)},{default:r(()=>e[19]||(e[19]=[p(" cancel ")])),_:1}),n(S,{class:"_accent white--text",disabled:o.anyEmptyDimensionOrWeight,onClick:o.sendBoxSpecs},{default:r(()=>e[20]||(e[20]=[p(" finish ")])),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Lt=U(It,[["render",Tt],["__scopeId","data-v-fa41d12c"]]),Nt="data:image/svg+xml,%3csvg%20width='22'%20height='11'%20viewBox='0%200%2022%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.5138%204.125H0V6.875H16.5138V11L22%205.5L16.5138%200V4.125Z'%20fill='%236FBE5B'/%3e%3c/svg%3e",Ut={name:"LtlInfoDialog",components:{AbsoluteLoader:E},props:{onSuccess:{type:Function,required:!0},sessionId:{type:[String,Number],required:!0},shipmentId:{type:[String,Number],required:!0},forUpdate:{type:Boolean,default:!1}},data(){return{dialog:!0,loading:!1,datePickerModel:!1,stepperModel:0,payload:{contactRequest:{name:"",phone:"",email:"",fax:""},freightClass:"",freightReadyDate:"",palletItemRequests:[j()],totalWeight:{value:"",unit:"POUND"},sellerDeclaredValue:{price:0,currencyCode:"USD"}}
1,FREIGHT_CLASSES:Pt,stepFormModels:[!1,!1,!1],rules:{required:t=>!!t||"",num:t=>!isNaN(t)||"",max60:t=>!!t&&t<=60||"Maximum 60 inches",totalWeight:t=>t<=4e4&&t>=150||"Must be between 150 and 40000 lbs.",paletteHeight:t=>t<=50&&t>=48||"If it is STACKED, height must be between 48-50 inches"}}},watch:{dialog(t){t||this.$emit("close-ltl-info-dialog")}},mounted(){this.forUpdate&&this.fetchInfo()},methods:{async validateContact(){const{valid:t}=await this.$refs.contactForm.validate();t&&this.stepperModel++},async validateFreight(){const{valid:t}=await this.$refs.contactForm.validate();t&&this.stepperModel++},addPalette(){let t=j();this.payload.palletItemRequests.push(t)},removePalette(t){t!=null&&this.payload.palletItemRequests.splice(t,1)},async submitShipment(){const{valid:t}=await this.$refs.paletteForm.validate();if(t){this.loading=!0;const e=this.formatPayload();if((await xe(this.sessionId,this.shipmentId,e))?.data?.success){this.onSuccess(),this.loading=!1,this.dialog=!1;return}this.loading=!1}},async fetchInfo(){this.loading=!0;const t=await ce(this.sessionId,this.shipmentId);if(t?.data?.success){const e=t.data.data;this.payload=this.formatInfo(e),this.loading=!1}},formatInfo(t){return{contactRequest:{name:t?.contact?.name||"",phone:t?.contact?.phone||"",email:t?.contact?.email||"",fax:t?.contact?.fax||""},freightClass:t.freightClass,freightReadyDate:fe(t.freightReadyDate,"YYYY-MM-DD"),palletItemRequests:this.formatPalettes(t.items),totalWeight:{value:(t.totalWeight||0)/10,unit:t.weightUnit},sellerDeclaredValue:{price:((t.sellerDeclaredPrice||0)/100).toFixed(2),currencyCode:t.sellerDeclaredPriceCurrency}}},formatPalettes(t){let e=t||[],a=[];for(let d=0;d<e.length;d++){const s=e[d],o=j();o.stacked=s.stacked,o.weight.value=((s.weight||0)/10).toFixed(0),o.weight.unit=s.weightUnit,o.dimension.length=((s.length||0)/10).toFixed(0),o.dimension.width=((s.width||0)/10).toFixed(0),o.dimension.height=((s.height||0)/10).toFixed(0),o.dimension.unit=s.measurementUnit,a.push(o)}return a},formatPayload(){const t=JSON.parse(JSON.stringify(this.payload));return t.totalWeight.value=((t.totalWeight.value??0)*10).toFixed(0),t.sellerDeclaredValue.price=((t.sellerDeclaredValue.price??0)*100).toFixed(0),t.palletItemRequests=this.formatPayloadPalettes(t.palletItemRequests),t},formatPayloadPalettes(t){const e=JSON.parse(JSON.stringify(t||[]));for(let a=0;a<e.length;a++){let d=e[a];d.dimension.length=((d.dimension.length??0)*10).toFixed(0),d.dimension.width=((d.dimension.width??0)*10).toFixed(0),d.dimension.height=((d.dimension.height??0)*10).toFixed(0),d.weight.value=((d.weight.value??0)*10).toFixed(0)}return e},formatEnum(t){return Le(t)},getHeightRules(t){const e=[this.rules.required];return t.stacked?e.push(this.rules.paletteHeight):e.push(this.rules.max60),e}}},Pt=["_50","_55","_60","_65","_70","_77_5","_85","_92_5","_100","_110","_125","_150","_175","_200","_250","_300","_400","_500"],qt=48,Et=40;function j(){return{dimension:{length:Et,width:qt,height:"",unit:"INCH"},weight:{value:"",unit:"POUND"},stacked:!0}}const At={class:"pa-6"},Qt={class:"d-flex pa-2"},Mt={class:"pa-6"},Rt={class:"d-flex"},Ot={style:{flex:"4"}},Ht={style:{flex:"3"}},Wt={class:"d-flex"},zt={style:{flex:"4"}},Kt={style:{flex:"3"}},jt={class:"d-flex pa-2"},Xt={class:"d-flex mb-3 px-6"},Gt={class:"pa-6 pt-0",style:{"max-height":"400px","overflow-y":"auto"}},Yt={class:"d-flex mb-4"},Jt={class:"font-weight-bold"},Zt=["onClick"],$t={class:"d-flex"},es={style:{flex:"1"}},ts={style:{flex:"1"}},ss={style:{flex:"1"}},is={class:"d-flex"},ls={style:{flex:"1"}},ns={style:{flex:"1"}},os={class:"d-flex pa-2"};function as(t,e,a,d,s,o){const h=y("absolute-loader"),c=y("text-button");return m(),I(N,{modelValue:s.dialog,"onUpdate:modelValue":e[16]||(e[16]=l=>s.dialog=l),width:"500"},{default:r(()=>[n(w,null,{default:r(()=>[n(h,{value:s.loading},null,8,["value"]),n(ye,{modelValue:s.stepperModel,"onUpdate:modelValue":e[15]||(e[15]=l=>s.stepperModel=l)},{default:r(()=>[n(z,null,{default:r(()=>[n(P,null,{default:r(()=>e[17]||(e[17]=[p(" Contact ")])),_:1}),n(Q,{ref:"contactForm",modelValue:s.stepFormModels[0],"onUpdate:modelValue":e[4]||(e[4]=l=>s.stepFormModels[0]=l)},{default:r(()=>[i("div",At,[n(_,{modelValue:s.payload.contactRequest.name,"onUpdate:modelValue":e[0]||(e[0]=l=>s.payload.contactRequest.name=l),rules:[s.rules.required],label:"Name *"},null,8,["modelValue","rules"]),n(_,{modelValue:s.payload.contactRequest.phone,"onUpdate:modelValue":e[1]||(e[1]=l=>s.payload.contactRequest.phone=l),rules:[s.rules.required],label:"Phone *"},null,8,["modelValue","rules"]),n(_,{modelValue:s.payload.contactRequest.email,"onUpdate:modelValue":e[2]||(e[2]=l=>s.payload.contactRequest.email=l),rules:[s.rules.required],label:"Email *"},null,8,["modelValue","rules"]),n(_,{modelValue:s.payload.contactRequest.fax,"onUpdate:modelValue":e[3]||(e[3]=l=>s.payload.contactRequest.fax=l),label:"Fax"},null,8,["modelValue"])]),i("div",Qt,[n(B),n(S,{class:"_accent white--text",onClick:o.validateContact},{default:r(()=>e[18]||(e[18]=[p(" Continue ")])),_:1},8,["onClick"])])]),_:1},8,["modelValue"])]),_:1}),n(z,null,{default:r(()=>[n(P,null,{default:r(()=>e[19]||(e[19]=[p("Freight")])),_:1}),n(Q,{ref:"freightForm",modelValue:s.stepFormModels[1],"onUpdate:modelValue":e[11]||(e[11]=l=>s.stepFormModels[1]=l)},{default:r(()=>[i("div",Mt,[n(A,{modelValue:s.payload.freightClass,"onUpdate:modelValue":e[5]||(e[5]=l=>s.payload.freightClass=l),label:"Freight Class",items:s.FREIGHT_CLASSES,rules:[s.rules.required],"menu-props":{maxHeight:300}},{selection:r(({item:l})=>[l.value?(m(),b(D,{key:0},[p(f(o.formatEnum(l.value)),1)],64)):(m(),b(D,{key:1},[],64))]),item:r(({item:l,index:x,props:g})=>[n(X,{onClick:g.onClick},{default:r(()=>[n(G,null,{default:r(()=>[p(f(o.formatEnum(l.value)),1)]),_:2},1024)]),_:2},1032,["onClick"])]),_:1},8,["modelValue","items","rules"]),n(_,{modelValue:s.payload.freightReadyDate,"onUpdate:modelValue":e[6]||(e[6]=l=>s.payload.freightReadyDate=l),rules:[s.rules.required],type:"date"},null,8,["modelValue","rules"]),i("div",Rt,[i("div",Ot,[n(_,{modelValue:s.payload.totalWeight.value,"onUpdate:modelValue":e[7]||
1(e[7]=l=>s.payload.totalWeight.value=l),rules:[s.rules.required,s.rules.totalWeight],label:"Total Weight"},null,8,["modelValue","rules"])]),e[20]||(e[20]=i("div",{class:"mr-3"},null,-1)),i("div",Ht,[n(A,{modelValue:s.payload.totalWeight.unit,"onUpdate:modelValue":e[8]||(e[8]=l=>s.payload.totalWeight.unit=l),rules:[s.rules.required],label:"Weight Unit",items:["POUND","KG"]},null,8,["modelValue","rules"])])]),i("div",Wt,[i("div",zt,[n(_,{modelValue:s.payload.sellerDeclaredValue.price,"onUpdate:modelValue":e[9]||(e[9]=l=>s.payload.sellerDeclaredValue.price=l),label:"Estimated Price",rules:[s.rules.required]},null,8,["modelValue","rules"])]),e[21]||(e[21]=i("div",{class:"mr-3"},null,-1)),i("div",Kt,[n(A,{modelValue:s.payload.sellerDeclaredValue.currencyCode,"onUpdate:modelValue":e[10]||(e[10]=l=>s.payload.sellerDeclaredValue.currencyCode=l),rules:[s.rules.required],label:"Currency",items:["USD","EUR","GBP"]},null,8,["modelValue","rules"])])])])]),_:1},8,["modelValue"]),i("div",jt,[n(c,{text:"","prepend-icon":"mdi-chevron-left",onClick:e[12]||(e[12]=l=>s.stepperModel--)},{default:r(()=>e[22]||(e[22]=[p(" back ")])),_:1}),n(B),n(S,{class:"_accent white--text",onClick:o.validateFreight},{default:r(()=>e[23]||(e[23]=[p(" Continue ")])),_:1},8,["onClick"])])]),_:1}),n(z,null,{default:r(()=>[n(P,null,{default:r(()=>e[24]||(e[24]=[p(" Palettes ")])),_:1}),n(Q,{ref:"paletteForm",modelValue:s.stepFormModels[2],"onUpdate:modelValue":e[14]||(e[14]=l=>s.stepFormModels[2]=l)},{default:r(()=>[i("div",Xt,[n(B),n(S,{outlined:"",small:"",onClick:o.addPalette},{default:r(()=>[n(be,{small:""},{default:r(()=>e[25]||(e[25]=[p(" mdi-plus ")])),_:1}),e[26]||(e[26]=p(" add palette "))]),_:1},8,["onClick"])]),i("div",Gt,[(m(!0),b(D,null,q(s.payload.palletItemRequests,(l,x)=>(m(),b("div",{key:x,class:"palette-card default-border"},[i("div",Yt,[i("span",Jt,"Palette #"+f(x+1),1),x!==0?(m(),b(D,{key:0},[n(B),i("span",{class:"text-decoration-underline clickable",onClick:()=>o.removePalette(x)},"remove",8,Zt)],64)):k("",!0)]),i("div",$t,[i("div",es,[n(_,{value:l.dimension.width,label:"Width (inch)",disabled:""},null,8,["value"])]),e[27]||(e[27]=i("div",{class:"mr-3"},null,-1)),i("div",ts,[n(_,{modelValue:l.dimension.height,"onUpdate:modelValue":g=>l.dimension.height=g,rules:o.getHeightRules(l),label:"Height (inch)",hint:l.stacked?"Available range: [48,50]":"Less than or equal to 60 inches."},null,8,["modelValue","onUpdate:modelValue","rules","hint"])]),e[28]||(e[28]=i("div",{class:"mr-3"},null,-1)),i("div",ss,[n(_,{value:l.dimension.length,label:"Length (inch)",disabled:""},null,8,["value"])])]),i("div",is,[i("div",ls,[n(_,{modelValue:l.weight.value,"onUpdate:modelValue":g=>l.weight.value=g,rules:[s.rules.required],label:"Weight"},null,8,["modelValue","onUpdate:modelValue","rules"])]),e[29]||(e[29]=i("div",{class:"mr-3"},null,-1)),i("div",ns,[n(A,{modelValue:l.weight.unit,"onUpdate:modelValue":g=>l.weight.unit=g,rules:[s.rules.required],items:["POUND","KG"],label:"Weight Unit"},null,8,["modelValue","onUpdate:modelValue","rules"])])]),n(ve,{modelValue:l.stacked,"onUpdate:modelValue":g=>l.stacked=g,class:"mt-0",label:"Is stacked?","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])]))),128))]),i("div",os,[n(c,{text:"","prepend-icon":"mdi-chevron-left",onClick:e[13]||(e[13]=l=>s.stepperModel--)},{default:r(()=>e[30]||(e[30]=[p(" back ")])),_:1}),n(B),n(S,{class:"_accent white--text",onClick:o.submitShipment},{default:r(()=>e[31]||(e[31]=[p(" Submit ")])),_:1},8,["onClick"])])]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])}const rs=U(Ut,[["render",as],["__scopeId","data-v-dcfb8aa5"]]),ds={name:"Boxing",components:{LtlInfoDialog:rs,ReviewBoxSpecsDialog:Lt,SessionItemLocatorDialog:vt,UnpackedShipmentsDialog:de,TransferItemToAnotherBoxDialog:ut,LabelPrinterSettings:Fe,ChangeQtyForBoxDialog:Je,ChangeQtyForSessionDialog:ze,MoreInfoDialog:Ae,AbsoluteLoader:E,BoxingTable:re},data(){return{boxSpecsDialog:!1,defaultDimensions:{width:"",height:"",length:"",weight:""},deleteBoxConfirmationModels:[],loadingForPage:!1,loadingForBoxing:!1,loadingForUnpackedItems:!1,moreInfo:{model:!1,item:null},changeQtyForSession:{model:!1,item:null},changeQtyForBox:{model:!1,item:null},transferItemToAnotherBoxDialog:{model:!1,items:null},labelPrinterSettings:!1,transferToAnotherSession:{model:!1,items:null,isAll:!1},keyboardInputs:"",formattedBoxes:[],currenBoxWeight:"",itemLocatorDialog:!1,rightArrow:Nt,scanner:null,ltlInfoDialog:!1,boxListMenuModel:!1}},mounted(){this.scanner=new Te(this.scannerHandler),this.scanner.startListening(),this.fetchPageData(!0)},methods:{...H(["getShipmentBoxes","addBox","removeBox","getUnpackedItems","fetchShipments","updateBox","getBoxDetail","addToCurrentBox","addBulkToCurrentBox","removeFromCurrentBox","deleteExistingListingItemInBoxing","resetBoxingStore","submitSelectedShipment"]),async fetchPageData(t=!1){this.loadingForPage=!0;let{sessionId:e,shipmentId:a}=this.$route.params;if(!e||!a)return;await this.fetchShipments({sessionId:e,shipmentId:a}),await this.getUnpackedItems({sessionId:e}
1),await this.getShipmentBoxes({sessionId:e,shipmentId:a});let d=this.$route.params?.boxId;if(d&&this.boxes&&this.boxes.length>0){let s=this.formattedBoxes.find(o=>Number(o.id)===Number(d));s&&await this.selectBox(s)}this.loadingForPage=!1},async addNewBox(){document.activeElement&&document.activeElement.blur();let{width:t,height:e,length:a,weight:d}=this.defaultDimensions,s={width:t?Number(t)*10:0,height:e?Number(e)*10:0,length:a?Number(a)*10:0,weight:d?Number(d)*10:0};const{sessionId:o,shipmentId:h}=this.$route.params;await this.addBox({sessionId:o,shipmentId:h,data:s})},async selectBox(t){const{sessionId:e,shipmentId:a,boxId:d}=this.$route.params,s=t.id;this.loadingForBoxing=!0,await this.getBoxDetail({sessionId:e,shipmentId:a,boxId:s}),Number(s)!==Number(d)&&await this.$router.push({params:{boxId:s.toString()}}),this.loadingForBoxing=!1},async handleBoxRemoval({id:t},e){this.loadingForUnpackedItems=!0,this.deleteBoxConfirmationModels[e]=!1;const{sessionId:a,shipmentId:d}=this.$route.params;await this.removeBox({sessionId:a,shipmentId:d,boxId:t}),this.boxes.length<1&&ke.commit("SET_SELECTED_BOX",null),this.loadingForUnpackedItems=!1},onDimensionSet(t,e,a,d){t.target.value=t.target.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1");let s=t.target.value;a[d]=Number(s),this.formattedBoxes.filter(h=>h[d]===Number(s)).length===this.boxes.length?this.defaultDimensions[e]=s:this.defaultDimensions[e]="mixed"},handleDefaultDimensionChange(t,e){t.target.value=t.target.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),this.defaultDimensions[e]=t.target.value},async updateBoxDimensions(t,e){const{sessionId:a,shipmentId:d}=this.$route.params,s=this.$refs[`width_${t.id}`][0].value||null,o=this.$refs[`height_${t.id}`][0].value||null,h=this.$refs[`length_${t.id}`][0].value||null,c=e||this.$refs[`weight_${t.id}`][0].value||null;let l={width:Number(s)*10,height:Number(o)*10,length:Number(h)*10,weight:Number(c)*10};Object.keys(l).forEach(x=>{l[x]||delete l[x]}),await this.updateBox({sessionId:a,shipmentId:d,boxId:t.id,data:l})},async addToBox(t,e){if(!this.selectedBox){Be("Please select a box first.",we.WARNING);return}const{sessionId:a,shipmentId:d}=this.$route.params;await this.addToCurrentBox({sessionId:a,shipmentId:d,fnsku:t,quantity:e})},async bulkAddToBox(t,e,a){const{sessionId:d,shipmentId:s}=this.$route.params,o=Object.keys(e).filter(x=>e[x]!==t).map(x=>Number(x));let h=t?"excludeIds":"includingIds";const c=a.filter(({id:x})=>o.includes(x)).map(({fnsku:x})=>x),l={isAll:t,isBoxed:!1,[h]:o,boxSelectionType:Se.ONLY_UNBOXED};await this.addBulkToCurrentBox({sessionId:d,shipmentId:s,payload:l,affectedItems:c,excluding:t})},displayMoreInfoForItem(t){this.moreInfo.item=t,this.moreInfo.model=!0},displayChangeQtyForSessionItem(t){this.changeQtyForSession.item=t,this.changeQtyForSession.model=!0},displayChangeQtyForBoxItem(t){this.changeQtyForBox.item=t,this.changeQtyForBox.model=!0},async removeItemFromBox(t,e){const{sessionId:a,shipmentId:d}=this.$route.params;await this.removeFromCurrentBox({sessionId:a,shipmentId:d,fnsku:t,quantity:e})},async reprintSticker(t){let e=t.fnsku,a=t.labelPrepType,d=t.bookDetail?.title||"",s=Y[t.condition]||"";await $.printFbaLabel({fnsku:e,title:d,condition:s,labelPrepType:a})},displayTransferItemToAnotherBox(t){this.transferItemToAnotherBoxDialog.items=t,this.transferItemToAnotherBoxDialog.model=!0},async printStickers(t,e,a){Object.keys(e).filter(s=>e[s]).forEach(s=>{let o=a.find(h=>Number(h.id)===Number(s));o&&this.reprintSticker(o)})},async transferItemsToAnotherBox(t,e,a){let d=Object.keys(e).filter(o=>e[o]),s=[];d.forEach(o=>{let h=a.find(c=>Number(c.id)===Number(o));h&&s.push(h)}),this.displayTransferItemToAnotherBox(s)},async displayTransferToAnotherSession(t,e){this.transferToAnotherSession.items=e,this.transferToAnotherSession.isAll=t,this.transferToAnotherSession.model=!0},transferMultipleItemsToAnotherSession(t,e,a){let d=Object.keys(e).filter(o=>e[o]===!t),s=[];d.forEach(o=>{let h=a.find(c=>Number(c.id)===Number(o));h&&s.push(h)}),this.displayTransferToAnotherSession(t,s)},handleCompleteBoxingClick(){this.shippingMethod==="LTL"?this.ltlInfoDialog=!0:this.boxSpecsDialog=!0},async submitCurrentSession(){if(this.boxingShipments.length===0)return;this.loadingForPage=!0,this.boxSpecsDialog=!1;const{sessionId:t,shipmentId:e}=this.$route.params;await this.submitSelectedShipment({sessionId:t,shipmentId:e}),this.loadingForPage=!1,this.boxingShipments.length<1?await this.$router.push({name:"ListingsFba"}):await this.$router.push({params:{shipmentId:this.boxingShipments[0].id}})},scannerHandler(t){document.activeElement?.tagName!=="INPUT"&&(!t||t===""||this.addToBox(t,1))},async searchInTheBox(t){const{sessionId:e,shipmentId:a}=this.$route.params,{id:d}=this.selectedBox;await this.getBoxDetail({sessionId:e,shipmentId:a,boxId:d,searchText:t})},async bulkRemoveFromSession(t,e){const{sessionId:a}=this.$route.params;let d=Object.keys(e).filter(h=>e[h]===!t),s=t?"excludeIds":"includingIds",o={};o.isAll=t,o[s]=d,await this.deleteExistingListingItemInBoxing({sessionId:a,body:o})}},computed:{...Ie(["boxes","unpackedItemsData","boxingShipments","selectedBox","currentBoxingShipment","lastBoxingLog","boxingSessionSummary"]),selectedBoxText(){return this.selectedBox?.name},unpackedItems(){return{content:this.unpackedItemsData?.content||[],pageSize:this.unpackedItemsData?.pageSize||0,totalSize:this.unpackedItemsData?.totalSize||0,nextSeekId:this.unpackedItemsData?.nextSeekId||null}},shippingMethod(){return this.boxingSessionSummary?.shippingMethod},isCurrentShipmentReadyToSubmit(){return this.currentBoxingShipment.itemQuantity<=this.currentBoxingShipment.boxedQuantity},boxItems(){return this.selectedBox?.items||[]},activeShipments(){let t=[...this.boxingShipments];return t=t.filter(e=>e.status!=="CANCELLED"),t||[]}
1,anyEmptyDimensionOrWeight(){return!!this.boxes.find(t=>!t.width||!t.height||!t.length||!t.weight)},unpackedItemsLeft(){let t=this.boxingSessionSummary;return(t?.itemQuantity||0)-(t?.boxedQuantity||0)},sessionId(){return this.$route.params.sessionId??""},shipmentId(){return this.$route.params.shipmentId??""}},watch:{"$route.params":{handler:function(t,e){let a=t.sessionId!==e.sessionId,d=t.shipmentId!==e.shipmentId;(a||d)&&this.fetchPageData()},deep:!0},boxes:{handler:function(t){!t||t.length===0||(this.formattedBoxes=[],t.forEach(e=>{this.formattedBoxes.push(Object.assign({},e))}))},immediate:!0},selectedBox:{handler:function(t,e){t&&(this.currenBoxWeight=t.weight?t.weight/10:"");const a=!!t?.withSearchText;!!e?.withSearchText&&!a&&this.$refs.rightBoxingTable?.clearSearchData()},immediate:!0},boxListMenuModel(){document.activeElement.blur()},unpackedItemsData(t,e){const a=!!t?.withSearchText;!!e?.withSearchText&&!a&&this.$refs.leftBoxingTable?.clearSearchData()}},beforeUnmount(){this.resetBoxingStore(),this.scanner.stopListening()}},us={class:"boxing-page-container"},ms={class:"boxing-layout"},hs={style:{position:"absolute",top:"4px",right:"4px"}},gs=["innerHTML"],ps={class:"boxing-layout-part-head"},fs={class:"text-text_inverse"},cs={class:"boxing-layout-part-head"},xs={style:{color:"rgb(var(--v-theme-text_primary))"}},ys={class:"boxing-part-header"},bs={class:"boxig-part-header-right"},vs={class:"boxig-part-header-right-num"},Is={class:"boxing-layout-part-content"},Ss={class:"boxing-part-header"},Bs={class:"boxing-part-header-title"},ks={class:"boxig-part-header-right"}
1,ws={key:0,class:"underline-menu-button justify-end",style:{"align-items":"end","padding-bottom":"2px"}},Ds={class:"boxing-layout-part-content"},_s={key:1,class:"boxing-table-placeholder grey lighten-3 text-text_muted"};function Vs(t,e,a,d,s,o){const h=y("absolute-loader"),c=y("icon-button"),l=y("v-list"),x=y("text-button"),g=y("boxing-table"),O=y("review-box-specs-dialog"),W=y("MoreInfoDialog"),te=y("ChangeQtyForSessionDialog"),se=y("ChangeQtyForBoxDialog"),ie=y("LabelPrinterSettings"),le=y("TransferItemToAnotherBoxDialog"),ne=y("UnpackedShipmentsDialog"),oe=y("SessionItemLocatorDialog"),ae=y("LtlInfoDialog");return m(),b("div",us,[n(h,{value:s.loadingForPage},null,8,["value"]),i("div",ms,[n(w,{flat:"",class:"default-shadow"},{default:r(()=>[n(T,{style:{height:"100%",display:"flex","align-content":"center","align-items":"center","justify-content":"center",padding:"20px",position:"relative","max-height":"104px","overflow-y":"auto",color:"rgb(var(--v-theme-border_control))","font-size":"12px"}},{default:r(()=>[i("div",hs,[n(J,{location:"bottom"},{activator:r(({props:u})=>[n(c,R({icon:"mdi-map-marker-question",color:"text_primary"},u,{onClick:e[0]||(e[0]=v=>s.itemLocatorDialog=!0)}),null,16)]),default:r(()=>[e[12]||(e[12]=i("span",null,"Locate Item",-1))]),_:1}),n(J,{location:"bottom"},{activator:r(({props:u})=>[n(c,R({icon:"mdi-printer",color:"text_primary",class:"ml-1"},u,{onClick:e[1]||(e[1]=v=>s.labelPrinterSettings=!0)}),null,16)]),default:r(()=>[e[13]||(e[13]=i("span",null,"Printer Settings",-1))]),_:1})]),t.lastBoxingLog?(m(),b("span",{key:0,class:V(t.lastBoxingLog.type),innerHTML:t.lastBoxingLog.message},null,10,gs)):(m(),b(D,{key:1},[p(" Scan FNSKU to transfer item to selected box ")],64))]),_:1})]),_:1}),n(w,{flat:"",class:"default-shadow"},{default:r(()=>[n(T,null,{default:r(()=>[i("div",ps,[n(K,{"offset-y":"",left:"","max-width":"420",disabled:o.activeShipments.length<2},{activator:r(({props:u})=>
1[i("div",R(u,{class:"underline-menu-button clickable"}),[i("div",null,f(t.currentBoxingShipment.shipmentName||"Select Shipment"),1),o.activeShipments.length>1?(m(),I(De,{key:0,class:"ml-2",color:"brand_solid",size:"20",style:{"min-width":"24px",width:"24px",height:"24px"}},{default:r(()=>[i("span",fs,f(o.activeShipments&&o.activeShipments.length>0?o.activeShipments.length:0),1)]),_:1})):k("",!0)],16)]),default:r(()=>[n(l,null,{default:r(()=>[(m(!0),b(D,null,q(o.activeShipments,({id:u,shipmentName:v},C)=>(m(),b(D,{key:C},[n(X,{lines:"two",onClick:Cs=>t.$router.push({params:{shipmentId:u}})},{default:r(()=>[n(G,{class:V({"font-weight-bold":u===t.currentBoxingShipment.id})},{default:r(()=>[p(f(v),1)]),_:2},1032,["class"])]),_:2},1032,["onClick"]),C!==t.boxingShipments.length-1?(m(),I(Z,{key:`shipment-menu-divider-${C}`})):k("",!0)],64))),128))]),_:1})]),_:1},8,["disabled"]),n(B),n(x,{color:"state_boxing",disabled:!(o.isCurrentShipmentReadyToSubmit&&!s.loadingForPage),onClick:o.handleCompleteBoxingClick},{default:r(()=>e[14]||(e[14]=[p(" Complete Boxing ")])),_:1},8,["disabled","onClick"])]),i("div",cs,[i("div",xs,f(t.currentBoxingShipment.boxedQuantity)+" / "+f(t.currentBoxingShipment.itemQuantity),1),n(B),n(x,{color:"state_boxing",onClick:o.addNewBox},{default:r(()=>e[15]||(e[15]=[p(" add box ")])),_:1},8,["onClick"]),n(K,{modelValue:s.boxListMenuModel,"onUpdate:modelValue":e[2]||(e[2]=u=>s.boxListMenuModel=u),"offset-y":""},{activator:r(({props:u})=>[n(x,R(u,{color:"state_boxing",disabled:!t.boxes||t.boxes.length===0}),{default:r(()=>e[16]||(e[16]=[p(" box list ")])),_:2},1040,["disabled"])]),default:r(()=>[n(l,{class:"boxes-list"},{default:r(()=>[(m(!0),b(D,null,q(s.formattedBoxes,(u,v)=>(m(),b(D,{key:`box-${v}`},[n(X,{class:"pr-1",onClick:C=>o.selectBox(u)},{append:r(()=>[n(_e,{class:"my-0"},{default:r(()=>[n(K,{modelValue:s.deleteBoxConfirmationModels[v],"onUpdate:modelValue":C=>s.deleteBoxConfirmationModels[v]=C,"offset-y":"","close-on-content-click":!0},{activator:r(({props:C})=>[n(c,R({icon:"mdi-delete",small:"",ref_for:!0},C),null,16)]),default:r(()=>[n(w,null,{default:r(()=>[n(T,{class:"pt-4 pb-0"},{default:r(()=>e[17]||(e[17]=[p(" You have items in this box. These items wil go back to “Unpacked” if you delete box. "),i("br",null,null,-1),p(" You can make transfer between boxes before deleting the box. ")])),_:1}),n(M,null,{default:r(()=>[n(B),n(S,{onClick:C=>s.deleteBoxConfirmationModels[v]=!1},{default:r(()=>e[18]||(e[18]=[p(" cancel ")])),_:2},1032,["onClick"]),n(S,{onClick:C=>o.handleBoxRemoval(u,v)},{default:r(()=>e[19]||(e[19]=[p(" DELETE BOX AND TRANSFER ITEMS TO “UNPACKED” ")])),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),default:r(()=>[n(G,{style:{"min-width":"100px"},class:V({"font-weight-bold":t.selectedBox&&t.selectedBox.id===u.id})},{default:r(()=>[p(f(u.name),1)]),_:2},1032,["class"])]),_:2},1032,["onClick"]),n(Z)],64))),128))]),_:1})]),_:1},8,["modelValue"])])]),_:1})]),_:1}),n(w,{flat:"",class:"boxing-layout-part default-shadow"},{default:r(()=>[i("div",ys,[e[22]||(e[22]=i("div",{class:"boxing-part-header-title"}," Unpacked Items ",-1)),i("div",bs,[i("span",vs,f(o.unpackedItemsLeft),1),e[20]||(e[20]=i("br",null,null,-1)),e[21]||(e[21]=i("span",{class:"boxig-part-header-right-text"},"Items Left",-1))])]),i("div",Is,[n(g,{ref:"leftBoxingTable",items:o.unpackedItems.content,"menu-items":[{handler:u=>o.displayTransferToAnotherSession(!1,[u]),text:"Transfer to Another Session"},{text:"Reprint Sticker",handler:u=>o.reprintSticker(u)},{text:"More Info",handler:u=>o.displayMoreInfoForItem(u)},{text:"Change Qty",handler:u=>o.displayChangeQtyForSessionItem(u)},{text:"Delete From Session",className:"text-error",handler:u=>t.deleteExistingListingItemInBoxing({sessionId:t.$route.params.sessionId,body:{includingIds:[u.id]}})}],"bulk-menu-items":[{text:"Reprint Stickers",handler:(u,v)=>o.printStickers(u,v,o.unpackedItems.content)},{text:"Move Selected to Box",handler:(u,v)=>o.bulkAddToBox(u,v,o.unpackedItems.content),disabled:!t.selectedBox},{text:"Transfer to Another Session",handler:(u,v)=>o.transferMultipleItemsToAnotherSession(u,v,o.unpackedItems.content)},{text:"Delete From Session",className:"text-error",handler:(u,v)=>o.bulkRemoveFromSession(u,v)}],"second-button":{image:s.rightArrow,handler:u=>o.addToBox(u.fnsku,1),color:"state_boxing"},boxes:t.boxes,"total-size":o.unpackedItems.totalSize,loading:s.loadingForUnpackedItems,pagination:"","pagination-has-more":!!o.unpackedItems.nextSeekId,"pagination-load-more":()=>t.getUnpackedItems({sessionId:t.$route.params.sessionId,nextSeekId:o.unpackedItems.nextSeekId}),"search-handler":u=>t.getUnpackedItems({sessionId:t.$route.params.sessionId,searchText:u})},null,8,["items","menu-items","bulk-menu-items","second-button","boxes","total-size","loading","pagination-has-more","pagination-load-more","search-handler"])])]),_:1}),n(w,{flat:"",class:"boxing-layout-part default-shadow"},{default:r(()=>[i("div",Ss,[i("div",Bs,f(o.selectedBoxText),1),i("div",ks,[t.selectedBox?(m(),b("div",ws,[i("b",null,"≈ "+f(t.selectedBox?t.selectedBox.estimatedWeight/10:0),1),e[23]||(e[23]=p()),e[24]||(e[24]=i("span",{class:"boxig-part-header-right-text ml-1"},"lbs.",-1))])):k("",!0)])]),i("div",Ds,[t.selectedBox?(m(),I(g,{key:0,ref:"rightBoxingTable",items:o.boxItems,"menu-items":[{text:"Reprint Sticker",handler:u=>o.reprintSticker(u)},{handler:u=>o.displayTransferItemToAnotherBox([u]),text:"Transfer to Another Box"},{text:"More Info",handler:u=>o.displayMoreInfoForItem(u)},{text:"Change Qty",handler:u=>o.displayChangeQtyForBoxItem(u)}],"bulk-menu-items":[{text:"Reprint Stickers",handler:(u,v)=>o.printStickers(u,v,o.boxItems)},{text:"Transfer to Another Box",handler:(u,v)=>o.transferItemsToAnotherBox(u,v,o.boxItems),disabled:t.boxes.length<2}],"second-button":{image:s.rightArrow,imageStyle:"transform: rotate(180deg);",handler:u=>o.removeItemFromBox(u.fnsku,1),color:"state_boxing"},boxes:t.boxes,"total-size":o.boxItems.length,loading:s.loadingForBoxing,"search-handler":u=>o.searchInTheBox(u)},null,8,["items","menu-items","bulk-menu-items","second-button","boxes","total-size","loading","search-handler"])):(m(),b("div",_s,e[25]||(e[25]=[i("span",null,"Please select/create a box",-1)])))])]),_:1})]),s.boxSpecsDialog?(m(),I(O,{key:0,"session-id":t.$route.params.sessionId,"shipment-id":t.$route.params.shipmentId,"on-submit-success":o.submitCurrentSession,boxes:t.boxes,onReviewBoxSpecsDialog:e[3]||(e[3]=u=>s.boxSpecsDialog=u)},null,8,["session-id","shipment-id","on-submit-success","boxes"])):k("",!0),s.moreInfo.model?(m(),I(W,{key:1,item:s.moreInfo.item,onMoreInfoDialog:e[4]||(e[4]=u=>s.moreInfo.model=u)},null,8,["item"])):k("",!0),s.changeQtyForSession.model?(m(),I(te,{key:2,item:s.changeQtyForSession.item,onChangeQtyDialog:e[5]||(e[5]=u=>s.changeQtyForSession.model=u)},null,8,["item"])):k("",!0),s.changeQtyForBox.model?(m(),I(se,{key:3,item:s.changeQtyForBox.item,onChangeQtyDialog:e[6]||(e[6]=u=>s.changeQtyForBox.model=u)},null,8,["item"])):k("",!0),s.labelPrinterSettings?(m(),I(ie,{key:4,onClose:e[7]||
1(e[7]=u=>s.labelPrinterSettings=u)})):k("",!0),s.transferItemToAnotherBoxDialog.model?(m(),I(le,{key:5,boxes:t.boxes,items:s.transferItemToAnotherBoxDialog.items,"selected-box":t.selectedBox,onTransferItemToAnotherBox:e[8]||(e[8]=u=>s.transferItemToAnotherBoxDialog.model=u)},null,8,["boxes","items","selected-box"])):k("",!0),s.transferToAnotherSession.model?(m(),I(ne,{key:6,"is-all":s.transferToAnotherSession.isAll,items:s.transferToAnotherSession.items,onUnpackedShipmentsDialog:e[9]||(e[9]=u=>s.transferToAnotherSession.model=u)},null,8,["is-all","items"])):k("",!0),s.itemLocatorDialog?(m(),I(oe,{key:7,onSessionItemLocatorDialog:e[10]||(e[10]=u=>s.itemLocatorDialog=u)})):k("",!0),s.ltlInfoDialog?(m(),I(ae,{key:8,"session-id":o.sessionId,"shipment-id":o.shipmentId,"on-success":o.submitCurrentSession,onCloseLtlInfoDialog:e[11]||(e[11]=()=>s.ltlInfoDialog=!1)},null,8,["session-id","shipment-id","on-success"])):k("",!0)])}const di=U(ds,[["render",Vs],["__scopeId","data-v-453812ae"]]);export{di as default};

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.