1"use strict";(self.webpackChunkDashboard=self.webpackChunkDashboard||[]).push([[4246],{8968:(t,e,i)=>{i.r(e),i.d(e,{default:()=>r});var o=i(4267),n=i(76610);const s={name:"NewOrderShipping",components:{AlertContainer:function(){return i.e(7561).then(i.bind(i,89451))},LoadingWrapper:function(){return i.e(1028).then(i.bind(i,25094))},NewOrderProductTable:function(){return i.e(6015).then(i.bind(i,11316))}},data:function(){return{test:{},shippingOptionsReady:!1,loading:!0,error:!1}},computed:{productData:function(){return this.$store.getters["bookOrder/getBookOrderData"]("productData")},shippingAddresses:function(){return this.$store.getters["bookOrder/getBookOrderData"]("shippingAddresses")},shippingOptions:function(){return this.$store.getters["bookOrder/getBookOrderData"]("shippingOptions")},shippingOptionsError:function(){var t,e;return null===(t=this.shippingOptions)||void 0===t||null===(e=t.some)||void 0===e?void 0:e.call(t,(function(t){return t.shippingOptionsError}))}},mounted:function(){this.fetchData()},watch:{$route:"fetchData"},methods:{formatMoneyIso:o.zc,fetchData:function(){var t=this,e=this.productData,i=e.projectId,o={objectId:e.objectId,shipping:this.shippingAddresses};i&&delete Object.assign(o,{projectId:i}).objectId,n.hi.post("/v1/me/bookorders/shippingmethods",o).then((function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.data;t.shippingAddresses.forEach((function(t,e){var o,n,s,r=null===(o=i[e])||void 0===o||null===(n=o.shippingOptions)||void 0===n||null===(s=n.filter((function(e){return e.shippingMethod==t.shippingMethod})))||void 0===s?void 0:s[0];if(!t.shippingMethod||null==r)return t.shippingMethod=i[e].shippingOptions[0].shippingMethod})),t.setBookOrderShippingOptionsData(i),t.shippingOptionsReady=!0})).catch((function(e){t.error=!0,console.error(e)})).finally((function(){return t.loading=!1}))},sumbitForm:function(){this.setBookOrderShippingAddressesData(this.shippingAddresses),this.setBookOrderStep(4)},setBookOrderShippingAddressesData:function(t){this.$store.commit("bookOrder/SET_BOOK_ORDER_SHIPPING_ADDRESSES_DATA",t)},setBookOrderShippingOptionsData:function(t){this.$store.commit("bookOrder/SET_BOOK_ORDER_SHIPPING_OPTIONS_DATA",t)},setBookOrderStep:function(t){this.$store.commit("bookOrder/SET_BOOK_ORDER_STEP",t)}}};const r=(0,i(51900).Z)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"new-order-shipping"},[i("loading-wrapper",{attrs:{loading:t.loading,error:t.error}},[i("new-order-product-table"),t._v(" "),i("div",{staticClass:"card mb-4"},[i("div",{staticClass:"card-body p-4"},[i("h3",{staticClass:"fw-bold text-bodblue-dark"},[t._v("\n "+t._s(t.$t("newbookorder.shipping.title"))+"\n ")]),t._v(" "),i("table",{staticClass:"table table-borderless table-striped table-bodblue-light-30 table-responsive-custom mb-4"},[i("thead",[i("tr",[i("th",[t._v(t._s(t.$t("newbookorder.shipping.tableTitle.shippingAddresses")))]),t._v(" "),i("th",[t._v(t._s(t.$t("newbookorder.shipping.tableTitle.amount")))]),t._v(" "),i("th",[t._v(t._s(t.$t("newbookorder.shipping.tableTitle.shippingOptions")))])])]),t._v(" "),i("tbody",t._l(t.shippingAddresses,(function(e,o){return t.shippingOptionsReady?i("tr",[i("td",{attrs:{"data-title":t.$t("newbookorder.shipping.tableTitle.shippingAddresses")}},[i("p",{staticClass:"m-0"},[i("b",[t._v(t._s(e.company))])]),t._v(" "),i("p",[t._v(t._s(e.firstName)+" "+t._s(e.lastName)),i("br"),t._v("\n "+t._s(e.street)),i("br"),t._v("\n "+t._s(e.country)+" "+t._s(e.zip)+" "+t._s(e.city))]),t._v(" "),i("button",{staticClass:"btn btn-sm btn-outline-bodblue-dark rounded-pill text-nowrap px-4",on:{click:function(e){return e.preventDefault(),t.setBookOrderStep(2)}}},[i("i",{staticClass:"fa-duotone fa-pencil"}),t._v(" "+t._s(t.$t("newbookorder.shipping.btnEdit"))+"\n ")])]),t._v(" "),i("td",{attrs:{"data-title":t.$t("newbookorder.shipping.tableTitle.amount")}},[t._v("\n "+t._s(e.amount)+"\n ")]),t._v(" "),i("td",{attrs:{"data-title":t.$t("newbookorder.shipping.tableTitle.shippingOptions")}},t._l(t.shippingOptions[o].shippingOptions,(function(n){return i("div",{staticClass:"form-check mt-1 mb-2"},["N"==n.shippingMethod?[i("alert-container",{attrs:{data:{state:"error",text:t.$t("newbookorder.shipping.optionsError")},layoutType:2}})]:[i("input",{directives:[{name:"model",rawName:"v-model",value:e.shippingMethod,expression:"address.shippingMethod"}],staticClass:"form-check-input",attrs:{type:"radio",id:"shipping["+o+"]["+n.shippingMethod+"]"},domProps:{value:n.shippingMethod,checked:t._q(e.shippingMethod,n.shippingMethod)}
1,on:{change:function(i){return t.$set(e,"shippingMethod",n.shippingMethod)}}}),t._v(" "),i("label",{staticClass:"form-check-label",attrs:{for:"shipping["+o+"]["+n.shippingMethod+"]"}},["C"==n.shippingMethod?[t._v("\n "+t._s(t.$t("newbookorder.shipping.options.0"))+"\n ")]:t._e(),t._v(" "),"B"==n.shippingMethod?[t._v("\n "+t._s(t.$t("newbookorder.shipping.options.1",{price:t.formatMoneyIso(n.shippingCosts)}))+" "+t._s(t.$t("newbookorder.shipping.vatText"))+"\n ")]:t._e(),t._v(" "),"P"==n.shippingMethod?[t._v("\n "+t._s(t.$t("newbookorder.shipping.options.2",{price:t.formatMoneyIso(n.shippingCosts)}))+" "+t._s(t.$t("newbookorder.shipping.vatText"))+"\n ")]:t._e()],2)]],2)})),0)]):t._e()})),0)]),t._v(" "),i("div",{staticClass:"text-bodgrey-dark"},[i("div",{domProps:{innerHTML:t._s(t.$t("newbookorder.shipping.standardShippingDesc"))}}),t._v(" "),i("div",{domProps:{innerHTML:t._s(t.$t("newbookorder.shipping.dhlShippingDesc"))}})])])]),t._v(" "),i("div",{staticClass:"row g-4 mt-4 justify-content-between"},[i("div",{staticClass:"d-grid col-md-12 col-lg-10 col-xl-8"},[i("button",{staticClass:"btn btn-bodorange rounded-pill",attrs:{id:"btnNext",disabled:t.shippingOptionsError},on:{click:function(e){return e.preventDefault(),t.sumbitForm()}}},[t._v("\n "+t._s(t.$t("newbookorder.btnNext"))+" "),i("i",{staticClass:"fa-regular fa-chevron-right"})])]),t._v(" "),i("div",{staticClass:"d-grid col-md-12 col-lg-10 col-xl-8 order-md-first"},[i("button",{staticClass:"btn btn-outline-dark rounded-pill",attrs:{id:"btnBack"},on:{click:function(e){return e.preventDefault(),t.setBookOrderStep(2)}}},[i("i",{staticClass:"fa-regular fa-chevron-left"}),t._v(" "+t._s(t.$t("newbookorder.btnBack"))+"\n ")])])])],1)],1)}),[],!1,null,null,null).exports}}]);
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.