From 3048e52f974190a6677166a06844432b6ae94c1d Mon Sep 17 00:00:00 2001 From: Allan Dorr Date: Fri, 17 Jul 2020 16:38:48 +0200 Subject: [PATCH 1/4] Added some responsiveness, and some translationability (i.e. Empty Cart is used as both Noun and Verb, which doesn't always translate the same way) --- assets/js/frontend.js | 6 +- assets/js/frontend.min.js | 2 +- assets/less/style.less | 150 ++++++++++++++++++ assets/src/frontend/components/FeeKeypad.vue | 4 +- assets/src/frontend/components/Home.vue | 2 +- .../src/frontend/components/ProductSearch.vue | 4 +- languages/wepos.php | 3 +- languages/wepos.pot | 13 +- 8 files changed, 169 insertions(+), 15 deletions(-) mode change 100644 => 100755 assets/js/frontend.js mode change 100644 => 100755 assets/js/frontend.min.js mode change 100644 => 100755 assets/less/style.less mode change 100644 => 100755 assets/src/frontend/components/FeeKeypad.vue mode change 100644 => 100755 assets/src/frontend/components/Home.vue mode change 100644 => 100755 assets/src/frontend/components/ProductSearch.vue mode change 100644 => 100755 languages/wepos.pot diff --git a/assets/js/frontend.js b/assets/js/frontend.js old mode 100644 new mode 100755 index 7ab087c5..ef8b0b4b --- a/assets/js/frontend.js +++ b/assets/js/frontend.js @@ -1755,7 +1755,7 @@ let Modal = wepos_get_lib('Modal'); return { showResults: false, showVariationModal: false, - mode: 'scan', + mode: 'product', serachInput: '', searchableProduct: [], selectedVariationProduct: {}, @@ -4995,7 +4995,7 @@ var render = function() { }, [ _c("a", { attrs: { href: "#" }, on: { click: _vm.showFeeKeypad } }, [ - _vm._v(_vm._s(_vm.__("Add", "wepos")) + " " + _vm._s(_vm.name)) + _vm._v("+ " + _vm._s(_vm.name)) ]), _vm._v(" "), _c( @@ -6848,7 +6848,7 @@ var render = function() { _vm._v(" "), _c("p", [ _vm._v( - _vm._s(_vm.__("Empty Cart", "wepos")) + _vm._s(_vm.__("Cart Empty", "wepos")) ) ]) ]) diff --git a/assets/js/frontend.min.js b/assets/js/frontend.min.js old mode 100644 new mode 100755 index e11bd4fd..be4973a5 --- a/assets/js/frontend.min.js +++ b/assets/js/frontend.min.js @@ -1 +1 @@ -pluginWebpack([0],Array(27).concat([function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=o(a(28)),i=o(a(30));function o(t){return t&&t.__esModule?t:{default:t}}var r=wepos_get_lib("Vue"),n=wepos_get_lib("Vuex");r.use(n),e.default=new n.Store({modules:{Cart:s.default,Order:i.default}})},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s,i=a(29),o=(s=i)&&s.__esModule?s:{default:s};e.default={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[]}},getters:{getSubtotal:function(t){var e=0;return weLo_.forEach(t.cartdata.line_items,function(t,a){t.on_sale?e+=t.quantity*t.sale_price:e+=t.quantity*t.regular_price}),e},getTotalFee:function(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,function(t,a){"fee"==t.type&&(e+=Math.abs(t.total))}),e},getTotalDiscount:function(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,function(t,a){"discount"==t.type&&(e+=Number(Math.abs(t.total)))}),e},getTotalLineTax:function(t){var e=0;return weLo_.forEach(t.cartdata.line_items,function(t,a){e+=Math.abs(t.tax_amount*t.quantity)}),e},getTotalTax:function(t){var e=0,a=0;return weLo_.forEach(t.cartdata.line_items,function(t,a){e+=Math.abs(t.tax_amount*t.quantity)}),void 0!=t.settings.woo_tax&&"incl"==t.settings.woo_tax.wc_tax_display_cart&&(e=0),weLo_.forEach(t.cartdata.fee_lines,function(e,s){if("fee"==e.type&&"taxable"==e.tax_status){var i=""===e.tax_class?"standard":e.tax_class,o=weLo_.find(t.availableTax,{class:i.toString()});void 0!==o&&(a+=Math.abs(e.total)*Math.abs(o.rate)/100)}}),e+a},getOrderTotal:function(t,e){return e.getSubtotal+e.getTotalFee+e.getTotalTax},getTotal:function(t,e){return e.getOrderTotal-e.getTotalDiscount}},mutations:{setSettings:function(t,e){t.settings=e},setAvailableTax:function(t,e){t.availableTax=e},setCartData:function(t,e){weLo_.isEmpty(e)?t.cartdata={line_items:[],fee_lines:[]}:t.cartdata=Object.assign({},e)},addToCartItem:function(t,e){var a={};a.product_id=0===e.parent_id?e.id:e.parent_id,a.name=e.name,a.quantity=1,a.regular_price=e.regular_display_price,a.sale_price=e.sales_display_price,a.on_sale=e.on_sale,a.attribute=e.attributes,a.variation_id=0!==e.parent_id?e.id:0,a.editQuantity=!1,a.type=e.type,a.tax_amount=e.tax_amount,a.manage_stock=e.manage_stock,a.stock_status=e.stock_status,a.backorders_allowed=e.backorders_allowed,a.stock_quantity=e.stock_quantity;var s=weLo_.findIndex(t.cartdata.line_items,{product_id:a.product_id,variation_id:a.variation_id});s<0?o.default.hasStock(e)&&t.cartdata.line_items.push(a):o.default.hasStock(e,t.cartdata.line_items[s].quantity)&&(t.cartdata.line_items[s].quantity+=1)},removeCartItem:function(t,e){t.cartdata.line_items.splice(e,1)},addCartItemQuantity:function(t,e){var a=t.cartdata.line_items[e];o.default.hasStock(a,a.quantity)&&t.cartdata.line_items[e].quantity++},removeCartItemQuantity:function(t,e){t.cartdata.line_items[e].quantity<=1?t.cartdata.line_items[e].quantity=1:t.cartdata.line_items[e].quantity--},toggleEditQuantity:function(t,e){t.cartdata.line_items[e].editQuantity=!t.cartdata.line_items[e].editQuantity},addDiscount:function(t,e){t.cartdata.fee_lines.push({name:e.title,type:"discount",value:e.value.toString(),isEdit:!1,discount_type:e.type,tax_status:"none",tax_class:"",total:0})},addFee:function(t,e){t.cartdata.fee_lines.push({name:e.title,type:"fee",value:e.value.toString(),isEdit:!1,fee_type:e.type,tax_status:"none",tax_class:"",total:0})},saveFeeValue:function(t,e){t.cartdata.fee_lines.splice(e.key,1,e.feeData),t.cartdata.fee_lines[e.key].isEdit=!1},editFeeValue:function(t,e){t.cartdata.fee_lines[e].isEdit=!0},cancelSaveFeeValue:function(t,e){t.cartdata.fee_lines[e].isEdit=!1},removeFeeLineItems:function(t,e){t.cartdata.fee_lines.splice(e,1)},emptyCart:function(t){t.cartdata={line_items:[],fee_lines:[]}},calculateDiscount:function(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,function(a,s){"discount"==a.type&&("percent"==a.discount_type?t.cartdata.fee_lines[s].total="-"+e.getSubtotal*Math.abs(a.value)/100:t.cartdata.fee_lines[s].total="-"+Math.abs(a.value))})},calculateFee:function(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,function(a,s){"fee"==a.type&&("percent"==a.fee_type?t.cartdata.fee_lines[s].total=(e.getSubtotal*Math.abs(a.value)/100).toString():t.cartdata.fee_lines[s].total=Math.abs(a.value).toString())})}},actions:{setSettingsAction:function(t,e){t.commit("setSettings",e)},setAvailableTaxAction:function(t,e){t.commit("setAvailableTax",e)},setCartDataAction:function(t,e){t.commit("setCartData",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addToCartAction:function(t,e){t.commit("addToCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeCartItemAction:function(t,e){t.commit("removeCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addItemQuantityAction:function(t,e){t.commit("addCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeItemQuantityAction:function(t,e){t.commit("removeCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},toggleEditQuantityAction:function(t,e){t.commit("toggleEditQuantity",e)},addDiscountAction:function(t,e){t.commit("addDiscount",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addFeeAction:function(t,e){t.commit("addFee",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeFeeLineItemsAction:function(t,e){t.commit("removeFeeLineItems",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},saveFeeValueAction:function(t,e){t.commit("saveFeeValue",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},editFeeValueAction:function(t,e){t.commit("editFeeValue",e)},cancelSaveFeeValueAction:function(t,e){t.commit("cancelSaveFeeValue",e)},emptyCartAction:function(t){t.commit("emptyCart")},calculateDiscount:function(t){t.commit("calculateDiscount",t.getters)},calculateFee:function(t){t.commit("calculateFee",t.getters)}}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={hasStock:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.manage_stock?!!t.backorders_allowed||t.stock_quantity>e:"outofstock"!=t.stock_status}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},getters:{},mutations:{setOrderData:function(t,e){weLo_.isEmpty(e)?t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:t.orderdata=e},setCustomer:function(t,e){Object.keys(e).length>0?(t.orderdata.billing=e.billing,t.orderdata.shipping=e.shipping,t.orderdata.customer_id=e.id):(t.orderdata.billing={},t.orderdata.shipping={},t.orderdata.customer_id=0)},emptyOrderdata:function(t){t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote:function(t,e){t.orderdata.customer_note=e.trim()},removeCustomerNote:function(t){t.orderdata.customer_note=""},setGateway:function(t,e){t.orderdata.payment_method=e.id,t.orderdata.payment_method_title=e.title}},actions:{setOrderDataAction:function(t,e){t.commit("setOrderData",e)},setCustomerAction:function(t,e){t.commit("setCustomer",e)},emptyOrderdataAction:function(t){t.commit("emptyOrderdata")},setCustomerNoteAction:function(t,e){t.commit("setCustomerNote",e)},removeCustomerNoteAction:function(t){t.commit("removeCustomerNote")},setGatewayAction:function(t,e){t.commit("setGateway",e)}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";e.a={name:"App"}},function(t,e,a){"use strict";var s=a(146),i=a(149),o=a(152),r=a(155),n=a(69),c=a.n(n),l=a(162),u=a(165),d=a(168);let p=wepos_get_lib("Modal");e.a={name:"Home",components:{ProductSearch:i.a,CustomerSearch:o.a,Overlay:s.a,Modal:p,MugenScroll:c.a,FeeKeypad:r.a,PrintReceipt:l.a,PrintReceiptHtml:u.a,CustomerNote:d.a},data:()=>({showHelp:!1,showQucikMenu:!1,productView:"grid",productLoading:!1,viewVariationPopover:!1,showModal:!1,showPaymentReceipt:!1,products:[],filteredProducts:[],totalPages:1,page:1,showOverlay:!1,selectedVariationProduct:{},attributeDisabled:!0,selectedAttribute:{},availableGateways:[],emptyGatewayDiv:0,cashAmount:"",availableTax:[],settings:{},taxSettings:{},printdata:wepos.hooks.applyFilters("wepos_initial_print_data",{gateway:{id:"",title:""}}),feeData:{},createprintreceipt:!1,selectedCategory:"",selectedGateway:"",categories:[],showReceiptHtml:wepos.hooks.applyFilters("wepos_render_receipt_html",!0),quickLinkList:wepos.hooks.applyFilters("wepos_quick_links",[]),quickLinkListStart:wepos.hooks.applyFilters("wepos_quick_links_start",[]),availableGatewayContent:wepos.hooks.applyFilters("wepos_avaialable_gateway_content",[]),afterMainContents:wepos.hooks.applyFilters("wepos_after_main_content",[]),beforCartPanels:wepos.hooks.applyFilters("wepos_before_cart_panel",[])}),computed:{cartdata(){return this.$store.state.Cart.cartdata},orderdata(){return this.$store.state.Order.orderdata},hotkeys(){return{f3:this.toggleProductView,f9:this.initPayment,f10:this.processPayment,f8:this.createNewSale,"shift+f8":this.emptyCart,esc:this.backToSale,"meta+/":this.openHelp,"ctrl+/":this.openHelp}},getFilteredProduct(){return void 0!==this.$route.query.category?this.products.filter(t=>{var e=weLo_.find(t.categories,{id:parseInt(this.$route.query.category)});return void 0!=e&&Object.keys(e).length>0}):this.products},changeAmount(){var t=this.cashAmount-this.$store.getters["Cart/getTotal"];return t>0?t:0},getBreadCrums(){if(void 0!==this.$route.query.category){var t=jQuery.extend(!0,[],this.categories),e=weLo_.find(this.categories,{id:parseInt(this.$route.query.category)}),a=weLo_.findIndex(this.categories,e),s=t.splice(0,a+1),i=[];if(s.length>0){for(var o=s.length-1;o>=0;o--)if(i.length>0){var r=weLo_.find(s,{id:s[o+1].parent_id});if(void 0!=r&&(i.push(r),null==r.parent_id))break}else i.push(s[o]);return i.slice().reverse()}}return[]}},watch:{selectedAttribute(t,e){Object.keys(t).length==this.selectedVariationProduct.attributes.length&&(this.attributeDisabled=!1)},"$route.query.order_key"(){""!=this.$route.query.order_key&&"success"==this.$route.query.payment&&(this.showModal=!1,this.showPaymentReceipt=!0)},"$route.query.category"(){this.selectedCategory={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},void 0!==this.$route.query.category&&(this.selectedCategory=weLo_.find(this.categories,{id:parseInt(this.$route.query.category)}))},selectedGateway(t,e){var a=weLo_.find(this.availableGateways,{id:t});this.$store.dispatch("Order/setGatewayAction",a)}},methods:{openQucikMenu(){this.showQucikMenu=!0},openHelp(t){t.preventDefault(),this.showHelp=!0,this.showQucikMenu=!1},closeHelp(){this.showHelp=!1},addCustomerNote(t){this.$store.dispatch("Order/setCustomerNoteAction",t)},removeCustomerNote(){this.$store.dispatch("Order/removeCustomerNoteAction")},removeBreadcrums(){this.$router.push({name:"Home"})},logout(){wepos.hooks.doAction("wepos_before_logout"),window.location.href=wepos.logout_url.toString()},emptyCart(){this.$store.dispatch("Cart/emptyCartAction"),this.$store.dispatch("Order/emptyOrderdataAction"),this.printdata=wepos.hooks.applyFilters("wepos_initial_print_data",{gateway:{id:"",title:""}}),this.showPaymentReceipt=!1,this.cashAmount="",this.eventBus.$emit("emptycart",this.orderdata),this.showQucikMenu=!1},toggleProductView(t){t.preventDefault(),this.productView="grid"==this.productView?"list":"grid"},createNewSale(){this.$router.push({name:"Home"}),this.emptyCart()},ableToProcess(){return this.cartdata.line_items.length>0&&this.isSelectGateway()},processPayment(t){if(t.preventDefault(),this.ableToProcess()){weLo_.find(this.availableGateways,{id:this.orderdata.payment_method});var e=wepos.hooks.applyFilters("wepos_order_form_data",{billing:this.orderdata.billing,shipping:this.orderdata.shipping,line_items:this.cartdata.line_items,fee_lines:this.cartdata.fee_lines,customer_id:this.orderdata.customer_id,customer_note:this.orderdata.customer_note,payment_method:this.orderdata.payment_method,payment_method_title:this.orderdata.payment_method_title,meta_data:[{key:"_wepos_is_pos_order",value:!0},{key:"_wepos_cash_tendered_amount",value:this.cashAmount.toString()},{key:"_wepos_cash_change_amount",value:this.changeAmount.toString()}]},this.orderdata,this.cartdata),a=jQuery(".wepos-checkout-wrapper .right-content").find(".content");a.block({message:null,overlayCSS:{background:"#fff url("+wepos.ajax_loader+") no-repeat center",opacity:.4}}),wepos.api.post(wepos.rest.root+wepos.rest.wcversion+"/orders",e).done(t=>{wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/payment/process",t).done(s=>{"success"==s.result?(this.$router.push({name:"Home",query:{order_key:t.order_key,payment:"success"}}),this.printdata=wepos.hooks.applyFilters("wepos_after_payment_print_data",{line_items:this.cartdata.line_items,fee_lines:this.cartdata.fee_lines,subtotal:this.$store.getters["Cart/getSubtotal"],taxtotal:this.$store.getters["Cart/getTotalTax"],ordertotal:this.$store.getters["Cart/getTotal"],gateway:{id:t.payment_method,title:t.payment_method_title},order_id:t.id,order_date:t.date_created,cashamount:this.cashAmount.toString(),changeamount:this.changeAmount.toString()},e)):a.unblock()}).fail(t=>{a.unblock(),alert(t.responseJSON.message)})}).fail(t=>{a.unblock(),alert(t.responseJSON.message)})}},initPayment(){this.showModal=!0,this.$store.dispatch("Order/setGatewayAction",this.availableGateways[0]),this.selectedGateway=this.availableGateways[0].id},backToSale(){this.showModal=!1,this.showHelp=!1},isSelectGateway(){return!(void 0==this.orderdata.payment_method||""==this.orderdata.payment_method)},getProductImage:t=>t.images.length>0?t.images[0].woocommerce_thumbnail:wepos.placeholder_image,getProductImageName:t=>t.images.length>0?t.images[0].name:t.name,setDiscount(t,e){this.$store.dispatch("Cart/addDiscountAction",{title:this.__("Discount","wepos"),value:t,type:e})},saveFee(t){this.$store.dispatch("Cart/saveFeeValueAction",{key:t,feeData:this.feeData}),this.feeData={}},cancelEditFee(t){this.$store.dispatch("Cart/cancelSaveFeeValueAction",t),this.feeData={}},editFeeData(t){this.$store.dispatch("Cart/editFeeValueAction",t),this.feeData=Object.assign({},this.cartdata.fee_lines[t]),this.$nextTick(()=>{jQuery(this.$refs.fee_name).focus()})},setFee(t,e){this.$store.dispatch("Cart/addFeeAction",{title:this.__("Fee","wepos"),value:t,type:e})},removeFeeLine(t){this.$store.dispatch("Cart/removeFeeLineItemsAction",t)},fetchProducts(){1==this.page&&(this.productLoading=!0),this.totalPages>=this.page?wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?status=publish&per_page=30&page="+this.page).done((t,e,a)=>{this.products=this.products.concat(t),this.page+=1,this.totalPages=parseInt(a.getResponseHeader("X-WP-TotalPages")),this.productLoading=!1}).then((t,e,a)=>{this.fetchProducts()}):this.productLoading=!1},maybeRemoveDeletedProduct:t=>new Promise((e,a)=>{if(!t)return e(t);if(!t.line_items||t.line_items.length<1)return e(t);let s=t.line_items.map(t=>t.product_id);wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?include="+s.toString()).then(a=>{let s=a.map(t=>t.id);return t.line_items.forEach((e,a)=>{s.includes(e.product_id)||(t.line_items.splice(a,1),localStorage.setItem("cartdata",JSON.stringify(t)))}),e(t)}).fail(()=>a(t))}),selectCustomer(t){this.$store.dispatch("Order/setCustomerAction",t)},selectVariationProduct(t){this.viewVariationPopover=!0,this.selectedVariationProduct=t},addVariationProduct(){var t=this.findMatchingVariations(this.selectedVariationProduct.variations,this.selectedAttribute)[0];t.parent_id=this.selectedVariationProduct.id,t.type=this.selectedVariationProduct.type,t.name=this.selectedVariationProduct.name,t.type=this.selectedVariationProduct.type,this.selectedAttribute={},this.attributeDisabled=!0,this.$store.dispatch("Cart/addToCartAction",t)},addToCart(t){this.$store.dispatch("Cart/addToCartAction",t)},toggleEditQuantity(t,e){this.$store.dispatch("Cart/toggleEditQuantityAction",e)},removeItem(t){this.$store.dispatch("Cart/removeCartItemAction",t)},addQuantity(t,e){this.$store.dispatch("Cart/addItemQuantityAction",e)},removeQuantity(t,e){this.$store.dispatch("Cart/removeItemQuantityAction",e)},fetchGateway(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/payment/gateways").done(t=>{this.availableGateways=t,this.emptyGatewayDiv=4-this.availableGateways.length%4})},truncateTitle:(t,e)=>weLo_.truncate(t,{length:e}),unSanitizeString:t=>t.split("-").map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}).join(" "),fetchSettings(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/settings").done(t=>{this.settings=t,this.$store.dispatch("Cart/setSettingsAction",t)})},fetchTaxes(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/taxes").done(t=>{this.availableTax=t,this.$store.dispatch("Cart/setAvailableTaxAction",t)})},handleCategorySelect(t,e){"-1"==t.id?this.$router.push({name:"Home"}):this.$router.push({name:"Home",query:{category:t.id}})},handleCategoryRemove(t,e){this.$router.push({name:"Home"}),this.selectedCategory={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null}},fetchCategories(){var t,e;wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/products/categories?hide_empty=true&_fields=id,name,parent_id&per_page=100").then(a=>{a.sort(function(t,e){return t.name.localeCompare(e.name)});var s=(t=[],e={},a.forEach(function(a){e[a.id]={response:a,children:e[a.id]&&e[a.id].children},null===a.parent_id?t.push(e[a.id]):(e[a.parent_id]=e[a.parent_id]||{},e[a.parent_id].children=e[a.parent_id].children||[],e[a.parent_id].children.push(e[a.id]))}),t),i={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},o=s.reduce(function t(e){return function(a,s){return s.response.level=e,a.concat(s.response,(s.children||[]).reduce(t(e+1),[]))}}(0),[]);this.categories=o,this.categories.unshift(i),this.selectedCategory=i,void 0!==this.$route.query.category&&(this.selectedCategory=weLo_.find(a,{id:parseInt(this.$route.query.category)}))})},filterProducts(){this.products=this.products.filter(t=>weLo_.findIndex(t.categories,{id:this.$route.query.category})>0)},fetchTaxSettings(){wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/settings/tax").done(t=>{this.taxSettings=t})}},async created(){if(this.fetchSettings(),this.fetchTaxes(),this.fetchProducts(),this.fetchGateway(),this.fetchCategories(),"undefined"!=typeof localStorage)try{var t=JSON.parse(localStorage.getItem("cartdata")),e=JSON.parse(localStorage.getItem("orderdata"));t=await this.maybeRemoveDeletedProduct(t),this.$store.dispatch("Cart/setCartDataAction",t),this.$store.dispatch("Order/setOrderDataAction",e)}catch(t){e=JSON.parse(localStorage.getItem("orderdata"));this.$store.dispatch("Cart/setCartDataAction",t),this.$store.dispatch("Order/setOrderDataAction",e)}window.addEventListener("beforeunload",()=>{"undefined"!=typeof localStorage&&(localStorage.setItem("cartdata",JSON.stringify(this.$store.state.Cart.cartdata)),localStorage.setItem("orderdata",JSON.stringify(this.$store.state.Order.orderdata)))},!1)}}},function(t,e,a){"use strict";e.a={name:"Overlay",props:{show:{type:Boolean}}}},function(t,e,a){"use strict";var s=a(64),i=a(26);a.n(i);let o=wepos_get_lib("Modal");e.a={name:"ProductInlineSearch",props:{products:{type:Array,default:()=>[]},settings:{type:Object,default:()=>({})}},components:{Modal:o,KeyboardControl:s.a},data:()=>({showResults:!1,showVariationModal:!1,mode:"scan",serachInput:"",searchableProduct:[],selectedVariationProduct:{},attributeDisabled:!0,chosenAttribute:{}}),computed:{placeholder(){return"scan"==this.mode?this.__("Scan your product","wepos"):this.__("Search product by typing","wepos")},hotkeys(){return{f1:this.changeProductSearch,f2:this.changeScan,esc:this.searchClose}}},watch:{chosenAttribute(t,e){Object.keys(t).length==this.selectedVariationProduct.attributes.length&&(this.attributeDisabled=!1)}},methods:{changeScan(t){t.preventDefault(),this.changeMode("scan")},changeProductSearch(t){t.preventDefault(),this.changeMode("product")},searchClose(){this.showResults=!1,this.showVariationModal=!1,this.changeMode("scan"),this.$refs.productSearch.blur()},selectedHandler(t){var e=this.searchableProduct[t];"simple"==e.type?this.addToCartAction(e):this.selectVariation(e)},onKeyDown(){jQuery(".product-search-item.selected").next().children("a").focus()},onKeyUp(){jQuery(".product-search-item.selected").prev().children("a").focus()},triggerFocus(){this.showResults=!0,this.$emit("onfocus")},outside(){this.showResults=!1,this.$emit("onblur")},changeMode(t){this.mode=t,"scan"==this.mode&&(this.searchableProduct=[],this.showResults=!1),this.$refs.productSearch.focus()},handleProductScan(){if("product"!=this.mode){var t=this.settings.wepos_general,e="custom"==t.barcode_scanner_field?"barcode":t.barcode_scanner_field,a={},s=this.products.filter(t=>{if("simple"==t.type&&t[e].toString()==this.serachInput)return!0;if("variable"==t.type){var a=!1;if(t.variations.length>0&&weLo_.forEach(t.variations,(t,s)=>{t[e].toString()==this.serachInput&&(a=!0)}),a)return!0}return!1});if(s.length>0)if("variable"==(s=s[0]).type)(a=s.variations.filter(t=>t[e].toString()==this.serachInput)[0]).parent_id=s.id,a.type=s.type,a.name=s.name,this.$emit("onProductAdded",a);else this.$emit("onProductAdded",s);this.serachInput=""}},searchProduct(t){this.serachInput&&"product"==this.mode&&(this.searchableProduct=this.products.filter(t=>-1!=t.id.toString().indexOf(this.serachInput)||(-1!=t.name.toString().toLowerCase().indexOf(this.serachInput.toLowerCase())||-1!=t.sku.indexOf(this.serachInput))))},selectVariation(t){this.selectedVariationProduct=t,this.showVariationModal=!0},addVariationProduct(){var t=this.findMatchingVariations(this.selectedVariationProduct.variations,this.chosenAttribute)[0];t.parent_id=this.selectedVariationProduct.id,t.type=this.selectedVariationProduct.type,t.name=this.selectedVariationProduct.name,this.$emit("onProductAdded",t),this.showVariationModal=!1,this.chosenAttribute={}},addToCartAction(t){this.$emit("onProductAdded",t)}},mounted(){this.$refs.productSearch.focus()}}},function(t,e,a){"use strict";var s=a(65),i=a(0)(s.a,null,!1,null,null,null);i.options.__file="assets/src/frontend/components/KeyboardControl.vue",e.a=i.exports},function(t,e,a){"use strict";e.a={props:{listLength:Number},data:()=>({selectedIndex:0}),render(t){return t("ul",this.$scopedSlots.default({selectedIndex:this.selectedIndex}))},methods:{keyHandler(t){const e=t.which||t.keyCode;38===e||t.shiftKey&&9===e?(this.handleKeyUp(t),this.$emit("key-up")):40===e||9===e?(this.handleKeyDown(t),this.$emit("key-down")):13===e&&this.handleEnter(t)},handleEnter(t){t.preventDefault(),this.$emit("selected",this.selectedIndex)},handleKeyUp(t){t.preventDefault(),this.selectedIndex<=0?this.selectedIndex=this.listLength-1:this.selectedIndex>0&&this.selectedIndex<=this.listLength-1&&this.selectedIndex--},handleKeyDown(t){t.preventDefault(),this.selectedIndex<0||this.selectedIndex===this.listLength-1?this.selectedIndex=0:this.selectedIndex>=0&&this.selectedIndex({submitDisable:!1,customers:[],customer:{email:"",first_name:"",last_name:"",address_1:"",address_2:"",country:"",state:"",postcode:"",city:"",phone:""},showCustomerResults:!1,serachInput:"",showNewCustomerModal:!1,stateList:[],selectedState:null,selectedCountry:null,isDisabled:!0}),computed:{hotkeys(){return{f7:this.focusCustomerSearch,"shift+f7":this.addNewCustomer,esc:this.searchClose}},getCountryList:()=>Object.keys(wepos.countries).map(t=>({code:t,name:wepos.countries[t]})),orderdata(){return this.$store.state.Order.orderdata}},watch:{customer:{handler(t){this.isDisabled=!0,void 0!==t.first_name&&""!=t.first_name.trim()&&void 0!==t.last_name&&""!=t.last_name.trim()&&void 0!==t.email&&""!=t.email.trim()&&(this.isDisabled=!1)},deep:!0},"orderdata.customer_id"(t){this.serachInput=t?this.orderdata.billing.first_name+" "+this.orderdata.billing.last_name:""}},methods:{focusCustomerSearch(t){t.preventDefault(),this.$refs.customerSearch.focus()},searchClose(){this.showCustomerResults=!1,this.serachInput="",this.showNewCustomerModal=!1,this.$refs.customerSearch.blur()},addNewCustomer(){this.showNewCustomerModal=!0},selectedHandler(t){var e=this.customers[t];this.selectCustomer(e)},onKeyDown(){jQuery(".customer-search-item.selected").next().children("a").focus()},onKeyUp(){jQuery(".customer-search-item.selected").prev().children("a").focus()},triggerFocus(){this.showCustomerResults=!0,this.$emit("onfocus")},onblur(){this.showCustomerResults=!1,this.$emit("onblur")},closeNewCustomerModal(){this.customer={email:"",first_name:"",last_name:"",address_1:"",address_2:"",country:"",state:"",postcode:"",city:"",phone:""},this.selectedState=null,this.selectedCountry=null,this.showNewCustomerModal=!1},searchCustomer(){this.serachInput?wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/customers?search="+this.serachInput).done(t=>{this.customers=t}):this.$emit("onCustomerSelected",{})},selectCustomer(t){this.$emit("onCustomerSelected",t),this.serachInput=t.first_name+" "+t.last_name,this.showCustomerResults=!1},createCustomer(){if(this.customer.email){var t={email:this.customer.email,first_name:this.customer.first_name,last_name:this.customer.last_name,username:this.customer.email,password:this.generatePassword(20),billing:{first_name:this.customer.first_name,last_name:this.customer.last_name,address_1:this.customer.address_1,address_2:this.customer.address_2,country:null!==this.selectedCountry?this.selectedCountry.code:"",state:null!==this.selectedState?this.selectedState.code:this.customer.state,postcode:this.customer.postcode,city:this.customer.city,phone:this.customer.phone,email:this.customer.email}},e=jQuery(".wepos-new-customer-form");e.block({message:null,overlayCSS:{background:"#fff url("+wepos.ajax_loader+") no-repeat center",opacity:.4}}),wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/customers",t).done(t=>{this.serachInput=t.first_name+" "+t.last_name,this.$emit("onCustomerSelected",t),e.unblock(),this.closeNewCustomerModal()}).fail(t=>{e.unblock(),alert(t.responseJSON.message)})}else alert(this.__("Please enter an email address for customer","wepos"))},removeCountrySelect(t,e){this.selectedState=null,this.selectedCountry=null,this.stateList=[],this.customer.country="",this.customer.state=""},removeStateSelect(t,e){this.selectedState=null,this.customer.state=""},handleCountrySelect(t,e){var a=void 0!==wepos.states[t.code]?wepos.states[t.code]:[],s=Object.keys(a);s.length>0?this.stateList=s.map(t=>({code:t,name:a[t]})):(this.stateList=a,this.selectedState=null)},generatePassword(t){for(var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",a="",s=0,i=e.length;s{this.serachInput=""});var t=JSON.parse(localStorage.getItem("orderdata"));"undefined"!=t.customer_id&&0!=t.customer_id&&(this.serachInput=t.billing.first_name+" "+t.billing.last_name)}}},function(t,e,a){"use strict";var s=a(157);e.a={name:"FeeKeypad",components:{keyboard:s.a},computed:{hotkeys(){return{discount:{f4:this.showFeeKeypad,esc:this.hideFeeKepad},fee:{f5:this.showFeeKeypad,esc:this.hideFeeKepad}}[this.shortKey]}},props:{name:{type:String,default:"Fee"},className:{type:String,default:""},shortKey:{type:String,default:""}},data:()=>({input:"",displayValue:"",viewFeeKeypad:!1}),methods:{hideFeeKepad(t){this.viewFeeKeypad=!1},layout(){return'123|456|789|{:backspace}0'+wepos.currency_format_decimal_sep+"|{% "+this.name+":percent}{"+wepos.currency_format_symbol+" "+this.name+":flat}"},percentFee(t){this.$emit("inputfee",t.value.toString(),"percent"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},flatFee(t){this.$emit("inputfee",t.value.toString(),"flat"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},change(t){isNaN(t)?(this.input=this.displayValue,""==this.displayValue&&(this.input="")):(this.displayValue=t,this.input=this.displayValue),jQuery(this.$refs.feeinput).focus(),""==this.input&&jQuery(this.$refs.feeinput).focus()},inputChange(){isNaN(this.displayValue)?this.displayValue=this.input:this.input=this.displayValue,""==this.input&&jQuery(this.$refs.feeinput).focus()},showFeeKeypad(t){t.preventDefault(),this.viewFeeKeypad=!0,setTimeout(()=>{jQuery(this.$refs.feeinput).focus()},500)}}}},function(t,e,a){"use strict";const s="7440011c983cf39ae730b1f831e2922ac5a76910",i="f630c4abcae620278f82e142a526ef325c2a773a",o="ad982c66898e02a5dab419ea7568421b03f68ee2";e.a={name:"keyboard",props:{value:{type:String,default:""},layouts:{type:[String,Array],required:!0},maxlength:{type:Number,default:0,validator:t=>t>=0},pattern:{type:String,default:null}},data:()=>({layout:0}),computed:{full(){return this.maxlength>0&&this.value.length>=this.maxlength},empty(){return 0===this.value.length},lines(){return(Array.isArray(this.layouts)?this.layouts:[this.layouts])[this.layout].replace("||",s).replace("{{",i).replace("}}",o).split("|")},buttons(){return this.lines.map(t=>{let e=[],a=null;return t.match(new RegExp(`(${i}|${o}|${s}|.)`,"g")).forEach(t=>{if("{"===t)a="";else if("}"===t){let t=a.split(":"),s=t.length>1?t[0]:"",i=t.length>1?t[1]:t[0],o=t.length>2?t[2]:null,r=null;r=["append","backspace","space","clear","goto"].indexOf(i)>=0?this[i].bind(this,o):this.$emit.bind(this,i,this),e.push({type:"action",action:{name:i.replace(/\s+/g,"-").toLowerCase(),callable:r},value:s,args:o}),a=null}else null!==a?a+=t:(t===s&&(t="|"),t===i&&(t="{"),t===o&&(t="}"),e.push({type:"char",action:{name:null,callable:this.append.bind(this,t)},value:t,args:null}))}),e})},valid(){return!this.pattern||this.value.match(new RegExp(this.pattern))}},methods:{mutate(t){this.maxlength>0&&(t=t.slice(0,this.maxlength)),this.$emit("input",t)},append(t){this.mutate(this.value+t)},backspace(){this.mutate(this.value.slice(0,this.value.length-1))},space(){this.append(" ")},goto(t){if(!Array.isArray(this.layouts))throw new Error("A single non-array layout was provided.");if(!(t>=0&&t{window.print()},500)}}}},function(t,e,a){"use strict";e.a={name:"ReceiptPrintHtml",props:{printdata:{type:Object,default:()=>({})},settings:{type:Object,default:()=>({})}},methods:{formatDate:t=>(t=new Date(t)).toLocaleString()}}},function(t,e,a){"use strict";e.a={data:()=>({viewNotePopover:!1,customerNote:""}),computed:{hotkeys(){return{f6:this.openNote,esc:this.closeNote}}},methods:{openNote(t){t.preventDefault(),this.viewNotePopover=!0,setTimeout(()=>{jQuery(this.$refs.customernote).focus()},500)},closeNote(){this.viewNotePopover=!1},addCustomerNote(){this.$emit("addnote",this.customerNote),this.viewNotePopover=!1,this.customerNote=""}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";var s=r(a(139)),i=r(a(143)),o=r(a(27));function r(t){return t&&t.__esModule?t:{default:t}}var n=wepos_get_lib("Vue");n.config.productionTip=!1,new n({el:"#vue-frontend-app",router:i.default,store:o.default,render:function(t){return t(s.default)},created:function(){this.setLocaleData(wepos.i18n.wepos)}})},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a(60),i=a(142),o=!1;var r=function(t){o||a(140)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/App.vue",e.default=n.exports},function(t,e){},,function(t,e,a){"use strict";var s=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"vue-frontend-app"}},[e("router-view")],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s,i=a(144),o=(s=i)&&s.__esModule?s:{default:s};var r=wepos_get_lib("Vue"),n=wepos_get_lib("Router");r.use(n),e.default=new n({routes:wepos.hooks.applyFilters("wepos_frontend_routes",[{path:"/",name:"Home",component:o.default}])})},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a(61),i=a(171),o=!1;var r=function(t){o||a(145)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Home.vue",e.default=n.exports},function(t,e){},function(t,e,a){"use strict";var s=a(62),i=a(148),o=!1;var r=function(t){o||a(147)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Overlay.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this.$createElement,e=this._self._c||t;return this.show?e("div",{staticClass:"overlay"}):this._e()};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=a(63),i=a(151),o=!1;var r=function(t){o||a(150)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/ProductSearch.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.outside,expression:"outside"}],staticClass:"search-box"},[a("form",{attrs:{action:"",autocomplete:"off"},on:{submit:function(e){e.preventDefault(),t.handleProductScan(e)}}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.serachInput,expression:"serachInput"}],ref:"productSearch",attrs:{type:"text",name:"search",id:"product-search",placeholder:t.placeholder},domProps:{value:t.serachInput},on:{focus:function(e){e.preventDefault(),t.triggerFocus(e)},keyup:function(e){e.preventDefault(),t.searchProduct(e)},input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),"product"==t.mode?a("span",{staticClass:"search-icon flaticon-musica-searcher"}):t._e(),t._v(" "),"scan"==t.mode?a("span",{staticClass:"search-icon flaticon-supermarket-scanner"}):t._e(),t._v(" "),a("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"search-type"},[a("a",{class:{active:"product"==t.mode},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.changeMode("product")}}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),a("a",{class:{active:"scan"==t.mode},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.changeMode("scan")}}},[t._v(t._s(t.__("Scan","wepos")))])]),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.showResults&&"product"==t.mode,expression:"showResults && mode=='product'"}],staticClass:"search-result"},[t.searchableProduct.length?a("div",[a("keyboard-control",{attrs:{listLength:t.searchableProduct.length},on:{selected:t.selectedHandler,"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.selectedIndex;return t._l(t.searchableProduct,function(e,i){return a("li",{key:i,staticClass:"product-search-item",class:{selected:i===s}},["simple"==e.type?[a("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(a){t.addToCartAction(e)}}},[t._v(t._s(e.name)+"\n "),a("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?a("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),a("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e(),t._v(" "),"variable"==e.type?[a("a",{attrs:{href:"#"},on:{click:function(a){a.preventDefault(),t.selectVariation(e)}}},[t._v(t._s(e.name)+"\n "),a("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?a("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),a("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e()],2)})}}])})],1):a("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No product found","wepos"))+"\n ")]),t._v(" "),a("div",{staticClass:"suggession"},[a("span",{staticClass:"term"},[a("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),a("span",{staticClass:"term"},[a("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),a("span",{staticClass:"term"},[a("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showVariationModal?a("modal",{attrs:{title:t.__("Select Variations","wepos"),width:"500px",height:"auto",footer:!0,header:!0},on:{close:function(e){t.showVariationModal=!1}}},[a("template",{slot:"body"},t._l(t.selectedVariationProduct.attributes,function(e){return a("div",{staticClass:"variation-attribute-wrapper"},[a("div",{staticClass:"attribute"},[a("p",[t._v(t._s(e.name))]),t._v(" "),a("div",{staticClass:"options"},[t._l(e.options,function(s){return[a("label",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.chosenAttribute[e.name],expression:"chosenAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:s,checked:t._q(t.chosenAttribute[e.name],s)},on:{change:function(a){t.$set(t.chosenAttribute,e.name,s)}}}),t._v(" "),a("div",{staticClass:"box"},[t._v("\n "+t._s(s)+"\n ")])])]})],2)])])})),t._v(" "),a("template",{slot:"footer"},[a("button",{staticClass:"add-variation-btn",attrs:{disabled:t.attributeDisabled},on:{click:function(e){t.addVariationProduct()}}},[t._v(t._s(t.__("Add Product","wepos")))])])],2):t._e()],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=a(66),i=a(154),o=!1;var r=function(t){o||a(153)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/CustomerSearch.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onblur,expression:"onblur"},{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"customer-search-box"},[a("form",{attrs:{action:"",autocomplete:"off"}},[a("svg",{staticClass:"customer-icon",attrs:{width:"19px",height:"19px",viewBox:"0 0 19 19",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[a("defs",[a("linearGradient",{attrs:{x1:"14.5524094%",y1:"14.6909544%",x2:"82.7722259%",y2:"85.2519444%",id:"linearGradient-1"}},[a("stop",{attrs:{"stop-color":"#C444FB",offset:"0%"}}),t._v(" "),a("stop",{attrs:{"stop-color":"#5B56D7",offset:"100%"}})],1)],1),t._v(" "),a("g",{attrs:{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[a("g",{attrs:{id:"POS-Design---Dokan-P2",transform:"translate(-759.000000, -27.000000)"}},[a("g",{attrs:{id:"Group",transform:"translate(759.000000, 27.000000)"}},[a("circle",{attrs:{id:"Oval",fill:"url(#linearGradient-1)","fill-rule":"nonzero",cx:"9.5",cy:"9.5",r:"9.5"}}),t._v(" "),a("g",{attrs:{id:"flaticon1543304699-svg-2",transform:"translate(9.500000, 9.500000) scale(-1, 1) translate(-9.500000, -9.500000) translate(6.000000, 5.000000)"}},[a("g",{attrs:{id:"flaticon1543304699-svg"}},[a("path",{attrs:{d:"M3.31578947,4.40159143 C4.27870463,4.40159143 5.0593751,3.41627143 5.0593751,2.20080857 C5.0593751,0.98532 4.80306952,0 3.31578947,0 C1.82850943,0 1.57215436,0.98532 1.57215436,2.20080857 C1.57215436,3.41627143 2.35282482,4.40159143 3.31578947,4.40159143 Z",id:"Path",fill:"#FFFFFF"}}),t._v(" "),a("path",{attrs:{d:"M0.0616980658,7.82884897 C0.0604730658,7.62453402 0.0592480658,7.77128348 0.0616980658,7.82884897 Z",id:"Path",fill:"#000000"}}),t._v(" "),a("path",{attrs:{d:"M6.64682715,7.85749962 C6.65070632,7.82585407 6.64815424,7.63794608 6.64682715,7.85749962 Z",id:"Path",fill:"#000000"}}),t._v(" "),a("path",{attrs:{d:"M6.60522584,7.67306571 C6.57293401,5.5557 6.30682954,4.95236571 4.27051414,4.57045714 C4.27051414,4.57045714 3.98387156,4.95002571 3.31576473,4.95002571 C2.64765789,4.95002571 2.36096583,4.57045714 2.36096583,4.57045714 C0.34687117,4.9482 0.0645836606,5.54258571 0.0274666143,7.60428 C0.0244230165,7.77263143 0.0230125687,7.78147714 0.0224681854,7.76193429 C0.0225919089,7.79855143 0.0227403771,7.86628286 0.0227403771,7.98438857 C0.0227403771,7.98438857 0.507538492,9 3.31576473,9 C6.12394148,9 6.60878908,7.98438857 6.60878908,7.98438857 C6.60878908,7.90850571 6.60883857,7.85574 6.6089128,7.81984286 C6.60836842,7.83192857 6.60727965,7.80850286 6.60522584,7.67306571 Z",id:"Path",fill:"#FFFFFF"}})])])])])])]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.serachInput,expression:"serachInput"}],ref:"customerSearch",attrs:{type:"text",name:"customer_search",id:"customer-search",placeholder:t.__("Search customer","wepos")},domProps:{value:t.serachInput},on:{focus:function(e){e.preventDefault(),t.triggerFocus(e)},keyup:t.searchCustomer,input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),a("span",{staticClass:"add-new-customer flaticon-add",on:{click:function(e){e.preventDefault(),t.addNewCustomer()}}}),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.showCustomerResults,expression:"showCustomerResults"}],staticClass:"search-result"},[t.customers.length?a("div",[a("keyboard-control",{attrs:{listLength:t.customers.length},on:{selected:t.selectedHandler,"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.selectedIndex;return t._l(t.customers,function(e,i){return a("li",{key:i,staticClass:"customer-search-item",class:{selected:i===s}},[a("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(a){t.selectCustomer(e)}}},[a("span",{staticClass:"avatar wepos-left"},[a("img",{attrs:{src:e.avatar_url,alt:e.first_name+" "+e.last_name}})]),t._v(" "),a("span",{staticClass:"name wepos-left"},[t._v(t._s(e.first_name+" "+e.last_name)),a("span",{staticClass:"metadata"},[t._v(t._s(e.email))])]),t._v(" "),a("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])])})}}])})],1):a("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No customer found","wepos"))+"\n ")]),t._v(" "),a("div",{staticClass:"suggession"},[a("span",{staticClass:"term"},[a("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),a("span",{staticClass:"term"},[a("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),a("span",{staticClass:"term"},[a("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showNewCustomerModal?a("modal",{attrs:{title:t.__("Add New Customer","wepos"),width:"700px",footer:!0,header:!0},on:{close:t.closeNewCustomerModal}},[a("template",{slot:"body"},[a("div",{staticClass:"wepos-new-customer-form"},[a("form",{staticClass:"wepos-form",attrs:{action:"",autocomplete:"off"}},[a("div",{staticClass:"form-row col-2"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.first_name,expression:"customer.first_name"}],attrs:{type:"text",placeholder:t.__("First Name","wepos")},domProps:{value:t.customer.first_name},on:{input:function(e){e.target.composing||t.$set(t.customer,"first_name",e.target.value)}}}),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.last_name,expression:"customer.last_name"}],attrs:{type:"text",placeholder:t.__("Last Name","wepos")},domProps:{value:t.customer.last_name},on:{input:function(e){e.target.composing||t.$set(t.customer,"last_name",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.email,expression:"customer.email"}],attrs:{type:"email",placeholder:t.__("Email","wepos")},domProps:{value:t.customer.email},on:{input:function(e){e.target.composing||t.$set(t.customer,"email",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row col-2"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.address_1,expression:"customer.address_1"}],attrs:{type:"text",placeholder:t.__("Address 1","wepos")},domProps:{value:t.customer.address_1},on:{input:function(e){e.target.composing||t.$set(t.customer,"address_1",e.target.value)}}}),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.address_2,expression:"customer.address_2"}],attrs:{type:"text",placeholder:t.__("Address 2 (optional)","wepos")},domProps:{value:t.customer.address_2},on:{input:function(e){e.target.composing||t.$set(t.customer,"address_2",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row col-2"},[a("multiselect",{staticClass:"wepos-multiselect customer-country",staticStyle:{width:"48.5%","margin-right":"20px"},attrs:{options:t.getCountryList,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a country","wepos"),"track-by":"code",label:"name"},on:{select:t.handleCountrySelect,remove:t.removeCountrySelect},scopedSlots:t._u([{key:"singleLabel",fn:function(e){return[a("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[a("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedCountry,callback:function(e){t.selectedCountry=e},expression:"selectedCountry"}},[a("template",{slot:"noResult"},[a("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2),t._v(" "),t.stateList.length>0?[a("multiselect",{staticClass:"wepos-multiselect customer-state",staticStyle:{width:"48.5%"},attrs:{options:t.stateList,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a state","wepos"),"track-by":"code",label:"name"},on:{remove:t.removeStateSelect},scopedSlots:t._u([{key:"singleLabel",fn:function(e){return[a("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[a("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedState,callback:function(e){t.selectedState=e},expression:"selectedState"}},[a("template",{slot:"noResult"},[a("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2)]:[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.state,expression:"customer.state"}],attrs:{type:"text",placeholder:t.__("States (optional)","wepos")},domProps:{value:t.customer.state},on:{input:function(e){e.target.composing||t.$set(t.customer,"state",e.target.value)}}})]],2),t._v(" "),a("div",{staticClass:"form-row col-2"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.city,expression:"customer.city"}],attrs:{type:"text",placeholder:t.__("City (optional)","wepos")},domProps:{value:t.customer.city},on:{input:function(e){e.target.composing||t.$set(t.customer,"city",e.target.value)}}}),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.postcode,expression:"customer.postcode"}],attrs:{type:"text",placeholder:t.__("Zip/Postal Code (optional)","wepos")},domProps:{value:t.customer.postcode},on:{input:function(e){e.target.composing||t.$set(t.customer,"postcode",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.phone,expression:"customer.phone"}],attrs:{type:"text",placeholder:t.__("Phone (optional)","wepos")},domProps:{value:t.customer.phone},on:{input:function(e){e.target.composing||t.$set(t.customer,"phone",e.target.value)}}})])])])]),t._v(" "),a("template",{slot:"footer"},[a("button",{staticClass:"add-new-customer-btn add-variation-btn",attrs:{disabled:t.isDisabled},on:{click:function(e){t.createCustomer()}}},[t._v(t._s(t.__("Add Customer","wepos")))])])],2):t._e()],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=a(67),i=a(160),o=!1;var r=function(t){o||a(156)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/FeeKeypad.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=a(68),i=a(159),o=!1;var r=function(t){o||a(158)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Keyboard.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("aside",{staticClass:"vue-keyboard",class:{full:t.full,empty:t.empty,valid:t.valid,invalid:!t.valid},attrs:{role:"application","data-value":t.value,"data-layout":t.layout}},t._l(t.buttons,function(e){return a("div",{staticClass:"vue-keyboard-row",attrs:{role:"row","data-keys":e.length}},t._l(e,function(e){return a("button",{staticClass:"vue-keyboard-key",class:e.type,attrs:{role:"button","data-args":e.args,"data-text":e.value,"data-action":e.action.name},domProps:{innerHTML:t._s(e.value)},on:{click:function(t){t.preventDefault(),e.action.callable(t)}}})}))}))};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-fee-keypad-wrap",class:t.className},[a("v-popover",{attrs:{offset:"5","popover-base-class":"fee-keypad tooltip popover",placement:"top",open:t.viewFeeKeypad}},[a("a",{attrs:{href:"#"},on:{click:t.showFeeKeypad}},[t._v(t._s(t.__("Add","wepos"))+" "+t._s(t.name))]),t._v(" "),a("template",{slot:"popover"},[a("form",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.displayValue,expression:"displayValue"}],ref:"feeinput",attrs:{type:"text"},domProps:{value:t.displayValue},on:{keyup:t.inputChange,input:function(e){e.target.composing||(t.displayValue=e.target.value)}}})]),t._v(" "),a("keyboard",{attrs:{layouts:t.layout()},on:{percent:t.percentFee,flat:t.flatFee,input:t.change},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}})],1)],2)],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},,function(t,e,a){"use strict";var s=a(70),i=a(164),o=!1;var r=function(t){o||a(163)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/PrintReceipt.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"wepos-print-receipt"}},[a("button",{staticClass:"print-btn",on:{click:function(e){e.preventDefault(),t.printReceipt()}}},[a("span",{staticClass:"icon flaticon-printer"}),t._v(" "),a("span",{staticClass:"label"},[t._v(t._s(t.__("Print Receipt","wepos")))])])])};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=a(71),i=a(167),o=!1;var r=function(t){o||a(166)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/PrintReceiptHtml.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.settings.wepos_receipts?a("div",{staticClass:"wepos-checkout-print-wrapper"},[a("div",{staticClass:"header",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_header)}}),t._v(" "),a("div",{staticClass:"order-info"},[a("span",{staticClass:"wepos-left"},[a("strong",[t._v(t._s(t.__("Order ID","wepos"))+": #"+t._s(t.printdata.order_id))])]),t._v(" "),a("span",{staticClass:"wepos-right"},[a("strong",[t._v(t._s(t.__("Order Date","wepos"))+": "+t._s(t.formatDate(t.printdata.order_date)))])]),t._v(" "),a("div",{staticClass:"wepos-clearfix"})]),t._v(" "),a("div",{staticClass:"content"},[a("table",{staticClass:"sale-summary"},[a("tbody",[t._l(t.printdata.line_items,function(e){return a("tr",[a("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0?a("div",{staticClass:"attribute"},[a("ul",t._l(e.attribute,function(e){return a("li",[a("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),a("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),a("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),a("td",{staticClass:"price"},[e.on_sale?[a("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))]),t._v(" "),a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))])]:[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}),t._v(" "),a("tr",{staticClass:"cart-meta-data"},[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?a("span",{staticClass:"metadata"},[t._v("\n "+t._s(t.__("Includes Tax","wepos"))+" "+t._s(t.formatPrice(t.$store.getters["Cart/getTotalLineTax"]))+"\n ")]):t._e()]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.subtotal)))])]),t._v(" "),t._l(t.printdata.fee_lines,function(e,s){return a("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Discount","wepos"))+" "),a("span",{staticClass:"metadata"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Fee","wepos"))+" "),a("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]],2)}),t._v(" "),t.printdata.taxtotal?a("tr",[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.taxtotal)))])]):t._e(),t._v(" "),a("tr",[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.ordertotal)))])]),t._v(" "),t._m(0),t._v(" "),a("tr",[a("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Payment method","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.printdata.gateway.title||""))])]),t._v(" "),(t.printdata.gateway.id="wepos_cash")?[a("tr",[a("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Cash Given","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.cashamount)))])]),t._v(" "),a("tr",[a("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Change Money","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.changeamount)))])])]:t._e()],2)])]),t._v(" "),a("div",{staticClass:"footer",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_footer)}})]):t._e()};s._withStripped=!0;var i={render:s,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("tr",{staticClass:"divider"},[e("td",{attrs:{colspan:"3"}})])}]};e.a=i},function(t,e,a){"use strict";var s=a(72),i=a(170),o=!1;var r=function(t){o||a(169)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/CustomerNote.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-custom-note-wrap"},[a("v-popover",{attrs:{offset:"5","popover-base-class":"customer-note tooltip popover",placement:"top",open:t.viewNotePopover}},[a("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openNote(e)}}},[t._v(t._s(t.__("Add Note","wepos")))]),t._v(" "),a("template",{slot:"popover"},[a("form",{on:{submit:function(e){e.preventDefault(),t.addCustomerNote(e)}}},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:t.customerNote,expression:"customerNote"}],ref:"customernote",attrs:{id:"",cols:"30",rows:"5"},domProps:{value:t.customerNote},on:{input:function(e){e.target.composing||(t.customerNote=e.target.value)}}}),t._v(" "),a("button",{staticClass:"add-note-btn",attrs:{type:"submit",disabled:""==t.customerNote}},[t._v(t._s(t.__("Add Note","wepos")))])])])],2)],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],attrs:{id:"wepos-main"}},[a("div",{staticClass:"content-product"},[a("div",{staticClass:"top-panel wepos-clearfix"},[a("div",{staticClass:"search-bar"},[a("product-search",{attrs:{products:t.products,settings:t.settings},on:{onProductAdded:t.addToCart}})],1),t._v(" "),a("div",{staticClass:"category"},[a("multiselect",{staticClass:"wepos-multiselect",attrs:{options:t.categories,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a category","wepos")},on:{select:t.handleCategorySelect,remove:t.handleCategoryRemove},scopedSlots:t._u([{key:"singleLabel",fn:function(e){return[t._v("\n "+t._s(e.option.name)+"\n ")]}},{key:"option",fn:function(e){return[a("span",[t._l(e.option.level,function(e){return[t._v("\n  \n ")]}),t._v("\n "+t._s(e.option.name)+"\n ")],2)]}}]),model:{value:t.selectedCategory,callback:function(e){t.selectedCategory=e},expression:"selectedCategory"}},[a("template",{slot:"noResult"},[a("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("Not found","wepos")))])])],2)],1),t._v(" "),a("div",{staticClass:"toggle-view"},[a("div",{staticClass:"product-toggle"},[a("span",{staticClass:"toggle-icon list-view flaticon-menu-button-of-three-horizontal-lines",class:{active:"list"==t.productView},on:{click:function(e){t.productView="list"}}}),t._v(" "),a("span",{staticClass:"toggle-icon grid-view flaticon-menu",class:{active:"grid"==t.productView},on:{click:function(e){t.productView="grid"}}})])])]),t._v(" "),t.getBreadCrums.length>0?a("div",{staticClass:"breadcrumb"},[a("ul",[t._l(t.getBreadCrums,function(e){return[a("router-link",{attrs:{tag:"li",to:{name:"Home",query:{category:e.id}}}},[a("a",[t._v(t._s(e.name))])])]})],2),t._v(" "),a("span",{staticClass:"close-breadcrumb flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeBreadcrums(e)}}})]):t._e(),t._v(" "),a("div",{ref:"items-wrapper",staticClass:"items-wrapper",class:t.productView},[t.productLoading?t._e():[t._l(t.getFilteredProduct,function(e){return t.getFilteredProduct.length>0?a("div",{staticClass:"item"},["simple"==e.type?[a("div",{staticClass:"item-wrap",on:{click:function(a){if(!("button"in a)&&t._k(a.keyCode,"prevnt",void 0,a.key))return null;t.addToCart(e)}}},[a("div",{staticClass:"img"},[a("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"==t.productView?a("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n\n ")]):a("div",{staticClass:"title"},[a("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),a("ul",{staticClass:"meta"},[e.sku?a("li",[a("span",{staticClass:"label"},[t._v(t._s(t.__("Sku :","wepos")))]),t._v(" "),a("span",{staticClass:"value"},[t._v(t._s(e.sku))])]):t._e(),t._v(" "),a("li",[a("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),a("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),a("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})])]:t._e(),t._v(" "),"variable"==e.type?[a("v-popover",{attrs:{offset:"10","popover-base-class":"product-variation tooltip popover",placement:"left-end"}},[a("div",{staticClass:"item-wrap",on:{click:function(a){t.selectVariationProduct(e)}}},[a("div",{staticClass:"img"},[a("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"==t.productView?a("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n ")]):a("div",{staticClass:"title"},[a("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),a("ul",{staticClass:"meta"},[a("li",[a("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),a("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),a("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})]),t._v(" "),a("template",{slot:"popover"},[a("div",{staticClass:"variation-header"},[t._v("\n "+t._s(t.__("Select Variations","wepos"))+"\n ")]),t._v(" "),a("div",{staticClass:"variation-body"},[t._l(e.attributes,function(e){return[a("div",{staticClass:"attribute"},[a("p",[t._v(t._s(e.name))]),t._v(" "),a("div",{staticClass:"options"},[t._l(e.options,function(s){return[a("label",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedAttribute[e.name],expression:"selectedAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:s,checked:t._q(t.selectedAttribute[e.name],s)},on:{change:function(a){t.$set(t.selectedAttribute,e.name,s)}}}),t._v(" "),a("div",{staticClass:"box"},[t._v("\n "+t._s(s)+"\n ")])])]})],2)])]})],2),t._v(" "),a("div",{staticClass:"variation-footer"},[a("button",{attrs:{disabled:t.attributeDisabled},on:{click:function(e){e.preventDefault(),t.addVariationProduct(e)}}},[t._v(t._s(t.__("Add Product","wepos")))])])])],2)]:t._e()],2):t._e()}),t._v(" "),t.getFilteredProduct.length<=0?a("div",{staticClass:"no-product-found"},[a("img",{attrs:{src:t.wepos.assets_url+"/images/no-product.png",alt:"",width:"120px"}}),t._v(" "),a("p",[t._v(t._s(t.__("No Product Found","wepos")))])]):t._e()],t._v(" "),t.productLoading?a("div",{staticClass:"product-loading"},[a("div",{staticClass:"spinner spinner-loading"})]):t._e()],2)]),t._v(" "),a("div",{staticClass:"content-cart"},[a("div",{staticClass:"top-panel"},[a("customer-search",{on:{onCustomerSelected:t.selectCustomer}}),t._v(" "),a("div",{staticClass:"action"},[a("div",{staticClass:"more-options"},[a("v-popover",{attrs:{offset:"5","popover-base-class":"wepos-dropdown-menu tooltip popover",placement:"bottom-end",open:t.showQucikMenu}},[a("button",{staticClass:"wepos-button",on:{click:function(e){e.preventDefault(),t.openQucikMenu()}}},[a("span",{staticClass:"more-icon flaticon-more"})]),t._v(" "),a("template",{slot:"popover"},[a("ul",[t._l(t.quickLinkListStart,function(t,e){return a(t,{key:e-"1",tag:"component"})}),t._v(" "),a("li",[a("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.emptyCart(e)}}},[a("span",{staticClass:"flaticon-empty-cart quick-menu-icon"}),t._v(t._s(t.__("Empty Cart","wepos")))])]),t._v(" "),a("li",[a("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openHelp(e)}}},[a("span",{staticClass:"flaticon-information quick-menu-icon"}),t._v(t._s(t.__("Help","wepos")))])]),t._v(" "),a("li",{staticClass:"divider"}),t._v(" "),t._l(t.quickLinkList,function(t,e){return a(t,{key:e,tag:"component"})}),t._v(" "),a("li",[a("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.logout(e)}}},[a("span",{staticClass:"flaticon-logout quick-menu-icon"}),t._v(t._s(t.__("Logout","wepos")))])])],2)])],2)],1)])],1),t._v(" "),t._l(t.beforCartPanels,function(t,e){return a(t,{key:e,tag:"component"})}),t._v(" "),t.settings.wepos_general?a("div",{staticClass:"cart-panel"},[a("div",{staticClass:"cart-content"},[a("table",{staticClass:"cart-table"},[a("thead",[a("tr",[a("th",{attrs:{width:"65%"}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),a("th",{attrs:{width:"15%"}},[t._v(t._s(t.__("Qty","wepos")))]),t._v(" "),a("th",{attrs:{width:"30%"}},[t._v(t._s(t.__("Price","wepos")))]),t._v(" "),a("th"),t._v(" "),a("th")])]),t._v(" "),a("tbody",[t.cartdata.line_items.length>0?[t._l(t.cartdata.line_items,function(e,s){return[a("tr",[a("td",{staticClass:"name",on:{click:function(a){t.toggleEditQuantity(e,s)}}},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?a("div",{staticClass:"attribute"},[a("ul",t._l(e.attribute,function(e){return a("li",[a("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),a("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),a("td",{staticClass:"qty",on:{click:function(a){t.toggleEditQuantity(e,s)}}},[t._v(t._s(e.quantity))]),t._v(" "),a("td",{staticClass:"price",on:{click:function(a){t.toggleEditQuantity(e,s)}}},[e.on_sale?[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),a("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-right-arrow",class:{open:e.editQuantity},on:{click:function(a){a.preventDefault(),t.toggleEditQuantity(e,s)}}})]),t._v(" "),a("td",{staticClass:"remove"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeItem(s)}}})])]),t._v(" "),e.editQuantity?a("tr",{staticClass:"update-quantity-wrap"},[a("td",{attrs:{colspan:"5"}},[a("span",{staticClass:"qty"},[t._v(t._s(t.__("Quantity","wepos")))]),t._v(" "),a("span",{staticClass:"qty-number"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.quantity,expression:"item.quantity"}],attrs:{type:"number",min:"1",step:"1"},domProps:{value:e.quantity},on:{input:function(a){a.target.composing||t.$set(e,"quantity",a.target.value)}}})]),t._v(" "),a("span",{staticClass:"qty-action"},[a("a",{staticClass:"add",attrs:{href:"#"},on:{click:function(a){a.preventDefault(),t.addQuantity(e,s)}}},[t._v("+")]),t._v(" "),a("a",{staticClass:"minus",attrs:{href:"#"},on:{click:function(a){a.preventDefault(),t.removeQuantity(e,s)}}},[t._v("-")])])])]):t._e()]})]:[a("tr",{staticClass:"no-item"},[a("td",{attrs:{colspan:"5"}},[a("img",{attrs:{src:t.wepos.assets_url+"/images/empty-cart.png",alt:"",width:"120px"}}),t._v(" "),a("p",[t._v(t._s(t.__("Empty Cart","wepos")))])])])]],2)])]),t._v(" "),a("div",{staticClass:"cart-calculation"},[a("form",{attrs:{autocomplete:"off"}},[a("table",{staticClass:"cart-total-table"},[a("tbody",[a("tr",{staticClass:"cart-meta-data"},[a("td",{staticClass:"label"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart&&t.$store.getters["Cart/getTotalLineTax"]>0?a("span",{staticClass:"name"},[t._v("\n "+t._s(t.__("Includes Tax","wepos"))+" "+t._s(t.formatPrice(t.$store.getters["Cart/getTotalLineTax"]))+"\n ")]):t._e()]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))]),t._v(" "),a("td",{staticClass:"action"})]),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,function(e,s){return a("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[a("td",{staticClass:"label"},[t._v(t._s(t.__("Discount","wepos"))+" "),a("span",{staticClass:"name"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("td",{staticClass:"price"},[t._v("−"+t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(s)}}})])]:[t.cartdata.fee_lines[s].isEdit?[a("td",{staticClass:"label",attrs:{colspan:"2"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.name,expression:"feeData.name"}],ref:"fee_name",refInFor:!0,staticClass:"fee-name",attrs:{type:"text",placeholder:t.__("Fee Name","wepos")},domProps:{value:t.feeData.name},on:{input:function(e){e.target.composing||t.$set(t.feeData,"name",e.target.value)}}}),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.value,expression:"feeData.value"}],ref:"fee_total",refInFor:!0,staticClass:"fee-amount",attrs:{type:"number",min:"0",step:"any",placeholder:t.__("Total","wepos")},domProps:{value:t.feeData.value},on:{input:function(e){e.target.composing||t.$set(t.feeData,"value",e.target.value)}}}),t._v(" "),"yes"==t.settings.wepos_general.enable_fee_tax?[a("label",{attrs:{for:"fee-tax-status"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_status,expression:"feeData.tax_status"}],staticClass:"fee-tax-status",attrs:{type:"checkbox",id:"fee-tax-status","true-value":"taxable","false-value":"none"},domProps:{checked:Array.isArray(t.feeData.tax_status)?t._i(t.feeData.tax_status,null)>-1:t._q(t.feeData.tax_status,"taxable")},on:{change:function(e){var a=t.feeData.tax_status,s=e.target,i=s.checked?"taxable":"none";if(Array.isArray(a)){var o=t._i(a,null);s.checked?o<0&&(t.feeData.tax_status=a.concat([null])):o>-1&&(t.feeData.tax_status=a.slice(0,o).concat(a.slice(o+1)))}else t.$set(t.feeData,"tax_status",i)}}}),t._v(" "+t._s(t.__("Taxable","wepos")))]),t._v(" "),"taxable"==t.feeData.tax_status?a("select",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_class,expression:"feeData.tax_class"}],staticClass:"fee-tax-class",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.feeData,"tax_class",e.target.multiple?a:a[0])}}},t._l(t.availableTax,function(e){return a("option",{domProps:{value:"standard"==e.class?"":e.class}},[t._v(t._s(t.unSanitizeString(e.class))+" - "+t._s(e.percentage_rate))])})):t._e()]:t._e(),t._v(" "),a("button",{attrs:{disabled:""==t.feeData.name},on:{click:function(e){e.preventDefault(),t.saveFee(s)}}},[t._v(t._s(t.__("Apply","wepos")))]),t._v(" "),a("button",{staticClass:"cancel",on:{click:function(e){e.preventDefault(),t.cancelEditFee(s)}}},[t._v(t._s(t.__("Cancel","wepos")))])],2),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(s)}}})])]:[a("td",{staticClass:"label",on:{dblclick:function(e){e.preventDefault(),t.editFeeData(s)}}},[t._v(t._s(t.__("Fee","wepos"))+" "),a("span",{staticClass:"name"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(s)}}})])]]],2)}):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?a("tr",{staticClass:"tax"},[a("td",{staticClass:"label"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))]),t._v(" "),a("td",{staticClass:"action"})]):t._e(),t._v(" "),a("tr",{staticClass:"cart-action"},[a("td",{attrs:{colspan:"3"}},[a("fee-keypad",{attrs:{name:t.__("Discount","wepos"),"short-key":"discount"},on:{inputfee:t.setDiscount}}),t._v(" "),a("fee-keypad",{attrs:{name:t.__("Fee","wepos"),"short-key":"fee"},on:{inputfee:t.setFee}}),t._v(" "),""==t.orderdata.customer_note?a("customer-note",{on:{addnote:t.addCustomerNote}}):t._e()],1)]),t._v(" "),t.orderdata.customer_note?a("tr",{staticClass:"note"},[a("td",{staticClass:"note-text",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.orderdata.customer_note)+"\n ")]),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeCustomerNote(e)}}})])]):t._e(),t._v(" "),a("tr",{staticClass:"pay-now",on:{click:function(e){t.initPayment()}}},[a("td",[t._v(t._s(t.__("Pay Now","wepos")))]),t._v(" "),a("td",{staticClass:"amount"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))]),t._v(" "),t._m(0)])],2)])])])]):t._e()],2),t._v(" "),t.showPaymentReceipt?a("modal",{attrs:{width:"600px",height:"400px"},on:{close:function(e){t.createNewSale()}}},[a("template",{slot:"body"},[a("div",{staticClass:"wepos-payment-receipt"},[a("div",{staticClass:"sale-completed"},[a("img",{attrs:{src:t.wepos.assets_url+"/images/sale-completed.png",alt:"",width:"120px"}}),t._v(" "),a("h2",[t._v(t._s(t.__("Sale Completed","wepos")))])]),t._v(" "),a("div",{staticClass:"print-section"},[a("print-receipt"),t._v(" "),a("button",{staticClass:"new-sale-btn",on:{click:function(e){e.preventDefault(),t.createNewSale()}}},[a("span",{staticClass:"icon flaticon-add"}),t._v(" "),a("span",{staticClass:"label"},[t._v(t._s(t.__("New Sale","wepos")))])])],1)])])],2):t._e(),t._v(" "),t.showHelp?a("modal",{attrs:{width:"700px",height:"500px"},on:{close:function(e){t.closeHelp()}}},[a("template",{slot:"body"},[a("div",{staticClass:"wepos-help-wrapper"},[a("h2",[t._v(t._s(t.__("Shortcut Keys","wepos")))]),t._v(" "),a("ul",[a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f1")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Search Product","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f2")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Scan Product","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f3")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Toggle Product View","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f4")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Add Fee in cart","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f5")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Add Discount in cart","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f6")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Add Customer note","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f7")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Customer Search","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("shift+f7")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Add new Customer","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f8")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Create New Sale","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("shift+f8")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Empty your cart","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f9")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Go to payment receipt","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f10")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Process Payment","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("ctrl/cmd+p")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Print Receipt","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("ctrl/cmd+?")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Show/Close(Toggle) Help","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("esc")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Close anything","wepos")))])])])])])],2):t._e(),t._v(" "),t.showModal?a("modal",{attrs:{width:"98%",height:"95vh"},on:{close:function(e){t.backToSale()}}},[a("template",{slot:"body"},[a("div",{staticClass:"wepos-checkout-wrapper"},[a("div",{staticClass:"left-content"},[a("div",{staticClass:"header"},[t._v("\n "+t._s(t.__("Sale Summary","wepos"))+"\n ")]),t._v(" "),a("div",{staticClass:"content"},[a("table",{staticClass:"sale-summary-cart"},[a("tbody",t._l(t.cartdata.line_items,function(e){return a("tr",[a("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?a("div",{staticClass:"attribute"},[a("ul",t._l(e.attribute,function(e){return a("li",[a("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),a("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),a("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),a("td",{staticClass:"price"},[e.on_sale?[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),a("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}))])]),t._v(" "),a("div",{staticClass:"footer"},[a("ul",[a("li",{staticClass:"wepos-clearfix"},[a("span",{staticClass:"wepos-left"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?a("span",{staticClass:"metadata"},[t._v("\n "+t._s(t.__("Includes Tax","wepos"))+" "+t._s(t.formatPrice(t.$store.getters["Cart/getTotalLineTax"]))+"\n ")]):t._e()]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))])]),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,function(e,s){return a("li",{staticClass:"wepos-clearfix"},["discount"==e.type?[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Discount","wepos"))+" "),a("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Fee","wepos"))+" "),a("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(e.total)))])]],2)}):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?a("li",{staticClass:"wepos-clearfix"},[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))])]):t._e(),t._v(" "),a("li",{staticClass:"wepos-clearfix"},[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),a("li",{staticClass:"wepos-clearfix"},[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])])],2)])]),t._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"header wepos-clearfix"},[a("h2",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),a("span",{staticClass:"pay-amount wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),a("div",{staticClass:"content"},[a("div",{staticClass:"payment-gateway"},[t.availableGateways.length>0?[t._l(t.availableGateways,function(e){return a("label",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedGateway,expression:"selectedGateway"}],attrs:{type:"radio",name:"gateway",checked:""},domProps:{value:e.id,checked:t._q(t.selectedGateway,e.id)},on:{change:function(a){t.selectedGateway=e.id}}}),t._v(" "),a("span",{staticClass:"gateway",class:"gateway-"+e.id},[t._v("\n "+t._s(e.title)+"\n ")])])}),t._v(" "),t.emptyGatewayDiv>0?t._l(t.emptyGatewayDiv,function(t){return a("label",{key:t},[a("span",{staticClass:"grid-placeholder"})])}):t._e()]:[a("p",[t._v(t._s(t.__("No gateway found","wepos")))])]],2),t._v(" "),"wepos_cash"==t.orderdata.payment_method?[a("div",{staticClass:"payment-option"},[a("div",{staticClass:"payment-amount"},[a("div",{staticClass:"input-part"},[a("div",{staticClass:"input-wrap"},[a("p",[t._v(t._s(t.__("Cash","wepos")))]),t._v(" "),a("div",{staticClass:"input-addon"},[a("span",{staticClass:"currency"},[t._v(t._s(t.wepos.currency_format_symbol))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.cashAmount,expression:"cashAmount"}],ref:"cashamount",attrs:{type:"text"},domProps:{value:t.cashAmount},on:{input:function(e){e.target.composing||(t.cashAmount=e.target.value)}}})])])]),t._v(" "),a("div",{staticClass:"change-money"},[a("p",[t._v(t._s(t.__("Change money","wepos"))+": "+t._s(t.formatPrice(t.changeAmount)))])])])])]:t._e(),t._v(" "),t._l(t.availableGatewayContent,function(e,s){return a(e,{key:s,tag:"component",attrs:{availablegateways:t.availableGateways}})})],2),t._v(" "),a("div",{staticClass:"footer wepos-clearfix"},[a("a",{staticClass:"back-btn wepos-left",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.backToSale()}}},[t._v(t._s(t.__("Back to Sale","wepos")))]),t._v(" "),a("button",{staticClass:"process-checkout-btn wepos-right",attrs:{disabled:!t.ableToProcess()},on:{click:function(e){e.preventDefault(),t.processPayment(e)}}},[t._v(t._s(t.__("Process Payment","wepos")))])])])])])],2):t._e(),t._v(" "),a("overlay",{attrs:{show:t.showOverlay}}),t._v(" "),t.showReceiptHtml?a("print-receipt-html",{directives:[{name:"show",rawName:"v-show",value:t.createprintreceipt,expression:"createprintreceipt"}],attrs:{printdata:t.printdata,settings:t.settings}}):t._e(),t._v(" "),t._l(t.afterMainContents,function(e,s){return a(e,{key:s,tag:"component",attrs:{orderdata:t.orderdata,printdata:t.printdata}})})],2)};s._withStripped=!0;var i={render:s,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("td",{staticClass:"icon"},[e("span",{staticClass:"flaticon-right-arrow"})])}]};e.a=i}]),[138]); \ No newline at end of file +pluginWebpack([0],Array(27).concat([function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=o(a(28)),i=o(a(30));function o(t){return t&&t.__esModule?t:{default:t}}var r=wepos_get_lib("Vue"),n=wepos_get_lib("Vuex");r.use(n),e.default=new n.Store({modules:{Cart:s.default,Order:i.default}})},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s,i=a(29),o=(s=i)&&s.__esModule?s:{default:s};e.default={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[]}},getters:{getSubtotal:function(t){var e=0;return weLo_.forEach(t.cartdata.line_items,function(t,a){t.on_sale?e+=t.quantity*t.sale_price:e+=t.quantity*t.regular_price}),e},getTotalFee:function(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,function(t,a){"fee"==t.type&&(e+=Math.abs(t.total))}),e},getTotalDiscount:function(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,function(t,a){"discount"==t.type&&(e+=Number(Math.abs(t.total)))}),e},getTotalLineTax:function(t){var e=0;return weLo_.forEach(t.cartdata.line_items,function(t,a){e+=Math.abs(t.tax_amount*t.quantity)}),e},getTotalTax:function(t){var e=0,a=0;return weLo_.forEach(t.cartdata.line_items,function(t,a){e+=Math.abs(t.tax_amount*t.quantity)}),void 0!=t.settings.woo_tax&&"incl"==t.settings.woo_tax.wc_tax_display_cart&&(e=0),weLo_.forEach(t.cartdata.fee_lines,function(e,s){if("fee"==e.type&&"taxable"==e.tax_status){var i=""===e.tax_class?"standard":e.tax_class,o=weLo_.find(t.availableTax,{class:i.toString()});void 0!==o&&(a+=Math.abs(e.total)*Math.abs(o.rate)/100)}}),e+a},getOrderTotal:function(t,e){return e.getSubtotal+e.getTotalFee+e.getTotalTax},getTotal:function(t,e){return e.getOrderTotal-e.getTotalDiscount}},mutations:{setSettings:function(t,e){t.settings=e},setAvailableTax:function(t,e){t.availableTax=e},setCartData:function(t,e){weLo_.isEmpty(e)?t.cartdata={line_items:[],fee_lines:[]}:t.cartdata=Object.assign({},e)},addToCartItem:function(t,e){var a={};a.product_id=0===e.parent_id?e.id:e.parent_id,a.name=e.name,a.quantity=1,a.regular_price=e.regular_display_price,a.sale_price=e.sales_display_price,a.on_sale=e.on_sale,a.attribute=e.attributes,a.variation_id=0!==e.parent_id?e.id:0,a.editQuantity=!1,a.type=e.type,a.tax_amount=e.tax_amount,a.manage_stock=e.manage_stock,a.stock_status=e.stock_status,a.backorders_allowed=e.backorders_allowed,a.stock_quantity=e.stock_quantity;var s=weLo_.findIndex(t.cartdata.line_items,{product_id:a.product_id,variation_id:a.variation_id});s<0?o.default.hasStock(e)&&t.cartdata.line_items.push(a):o.default.hasStock(e,t.cartdata.line_items[s].quantity)&&(t.cartdata.line_items[s].quantity+=1)},removeCartItem:function(t,e){t.cartdata.line_items.splice(e,1)},addCartItemQuantity:function(t,e){var a=t.cartdata.line_items[e];o.default.hasStock(a,a.quantity)&&t.cartdata.line_items[e].quantity++},removeCartItemQuantity:function(t,e){t.cartdata.line_items[e].quantity<=1?t.cartdata.line_items[e].quantity=1:t.cartdata.line_items[e].quantity--},toggleEditQuantity:function(t,e){t.cartdata.line_items[e].editQuantity=!t.cartdata.line_items[e].editQuantity},addDiscount:function(t,e){t.cartdata.fee_lines.push({name:e.title,type:"discount",value:e.value.toString(),isEdit:!1,discount_type:e.type,tax_status:"none",tax_class:"",total:0})},addFee:function(t,e){t.cartdata.fee_lines.push({name:e.title,type:"fee",value:e.value.toString(),isEdit:!1,fee_type:e.type,tax_status:"none",tax_class:"",total:0})},saveFeeValue:function(t,e){t.cartdata.fee_lines.splice(e.key,1,e.feeData),t.cartdata.fee_lines[e.key].isEdit=!1},editFeeValue:function(t,e){t.cartdata.fee_lines[e].isEdit=!0},cancelSaveFeeValue:function(t,e){t.cartdata.fee_lines[e].isEdit=!1},removeFeeLineItems:function(t,e){t.cartdata.fee_lines.splice(e,1)},emptyCart:function(t){t.cartdata={line_items:[],fee_lines:[]}},calculateDiscount:function(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,function(a,s){"discount"==a.type&&("percent"==a.discount_type?t.cartdata.fee_lines[s].total="-"+e.getSubtotal*Math.abs(a.value)/100:t.cartdata.fee_lines[s].total="-"+Math.abs(a.value))})},calculateFee:function(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,function(a,s){"fee"==a.type&&("percent"==a.fee_type?t.cartdata.fee_lines[s].total=(e.getSubtotal*Math.abs(a.value)/100).toString():t.cartdata.fee_lines[s].total=Math.abs(a.value).toString())})}},actions:{setSettingsAction:function(t,e){t.commit("setSettings",e)},setAvailableTaxAction:function(t,e){t.commit("setAvailableTax",e)},setCartDataAction:function(t,e){t.commit("setCartData",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addToCartAction:function(t,e){t.commit("addToCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeCartItemAction:function(t,e){t.commit("removeCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addItemQuantityAction:function(t,e){t.commit("addCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeItemQuantityAction:function(t,e){t.commit("removeCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},toggleEditQuantityAction:function(t,e){t.commit("toggleEditQuantity",e)},addDiscountAction:function(t,e){t.commit("addDiscount",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addFeeAction:function(t,e){t.commit("addFee",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeFeeLineItemsAction:function(t,e){t.commit("removeFeeLineItems",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},saveFeeValueAction:function(t,e){t.commit("saveFeeValue",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},editFeeValueAction:function(t,e){t.commit("editFeeValue",e)},cancelSaveFeeValueAction:function(t,e){t.commit("cancelSaveFeeValue",e)},emptyCartAction:function(t){t.commit("emptyCart")},calculateDiscount:function(t){t.commit("calculateDiscount",t.getters)},calculateFee:function(t){t.commit("calculateFee",t.getters)}}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={hasStock:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.manage_stock?!!t.backorders_allowed||t.stock_quantity>e:"outofstock"!=t.stock_status}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},getters:{},mutations:{setOrderData:function(t,e){weLo_.isEmpty(e)?t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:t.orderdata=e},setCustomer:function(t,e){Object.keys(e).length>0?(t.orderdata.billing=e.billing,t.orderdata.shipping=e.shipping,t.orderdata.customer_id=e.id):(t.orderdata.billing={},t.orderdata.shipping={},t.orderdata.customer_id=0)},emptyOrderdata:function(t){t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote:function(t,e){t.orderdata.customer_note=e.trim()},removeCustomerNote:function(t){t.orderdata.customer_note=""},setGateway:function(t,e){t.orderdata.payment_method=e.id,t.orderdata.payment_method_title=e.title}},actions:{setOrderDataAction:function(t,e){t.commit("setOrderData",e)},setCustomerAction:function(t,e){t.commit("setCustomer",e)},emptyOrderdataAction:function(t){t.commit("emptyOrderdata")},setCustomerNoteAction:function(t,e){t.commit("setCustomerNote",e)},removeCustomerNoteAction:function(t){t.commit("removeCustomerNote")},setGatewayAction:function(t,e){t.commit("setGateway",e)}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";e.a={name:"App"}},function(t,e,a){"use strict";var s=a(146),i=a(149),o=a(152),r=a(155),n=a(69),c=a.n(n),l=a(162),u=a(165),d=a(168);let p=wepos_get_lib("Modal");e.a={name:"Home",components:{ProductSearch:i.a,CustomerSearch:o.a,Overlay:s.a,Modal:p,MugenScroll:c.a,FeeKeypad:r.a,PrintReceipt:l.a,PrintReceiptHtml:u.a,CustomerNote:d.a},data:()=>({showHelp:!1,showQucikMenu:!1,productView:"grid",productLoading:!1,viewVariationPopover:!1,showModal:!1,showPaymentReceipt:!1,products:[],filteredProducts:[],totalPages:1,page:1,showOverlay:!1,selectedVariationProduct:{},attributeDisabled:!0,selectedAttribute:{},availableGateways:[],emptyGatewayDiv:0,cashAmount:"",availableTax:[],settings:{},taxSettings:{},printdata:wepos.hooks.applyFilters("wepos_initial_print_data",{gateway:{id:"",title:""}}),feeData:{},createprintreceipt:!1,selectedCategory:"",selectedGateway:"",categories:[],showReceiptHtml:wepos.hooks.applyFilters("wepos_render_receipt_html",!0),quickLinkList:wepos.hooks.applyFilters("wepos_quick_links",[]),quickLinkListStart:wepos.hooks.applyFilters("wepos_quick_links_start",[]),availableGatewayContent:wepos.hooks.applyFilters("wepos_avaialable_gateway_content",[]),afterMainContents:wepos.hooks.applyFilters("wepos_after_main_content",[]),beforCartPanels:wepos.hooks.applyFilters("wepos_before_cart_panel",[])}),computed:{cartdata(){return this.$store.state.Cart.cartdata},orderdata(){return this.$store.state.Order.orderdata},hotkeys(){return{f3:this.toggleProductView,f9:this.initPayment,f10:this.processPayment,f8:this.createNewSale,"shift+f8":this.emptyCart,esc:this.backToSale,"meta+/":this.openHelp,"ctrl+/":this.openHelp}},getFilteredProduct(){return void 0!==this.$route.query.category?this.products.filter(t=>{var e=weLo_.find(t.categories,{id:parseInt(this.$route.query.category)});return void 0!=e&&Object.keys(e).length>0}):this.products},changeAmount(){var t=this.cashAmount-this.$store.getters["Cart/getTotal"];return t>0?t:0},getBreadCrums(){if(void 0!==this.$route.query.category){var t=jQuery.extend(!0,[],this.categories),e=weLo_.find(this.categories,{id:parseInt(this.$route.query.category)}),a=weLo_.findIndex(this.categories,e),s=t.splice(0,a+1),i=[];if(s.length>0){for(var o=s.length-1;o>=0;o--)if(i.length>0){var r=weLo_.find(s,{id:s[o+1].parent_id});if(void 0!=r&&(i.push(r),null==r.parent_id))break}else i.push(s[o]);return i.slice().reverse()}}return[]}},watch:{selectedAttribute(t,e){Object.keys(t).length==this.selectedVariationProduct.attributes.length&&(this.attributeDisabled=!1)},"$route.query.order_key"(){""!=this.$route.query.order_key&&"success"==this.$route.query.payment&&(this.showModal=!1,this.showPaymentReceipt=!0)},"$route.query.category"(){this.selectedCategory={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},void 0!==this.$route.query.category&&(this.selectedCategory=weLo_.find(this.categories,{id:parseInt(this.$route.query.category)}))},selectedGateway(t,e){var a=weLo_.find(this.availableGateways,{id:t});this.$store.dispatch("Order/setGatewayAction",a)}},methods:{openQucikMenu(){this.showQucikMenu=!0},openHelp(t){t.preventDefault(),this.showHelp=!0,this.showQucikMenu=!1},closeHelp(){this.showHelp=!1},addCustomerNote(t){this.$store.dispatch("Order/setCustomerNoteAction",t)},removeCustomerNote(){this.$store.dispatch("Order/removeCustomerNoteAction")},removeBreadcrums(){this.$router.push({name:"Home"})},logout(){wepos.hooks.doAction("wepos_before_logout"),window.location.href=wepos.logout_url.toString()},emptyCart(){this.$store.dispatch("Cart/emptyCartAction"),this.$store.dispatch("Order/emptyOrderdataAction"),this.printdata=wepos.hooks.applyFilters("wepos_initial_print_data",{gateway:{id:"",title:""}}),this.showPaymentReceipt=!1,this.cashAmount="",this.eventBus.$emit("emptycart",this.orderdata),this.showQucikMenu=!1},toggleProductView(t){t.preventDefault(),this.productView="grid"==this.productView?"list":"grid"},createNewSale(){this.$router.push({name:"Home"}),this.emptyCart()},ableToProcess(){return this.cartdata.line_items.length>0&&this.isSelectGateway()},processPayment(t){if(t.preventDefault(),this.ableToProcess()){weLo_.find(this.availableGateways,{id:this.orderdata.payment_method});var e=wepos.hooks.applyFilters("wepos_order_form_data",{billing:this.orderdata.billing,shipping:this.orderdata.shipping,line_items:this.cartdata.line_items,fee_lines:this.cartdata.fee_lines,customer_id:this.orderdata.customer_id,customer_note:this.orderdata.customer_note,payment_method:this.orderdata.payment_method,payment_method_title:this.orderdata.payment_method_title,meta_data:[{key:"_wepos_is_pos_order",value:!0},{key:"_wepos_cash_tendered_amount",value:this.cashAmount.toString()},{key:"_wepos_cash_change_amount",value:this.changeAmount.toString()}]},this.orderdata,this.cartdata),a=jQuery(".wepos-checkout-wrapper .right-content").find(".content");a.block({message:null,overlayCSS:{background:"#fff url("+wepos.ajax_loader+") no-repeat center",opacity:.4}}),wepos.api.post(wepos.rest.root+wepos.rest.wcversion+"/orders",e).done(t=>{wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/payment/process",t).done(s=>{"success"==s.result?(this.$router.push({name:"Home",query:{order_key:t.order_key,payment:"success"}}),this.printdata=wepos.hooks.applyFilters("wepos_after_payment_print_data",{line_items:this.cartdata.line_items,fee_lines:this.cartdata.fee_lines,subtotal:this.$store.getters["Cart/getSubtotal"],taxtotal:this.$store.getters["Cart/getTotalTax"],ordertotal:this.$store.getters["Cart/getTotal"],gateway:{id:t.payment_method,title:t.payment_method_title},order_id:t.id,order_date:t.date_created,cashamount:this.cashAmount.toString(),changeamount:this.changeAmount.toString()},e)):a.unblock()}).fail(t=>{a.unblock(),alert(t.responseJSON.message)})}).fail(t=>{a.unblock(),alert(t.responseJSON.message)})}},initPayment(){this.showModal=!0,this.$store.dispatch("Order/setGatewayAction",this.availableGateways[0]),this.selectedGateway=this.availableGateways[0].id},backToSale(){this.showModal=!1,this.showHelp=!1},isSelectGateway(){return!(void 0==this.orderdata.payment_method||""==this.orderdata.payment_method)},getProductImage:t=>t.images.length>0?t.images[0].woocommerce_thumbnail:wepos.placeholder_image,getProductImageName:t=>t.images.length>0?t.images[0].name:t.name,setDiscount(t,e){this.$store.dispatch("Cart/addDiscountAction",{title:this.__("Discount","wepos"),value:t,type:e})},saveFee(t){this.$store.dispatch("Cart/saveFeeValueAction",{key:t,feeData:this.feeData}),this.feeData={}},cancelEditFee(t){this.$store.dispatch("Cart/cancelSaveFeeValueAction",t),this.feeData={}},editFeeData(t){this.$store.dispatch("Cart/editFeeValueAction",t),this.feeData=Object.assign({},this.cartdata.fee_lines[t]),this.$nextTick(()=>{jQuery(this.$refs.fee_name).focus()})},setFee(t,e){this.$store.dispatch("Cart/addFeeAction",{title:this.__("Fee","wepos"),value:t,type:e})},removeFeeLine(t){this.$store.dispatch("Cart/removeFeeLineItemsAction",t)},fetchProducts(){1==this.page&&(this.productLoading=!0),this.totalPages>=this.page?wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?status=publish&per_page=30&page="+this.page).done((t,e,a)=>{this.products=this.products.concat(t),this.page+=1,this.totalPages=parseInt(a.getResponseHeader("X-WP-TotalPages")),this.productLoading=!1}).then((t,e,a)=>{this.fetchProducts()}):this.productLoading=!1},maybeRemoveDeletedProduct:t=>new Promise((e,a)=>{if(!t)return e(t);if(!t.line_items||t.line_items.length<1)return e(t);let s=t.line_items.map(t=>t.product_id);wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?include="+s.toString()).then(a=>{let s=a.map(t=>t.id);return t.line_items.forEach((e,a)=>{s.includes(e.product_id)||(t.line_items.splice(a,1),localStorage.setItem("cartdata",JSON.stringify(t)))}),e(t)}).fail(()=>a(t))}),selectCustomer(t){this.$store.dispatch("Order/setCustomerAction",t)},selectVariationProduct(t){this.viewVariationPopover=!0,this.selectedVariationProduct=t},addVariationProduct(){var t=this.findMatchingVariations(this.selectedVariationProduct.variations,this.selectedAttribute)[0];t.parent_id=this.selectedVariationProduct.id,t.type=this.selectedVariationProduct.type,t.name=this.selectedVariationProduct.name,t.type=this.selectedVariationProduct.type,this.selectedAttribute={},this.attributeDisabled=!0,this.$store.dispatch("Cart/addToCartAction",t)},addToCart(t){this.$store.dispatch("Cart/addToCartAction",t)},toggleEditQuantity(t,e){this.$store.dispatch("Cart/toggleEditQuantityAction",e)},removeItem(t){this.$store.dispatch("Cart/removeCartItemAction",t)},addQuantity(t,e){this.$store.dispatch("Cart/addItemQuantityAction",e)},removeQuantity(t,e){this.$store.dispatch("Cart/removeItemQuantityAction",e)},fetchGateway(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/payment/gateways").done(t=>{this.availableGateways=t,this.emptyGatewayDiv=4-this.availableGateways.length%4})},truncateTitle:(t,e)=>weLo_.truncate(t,{length:e}),unSanitizeString:t=>t.split("-").map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}).join(" "),fetchSettings(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/settings").done(t=>{this.settings=t,this.$store.dispatch("Cart/setSettingsAction",t)})},fetchTaxes(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/taxes").done(t=>{this.availableTax=t,this.$store.dispatch("Cart/setAvailableTaxAction",t)})},handleCategorySelect(t,e){"-1"==t.id?this.$router.push({name:"Home"}):this.$router.push({name:"Home",query:{category:t.id}})},handleCategoryRemove(t,e){this.$router.push({name:"Home"}),this.selectedCategory={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null}},fetchCategories(){var t,e;wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/products/categories?hide_empty=true&_fields=id,name,parent_id&per_page=100").then(a=>{a.sort(function(t,e){return t.name.localeCompare(e.name)});var s=(t=[],e={},a.forEach(function(a){e[a.id]={response:a,children:e[a.id]&&e[a.id].children},null===a.parent_id?t.push(e[a.id]):(e[a.parent_id]=e[a.parent_id]||{},e[a.parent_id].children=e[a.parent_id].children||[],e[a.parent_id].children.push(e[a.id]))}),t),i={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},o=s.reduce(function t(e){return function(a,s){return s.response.level=e,a.concat(s.response,(s.children||[]).reduce(t(e+1),[]))}}(0),[]);this.categories=o,this.categories.unshift(i),this.selectedCategory=i,void 0!==this.$route.query.category&&(this.selectedCategory=weLo_.find(a,{id:parseInt(this.$route.query.category)}))})},filterProducts(){this.products=this.products.filter(t=>weLo_.findIndex(t.categories,{id:this.$route.query.category})>0)},fetchTaxSettings(){wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/settings/tax").done(t=>{this.taxSettings=t})}},async created(){if(this.fetchSettings(),this.fetchTaxes(),this.fetchProducts(),this.fetchGateway(),this.fetchCategories(),"undefined"!=typeof localStorage)try{var t=JSON.parse(localStorage.getItem("cartdata")),e=JSON.parse(localStorage.getItem("orderdata"));t=await this.maybeRemoveDeletedProduct(t),this.$store.dispatch("Cart/setCartDataAction",t),this.$store.dispatch("Order/setOrderDataAction",e)}catch(t){e=JSON.parse(localStorage.getItem("orderdata"));this.$store.dispatch("Cart/setCartDataAction",t),this.$store.dispatch("Order/setOrderDataAction",e)}window.addEventListener("beforeunload",()=>{"undefined"!=typeof localStorage&&(localStorage.setItem("cartdata",JSON.stringify(this.$store.state.Cart.cartdata)),localStorage.setItem("orderdata",JSON.stringify(this.$store.state.Order.orderdata)))},!1)}}},function(t,e,a){"use strict";e.a={name:"Overlay",props:{show:{type:Boolean}}}},function(t,e,a){"use strict";var s=a(64),i=a(26);a.n(i);let o=wepos_get_lib("Modal");e.a={name:"ProductInlineSearch",props:{products:{type:Array,default:()=>[]},settings:{type:Object,default:()=>({})}},components:{Modal:o,KeyboardControl:s.a},data:()=>({showResults:!1,showVariationModal:!1,mode:"product",serachInput:"",searchableProduct:[],selectedVariationProduct:{},attributeDisabled:!0,chosenAttribute:{}}),computed:{placeholder(){return"scan"==this.mode?this.__("Scan your product","wepos"):this.__("Search product by typing","wepos")},hotkeys(){return{f1:this.changeProductSearch,f2:this.changeScan,esc:this.searchClose}}},watch:{chosenAttribute(t,e){Object.keys(t).length==this.selectedVariationProduct.attributes.length&&(this.attributeDisabled=!1)}},methods:{changeScan(t){t.preventDefault(),this.changeMode("scan")},changeProductSearch(t){t.preventDefault(),this.changeMode("product")},searchClose(){this.showResults=!1,this.showVariationModal=!1,this.changeMode("scan"),this.$refs.productSearch.blur()},selectedHandler(t){var e=this.searchableProduct[t];"simple"==e.type?this.addToCartAction(e):this.selectVariation(e)},onKeyDown(){jQuery(".product-search-item.selected").next().children("a").focus()},onKeyUp(){jQuery(".product-search-item.selected").prev().children("a").focus()},triggerFocus(){this.showResults=!0,this.$emit("onfocus")},outside(){this.showResults=!1,this.$emit("onblur")},changeMode(t){this.mode=t,"scan"==this.mode&&(this.searchableProduct=[],this.showResults=!1),this.$refs.productSearch.focus()},handleProductScan(){if("product"!=this.mode){var t=this.settings.wepos_general,e="custom"==t.barcode_scanner_field?"barcode":t.barcode_scanner_field,a={},s=this.products.filter(t=>{if("simple"==t.type&&t[e].toString()==this.serachInput)return!0;if("variable"==t.type){var a=!1;if(t.variations.length>0&&weLo_.forEach(t.variations,(t,s)=>{t[e].toString()==this.serachInput&&(a=!0)}),a)return!0}return!1});if(s.length>0)if("variable"==(s=s[0]).type)(a=s.variations.filter(t=>t[e].toString()==this.serachInput)[0]).parent_id=s.id,a.type=s.type,a.name=s.name,this.$emit("onProductAdded",a);else this.$emit("onProductAdded",s);this.serachInput=""}},searchProduct(t){this.serachInput&&"product"==this.mode&&(this.searchableProduct=this.products.filter(t=>-1!=t.id.toString().indexOf(this.serachInput)||(-1!=t.name.toString().toLowerCase().indexOf(this.serachInput.toLowerCase())||-1!=t.sku.indexOf(this.serachInput))))},selectVariation(t){this.selectedVariationProduct=t,this.showVariationModal=!0},addVariationProduct(){var t=this.findMatchingVariations(this.selectedVariationProduct.variations,this.chosenAttribute)[0];t.parent_id=this.selectedVariationProduct.id,t.type=this.selectedVariationProduct.type,t.name=this.selectedVariationProduct.name,this.$emit("onProductAdded",t),this.showVariationModal=!1,this.chosenAttribute={}},addToCartAction(t){this.$emit("onProductAdded",t)}},mounted(){this.$refs.productSearch.focus()}}},function(t,e,a){"use strict";var s=a(65),i=a(0)(s.a,null,!1,null,null,null);i.options.__file="assets/src/frontend/components/KeyboardControl.vue",e.a=i.exports},function(t,e,a){"use strict";e.a={props:{listLength:Number},data:()=>({selectedIndex:0}),render(t){return t("ul",this.$scopedSlots.default({selectedIndex:this.selectedIndex}))},methods:{keyHandler(t){const e=t.which||t.keyCode;38===e||t.shiftKey&&9===e?(this.handleKeyUp(t),this.$emit("key-up")):40===e||9===e?(this.handleKeyDown(t),this.$emit("key-down")):13===e&&this.handleEnter(t)},handleEnter(t){t.preventDefault(),this.$emit("selected",this.selectedIndex)},handleKeyUp(t){t.preventDefault(),this.selectedIndex<=0?this.selectedIndex=this.listLength-1:this.selectedIndex>0&&this.selectedIndex<=this.listLength-1&&this.selectedIndex--},handleKeyDown(t){t.preventDefault(),this.selectedIndex<0||this.selectedIndex===this.listLength-1?this.selectedIndex=0:this.selectedIndex>=0&&this.selectedIndex({submitDisable:!1,customers:[],customer:{email:"",first_name:"",last_name:"",address_1:"",address_2:"",country:"",state:"",postcode:"",city:"",phone:""},showCustomerResults:!1,serachInput:"",showNewCustomerModal:!1,stateList:[],selectedState:null,selectedCountry:null,isDisabled:!0}),computed:{hotkeys(){return{f7:this.focusCustomerSearch,"shift+f7":this.addNewCustomer,esc:this.searchClose}},getCountryList:()=>Object.keys(wepos.countries).map(t=>({code:t,name:wepos.countries[t]})),orderdata(){return this.$store.state.Order.orderdata}},watch:{customer:{handler(t){this.isDisabled=!0,void 0!==t.first_name&&""!=t.first_name.trim()&&void 0!==t.last_name&&""!=t.last_name.trim()&&void 0!==t.email&&""!=t.email.trim()&&(this.isDisabled=!1)},deep:!0},"orderdata.customer_id"(t){this.serachInput=t?this.orderdata.billing.first_name+" "+this.orderdata.billing.last_name:""}},methods:{focusCustomerSearch(t){t.preventDefault(),this.$refs.customerSearch.focus()},searchClose(){this.showCustomerResults=!1,this.serachInput="",this.showNewCustomerModal=!1,this.$refs.customerSearch.blur()},addNewCustomer(){this.showNewCustomerModal=!0},selectedHandler(t){var e=this.customers[t];this.selectCustomer(e)},onKeyDown(){jQuery(".customer-search-item.selected").next().children("a").focus()},onKeyUp(){jQuery(".customer-search-item.selected").prev().children("a").focus()},triggerFocus(){this.showCustomerResults=!0,this.$emit("onfocus")},onblur(){this.showCustomerResults=!1,this.$emit("onblur")},closeNewCustomerModal(){this.customer={email:"",first_name:"",last_name:"",address_1:"",address_2:"",country:"",state:"",postcode:"",city:"",phone:""},this.selectedState=null,this.selectedCountry=null,this.showNewCustomerModal=!1},searchCustomer(){this.serachInput?wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/customers?search="+this.serachInput).done(t=>{this.customers=t}):this.$emit("onCustomerSelected",{})},selectCustomer(t){this.$emit("onCustomerSelected",t),this.serachInput=t.first_name+" "+t.last_name,this.showCustomerResults=!1},createCustomer(){if(this.customer.email){var t={email:this.customer.email,first_name:this.customer.first_name,last_name:this.customer.last_name,username:this.customer.email,password:this.generatePassword(20),billing:{first_name:this.customer.first_name,last_name:this.customer.last_name,address_1:this.customer.address_1,address_2:this.customer.address_2,country:null!==this.selectedCountry?this.selectedCountry.code:"",state:null!==this.selectedState?this.selectedState.code:this.customer.state,postcode:this.customer.postcode,city:this.customer.city,phone:this.customer.phone,email:this.customer.email}},e=jQuery(".wepos-new-customer-form");e.block({message:null,overlayCSS:{background:"#fff url("+wepos.ajax_loader+") no-repeat center",opacity:.4}}),wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/customers",t).done(t=>{this.serachInput=t.first_name+" "+t.last_name,this.$emit("onCustomerSelected",t),e.unblock(),this.closeNewCustomerModal()}).fail(t=>{e.unblock(),alert(t.responseJSON.message)})}else alert(this.__("Please enter an email address for customer","wepos"))},removeCountrySelect(t,e){this.selectedState=null,this.selectedCountry=null,this.stateList=[],this.customer.country="",this.customer.state=""},removeStateSelect(t,e){this.selectedState=null,this.customer.state=""},handleCountrySelect(t,e){var a=void 0!==wepos.states[t.code]?wepos.states[t.code]:[],s=Object.keys(a);s.length>0?this.stateList=s.map(t=>({code:t,name:a[t]})):(this.stateList=a,this.selectedState=null)},generatePassword(t){for(var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",a="",s=0,i=e.length;s{this.serachInput=""});var t=JSON.parse(localStorage.getItem("orderdata"));"undefined"!=t.customer_id&&0!=t.customer_id&&(this.serachInput=t.billing.first_name+" "+t.billing.last_name)}}},function(t,e,a){"use strict";var s=a(157);e.a={name:"FeeKeypad",components:{keyboard:s.a},computed:{hotkeys(){return{discount:{f4:this.showFeeKeypad,esc:this.hideFeeKepad},fee:{f5:this.showFeeKeypad,esc:this.hideFeeKepad}}[this.shortKey]}},props:{name:{type:String,default:"Fee"},className:{type:String,default:""},shortKey:{type:String,default:""}},data:()=>({input:"",displayValue:"",viewFeeKeypad:!1}),methods:{hideFeeKepad(t){this.viewFeeKeypad=!1},layout(){return'123|456|789|{:backspace}0'+wepos.currency_format_decimal_sep+"|{% "+this.name+":percent}{"+wepos.currency_format_symbol+" "+this.name+":flat}"},percentFee(t){this.$emit("inputfee",t.value.toString(),"percent"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},flatFee(t){this.$emit("inputfee",t.value.toString(),"flat"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},change(t){isNaN(t)?(this.input=this.displayValue,""==this.displayValue&&(this.input="")):(this.displayValue=t,this.input=this.displayValue),jQuery(this.$refs.feeinput).focus(),""==this.input&&jQuery(this.$refs.feeinput).focus()},inputChange(){isNaN(this.displayValue)?this.displayValue=this.input:this.input=this.displayValue,""==this.input&&jQuery(this.$refs.feeinput).focus()},showFeeKeypad(t){t.preventDefault(),this.viewFeeKeypad=!0,setTimeout(()=>{jQuery(this.$refs.feeinput).focus()},500)}}}},function(t,e,a){"use strict";const s="7440011c983cf39ae730b1f831e2922ac5a76910",i="f630c4abcae620278f82e142a526ef325c2a773a",o="ad982c66898e02a5dab419ea7568421b03f68ee2";e.a={name:"keyboard",props:{value:{type:String,default:""},layouts:{type:[String,Array],required:!0},maxlength:{type:Number,default:0,validator:t=>t>=0},pattern:{type:String,default:null}},data:()=>({layout:0}),computed:{full(){return this.maxlength>0&&this.value.length>=this.maxlength},empty(){return 0===this.value.length},lines(){return(Array.isArray(this.layouts)?this.layouts:[this.layouts])[this.layout].replace("||",s).replace("{{",i).replace("}}",o).split("|")},buttons(){return this.lines.map(t=>{let e=[],a=null;return t.match(new RegExp(`(${i}|${o}|${s}|.)`,"g")).forEach(t=>{if("{"===t)a="";else if("}"===t){let t=a.split(":"),s=t.length>1?t[0]:"",i=t.length>1?t[1]:t[0],o=t.length>2?t[2]:null,r=null;r=["append","backspace","space","clear","goto"].indexOf(i)>=0?this[i].bind(this,o):this.$emit.bind(this,i,this),e.push({type:"action",action:{name:i.replace(/\s+/g,"-").toLowerCase(),callable:r},value:s,args:o}),a=null}else null!==a?a+=t:(t===s&&(t="|"),t===i&&(t="{"),t===o&&(t="}"),e.push({type:"char",action:{name:null,callable:this.append.bind(this,t)},value:t,args:null}))}),e})},valid(){return!this.pattern||this.value.match(new RegExp(this.pattern))}},methods:{mutate(t){this.maxlength>0&&(t=t.slice(0,this.maxlength)),this.$emit("input",t)},append(t){this.mutate(this.value+t)},backspace(){this.mutate(this.value.slice(0,this.value.length-1))},space(){this.append(" ")},goto(t){if(!Array.isArray(this.layouts))throw new Error("A single non-array layout was provided.");if(!(t>=0&&t{window.print()},500)}}}},function(t,e,a){"use strict";e.a={name:"ReceiptPrintHtml",props:{printdata:{type:Object,default:()=>({})},settings:{type:Object,default:()=>({})}},methods:{formatDate:t=>(t=new Date(t)).toLocaleString()}}},function(t,e,a){"use strict";e.a={data:()=>({viewNotePopover:!1,customerNote:""}),computed:{hotkeys(){return{f6:this.openNote,esc:this.closeNote}}},methods:{openNote(t){t.preventDefault(),this.viewNotePopover=!0,setTimeout(()=>{jQuery(this.$refs.customernote).focus()},500)},closeNote(){this.viewNotePopover=!1},addCustomerNote(){this.$emit("addnote",this.customerNote),this.viewNotePopover=!1,this.customerNote=""}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";var s=r(a(139)),i=r(a(143)),o=r(a(27));function r(t){return t&&t.__esModule?t:{default:t}}var n=wepos_get_lib("Vue");n.config.productionTip=!1,new n({el:"#vue-frontend-app",router:i.default,store:o.default,render:function(t){return t(s.default)},created:function(){this.setLocaleData(wepos.i18n.wepos)}})},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a(60),i=a(142),o=!1;var r=function(t){o||a(140)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/App.vue",e.default=n.exports},function(t,e){},,function(t,e,a){"use strict";var s=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"vue-frontend-app"}},[e("router-view")],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s,i=a(144),o=(s=i)&&s.__esModule?s:{default:s};var r=wepos_get_lib("Vue"),n=wepos_get_lib("Router");r.use(n),e.default=new n({routes:wepos.hooks.applyFilters("wepos_frontend_routes",[{path:"/",name:"Home",component:o.default}])})},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a(61),i=a(171),o=!1;var r=function(t){o||a(145)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Home.vue",e.default=n.exports},function(t,e){},function(t,e,a){"use strict";var s=a(62),i=a(148),o=!1;var r=function(t){o||a(147)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Overlay.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this.$createElement,e=this._self._c||t;return this.show?e("div",{staticClass:"overlay"}):this._e()};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=a(63),i=a(151),o=!1;var r=function(t){o||a(150)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/ProductSearch.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.outside,expression:"outside"}],staticClass:"search-box"},[a("form",{attrs:{action:"",autocomplete:"off"},on:{submit:function(e){e.preventDefault(),t.handleProductScan(e)}}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.serachInput,expression:"serachInput"}],ref:"productSearch",attrs:{type:"text",name:"search",id:"product-search",placeholder:t.placeholder},domProps:{value:t.serachInput},on:{focus:function(e){e.preventDefault(),t.triggerFocus(e)},keyup:function(e){e.preventDefault(),t.searchProduct(e)},input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),"product"==t.mode?a("span",{staticClass:"search-icon flaticon-musica-searcher"}):t._e(),t._v(" "),"scan"==t.mode?a("span",{staticClass:"search-icon flaticon-supermarket-scanner"}):t._e(),t._v(" "),a("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"search-type"},[a("a",{class:{active:"product"==t.mode},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.changeMode("product")}}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),a("a",{class:{active:"scan"==t.mode},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.changeMode("scan")}}},[t._v(t._s(t.__("Scan","wepos")))])]),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.showResults&&"product"==t.mode,expression:"showResults && mode=='product'"}],staticClass:"search-result"},[t.searchableProduct.length?a("div",[a("keyboard-control",{attrs:{listLength:t.searchableProduct.length},on:{selected:t.selectedHandler,"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.selectedIndex;return t._l(t.searchableProduct,function(e,i){return a("li",{key:i,staticClass:"product-search-item",class:{selected:i===s}},["simple"==e.type?[a("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(a){t.addToCartAction(e)}}},[t._v(t._s(e.name)+"\n "),a("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?a("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),a("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e(),t._v(" "),"variable"==e.type?[a("a",{attrs:{href:"#"},on:{click:function(a){a.preventDefault(),t.selectVariation(e)}}},[t._v(t._s(e.name)+"\n "),a("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?a("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),a("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e()],2)})}}])})],1):a("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No product found","wepos"))+"\n ")]),t._v(" "),a("div",{staticClass:"suggession"},[a("span",{staticClass:"term"},[a("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),a("span",{staticClass:"term"},[a("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),a("span",{staticClass:"term"},[a("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showVariationModal?a("modal",{attrs:{title:t.__("Select Variations","wepos"),width:"500px",height:"auto",footer:!0,header:!0},on:{close:function(e){t.showVariationModal=!1}}},[a("template",{slot:"body"},t._l(t.selectedVariationProduct.attributes,function(e){return a("div",{staticClass:"variation-attribute-wrapper"},[a("div",{staticClass:"attribute"},[a("p",[t._v(t._s(e.name))]),t._v(" "),a("div",{staticClass:"options"},[t._l(e.options,function(s){return[a("label",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.chosenAttribute[e.name],expression:"chosenAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:s,checked:t._q(t.chosenAttribute[e.name],s)},on:{change:function(a){t.$set(t.chosenAttribute,e.name,s)}}}),t._v(" "),a("div",{staticClass:"box"},[t._v("\n "+t._s(s)+"\n ")])])]})],2)])])})),t._v(" "),a("template",{slot:"footer"},[a("button",{staticClass:"add-variation-btn",attrs:{disabled:t.attributeDisabled},on:{click:function(e){t.addVariationProduct()}}},[t._v(t._s(t.__("Add Product","wepos")))])])],2):t._e()],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=a(66),i=a(154),o=!1;var r=function(t){o||a(153)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/CustomerSearch.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onblur,expression:"onblur"},{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"customer-search-box"},[a("form",{attrs:{action:"",autocomplete:"off"}},[a("svg",{staticClass:"customer-icon",attrs:{width:"19px",height:"19px",viewBox:"0 0 19 19",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[a("defs",[a("linearGradient",{attrs:{x1:"14.5524094%",y1:"14.6909544%",x2:"82.7722259%",y2:"85.2519444%",id:"linearGradient-1"}},[a("stop",{attrs:{"stop-color":"#C444FB",offset:"0%"}}),t._v(" "),a("stop",{attrs:{"stop-color":"#5B56D7",offset:"100%"}})],1)],1),t._v(" "),a("g",{attrs:{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[a("g",{attrs:{id:"POS-Design---Dokan-P2",transform:"translate(-759.000000, -27.000000)"}},[a("g",{attrs:{id:"Group",transform:"translate(759.000000, 27.000000)"}},[a("circle",{attrs:{id:"Oval",fill:"url(#linearGradient-1)","fill-rule":"nonzero",cx:"9.5",cy:"9.5",r:"9.5"}}),t._v(" "),a("g",{attrs:{id:"flaticon1543304699-svg-2",transform:"translate(9.500000, 9.500000) scale(-1, 1) translate(-9.500000, -9.500000) translate(6.000000, 5.000000)"}},[a("g",{attrs:{id:"flaticon1543304699-svg"}},[a("path",{attrs:{d:"M3.31578947,4.40159143 C4.27870463,4.40159143 5.0593751,3.41627143 5.0593751,2.20080857 C5.0593751,0.98532 4.80306952,0 3.31578947,0 C1.82850943,0 1.57215436,0.98532 1.57215436,2.20080857 C1.57215436,3.41627143 2.35282482,4.40159143 3.31578947,4.40159143 Z",id:"Path",fill:"#FFFFFF"}}),t._v(" "),a("path",{attrs:{d:"M0.0616980658,7.82884897 C0.0604730658,7.62453402 0.0592480658,7.77128348 0.0616980658,7.82884897 Z",id:"Path",fill:"#000000"}}),t._v(" "),a("path",{attrs:{d:"M6.64682715,7.85749962 C6.65070632,7.82585407 6.64815424,7.63794608 6.64682715,7.85749962 Z",id:"Path",fill:"#000000"}}),t._v(" "),a("path",{attrs:{d:"M6.60522584,7.67306571 C6.57293401,5.5557 6.30682954,4.95236571 4.27051414,4.57045714 C4.27051414,4.57045714 3.98387156,4.95002571 3.31576473,4.95002571 C2.64765789,4.95002571 2.36096583,4.57045714 2.36096583,4.57045714 C0.34687117,4.9482 0.0645836606,5.54258571 0.0274666143,7.60428 C0.0244230165,7.77263143 0.0230125687,7.78147714 0.0224681854,7.76193429 C0.0225919089,7.79855143 0.0227403771,7.86628286 0.0227403771,7.98438857 C0.0227403771,7.98438857 0.507538492,9 3.31576473,9 C6.12394148,9 6.60878908,7.98438857 6.60878908,7.98438857 C6.60878908,7.90850571 6.60883857,7.85574 6.6089128,7.81984286 C6.60836842,7.83192857 6.60727965,7.80850286 6.60522584,7.67306571 Z",id:"Path",fill:"#FFFFFF"}})])])])])])]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.serachInput,expression:"serachInput"}],ref:"customerSearch",attrs:{type:"text",name:"customer_search",id:"customer-search",placeholder:t.__("Search customer","wepos")},domProps:{value:t.serachInput},on:{focus:function(e){e.preventDefault(),t.triggerFocus(e)},keyup:t.searchCustomer,input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),a("span",{staticClass:"add-new-customer flaticon-add",on:{click:function(e){e.preventDefault(),t.addNewCustomer()}}}),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.showCustomerResults,expression:"showCustomerResults"}],staticClass:"search-result"},[t.customers.length?a("div",[a("keyboard-control",{attrs:{listLength:t.customers.length},on:{selected:t.selectedHandler,"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.selectedIndex;return t._l(t.customers,function(e,i){return a("li",{key:i,staticClass:"customer-search-item",class:{selected:i===s}},[a("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(a){t.selectCustomer(e)}}},[a("span",{staticClass:"avatar wepos-left"},[a("img",{attrs:{src:e.avatar_url,alt:e.first_name+" "+e.last_name}})]),t._v(" "),a("span",{staticClass:"name wepos-left"},[t._v(t._s(e.first_name+" "+e.last_name)),a("span",{staticClass:"metadata"},[t._v(t._s(e.email))])]),t._v(" "),a("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])])})}}])})],1):a("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No customer found","wepos"))+"\n ")]),t._v(" "),a("div",{staticClass:"suggession"},[a("span",{staticClass:"term"},[a("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),a("span",{staticClass:"term"},[a("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),a("span",{staticClass:"term"},[a("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showNewCustomerModal?a("modal",{attrs:{title:t.__("Add New Customer","wepos"),width:"700px",footer:!0,header:!0},on:{close:t.closeNewCustomerModal}},[a("template",{slot:"body"},[a("div",{staticClass:"wepos-new-customer-form"},[a("form",{staticClass:"wepos-form",attrs:{action:"",autocomplete:"off"}},[a("div",{staticClass:"form-row col-2"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.first_name,expression:"customer.first_name"}],attrs:{type:"text",placeholder:t.__("First Name","wepos")},domProps:{value:t.customer.first_name},on:{input:function(e){e.target.composing||t.$set(t.customer,"first_name",e.target.value)}}}),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.last_name,expression:"customer.last_name"}],attrs:{type:"text",placeholder:t.__("Last Name","wepos")},domProps:{value:t.customer.last_name},on:{input:function(e){e.target.composing||t.$set(t.customer,"last_name",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.email,expression:"customer.email"}],attrs:{type:"email",placeholder:t.__("Email","wepos")},domProps:{value:t.customer.email},on:{input:function(e){e.target.composing||t.$set(t.customer,"email",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row col-2"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.address_1,expression:"customer.address_1"}],attrs:{type:"text",placeholder:t.__("Address 1","wepos")},domProps:{value:t.customer.address_1},on:{input:function(e){e.target.composing||t.$set(t.customer,"address_1",e.target.value)}}}),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.address_2,expression:"customer.address_2"}],attrs:{type:"text",placeholder:t.__("Address 2 (optional)","wepos")},domProps:{value:t.customer.address_2},on:{input:function(e){e.target.composing||t.$set(t.customer,"address_2",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row col-2"},[a("multiselect",{staticClass:"wepos-multiselect customer-country",staticStyle:{width:"48.5%","margin-right":"20px"},attrs:{options:t.getCountryList,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a country","wepos"),"track-by":"code",label:"name"},on:{select:t.handleCountrySelect,remove:t.removeCountrySelect},scopedSlots:t._u([{key:"singleLabel",fn:function(e){return[a("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[a("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedCountry,callback:function(e){t.selectedCountry=e},expression:"selectedCountry"}},[a("template",{slot:"noResult"},[a("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2),t._v(" "),t.stateList.length>0?[a("multiselect",{staticClass:"wepos-multiselect customer-state",staticStyle:{width:"48.5%"},attrs:{options:t.stateList,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a state","wepos"),"track-by":"code",label:"name"},on:{remove:t.removeStateSelect},scopedSlots:t._u([{key:"singleLabel",fn:function(e){return[a("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[a("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedState,callback:function(e){t.selectedState=e},expression:"selectedState"}},[a("template",{slot:"noResult"},[a("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2)]:[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.state,expression:"customer.state"}],attrs:{type:"text",placeholder:t.__("States (optional)","wepos")},domProps:{value:t.customer.state},on:{input:function(e){e.target.composing||t.$set(t.customer,"state",e.target.value)}}})]],2),t._v(" "),a("div",{staticClass:"form-row col-2"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.city,expression:"customer.city"}],attrs:{type:"text",placeholder:t.__("City (optional)","wepos")},domProps:{value:t.customer.city},on:{input:function(e){e.target.composing||t.$set(t.customer,"city",e.target.value)}}}),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.postcode,expression:"customer.postcode"}],attrs:{type:"text",placeholder:t.__("Zip/Postal Code (optional)","wepos")},domProps:{value:t.customer.postcode},on:{input:function(e){e.target.composing||t.$set(t.customer,"postcode",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.phone,expression:"customer.phone"}],attrs:{type:"text",placeholder:t.__("Phone (optional)","wepos")},domProps:{value:t.customer.phone},on:{input:function(e){e.target.composing||t.$set(t.customer,"phone",e.target.value)}}})])])])]),t._v(" "),a("template",{slot:"footer"},[a("button",{staticClass:"add-new-customer-btn add-variation-btn",attrs:{disabled:t.isDisabled},on:{click:function(e){t.createCustomer()}}},[t._v(t._s(t.__("Add Customer","wepos")))])])],2):t._e()],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=a(67),i=a(160),o=!1;var r=function(t){o||a(156)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/FeeKeypad.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=a(68),i=a(159),o=!1;var r=function(t){o||a(158)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Keyboard.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("aside",{staticClass:"vue-keyboard",class:{full:t.full,empty:t.empty,valid:t.valid,invalid:!t.valid},attrs:{role:"application","data-value":t.value,"data-layout":t.layout}},t._l(t.buttons,function(e){return a("div",{staticClass:"vue-keyboard-row",attrs:{role:"row","data-keys":e.length}},t._l(e,function(e){return a("button",{staticClass:"vue-keyboard-key",class:e.type,attrs:{role:"button","data-args":e.args,"data-text":e.value,"data-action":e.action.name},domProps:{innerHTML:t._s(e.value)},on:{click:function(t){t.preventDefault(),e.action.callable(t)}}})}))}))};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-fee-keypad-wrap",class:t.className},[a("v-popover",{attrs:{offset:"5","popover-base-class":"fee-keypad tooltip popover",placement:"top",open:t.viewFeeKeypad}},[a("a",{attrs:{href:"#"},on:{click:t.showFeeKeypad}},[t._v("+ "+t._s(t.name))]),t._v(" "),a("template",{slot:"popover"},[a("form",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.displayValue,expression:"displayValue"}],ref:"feeinput",attrs:{type:"text"},domProps:{value:t.displayValue},on:{keyup:t.inputChange,input:function(e){e.target.composing||(t.displayValue=e.target.value)}}})]),t._v(" "),a("keyboard",{attrs:{layouts:t.layout()},on:{percent:t.percentFee,flat:t.flatFee,input:t.change},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}})],1)],2)],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},,function(t,e,a){"use strict";var s=a(70),i=a(164),o=!1;var r=function(t){o||a(163)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/PrintReceipt.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"wepos-print-receipt"}},[a("button",{staticClass:"print-btn",on:{click:function(e){e.preventDefault(),t.printReceipt()}}},[a("span",{staticClass:"icon flaticon-printer"}),t._v(" "),a("span",{staticClass:"label"},[t._v(t._s(t.__("Print Receipt","wepos")))])])])};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=a(71),i=a(167),o=!1;var r=function(t){o||a(166)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/PrintReceiptHtml.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.settings.wepos_receipts?a("div",{staticClass:"wepos-checkout-print-wrapper"},[a("div",{staticClass:"header",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_header)}}),t._v(" "),a("div",{staticClass:"order-info"},[a("span",{staticClass:"wepos-left"},[a("strong",[t._v(t._s(t.__("Order ID","wepos"))+": #"+t._s(t.printdata.order_id))])]),t._v(" "),a("span",{staticClass:"wepos-right"},[a("strong",[t._v(t._s(t.__("Order Date","wepos"))+": "+t._s(t.formatDate(t.printdata.order_date)))])]),t._v(" "),a("div",{staticClass:"wepos-clearfix"})]),t._v(" "),a("div",{staticClass:"content"},[a("table",{staticClass:"sale-summary"},[a("tbody",[t._l(t.printdata.line_items,function(e){return a("tr",[a("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0?a("div",{staticClass:"attribute"},[a("ul",t._l(e.attribute,function(e){return a("li",[a("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),a("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),a("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),a("td",{staticClass:"price"},[e.on_sale?[a("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))]),t._v(" "),a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))])]:[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}),t._v(" "),a("tr",{staticClass:"cart-meta-data"},[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?a("span",{staticClass:"metadata"},[t._v("\n "+t._s(t.__("Includes Tax","wepos"))+" "+t._s(t.formatPrice(t.$store.getters["Cart/getTotalLineTax"]))+"\n ")]):t._e()]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.subtotal)))])]),t._v(" "),t._l(t.printdata.fee_lines,function(e,s){return a("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Discount","wepos"))+" "),a("span",{staticClass:"metadata"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Fee","wepos"))+" "),a("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]],2)}),t._v(" "),t.printdata.taxtotal?a("tr",[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.taxtotal)))])]):t._e(),t._v(" "),a("tr",[a("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.ordertotal)))])]),t._v(" "),t._m(0),t._v(" "),a("tr",[a("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Payment method","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.printdata.gateway.title||""))])]),t._v(" "),(t.printdata.gateway.id="wepos_cash")?[a("tr",[a("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Cash Given","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.cashamount)))])]),t._v(" "),a("tr",[a("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Change Money","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.changeamount)))])])]:t._e()],2)])]),t._v(" "),a("div",{staticClass:"footer",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_footer)}})]):t._e()};s._withStripped=!0;var i={render:s,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("tr",{staticClass:"divider"},[e("td",{attrs:{colspan:"3"}})])}]};e.a=i},function(t,e,a){"use strict";var s=a(72),i=a(170),o=!1;var r=function(t){o||a(169)},n=a(0)(s.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/CustomerNote.vue",e.a=n.exports},function(t,e){},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-custom-note-wrap"},[a("v-popover",{attrs:{offset:"5","popover-base-class":"customer-note tooltip popover",placement:"top",open:t.viewNotePopover}},[a("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openNote(e)}}},[t._v(t._s(t.__("Add Note","wepos")))]),t._v(" "),a("template",{slot:"popover"},[a("form",{on:{submit:function(e){e.preventDefault(),t.addCustomerNote(e)}}},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:t.customerNote,expression:"customerNote"}],ref:"customernote",attrs:{id:"",cols:"30",rows:"5"},domProps:{value:t.customerNote},on:{input:function(e){e.target.composing||(t.customerNote=e.target.value)}}}),t._v(" "),a("button",{staticClass:"add-note-btn",attrs:{type:"submit",disabled:""==t.customerNote}},[t._v(t._s(t.__("Add Note","wepos")))])])])],2)],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]};e.a=i},function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],attrs:{id:"wepos-main"}},[a("div",{staticClass:"content-product"},[a("div",{staticClass:"top-panel wepos-clearfix"},[a("div",{staticClass:"search-bar"},[a("product-search",{attrs:{products:t.products,settings:t.settings},on:{onProductAdded:t.addToCart}})],1),t._v(" "),a("div",{staticClass:"category"},[a("multiselect",{staticClass:"wepos-multiselect",attrs:{options:t.categories,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a category","wepos")},on:{select:t.handleCategorySelect,remove:t.handleCategoryRemove},scopedSlots:t._u([{key:"singleLabel",fn:function(e){return[t._v("\n "+t._s(e.option.name)+"\n ")]}},{key:"option",fn:function(e){return[a("span",[t._l(e.option.level,function(e){return[t._v("\n  \n ")]}),t._v("\n "+t._s(e.option.name)+"\n ")],2)]}}]),model:{value:t.selectedCategory,callback:function(e){t.selectedCategory=e},expression:"selectedCategory"}},[a("template",{slot:"noResult"},[a("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("Not found","wepos")))])])],2)],1),t._v(" "),a("div",{staticClass:"toggle-view"},[a("div",{staticClass:"product-toggle"},[a("span",{staticClass:"toggle-icon list-view flaticon-menu-button-of-three-horizontal-lines",class:{active:"list"==t.productView},on:{click:function(e){t.productView="list"}}}),t._v(" "),a("span",{staticClass:"toggle-icon grid-view flaticon-menu",class:{active:"grid"==t.productView},on:{click:function(e){t.productView="grid"}}})])])]),t._v(" "),t.getBreadCrums.length>0?a("div",{staticClass:"breadcrumb"},[a("ul",[t._l(t.getBreadCrums,function(e){return[a("router-link",{attrs:{tag:"li",to:{name:"Home",query:{category:e.id}}}},[a("a",[t._v(t._s(e.name))])])]})],2),t._v(" "),a("span",{staticClass:"close-breadcrumb flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeBreadcrums(e)}}})]):t._e(),t._v(" "),a("div",{ref:"items-wrapper",staticClass:"items-wrapper",class:t.productView},[t.productLoading?t._e():[t._l(t.getFilteredProduct,function(e){return t.getFilteredProduct.length>0?a("div",{staticClass:"item"},["simple"==e.type?[a("div",{staticClass:"item-wrap",on:{click:function(a){if(!("button"in a)&&t._k(a.keyCode,"prevnt",void 0,a.key))return null;t.addToCart(e)}}},[a("div",{staticClass:"img"},[a("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"==t.productView?a("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n\n ")]):a("div",{staticClass:"title"},[a("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),a("ul",{staticClass:"meta"},[e.sku?a("li",[a("span",{staticClass:"label"},[t._v(t._s(t.__("Sku :","wepos")))]),t._v(" "),a("span",{staticClass:"value"},[t._v(t._s(e.sku))])]):t._e(),t._v(" "),a("li",[a("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),a("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),a("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})])]:t._e(),t._v(" "),"variable"==e.type?[a("v-popover",{attrs:{offset:"10","popover-base-class":"product-variation tooltip popover",placement:"left-end"}},[a("div",{staticClass:"item-wrap",on:{click:function(a){t.selectVariationProduct(e)}}},[a("div",{staticClass:"img"},[a("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"==t.productView?a("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n ")]):a("div",{staticClass:"title"},[a("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),a("ul",{staticClass:"meta"},[a("li",[a("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),a("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),a("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})]),t._v(" "),a("template",{slot:"popover"},[a("div",{staticClass:"variation-header"},[t._v("\n "+t._s(t.__("Select Variations","wepos"))+"\n ")]),t._v(" "),a("div",{staticClass:"variation-body"},[t._l(e.attributes,function(e){return[a("div",{staticClass:"attribute"},[a("p",[t._v(t._s(e.name))]),t._v(" "),a("div",{staticClass:"options"},[t._l(e.options,function(s){return[a("label",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedAttribute[e.name],expression:"selectedAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:s,checked:t._q(t.selectedAttribute[e.name],s)},on:{change:function(a){t.$set(t.selectedAttribute,e.name,s)}}}),t._v(" "),a("div",{staticClass:"box"},[t._v("\n "+t._s(s)+"\n ")])])]})],2)])]})],2),t._v(" "),a("div",{staticClass:"variation-footer"},[a("button",{attrs:{disabled:t.attributeDisabled},on:{click:function(e){e.preventDefault(),t.addVariationProduct(e)}}},[t._v(t._s(t.__("Add Product","wepos")))])])])],2)]:t._e()],2):t._e()}),t._v(" "),t.getFilteredProduct.length<=0?a("div",{staticClass:"no-product-found"},[a("img",{attrs:{src:t.wepos.assets_url+"/images/no-product.png",alt:"",width:"120px"}}),t._v(" "),a("p",[t._v(t._s(t.__("No Product Found","wepos")))])]):t._e()],t._v(" "),t.productLoading?a("div",{staticClass:"product-loading"},[a("div",{staticClass:"spinner spinner-loading"})]):t._e()],2)]),t._v(" "),a("div",{staticClass:"content-cart"},[a("div",{staticClass:"top-panel"},[a("customer-search",{on:{onCustomerSelected:t.selectCustomer}}),t._v(" "),a("div",{staticClass:"action"},[a("div",{staticClass:"more-options"},[a("v-popover",{attrs:{offset:"5","popover-base-class":"wepos-dropdown-menu tooltip popover",placement:"bottom-end",open:t.showQucikMenu}},[a("button",{staticClass:"wepos-button",on:{click:function(e){e.preventDefault(),t.openQucikMenu()}}},[a("span",{staticClass:"more-icon flaticon-more"})]),t._v(" "),a("template",{slot:"popover"},[a("ul",[t._l(t.quickLinkListStart,function(t,e){return a(t,{key:e-"1",tag:"component"})}),t._v(" "),a("li",[a("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.emptyCart(e)}}},[a("span",{staticClass:"flaticon-empty-cart quick-menu-icon"}),t._v(t._s(t.__("Empty Cart","wepos")))])]),t._v(" "),a("li",[a("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openHelp(e)}}},[a("span",{staticClass:"flaticon-information quick-menu-icon"}),t._v(t._s(t.__("Help","wepos")))])]),t._v(" "),a("li",{staticClass:"divider"}),t._v(" "),t._l(t.quickLinkList,function(t,e){return a(t,{key:e,tag:"component"})}),t._v(" "),a("li",[a("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.logout(e)}}},[a("span",{staticClass:"flaticon-logout quick-menu-icon"}),t._v(t._s(t.__("Logout","wepos")))])])],2)])],2)],1)])],1),t._v(" "),t._l(t.beforCartPanels,function(t,e){return a(t,{key:e,tag:"component"})}),t._v(" "),t.settings.wepos_general?a("div",{staticClass:"cart-panel"},[a("div",{staticClass:"cart-content"},[a("table",{staticClass:"cart-table"},[a("thead",[a("tr",[a("th",{attrs:{width:"65%"}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),a("th",{attrs:{width:"15%"}},[t._v(t._s(t.__("Qty","wepos")))]),t._v(" "),a("th",{attrs:{width:"30%"}},[t._v(t._s(t.__("Price","wepos")))]),t._v(" "),a("th"),t._v(" "),a("th")])]),t._v(" "),a("tbody",[t.cartdata.line_items.length>0?[t._l(t.cartdata.line_items,function(e,s){return[a("tr",[a("td",{staticClass:"name",on:{click:function(a){t.toggleEditQuantity(e,s)}}},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?a("div",{staticClass:"attribute"},[a("ul",t._l(e.attribute,function(e){return a("li",[a("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),a("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),a("td",{staticClass:"qty",on:{click:function(a){t.toggleEditQuantity(e,s)}}},[t._v(t._s(e.quantity))]),t._v(" "),a("td",{staticClass:"price",on:{click:function(a){t.toggleEditQuantity(e,s)}}},[e.on_sale?[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),a("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-right-arrow",class:{open:e.editQuantity},on:{click:function(a){a.preventDefault(),t.toggleEditQuantity(e,s)}}})]),t._v(" "),a("td",{staticClass:"remove"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeItem(s)}}})])]),t._v(" "),e.editQuantity?a("tr",{staticClass:"update-quantity-wrap"},[a("td",{attrs:{colspan:"5"}},[a("span",{staticClass:"qty"},[t._v(t._s(t.__("Quantity","wepos")))]),t._v(" "),a("span",{staticClass:"qty-number"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.quantity,expression:"item.quantity"}],attrs:{type:"number",min:"1",step:"1"},domProps:{value:e.quantity},on:{input:function(a){a.target.composing||t.$set(e,"quantity",a.target.value)}}})]),t._v(" "),a("span",{staticClass:"qty-action"},[a("a",{staticClass:"add",attrs:{href:"#"},on:{click:function(a){a.preventDefault(),t.addQuantity(e,s)}}},[t._v("+")]),t._v(" "),a("a",{staticClass:"minus",attrs:{href:"#"},on:{click:function(a){a.preventDefault(),t.removeQuantity(e,s)}}},[t._v("-")])])])]):t._e()]})]:[a("tr",{staticClass:"no-item"},[a("td",{attrs:{colspan:"5"}},[a("img",{attrs:{src:t.wepos.assets_url+"/images/empty-cart.png",alt:"",width:"120px"}}),t._v(" "),a("p",[t._v(t._s(t.__("Cart Empty","wepos")))])])])]],2)])]),t._v(" "),a("div",{staticClass:"cart-calculation"},[a("form",{attrs:{autocomplete:"off"}},[a("table",{staticClass:"cart-total-table"},[a("tbody",[a("tr",{staticClass:"cart-meta-data"},[a("td",{staticClass:"label"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart&&t.$store.getters["Cart/getTotalLineTax"]>0?a("span",{staticClass:"name"},[t._v("\n "+t._s(t.__("Includes Tax","wepos"))+" "+t._s(t.formatPrice(t.$store.getters["Cart/getTotalLineTax"]))+"\n ")]):t._e()]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))]),t._v(" "),a("td",{staticClass:"action"})]),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,function(e,s){return a("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[a("td",{staticClass:"label"},[t._v(t._s(t.__("Discount","wepos"))+" "),a("span",{staticClass:"name"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("td",{staticClass:"price"},[t._v("−"+t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(s)}}})])]:[t.cartdata.fee_lines[s].isEdit?[a("td",{staticClass:"label",attrs:{colspan:"2"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.name,expression:"feeData.name"}],ref:"fee_name",refInFor:!0,staticClass:"fee-name",attrs:{type:"text",placeholder:t.__("Fee Name","wepos")},domProps:{value:t.feeData.name},on:{input:function(e){e.target.composing||t.$set(t.feeData,"name",e.target.value)}}}),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.value,expression:"feeData.value"}],ref:"fee_total",refInFor:!0,staticClass:"fee-amount",attrs:{type:"number",min:"0",step:"any",placeholder:t.__("Total","wepos")},domProps:{value:t.feeData.value},on:{input:function(e){e.target.composing||t.$set(t.feeData,"value",e.target.value)}}}),t._v(" "),"yes"==t.settings.wepos_general.enable_fee_tax?[a("label",{attrs:{for:"fee-tax-status"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_status,expression:"feeData.tax_status"}],staticClass:"fee-tax-status",attrs:{type:"checkbox",id:"fee-tax-status","true-value":"taxable","false-value":"none"},domProps:{checked:Array.isArray(t.feeData.tax_status)?t._i(t.feeData.tax_status,null)>-1:t._q(t.feeData.tax_status,"taxable")},on:{change:function(e){var a=t.feeData.tax_status,s=e.target,i=s.checked?"taxable":"none";if(Array.isArray(a)){var o=t._i(a,null);s.checked?o<0&&(t.feeData.tax_status=a.concat([null])):o>-1&&(t.feeData.tax_status=a.slice(0,o).concat(a.slice(o+1)))}else t.$set(t.feeData,"tax_status",i)}}}),t._v(" "+t._s(t.__("Taxable","wepos")))]),t._v(" "),"taxable"==t.feeData.tax_status?a("select",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_class,expression:"feeData.tax_class"}],staticClass:"fee-tax-class",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.feeData,"tax_class",e.target.multiple?a:a[0])}}},t._l(t.availableTax,function(e){return a("option",{domProps:{value:"standard"==e.class?"":e.class}},[t._v(t._s(t.unSanitizeString(e.class))+" - "+t._s(e.percentage_rate))])})):t._e()]:t._e(),t._v(" "),a("button",{attrs:{disabled:""==t.feeData.name},on:{click:function(e){e.preventDefault(),t.saveFee(s)}}},[t._v(t._s(t.__("Apply","wepos")))]),t._v(" "),a("button",{staticClass:"cancel",on:{click:function(e){e.preventDefault(),t.cancelEditFee(s)}}},[t._v(t._s(t.__("Cancel","wepos")))])],2),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(s)}}})])]:[a("td",{staticClass:"label",on:{dblclick:function(e){e.preventDefault(),t.editFeeData(s)}}},[t._v(t._s(t.__("Fee","wepos"))+" "),a("span",{staticClass:"name"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(s)}}})])]]],2)}):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?a("tr",{staticClass:"tax"},[a("td",{staticClass:"label"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),a("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))]),t._v(" "),a("td",{staticClass:"action"})]):t._e(),t._v(" "),a("tr",{staticClass:"cart-action"},[a("td",{attrs:{colspan:"3"}},[a("fee-keypad",{attrs:{name:t.__("Discount","wepos"),"short-key":"discount"},on:{inputfee:t.setDiscount}}),t._v(" "),a("fee-keypad",{attrs:{name:t.__("Fee","wepos"),"short-key":"fee"},on:{inputfee:t.setFee}}),t._v(" "),""==t.orderdata.customer_note?a("customer-note",{on:{addnote:t.addCustomerNote}}):t._e()],1)]),t._v(" "),t.orderdata.customer_note?a("tr",{staticClass:"note"},[a("td",{staticClass:"note-text",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.orderdata.customer_note)+"\n ")]),t._v(" "),a("td",{staticClass:"action"},[a("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeCustomerNote(e)}}})])]):t._e(),t._v(" "),a("tr",{staticClass:"pay-now",on:{click:function(e){t.initPayment()}}},[a("td",[t._v(t._s(t.__("Pay Now","wepos")))]),t._v(" "),a("td",{staticClass:"amount"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))]),t._v(" "),t._m(0)])],2)])])])]):t._e()],2),t._v(" "),t.showPaymentReceipt?a("modal",{attrs:{width:"600px",height:"400px"},on:{close:function(e){t.createNewSale()}}},[a("template",{slot:"body"},[a("div",{staticClass:"wepos-payment-receipt"},[a("div",{staticClass:"sale-completed"},[a("img",{attrs:{src:t.wepos.assets_url+"/images/sale-completed.png",alt:"",width:"120px"}}),t._v(" "),a("h2",[t._v(t._s(t.__("Sale Completed","wepos")))])]),t._v(" "),a("div",{staticClass:"print-section"},[a("print-receipt"),t._v(" "),a("button",{staticClass:"new-sale-btn",on:{click:function(e){e.preventDefault(),t.createNewSale()}}},[a("span",{staticClass:"icon flaticon-add"}),t._v(" "),a("span",{staticClass:"label"},[t._v(t._s(t.__("New Sale","wepos")))])])],1)])])],2):t._e(),t._v(" "),t.showHelp?a("modal",{attrs:{width:"700px",height:"500px"},on:{close:function(e){t.closeHelp()}}},[a("template",{slot:"body"},[a("div",{staticClass:"wepos-help-wrapper"},[a("h2",[t._v(t._s(t.__("Shortcut Keys","wepos")))]),t._v(" "),a("ul",[a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f1")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Search Product","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f2")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Scan Product","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f3")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Toggle Product View","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f4")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Add Fee in cart","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f5")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Add Discount in cart","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f6")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Add Customer note","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f7")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Customer Search","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("shift+f7")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Add new Customer","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f8")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Create New Sale","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("shift+f8")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Empty your cart","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f9")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Go to payment receipt","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("f10")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Process Payment","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("ctrl/cmd+p")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Print Receipt","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("ctrl/cmd+?")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Show/Close(Toggle) Help","wepos")))])]),t._v(" "),a("li",[a("span",{staticClass:"code"},[a("code",[t._v("esc")])]),t._v(" "),a("span",{staticClass:"title"},[t._v(t._s(t.__("Close anything","wepos")))])])])])])],2):t._e(),t._v(" "),t.showModal?a("modal",{attrs:{width:"98%",height:"95vh"},on:{close:function(e){t.backToSale()}}},[a("template",{slot:"body"},[a("div",{staticClass:"wepos-checkout-wrapper"},[a("div",{staticClass:"left-content"},[a("div",{staticClass:"header"},[t._v("\n "+t._s(t.__("Sale Summary","wepos"))+"\n ")]),t._v(" "),a("div",{staticClass:"content"},[a("table",{staticClass:"sale-summary-cart"},[a("tbody",t._l(t.cartdata.line_items,function(e){return a("tr",[a("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?a("div",{staticClass:"attribute"},[a("ul",t._l(e.attribute,function(e){return a("li",[a("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),a("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),a("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),a("td",{staticClass:"price"},[e.on_sale?[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),a("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[a("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}))])]),t._v(" "),a("div",{staticClass:"footer"},[a("ul",[a("li",{staticClass:"wepos-clearfix"},[a("span",{staticClass:"wepos-left"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?a("span",{staticClass:"metadata"},[t._v("\n "+t._s(t.__("Includes Tax","wepos"))+" "+t._s(t.formatPrice(t.$store.getters["Cart/getTotalLineTax"]))+"\n ")]):t._e()]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))])]),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,function(e,s){return a("li",{staticClass:"wepos-clearfix"},["discount"==e.type?[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Discount","wepos"))+" "),a("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Fee","wepos"))+" "),a("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(e.total)))])]],2)}):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?a("li",{staticClass:"wepos-clearfix"},[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))])]):t._e(),t._v(" "),a("li",{staticClass:"wepos-clearfix"},[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),a("li",{staticClass:"wepos-clearfix"},[a("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),a("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])])],2)])]),t._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"header wepos-clearfix"},[a("h2",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),a("span",{staticClass:"pay-amount wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),a("div",{staticClass:"content"},[a("div",{staticClass:"payment-gateway"},[t.availableGateways.length>0?[t._l(t.availableGateways,function(e){return a("label",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedGateway,expression:"selectedGateway"}],attrs:{type:"radio",name:"gateway",checked:""},domProps:{value:e.id,checked:t._q(t.selectedGateway,e.id)},on:{change:function(a){t.selectedGateway=e.id}}}),t._v(" "),a("span",{staticClass:"gateway",class:"gateway-"+e.id},[t._v("\n "+t._s(e.title)+"\n ")])])}),t._v(" "),t.emptyGatewayDiv>0?t._l(t.emptyGatewayDiv,function(t){return a("label",{key:t},[a("span",{staticClass:"grid-placeholder"})])}):t._e()]:[a("p",[t._v(t._s(t.__("No gateway found","wepos")))])]],2),t._v(" "),"wepos_cash"==t.orderdata.payment_method?[a("div",{staticClass:"payment-option"},[a("div",{staticClass:"payment-amount"},[a("div",{staticClass:"input-part"},[a("div",{staticClass:"input-wrap"},[a("p",[t._v(t._s(t.__("Cash","wepos")))]),t._v(" "),a("div",{staticClass:"input-addon"},[a("span",{staticClass:"currency"},[t._v(t._s(t.wepos.currency_format_symbol))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.cashAmount,expression:"cashAmount"}],ref:"cashamount",attrs:{type:"text"},domProps:{value:t.cashAmount},on:{input:function(e){e.target.composing||(t.cashAmount=e.target.value)}}})])])]),t._v(" "),a("div",{staticClass:"change-money"},[a("p",[t._v(t._s(t.__("Change money","wepos"))+": "+t._s(t.formatPrice(t.changeAmount)))])])])])]:t._e(),t._v(" "),t._l(t.availableGatewayContent,function(e,s){return a(e,{key:s,tag:"component",attrs:{availablegateways:t.availableGateways}})})],2),t._v(" "),a("div",{staticClass:"footer wepos-clearfix"},[a("a",{staticClass:"back-btn wepos-left",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.backToSale()}}},[t._v(t._s(t.__("Back to Sale","wepos")))]),t._v(" "),a("button",{staticClass:"process-checkout-btn wepos-right",attrs:{disabled:!t.ableToProcess()},on:{click:function(e){e.preventDefault(),t.processPayment(e)}}},[t._v(t._s(t.__("Process Payment","wepos")))])])])])])],2):t._e(),t._v(" "),a("overlay",{attrs:{show:t.showOverlay}}),t._v(" "),t.showReceiptHtml?a("print-receipt-html",{directives:[{name:"show",rawName:"v-show",value:t.createprintreceipt,expression:"createprintreceipt"}],attrs:{printdata:t.printdata,settings:t.settings}}):t._e(),t._v(" "),t._l(t.afterMainContents,function(e,s){return a(e,{key:s,tag:"component",attrs:{orderdata:t.orderdata,printdata:t.printdata}})})],2)};s._withStripped=!0;var i={render:s,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("td",{staticClass:"icon"},[e("span",{staticClass:"flaticon-right-arrow"})])}]};e.a=i}]),[138]); diff --git a/assets/less/style.less b/assets/less/style.less old mode 100644 new mode 100755 index 3bcc4138..dde0a194 --- a/assets/less/style.less +++ b/assets/less/style.less @@ -1156,3 +1156,153 @@ div:focus, span:focus, button:focus, input:focus { } } + +/* WePOS Mobile Styles */ + +@media screen and (max-width: 950px) { + #wepos-main { + flex-direction: column; + .content-product { + margin-right: unset !important; + .items-wrapper.grid { + .item { + flex-grow: 1; + flex-basis: 25% !important; + } + margin: 0 !important; + width: calc(100vw - 10px); + height: unset !important; + min-height: 100vh; + } + .top-panel { + > * { + display: block !important; + float: none !important; + } + .search-bar { + width: 100% !important; + margin-bottom: 10px; + .search-box { + input#product-search { + padding-right: 10px !important; + } + .search-type { + display: none; + } + span.search-icon { + top: 5px !important; + } + } + } + .toggle-view { + display: none !important; + } + .category { + width: 100% !important; + } + } + } + .content-cart { + min-height: 200px; + margin-top: 10px; + .top-panel { + .customer-search-box span.add-new-customer { + top: 5px !important; + } + } + .cart-panel .cart-content { + table.cart-table { + // height: fit-content; + tbody tr td { + font-size: 10px !important; + } + } + } + } + .wepos-modal { + .wepos-modal-main.has-footer { + background-color: #fbfcfe; + } + .wepos-modal-content { + top: 2.5vh !important; + left: 5vw; + transform: none; + width: 88vw !important; + height: 90vw !important; + } + .wepos-new-customer-form .wepos-form { + display: flex; + flex-direction: column; + } + .wepos-form .form-row { + flex-direction: column !important; + &.col-2, + &.col-3 { + flex-direction: column !important; + } + input, + select { + &:active, + &:focus { + border-color: #a0a4a7; + } + } + .multiselect.wepos-multiselect.customer-country { + width: 100% !important; + height: 35px; + margin-bottom: 10px; + } + .wepos-multiselect .multiselect__tags { + height: 35px; + } + } + .wepos-checkout-wrapper { + flex-direction: column; + .right-content { + background-color: #fbfcfe; + .content { + .payment-option .payment-amount { + .input-part .input-wrap { + width: unset; + } + .change-money p { + line-height: 19px; + } + } + .payment-gateway label { + flex: 1 0 100%; + span.grid-placeholder:empty { + display: none; + } + } + } + .header, + .footer { + display: flex; + flex-direction: column; + a.back-btn { + margin-bottom: 10px; + } + } + } + } + footer { + bottom: unset !important; + } + } + } + .product-loading { + display: flex; + align-items: space-around; + } + .spinner { + position: absolute; + width: 125px; + height: 125px; + top: 40%; + left: 45%; + transform: translate(-45%, -40%) + } +} + +/* End WePOS Mobile Styles */ diff --git a/assets/src/frontend/components/FeeKeypad.vue b/assets/src/frontend/components/FeeKeypad.vue old mode 100644 new mode 100755 index 58fbad7a..780537c1 --- a/assets/src/frontend/components/FeeKeypad.vue +++ b/assets/src/frontend/components/FeeKeypad.vue @@ -1,7 +1,7 @@