Changeset 2089750
- Timestamp:
- 05/17/2019 09:28:58 AM (7 years ago)
- Location:
- wepos/trunk
- Files:
-
- 2 added
- 8 edited
-
assets/js/bootstrap.js (modified) (1 diff)
-
assets/js/bootstrap.min.js (modified) (1 diff)
-
assets/js/frontend.js (modified) (14 diffs)
-
assets/js/frontend.min.js (modified) (1 diff)
-
includes/api/class-customers-controller.php (added)
-
includes/api/class-products-controller.php (added)
-
includes/class-rest-api.php (modified) (6 diffs)
-
languages/wepos.pot (modified) (8 diffs)
-
readme.txt (modified) (2 diffs)
-
wepos.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wepos/trunk/assets/js/bootstrap.js
r2079800 r2089750 416 416 value: function get(path) { 417 417 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 418 419 return this.ajax(path, 'GET', this.headers(), data); 418 var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 419 420 return this.ajax(path, 'GET', headers, data); 420 421 } 421 422 }, { -
wepos/trunk/assets/js/bootstrap.min.js
r2079800 r2089750 1 pluginWebpack([2],{130:function(e,t,n){"use strict";t.a={props:{value:{type:String,required:!0},shortcodes:{type:Object,required:!1}},data(){return{editorId:this._uid,fileFrame:null}},mounted(){const e=this;window.tinymce.init({selector:`#dokan-tinymce-${this.editorId}`,branding:!1,height:200,menubar:!1,convert_urls:!1,theme:"modern",skin:"lightgray",fontsize_formats:"10px 11px 13px 14px 16px 18px 22px 25px 30px 36px 40px 45px 50px 60px 65px 70px 75px 80px",font_formats:"Arial=arial,helvetica,sans-serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Lucida=Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;",plugins:"textcolor colorpicker wplink wordpress code hr wpeditimage",toolbar:["shortcodes bold italic underline bullist numlist alignleft aligncenter alignjustify alignright link image wp_adv","formatselect forecolor backcolor blockquote hr code fontselect fontsizeselect removeformat undo redo"],setup(t){const n=[];weLo_.forEach(e.shortcodes,(e,o)=>{n.push({text:e.title,classes:"menu-section-title"}),weLo_.forEach(e.codes,(e,i)=>{n.push({text:e.title,onclick(){let n=`[${o}:${i}]`;e.default&&(n=`[${o}:${i} default="${e.default}"]`),e.text&&(n=`[${o}:${i} text="${e.text}"]`),e.plainText&&(n=e.text),t.insertContent(n)}})})}),t.addButton("image",{icon:"image",onclick(){e.browseImage(t)}}),t.on("change keyup NodeChange",()=>{e.$emit("input",t.getContent())})}})},methods:{browseImage(e){const t=this,n={id:0,url:"",type:""};if(t.fileFrame)return void t.fileFrame.open();const o=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:this.__("Select an image","wepos"),priority:20,filterable:"uploaded"})];t.fileFrame=wp.media({title:this.__("Select an image","wepos"),library:{type:""},button:{text:this.__("Select an image","wepos")},multiple:!1,states:o}),t.fileFrame.on("select",()=>{t.fileFrame.state().get("selection").map(o=>((o=o.toJSON()).id&&(n.id=o.id),o.url&&(n.url=o.url),o.type&&(n.type=o.type),t.insertImage(e,n),null))}),t.fileFrame.on("ready",()=>{t.fileFrame.uploader.options.uploader.params={type:"dokan-image-uploader"}}),t.fileFrame.open()},insertImage(e,t){if(!t.id||"image"!==t.type)return void this.alert({type:"error",text:this.__("Please select an image,","wepos")});const n=`<img src="${t.url}" alt="${t.alt}" title="${t.title}" style="max-width: 100%; height: auto;">`;e.insertContent(n)}}}},131:function(e,t,n){"use strict";t.a={name:"Modal",props:{footer:{type:Boolean,required:!1,default:!1},header:{type:Boolean,required:!1,default:!1},title:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"600px"},height:{type:String,required:!1,default:"auto"},backdropOpacity:{type:String,required:!1,default:"0.2"}},data:()=>({})}},214:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventBus=void 0;var o=m(n(28)),i=m(n(84)),r=m(n(215)),a=m(n(216)),s=m(n(354)),u=m(n(82)),l=m(n(356)),c=n(81),d=m(n(26)),f=m(n(83)),p=m(n(358));function m(e){return e&&e.__esModule?e:{default:e}}n(361),o.default.directive("tooltip",c.VTooltip),o.default.directive("close-popover",c.VClosePopover),o.default.component("v-popover",c.VPopover),o.default.component("multiselect",f.default),o.default.directive("click-outside",{bind:function(e,t,n){if("function"!=typeof t.value){var o=n.context.name,i="[Vue-click-outside:] provided expression '"+t.expression+"' is not a function, but has to be";o&&(i+="Found in component '"+o+"'"),console.warn(i)}var r=t.modifiers.bubble,a=function(n){(r||!e.contains(n.target)&&e!==n.target)&&t.value(n)};e.__vueClickOutside__=a,document.addEventListener("click",a)},unbind:function(e,t){document.removeEventListener("click",e.__vueClickOutside__),e.__vueClickOutside__=null}}),o.default.mixin(s.default),o.default.use(u.default,{defaultBoundariesElement:document.body}),o.default.use(d.default),window.wepos_get_lib=function(e){return window.wepos.libs[e]};var _=t.EventBus=new o.default;window.weLo_=a.default,window.wepos._=a.default,window.wepos.api=new r.default,window.wepos.libs.Vue=o.default,window.wepos.libs.Router=i.default,window.wepos.libs.TextEditor=l.default,window.wepos.libs.EventBus=_,window.wepos.libs.Modal=p.default,window.wepos.hooks=wp&&wp.hooks?wp.hooks:window.wepos.wpPackages.hooks,wepos.addFilter=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;wepos.hooks.addFilter(e,t,function(e){return e.push(n),e},o)}},215:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,[{key:"headers",value:function(){return{}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} ;return this.ajax(e,"GET",this.headers(),t)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.ajax(e,"POST",this.headers(),t)}},{key:"put",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.ajax(e,"PUT",this.headers(),t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.ajax(e,"DELETE",this.headers(),t)}},{key:"ajax",value:function(e,t,n,o){var i=null;return"PUT"!==t&&"DELETE"!==t||(i=t,t="POST"),jQuery.ajax({url:e,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",window.wepos.rest.nonce),i&&e.setRequestHeader("X-HTTP-Method-Override",i)},type:t,data:o})}}]),e}();t.default=i},216:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var o=u(n(218)),i=u(n(219)),r=u(n(280)),a=u(n(291)),s=u(n(351));function u(e){return e&&e.__esModule?e:{default:e}}(e=o.default.noConflict()).findIndex=i.default,e.truncate=r.default,e.includes=a.default,e.debounce=s.default,t.default=e}).call(t,n(217))},217:function(e,t){e.exports=window.wepos._},354:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(355);t.default={methods:{setLocaleData:function(e){return(0,o.setLocaleData)(e)},__:function(e,t){return(0,o.__)(e,t)},_nx:function(e,t,n,i,r){return(0,o._nx)(e,t,n,i,r)},__n:function(e,t,n,o){return _n(e,t,n,o)},sprintf:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return o.sprintf.apply(void 0,[e].concat(n))},formatPrice:function(e){return accounting.formatMoney(e,wepos.currency_format_symbol,wepos.currency_format_num_decimals,wepos.currency_format_thousand_sep,wepos.currency_format_decimal_sep,wepos.currency_format)},formatNumber:function(e){return accounting.formatNumber(e,wepos.currency_format_num_decimals,wepos.currency_format_thousand_sep,wepos.currency_format_decimal_sep)},findMatchingVariations:function(e,t){for(var n=[],o=0;o<e.length;o++){for(var i=e[o],r={},a=0;a<i.attributes.length;a++)r[i.attributes[a].name]=i.attributes[a].option;this.isMatch(r,t)&&n.push(i)}return n},isMatch:function(e,t){var n=!0;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o],r=t[o];void 0!==i&&void 0!==r&&0!==i.length&&0!==r.length&&i!==r&&(n=!1)}return n}},computed:{wepos:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){return wepos}),eventBus:function(){return wepos_get_lib("EventBus")}}}},355:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setLocaleData=i,t.getI18n=r,t.__=function(e,t){return r(t)?r(t).dgettext(t,e):e},t._x=function(e,t,n){return r(n).dpgettext(n,t,e)},t._n=function(e,t,n,o){return r(o).dngettext(o,e,t,n)},t._nx=function(e,t,n,o,i){return r(i).dnpgettext(i,o,e,t,n)};var o={};function i(e){var t=new Jed(e);o[t._textdomain]=t}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return o[e]||i({"":{}}),o[e]}t.sprintf=Jed.sprintf},356:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(130),i=n(357),r=n(0)(o.a,i.a,!1,null,null,null);r.options.__file="assets/src/admin/components/TextEditor.vue",t.default=r.exports},357:function(e,t,n){"use strict";var o=function(){var e=this.$createElement;return(this._self._c||e)("textarea",{attrs:{id:"dokan-tinymce-"+this.editorId},domProps:{value:this.value}})};o._withStripped=!0;var i={render:o,staticRenderFns:[]};t.a=i},358:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(131),i=n(360),r=!1;var a=function(e){r||n(359)},s=n(0)(o.a,i.a,!1,a,null,null);s.options.__file="assets/src/utils/components/Modal.vue",t.default=s.exports},359:function(e,t){},360:function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wepos-modal-dialog"},[n("div",{staticClass:"wepos-modal"},[n("div",{staticClass:"wepos-modal-content",style:{width:e.width}},[n("section",{class:["wepos-modal-main",{"has-footer":e.footer}]},[e.header?n("header",{staticClass:"modal-header"},[e._t("header",[n("h1",[e._v(e._s(e.title))])])],2):e._e(),e._v(" "),n("div",{staticClass:"modal-body",style:{height:e.height}},[e._t("body")],2),e._v(" "),e.footer?n("footer",{staticClass:"modal-footer"},[n("div",{staticClass:"inner"},[e._t("footer")],2)]):e._e(),e._v(" "),n("span",{staticClass:"modal-close modal-close-link flaticon-cancel-music",on:{click:function(t){e.$emit("close")}}})])])]),e._v(" "),n("div",{staticClass:"wepos-modal-backdrop",style:{opacity:e.backdropOpacity}})])};o._withStripped=!0;var i={render:o,staticRenderFns:[]};t.a=i}},[214]);1 pluginWebpack([2],{130:function(e,t,n){"use strict";t.a={props:{value:{type:String,required:!0},shortcodes:{type:Object,required:!1}},data(){return{editorId:this._uid,fileFrame:null}},mounted(){const e=this;window.tinymce.init({selector:`#dokan-tinymce-${this.editorId}`,branding:!1,height:200,menubar:!1,convert_urls:!1,theme:"modern",skin:"lightgray",fontsize_formats:"10px 11px 13px 14px 16px 18px 22px 25px 30px 36px 40px 45px 50px 60px 65px 70px 75px 80px",font_formats:"Arial=arial,helvetica,sans-serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Lucida=Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;",plugins:"textcolor colorpicker wplink wordpress code hr wpeditimage",toolbar:["shortcodes bold italic underline bullist numlist alignleft aligncenter alignjustify alignright link image wp_adv","formatselect forecolor backcolor blockquote hr code fontselect fontsizeselect removeformat undo redo"],setup(t){const n=[];weLo_.forEach(e.shortcodes,(e,o)=>{n.push({text:e.title,classes:"menu-section-title"}),weLo_.forEach(e.codes,(e,i)=>{n.push({text:e.title,onclick(){let n=`[${o}:${i}]`;e.default&&(n=`[${o}:${i} default="${e.default}"]`),e.text&&(n=`[${o}:${i} text="${e.text}"]`),e.plainText&&(n=e.text),t.insertContent(n)}})})}),t.addButton("image",{icon:"image",onclick(){e.browseImage(t)}}),t.on("change keyup NodeChange",()=>{e.$emit("input",t.getContent())})}})},methods:{browseImage(e){const t=this,n={id:0,url:"",type:""};if(t.fileFrame)return void t.fileFrame.open();const o=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:this.__("Select an image","wepos"),priority:20,filterable:"uploaded"})];t.fileFrame=wp.media({title:this.__("Select an image","wepos"),library:{type:""},button:{text:this.__("Select an image","wepos")},multiple:!1,states:o}),t.fileFrame.on("select",()=>{t.fileFrame.state().get("selection").map(o=>((o=o.toJSON()).id&&(n.id=o.id),o.url&&(n.url=o.url),o.type&&(n.type=o.type),t.insertImage(e,n),null))}),t.fileFrame.on("ready",()=>{t.fileFrame.uploader.options.uploader.params={type:"dokan-image-uploader"}}),t.fileFrame.open()},insertImage(e,t){if(!t.id||"image"!==t.type)return void this.alert({type:"error",text:this.__("Please select an image,","wepos")});const n=`<img src="${t.url}" alt="${t.alt}" title="${t.title}" style="max-width: 100%; height: auto;">`;e.insertContent(n)}}}},131:function(e,t,n){"use strict";t.a={name:"Modal",props:{footer:{type:Boolean,required:!1,default:!1},header:{type:Boolean,required:!1,default:!1},title:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"600px"},height:{type:String,required:!1,default:"auto"},backdropOpacity:{type:String,required:!1,default:"0.2"}},data:()=>({})}},214:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventBus=void 0;var o=m(n(28)),i=m(n(84)),r=m(n(215)),a=m(n(216)),s=m(n(354)),u=m(n(82)),l=m(n(356)),c=n(81),d=m(n(26)),f=m(n(83)),p=m(n(358));function m(e){return e&&e.__esModule?e:{default:e}}n(361),o.default.directive("tooltip",c.VTooltip),o.default.directive("close-popover",c.VClosePopover),o.default.component("v-popover",c.VPopover),o.default.component("multiselect",f.default),o.default.directive("click-outside",{bind:function(e,t,n){if("function"!=typeof t.value){var o=n.context.name,i="[Vue-click-outside:] provided expression '"+t.expression+"' is not a function, but has to be";o&&(i+="Found in component '"+o+"'"),console.warn(i)}var r=t.modifiers.bubble,a=function(n){(r||!e.contains(n.target)&&e!==n.target)&&t.value(n)};e.__vueClickOutside__=a,document.addEventListener("click",a)},unbind:function(e,t){document.removeEventListener("click",e.__vueClickOutside__),e.__vueClickOutside__=null}}),o.default.mixin(s.default),o.default.use(u.default,{defaultBoundariesElement:document.body}),o.default.use(d.default),window.wepos_get_lib=function(e){return window.wepos.libs[e]};var _=t.EventBus=new o.default;window.weLo_=a.default,window.wepos._=a.default,window.wepos.api=new r.default,window.wepos.libs.Vue=o.default,window.wepos.libs.Router=i.default,window.wepos.libs.TextEditor=l.default,window.wepos.libs.EventBus=_,window.wepos.libs.Modal=p.default,window.wepos.hooks=wp&&wp.hooks?wp.hooks:window.wepos.wpPackages.hooks,wepos.addFilter=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;wepos.hooks.addFilter(e,t,function(e){return e.push(n),e},o)}},215:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,[{key:"headers",value:function(){return{}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.ajax(e,"GET",n,t)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.ajax(e,"POST",this.headers(),t)}},{key:"put",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.ajax(e,"PUT",this.headers(),t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.ajax(e,"DELETE",this.headers(),t)}},{key:"ajax",value:function(e,t,n,o){var i=null;return"PUT"!==t&&"DELETE"!==t||(i=t,t="POST"),jQuery.ajax({url:e,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",window.wepos.rest.nonce),i&&e.setRequestHeader("X-HTTP-Method-Override",i)},type:t,data:o})}}]),e}();t.default=i},216:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var o=u(n(218)),i=u(n(219)),r=u(n(280)),a=u(n(291)),s=u(n(351));function u(e){return e&&e.__esModule?e:{default:e}}(e=o.default.noConflict()).findIndex=i.default,e.truncate=r.default,e.includes=a.default,e.debounce=s.default,t.default=e}).call(t,n(217))},217:function(e,t){e.exports=window.wepos._},354:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(355);t.default={methods:{setLocaleData:function(e){return(0,o.setLocaleData)(e)},__:function(e,t){return(0,o.__)(e,t)},_nx:function(e,t,n,i,r){return(0,o._nx)(e,t,n,i,r)},__n:function(e,t,n,o){return _n(e,t,n,o)},sprintf:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return o.sprintf.apply(void 0,[e].concat(n))},formatPrice:function(e){return accounting.formatMoney(e,wepos.currency_format_symbol,wepos.currency_format_num_decimals,wepos.currency_format_thousand_sep,wepos.currency_format_decimal_sep,wepos.currency_format)},formatNumber:function(e){return accounting.formatNumber(e,wepos.currency_format_num_decimals,wepos.currency_format_thousand_sep,wepos.currency_format_decimal_sep)},findMatchingVariations:function(e,t){for(var n=[],o=0;o<e.length;o++){for(var i=e[o],r={},a=0;a<i.attributes.length;a++)r[i.attributes[a].name]=i.attributes[a].option;this.isMatch(r,t)&&n.push(i)}return n},isMatch:function(e,t){var n=!0;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o],r=t[o];void 0!==i&&void 0!==r&&0!==i.length&&0!==r.length&&i!==r&&(n=!1)}return n}},computed:{wepos:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){return wepos}),eventBus:function(){return wepos_get_lib("EventBus")}}}},355:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setLocaleData=i,t.getI18n=r,t.__=function(e,t){return r(t)?r(t).dgettext(t,e):e},t._x=function(e,t,n){return r(n).dpgettext(n,t,e)},t._n=function(e,t,n,o){return r(o).dngettext(o,e,t,n)},t._nx=function(e,t,n,o,i){return r(i).dnpgettext(i,o,e,t,n)};var o={};function i(e){var t=new Jed(e);o[t._textdomain]=t}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return o[e]||i({"":{}}),o[e]}t.sprintf=Jed.sprintf},356:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(130),i=n(357),r=n(0)(o.a,i.a,!1,null,null,null);r.options.__file="assets/src/admin/components/TextEditor.vue",t.default=r.exports},357:function(e,t,n){"use strict";var o=function(){var e=this.$createElement;return(this._self._c||e)("textarea",{attrs:{id:"dokan-tinymce-"+this.editorId},domProps:{value:this.value}})};o._withStripped=!0;var i={render:o,staticRenderFns:[]};t.a=i},358:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(131),i=n(360),r=!1;var a=function(e){r||n(359)},s=n(0)(o.a,i.a,!1,a,null,null);s.options.__file="assets/src/utils/components/Modal.vue",t.default=s.exports},359:function(e,t){},360:function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wepos-modal-dialog"},[n("div",{staticClass:"wepos-modal"},[n("div",{staticClass:"wepos-modal-content",style:{width:e.width}},[n("section",{class:["wepos-modal-main",{"has-footer":e.footer}]},[e.header?n("header",{staticClass:"modal-header"},[e._t("header",[n("h1",[e._v(e._s(e.title))])])],2):e._e(),e._v(" "),n("div",{staticClass:"modal-body",style:{height:e.height}},[e._t("body")],2),e._v(" "),e.footer?n("footer",{staticClass:"modal-footer"},[n("div",{staticClass:"inner"},[e._t("footer")],2)]):e._e(),e._v(" "),n("span",{staticClass:"modal-close modal-close-link flaticon-cancel-music",on:{click:function(t){e.$emit("close")}}})])])]),e._v(" "),n("div",{staticClass:"wepos-modal-backdrop",style:{opacity:e.backdropOpacity}})])};o._withStripped=!0;var i={render:o,staticRenderFns:[]};t.a=i}},[214]); -
wepos/trunk/assets/js/frontend.js
r2079800 r2089750 13 13 14 14 /* harmony default export */ __webpack_exports__["a"] = ({ 15 name: 'App', 16 17 created() { 18 19 // wepos.hooks.addAction( 'test_action', 'testAction', function() { 20 // console.log( 'Loaded action' ); 21 // } ); 22 } 15 name: 'App' 23 16 }); 24 17 … … 708 701 }, 709 702 changeAmount() { 710 var returnMoney = this. formatNumber(this.cashAmount - this.getTotal);711 return returnMoney > 0 ? returnMoney: 0;703 var returnMoney = this.cashAmount - this.getTotal; 704 return returnMoney > 0 ? this.formatNumber(returnMoney) : 0; 712 705 }, 713 706 getBreadCrums() { … … 973 966 974 967 if (this.totalPages >= this.page) { 975 wepos.api.get(wepos.rest.root + wepos.rest. wcversion + '/products?status=publish&per_page=30&page=' + this.page).done((response, status, xhr) => {968 wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/products?status=publish&per_page=30&page=' + this.page).done((response, status, xhr) => { 976 969 this.products = this.products.concat(response); 977 970 this.page += 1; … … 1026 1019 cartObject.type = product.type; 1027 1020 cartObject.tax_amount = product.tax_amount; 1021 cartObject.manage_stock = product.manage_stock; 1022 cartObject.stock_status = product.stock_status; 1023 cartObject.backorders_allowed = product.backorders_allowed; 1024 cartObject.stock_quantity = product.stock_quantity; 1028 1025 1029 1026 var index = weLo_.findIndex(self.orderdata.line_items, { product_id: cartObject.product_id, variation_id: cartObject.variation_id }); 1030 1027 1031 1028 if (index < 0) { 1032 self.orderdata.line_items.push(cartObject); 1029 if (this.hasStock(product)) { 1030 self.orderdata.line_items.push(cartObject); 1031 } 1033 1032 } else { 1034 self.orderdata.line_items[index].quantity += 1; 1033 if (this.hasStock(product, self.orderdata.line_items[index].quantity)) { 1034 self.orderdata.line_items[index].quantity += 1; 1035 } 1035 1036 } 1036 1037 … … 1047 1048 }, 1048 1049 addQuantity(item) { 1049 item.quantity++; 1050 if (this.hasStock(item, item.quantity)) { 1051 item.quantity++; 1052 } 1050 1053 this.calculateDiscount(); 1051 1054 this.calculateFee(); … … 1060 1063 this.calculateDiscount(); 1061 1064 this.calculateFee(); 1065 }, 1066 hasStock(product, productCartQty = 0) { 1067 if (!product.manage_stock) { 1068 return 'outofstock' == product.stock_status ? false : true; 1069 } else { 1070 if (product.backorders_allowed) { 1071 return true; 1072 } else { 1073 return product.stock_quantity > productCartQty; 1074 } 1075 } 1062 1076 }, 1063 1077 fetchGateway() { … … 1818 1832 selectedState: null, 1819 1833 selectedCountry: null, 1820 isDisabled: false1834 isDisabled: true 1821 1835 }; 1822 1836 }, … … 1838 1852 } 1839 1853 }, 1854 1855 watch: { 1856 customer: { 1857 handler(val) { 1858 this.isDisabled = true; 1859 if (val.first_name !== undefined && val.first_name.trim() != '' && val.last_name !== undefined && val.last_name.trim() != '' && val.email !== undefined && val.email.trim() != '') { 1860 this.isDisabled = false; 1861 } 1862 }, 1863 deep: true 1864 } 1865 }, 1866 1840 1867 methods: { 1841 1868 focusCustomerSearch(e) { … … 1871 1898 this.$emit('onblur'); 1872 1899 }, 1900 closeNewCustomerModal() { 1901 this.customer = { 1902 email: '', 1903 first_name: '', 1904 last_name: '', 1905 address_1: '', 1906 address_2: '', 1907 country: '', 1908 state: '', 1909 postcode: '', 1910 city: '', 1911 phone: '' 1912 }; 1913 this.selectedState = null; 1914 this.selectedCountry = null; 1915 this.showNewCustomerModal = false; 1916 }, 1873 1917 searchCustomer() { 1874 1918 if (this.serachInput) { 1875 wepos.api.get(wepos.rest.root + wepos.rest. wcversion + '/customers?search=' + this.serachInput).done(response => {1919 wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/customers?search=' + this.serachInput).done(response => { 1876 1920 this.customers = response; 1877 1921 }); … … 1891 1935 first_name: this.customer.first_name, 1892 1936 last_name: this.customer.last_name, 1937 username: this.customer.email, 1893 1938 password: this.generatePassword(20), 1894 1939 billing: { … … 1907 1952 var $contentWrap = jQuery('.wepos-new-customer-form'); 1908 1953 $contentWrap.block({ message: null, overlayCSS: { background: '#fff url(' + wepos.ajax_loader + ') no-repeat center', opacity: 0.4 } }); 1909 this.isDisabled = true; 1910 1911 wepos.api.post(wepos.rest.root + wepos.rest.wcversion + '/customers', customerData).done(response => { 1954 1955 wepos.api.post(wepos.rest.root + wepos.rest.posversion + '/customers', customerData).done(response => { 1912 1956 this.serachInput = response.first_name + ' ' + response.last_name; 1913 1957 this.$emit('onCustomerSelected', response); 1914 this.isDisabled = true;1915 1958 $contentWrap.unblock(); 1916 this.showNewCustomerModal = false; 1917 this.customer = {}; 1959 this.closeNewCustomerModal(); 1918 1960 }).fail(response => { 1919 this.isDisabled = true;1920 1961 $contentWrap.unblock(); 1921 1962 alert(response.responseJSON.message); … … 2308 2349 printReceipt() { 2309 2350 var self = this; 2310 var beforePrint = function () { 2311 this.eventBus.$emit('openprinthtml', true); 2312 }; 2313 var afterPrint = function () { 2314 this.eventBus.$emit('closeprinthtml', false); 2315 }; 2316 2317 if (window.matchMedia) { 2318 var mediaQueryList = window.matchMedia('print'); 2319 mediaQueryList.addListener(function (mql) { 2320 if (mql.matches) { 2321 beforePrint(); 2322 } else { 2323 afterPrint(); 2324 } 2325 }); 2326 } 2327 2328 window.onbeforeprint = beforePrint; 2351 2329 2352 setTimeout(() => { 2330 2353 window.print(); 2331 2354 }, 500); 2332 window.onafterprint = afterPrint;2333 2355 } 2334 2356 } … … 3807 3829 header: true 3808 3830 }, 3809 on: { 3810 close: function($event) { 3811 _vm.showNewCustomerModal = false 3812 } 3813 } 3831 on: { close: _vm.closeNewCustomerModal } 3814 3832 }, 3815 3833 [ … … 4259 4277 { 4260 4278 staticClass: "add-new-customer-btn add-variation-btn", 4261 attrs: { 4262 disabled: 4263 _vm.customer.email == undefined || 4264 _vm.customer.email == "" || 4265 _vm.isDisabled 4266 }, 4279 attrs: { disabled: _vm.isDisabled }, 4267 4280 on: { 4268 4281 click: function($event) { -
wepos/trunk/assets/js/frontend.min.js
r2079800 r2089750 1 pluginWebpack([0],Array(56).concat([function(t,e,s){"use strict";e.a={name:"App"}},function(t,e,s){"use strict";var a=s(140),i=s(143),o=s(146),r=s(149),n=s(65),c=s.n(n),l=s(156),d=s(159),u=s(162);let p=wepos_get_lib("Modal");e.a={name:"Home",components:{ProductSearch:i.a,CustomerSearch:o.a,Overlay:a.a,Modal:p,MugenScroll:c.a,FeeKeypad:r.a,PrintReceipt:l.a,PrintReceiptHtml:d.a,CustomerNote:u.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:[],modalLeftContentHeight:"",emptyGatewayDiv:0,cashAmount:"",availableTax:[],settings:{},printdata:{gateway:{id:"",title:""}},createprintreceipt:!1,orderdata:{billing:{},shipping:{},line_items:[],fee_lines:[],customer_note:""},selectedCategory:"",categories:[],quickLinkList:wepos.hooks.applyFilters("wepos_quick_links",[])}),computed:{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},getSubtotal(){var t=0;return weLo_.forEach(this.orderdata.line_items,function(e,s){e.on_sale?t+=e.quantity*e.sale_price:t+=e.quantity*e.regular_price}),t},getTotalFee(){var t=0;return weLo_.forEach(this.orderdata.fee_lines,function(e,s){"fee"==e.type&&(t+=Math.abs(e.total))}),t},getTotalDiscount(){var t=0;return weLo_.forEach(this.orderdata.fee_lines,function(e,s){"discount"==e.type&&(t+=Number(Math.abs(e.total)))}),t},getTotalTax(){var t=this,e=0,s=0;return weLo_.forEach(this.orderdata.line_items,function(t,s){e+=Math.abs(t.tax_amount*t.quantity)}),weLo_.forEach(this.orderdata.fee_lines,function(e,a){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&&(s+=Math.abs(e.total)*Math.abs(o.rate)/100)}}),e+s},getOrderTotal(){return this.getSubtotal+this.getTotalFee+this.getTotalTax},getTotal(){return this.getOrderTotal-this.getTotalDiscount},changeAmount(){var t=this. formatNumber(this.cashAmount-this.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)}),s=weLo_.findIndex(this.categories,e),a=t.splice(0,s+1),i=[];if(a.length>0){for(var o=a.length-1;o>=0;o--)if(i.length>0){var r=weLo_.find(a,{id:a[o+1].parent_id});if(void 0!=r&&(i.push(r),null==r.parent_id))break}else i.push(a[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)}))}},methods:{openQucikMenu(){this.showQucikMenu=!0},openHelp(t){t.preventDefault(),this.showHelp=!0,this.showQucikMenu=!1},closeHelp(){this.showHelp=!1},addCustomerNote(t){this.orderdata.customer_note=t.trim()},removeBreadcrums(){this.$router.push({name:"Home"})},logout(){wepos.hooks.doAction("wepos_before_logout"),window.location.href=wepos.logout_url.toString()},emptyCart(){this.orderdata={billing:{},shipping:{},customer_id:0,line_items:[],fee_lines:[],customer_note:""},this.printdata={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.orderdata.line_items.length>0&&this.isSelectGateway()},processPayment(t){if(t.preventDefault(),this.ableToProcess()){var e=weLo_.find(this.availableGateways,{id:this.orderdata.payment_method});this.orderdata.payment_method_title=e.title,this.orderdata.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()}];var s=jQuery(".wepos-checkout-wrapper .right-content").find(".content");s.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",this.orderdata).done(t=>{wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/payment/process",t).done(e=>{"success"==e.result?(this.$router.push({name:"Home",query:{order_key:t.order_key,payment:"success"}}),this.printdata={line_items:this.orderdata.line_items,fee_lines:this.orderdata.fee_lines,subtotal:this.getSubtotal,taxtotal:this.getTotalTax,ordertotal:this.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()}):s.unblock()}).fail(t=>{s.unblock(),alert(t.responseJSON.message)})}).fail(t=>{s.unblock(),alert(t.responseJSON.message)})}},backGatewaySelection(){this.orderdata.payment_method="",this.orderdata.payment_method_title=""},initPayment(){this.showModal=!0,this.orderdata.payment_method=this.availableGateways[0].id},backToSale(){this.showModal=!1,this.showHelp=!1,this.orderdata.payment_method=""},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.orderdata.fee_lines.push({name:this.__("Discount","wepos"),type:"discount",value:t.toString(),isEdit:!1,discount_type:e,tax_status:"none",tax_class:"",total:0}),this.calculateDiscount(),this.calculateFee()},saveFee(t){this.orderdata.fee_lines[t].isEdit=!1,this.$nextTick(()=>{jQuery(this.$refs.fee_name).focus()})},setFee(t,e){this.orderdata.fee_lines.push({name:this.__("Fee","wepos"),type:"fee",value:t.toString(),isEdit:!1,fee_type:e,tax_status:"none",tax_class:"",total:0}),this.calculateFee(),this.calculateDiscount()},removeFeeLine(t){this.orderdata.fee_lines.splice(t,1)},calculateDiscount(){this.orderdata.fee_lines.length>0&&weLo_.forEach(this.orderdata.fee_lines,(t,e)=>{"discount"==t.type&&("percent"==t.discount_type?this.orderdata.fee_lines[e].total="-"+this.getSubtotal*Math.abs(t.value)/100:this.orderdata.fee_lines[e].total="-"+Math.abs(t.value))})},calculateFee(){this.orderdata.fee_lines.length>0&&weLo_.forEach(this.orderdata.fee_lines,(t,e)=>{"fee"==t.type&&("percent"==t.fee_type?this.orderdata.fee_lines[e].total=(this.getSubtotal*Math.abs(t.value)/100).toString():this.orderdata.fee_lines[e].total=Math.abs(t.value).toString())})},fetchProducts(){1==this.page&&(this.productLoading=!0),this.totalPages>=this.page?wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/products?status=publish&per_page=30&page="+this.page).done((t,e,s)=>{this.products=this.products.concat(t),this.page+=1,this.totalPages=parseInt(s.getResponseHeader("X-WP-TotalPages")),this.productLoading=!1}).then((t,e,s)=>{this.fetchProducts()}):this.productLoading=!1},selectCustomer(t){Object.keys(t).length>0?(this.orderdata.billing=t.billing,this.orderdata.shipping=t.shipping,this.orderdata.customer_id=t.id):(this.orderdata.billing={},this.orderdata.shipping={},this.orderdata.customer_id=0)},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.addToCart(t)},addToCart(t){var e={};e.product_id=0===t.parent_id?t.id:t.parent_id,e.name=t.name,e.quantity=1,e.regular_price=t.regular_display_price,e.sale_price=t.sales_display_price,e.on_sale=t.on_sale,e.attribute=t.attributes,e.variation_id=0!==t.parent_id?t.id:0,e.editQuantity=!1,e.type=t.type,e.tax_amount=t.tax_amount;var s=weLo_.findIndex(this.orderdata.line_items,{product_id:e.product_id,variation_id:e.variation_id});s<0?this.orderdata.line_items.push(e):this.orderdata.line_items[s].quantity+=1,this.calculateDiscount(),this.calculateFee()},toggleEditQuantity(t,e){this.orderdata.line_items[e].editQuantity=!this.orderdata.line_items[e].editQuantity},removeItem(t){this.orderdata.line_items.splice(t,1),this.calculateDiscount(),this.calculateFee()},addQuantity(t){t.quantity++,this.calculateDiscount(),this.calculateFee()},removeQuantity(t){if(t.quantity<=1)return this.calculateDiscount(),this.calculateFee(),1;t.quantity--,this.calculateDiscount(),this.calculateFee()},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})},fetchTaxes(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/taxes").done(t=>{this.availableTax=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").then(s=>{s.sort(function(t,e){return t.name.localeCompare(e.name)});var a=(t=[],e={},s.forEach(function(s){e[s.id]={response:s,children:e[s.id]&&e[s.id].children},null===s.parent_id?t.push(e[s.id]):(e[s.parent_id]=e[s.parent_id]||{},e[s.parent_id].children=e[s.parent_id].children||[],e[s.parent_id].children.push(e[s.id]))}),t),i={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},o=a.reduce(function t(e){return function(s,a){return a.response.level=e,s.concat(a.response,(a.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(s,{id:parseInt(this.$route.query.category)}))})},filterProducts(){this.products=this.products.filter(t=>weLo_.findIndex(t.categories,{id:this.$route.query.category})>0)}},created(){if(this.fetchSettings(),this.fetchTaxes(),this.fetchProducts(),this.fetchGateway(),this.fetchCategories(),"undefined"!=typeof localStorage){var t=JSON.parse(localStorage.getItem("cartdata"));this.orderdata=t||this.orderdata}window.addEventListener("beforeunload",()=>{"undefined"!=typeof localStorage&&localStorage.setItem("cartdata",JSON.stringify(this.orderdata))},!1)}}},function(t,e,s){"use strict";e.a={name:"Overlay",props:{show:{type:Boolean}}}},function(t,e,s){"use strict";var a=s(60),i=s(26);s.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:a.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,s={},a=this.products.filter(t=>{if("simple"==t.type&&t[e].toString()==this.serachInput)return!0;if("variable"==t.type){var s=!1;if(t.variations.length>0&&weLo_.forEach(t.variations,(t,a)=>{t[e].toString()==this.serachInput&&(s=!0)}),s)return!0}return!1});if(a.length>0)if("variable"==(a=a[0]).type)(s=a.variations.filter(t=>t[e].toString()==this.serachInput)[0]).parent_id=a.id,s.type=a.type,s.name=a.name,this.$emit("onProductAdded",s);else this.$emit("onProductAdded",a);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,s){"use strict";var a=s(61),i=s(0)(a.a,null,!1,null,null,null);i.options.__file="assets/src/frontend/components/KeyboardControl.vue",e.a=i.exports},function(t,e,s){"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<this.listLength-1&&this.selectedIndex++},addKeyHandler(t){window.addEventListener("keydown",this.keyHandler)},removeKeyHandler(){window.removeEventListener("keydown",this.keyHandler)}},created(){this.addKeyHandler()},destroyed(){this.removeKeyHandler()}}},function(t,e,s){"use strict";var a=s(60);let i=wepos_get_lib("Modal");e.a={name:"CustomerSearch",components:{Modal:i,KeyboardControl:a.a},data:()=>({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:!1}),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]}))},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")},searchCustomer(){this.serachInput?wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/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,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}}),this.isDisabled=!0,wepos.api.post(wepos.rest.root+wepos.rest.wcversion+"/customers",t).done(t=>{this.serachInput=t.first_name+" "+t.last_name,this.$emit("onCustomerSelected",t),this.isDisabled=!0,e.unblock(),this.showNewCustomerModal=!1,this.customer={}}).fail(t=>{this.isDisabled=!0,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 s=void 0!==wepos.states[t.code]?wepos.states[t.code]:[],a=Object.keys(s);a.length>0?this.stateList=a.map(t=>({code:t,name:s[t]})):(this.stateList=s,this.selectedState=null)},generatePassword(t){for(var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",s="",a=0,i=e.length;a<t;++a)s+=e.charAt(Math.floor(Math.random()*i));return s}},mounted(){this.eventBus.$on("emptycart",t=>{this.serachInput=""})}}},function(t,e,s){"use strict";var a=s(151);e.a={name:"FeeKeypad",components:{keyboard:a.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|{<span class="keypord-icon flaticon-backspace"></span>: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,s){"use strict";const a="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("||",a).replace("{{",i).replace("}}",o).split("|")},buttons(){return this.lines.map(t=>{let e=[],s=null;return t.match(new RegExp(`(${i}|${o}|${a}|.)`,"g")).forEach(t=>{if("{"===t)s="";else if("}"===t){let t=s.split(":"),a=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:a,args:o}),s=null}else null!==s?s+=t:(t===a&&(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<this.layouts.length))throw new Error("The requested layout does not exist.");this.layout=t},clear(){this.mutate("")}}}},,function(t,e,s){"use strict";e.a={name:"ReceiptPrint",methods:{printReceipt(){var t=function(){this.eventBus.$emit("openprinthtml",!0)},e=function(){this.eventBus.$emit("closeprinthtml",!1)};window.matchMedia&&window.matchMedia("print").addListener(function(s){s.matches?t():e()});window.onbeforeprint=t,setTimeout(()=>{window.print()},500),window.onafterprint=e}}}},function(t,e,s){"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,s){"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,s){"use strict";var a=o(s(133)),i=o(s(137));function o(t){return t&&t.__esModule?t:{default:t}}var r=wepos_get_lib("Vue");r.config.productionTip=!1,new r({el:"#vue-frontend-app",router:i.default,render:function(t){return t(a.default)}})},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(56),i=s(136),o=!1;var r=function(t){o||s(134)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"vue-frontend-app"}},[e("router-view")],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a,i=s(138),o=(a=i)&&a.__esModule?a:{default:a};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,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(57),i=s(165),o=!1;var r=function(t){o||s(139)},n=s(0)(a.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,s){"use strict";var a=s(58),i=s(142),o=!1;var r=function(t){o||s(141)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this.$createElement,e=this._self._c||t;return this.show?e("div",{staticClass:"overlay"}):this._e()};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(59),i=s(145),o=!1;var r=function(t){o||s(144)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.outside,expression:"outside"}],staticClass:"search-box"},[s("form",{attrs:{action:"",autocomplete:"off"},on:{submit:function(e){e.preventDefault(),t.handleProductScan(e)}}},[s("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?s("span",{staticClass:"search-icon flaticon-musica-searcher"}):t._e(),t._v(" "),"scan"==t.mode?s("span",{staticClass:"search-icon flaticon-supermarket-scanner"}):t._e(),t._v(" "),s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"search-type"},[s("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(" "),s("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(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showResults&&"product"==t.mode,expression:"showResults && mode=='product'"}],staticClass:"search-result"},[t.searchableProduct.length?s("div",[s("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 a=e.selectedIndex;return t._l(t.searchableProduct,function(e,i){return s("li",{key:i,staticClass:"product-search-item",class:{selected:i===a}},["simple"==e.type?[s("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(s){t.addToCartAction(e)}}},[t._v(t._s(e.name)+"\n "),s("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?s("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e(),t._v(" "),"variable"==e.type?[s("a",{attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.selectVariation(e)}}},[t._v(t._s(e.name)+"\n "),s("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?s("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e()],2)})}}])})],1):s("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No product found","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"suggession"},[s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showVariationModal?s("modal",{attrs:{title:t.__("Select Variations","wepos"),width:"500px",height:"auto",footer:!0,header:!0},on:{close:function(e){t.showVariationModal=!1}}},[s("template",{slot:"body"},t._l(t.selectedVariationProduct.attributes,function(e){return s("div",{staticClass:"variation-attribute-wrapper"},[s("div",{staticClass:"attribute"},[s("p",[t._v(t._s(e.name))]),t._v(" "),s("div",{staticClass:"options"},[t._l(e.options,function(a){return[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.chosenAttribute[e.name],expression:"chosenAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:a,checked:t._q(t.chosenAttribute[e.name],a)},on:{change:function(s){t.$set(t.chosenAttribute,e.name,a)}}}),t._v(" "),s("div",{staticClass:"box"},[t._v("\n "+t._s(a)+"\n ")])])]})],2)])])})),t._v(" "),s("template",{slot:"footer"},[s("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)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(62),i=s(148),o=!1;var r=function(t){o||s(147)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("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"},[s("form",{attrs:{action:"",autocomplete:"off"}},[s("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"}},[s("defs",[s("linearGradient",{attrs:{x1:"14.5524094%",y1:"14.6909544%",x2:"82.7722259%",y2:"85.2519444%",id:"linearGradient-1"}},[s("stop",{attrs:{"stop-color":"#C444FB",offset:"0%"}}),t._v(" "),s("stop",{attrs:{"stop-color":"#5B56D7",offset:"100%"}})],1)],1),t._v(" "),s("g",{attrs:{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[s("g",{attrs:{id:"POS-Design---Dokan-P2",transform:"translate(-759.000000, -27.000000)"}},[s("g",{attrs:{id:"Group",transform:"translate(759.000000, 27.000000)"}},[s("circle",{attrs:{id:"Oval",fill:"url(#linearGradient-1)","fill-rule":"nonzero",cx:"9.5",cy:"9.5",r:"9.5"}}),t._v(" "),s("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)"}},[s("g",{attrs:{id:"flaticon1543304699-svg"}},[s("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(" "),s("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(" "),s("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(" "),s("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(" "),s("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(" "),s("span",{staticClass:"add-new-customer flaticon-add",on:{click:function(e){e.preventDefault(),t.addNewCustomer()}}}),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showCustomerResults,expression:"showCustomerResults"}],staticClass:"search-result"},[t.customers.length?s("div",[s("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 a=e.selectedIndex;return t._l(t.customers,function(e,i){return s("li",{key:i,staticClass:"customer-search-item",class:{selected:i===a}},[s("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(s){t.selectCustomer(e)}}},[s("span",{staticClass:"avatar wepos-left"},[s("img",{attrs:{src:e.avatar_url,alt:e.first_name+" "+e.last_name}})]),t._v(" "),s("span",{staticClass:"name wepos-left"},[t._v(t._s(e.first_name+" "+e.last_name)),s("span",{staticClass:"metadata"},[t._v(t._s(e.email))])]),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])])})}}])})],1):s("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No customer found","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"suggession"},[s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showNewCustomerModal?s("modal",{attrs:{title:t.__("Add New Customer","wepos"),width:"700px",footer:!0,header:!0},on:{close:function(e){t.showNewCustomerModal=!1}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-new-customer-form"},[s("form",{staticClass:"wepos-form",attrs:{action:"",autocomplete:"off"}},[s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row"},[s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedCountry,callback:function(e){t.selectedCountry=e},expression:"selectedCountry"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2),t._v(" "),t.stateList.length>0?[s("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[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedState,callback:function(e){t.selectedState=e},expression:"selectedState"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2)]:[s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row"},[s("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(" "),s("template",{slot:"footer"},[s("button",{staticClass:"add-new-customer-btn add-variation-btn",attrs:{disabled:void 0==t.customer.email||""==t.customer.email||t.isDisabled},on:{click:function(e){t.createCustomer()}}},[t._v(t._s(t.__("Add Customer","wepos")))])])],2):t._e()],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(63),i=s(154),o=!1;var r=function(t){o||s(150)},n=s(0)(a.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,s){"use strict";var a=s(64),i=s(153),o=!1;var r=function(t){o||s(152)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("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 s("div",{staticClass:"vue-keyboard-row",attrs:{role:"row","data-keys":e.length}},t._l(e,function(e){return s("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)}}})}))}))};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-fee-keypad-wrap",class:t.className},[s("v-popover",{attrs:{offset:"5","popover-base-class":"fee-keypad tooltip popover",placement:"top",open:t.viewFeeKeypad}},[s("a",{attrs:{href:"#"},on:{click:t.showFeeKeypad}},[t._v(t._s(t.__("Add","wepos"))+" "+t._s(t.name))]),t._v(" "),s("template",{slot:"popover"},[s("form",[s("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(" "),s("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)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},,function(t,e,s){"use strict";var a=s(66),i=s(158),o=!1;var r=function(t){o||s(157)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"wepos-print-receipt"}},[s("button",{staticClass:"print-btn",on:{click:function(e){e.preventDefault(),t.printReceipt()}}},[s("span",{staticClass:"icon flaticon-printer"}),t._v(" "),s("span",{staticClass:"label"},[t._v(t._s(t.__("Print Receipt","wepos")))])])])};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(67),i=s(161),o=!1;var r=function(t){o||s(160)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"wepos-checkout-print-wrapper"},[s("div",{staticClass:"header",domProps:{innerHTML:t._s(t.settings.receipt_header)}}),t._v(" "),s("div",{staticClass:"order-info"},[s("span",{staticClass:"wepos-left"},[s("strong",[t._v(t._s(t.__("Order ID","wepos"))+": #"+t._s(t.printdata.order_id))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[s("strong",[t._v(t._s(t.__("Order Date","wepos"))+": "+t._s(t.formatDate(t.printdata.order_date)))])]),t._v(" "),s("div",{staticClass:"wepos-clearfix"})]),t._v(" "),s("div",{staticClass:"content"},[s("table",{staticClass:"sale-summary"},[s("tbody",[t._l(t.printdata.line_items,function(e){return s("tr",[s("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price"},[e.on_sale?[s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))]),t._v(" "),s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}),t._v(" "),s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Subtotal","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.subtotal)))])]),t._v(" "),t._l(t.printdata.fee_lines,function(e,a){return s("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]],2)}),t._v(" "),t.printdata.taxtotal?s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.taxtotal)))])]):t._e(),t._v(" "),s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.ordertotal)))])]),t._v(" "),t._m(0),t._v(" "),s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Payment method","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.printdata.gateway.title||""))])]),t._v(" "),(t.printdata.gateway.id="wepos_cash")?[s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Cash Given","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.cashamount)))])]),t._v(" "),s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Change Money","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.changeamount)))])])]:t._e()],2)])]),t._v(" "),s("div",{staticClass:"footer",domProps:{innerHTML:t._s(t.settings.receipt_footer)}})])};a._withStripped=!0;var i={render:a,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,s){"use strict";var a=s(68),i=s(164),o=!1;var r=function(t){o||s(163)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-custom-note-wrap"},[s("v-popover",{attrs:{offset:"5","popover-base-class":"customer-note tooltip popover",placement:"top",open:t.viewNotePopover}},[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openNote(e)}}},[t._v(t._s(t.__("Add Note","wepos")))]),t._v(" "),s("template",{slot:"popover"},[s("form",{on:{submit:function(e){e.preventDefault(),t.addCustomerNote(e)}}},[s("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(" "),s("button",{staticClass:"add-note-btn",attrs:{type:"submit",disabled:""==t.customerNote}},[t._v(t._s(t.__("Add Note","wepos")))])])])],2)],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],attrs:{id:"wepos-main"}},[s("div",{staticClass:"content-product"},[s("div",{staticClass:"top-panel wepos-clearfix"},[s("div",{staticClass:"search-bar"},[s("product-search",{attrs:{products:t.products,settings:t.settings},on:{onProductAdded:t.addToCart}})],1),t._v(" "),s("div",{staticClass:"category"},[s("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[s("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"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("Not found","wepos")))])])],2)],1),t._v(" "),s("div",{staticClass:"toggle-view"},[s("div",{staticClass:"product-toggle"},[s("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(" "),s("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?s("div",{staticClass:"breadcrumb"},[s("ul",[t._l(t.getBreadCrums,function(e){return[s("router-link",{attrs:{tag:"li",to:{name:"Home",query:{category:e.id}}}},[s("a",[t._v(t._s(e.name))])])]})],2),t._v(" "),s("span",{staticClass:"close-breadcrumb flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeBreadcrums(e)}}})]):t._e(),t._v(" "),s("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?s("div",{staticClass:"item"},["simple"==e.type?[s("div",{staticClass:"item-wrap",on:{click:function(s){if(!("button"in s)&&t._k(s.keyCode,"prevnt",void 0,s.key))return null;t.addToCart(e)}}},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"==t.productView?s("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n\n ")]):s("div",{staticClass:"title"},[s("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),s("ul",{staticClass:"meta"},[e.sku?s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Sku :","wepos")))]),t._v(" "),s("span",{staticClass:"value"},[t._v(t._s(e.sku))])]):t._e(),t._v(" "),s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),s("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),s("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})])]:t._e(),t._v(" "),"variable"==e.type?[s("v-popover",{attrs:{offset:"10","popover-base-class":"product-variation tooltip popover",placement:"left-end"}},[s("div",{staticClass:"item-wrap",on:{click:function(s){t.selectVariationProduct(e)}}},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"==t.productView?s("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n ")]):s("div",{staticClass:"title"},[s("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),s("ul",{staticClass:"meta"},[s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),s("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),s("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})]),t._v(" "),s("template",{slot:"popover"},[s("div",{staticClass:"variation-header"},[t._v("\n "+t._s(t.__("Select Variations","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"variation-body"},[t._l(e.attributes,function(e){return[s("div",{staticClass:"attribute"},[s("p",[t._v(t._s(e.name))]),t._v(" "),s("div",{staticClass:"options"},[t._l(e.options,function(a){return[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedAttribute[e.name],expression:"selectedAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:a,checked:t._q(t.selectedAttribute[e.name],a)},on:{change:function(s){t.$set(t.selectedAttribute,e.name,a)}}}),t._v(" "),s("div",{staticClass:"box"},[t._v("\n "+t._s(a)+"\n ")])])]})],2)])]})],2),t._v(" "),s("div",{staticClass:"variation-footer"},[s("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?s("div",{staticClass:"no-product-found"},[s("img",{attrs:{src:t.wepos.assets_url+"/images/no-product.png",alt:"",width:"120px"}}),t._v(" "),s("p",[t._v(t._s(t.__("No Product Found","wepos")))])]):t._e()],t._v(" "),t.productLoading?s("div",{staticClass:"product-loading"},[s("div",{staticClass:"spinner spinner-loading"})]):t._e()],2)]),t._v(" "),s("div",{staticClass:"content-cart"},[s("div",{staticClass:"top-panel"},[s("customer-search",{on:{onCustomerSelected:t.selectCustomer}}),t._v(" "),s("div",{staticClass:"action"},[s("div",{staticClass:"more-options"},[s("v-popover",{attrs:{offset:"5","popover-base-class":"wepos-dropdown-menu tooltip popover",placement:"bottom-end",open:t.showQucikMenu}},[s("button",{staticClass:"wepos-button",on:{click:function(e){e.preventDefault(),t.openQucikMenu()}}},[s("span",{staticClass:"more-icon flaticon-more"})]),t._v(" "),s("template",{slot:"popover"},[s("ul",[s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.emptyCart(e)}}},[s("span",{staticClass:"flaticon-empty-cart quick-menu-icon"}),t._v(t._s(t.__("Empty Cart","wepos")))])]),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openHelp(e)}}},[s("span",{staticClass:"flaticon-information quick-menu-icon"}),t._v(t._s(t.__("Help","wepos")))])]),t._v(" "),s("li",{staticClass:"divider"}),t._v(" "),t._l(t.quickLinkList,function(t,e){return s(t,{key:e,tag:"component"})}),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.logout(e)}}},[s("span",{staticClass:"flaticon-logout quick-menu-icon"}),t._v(t._s(t.__("Logout","wepos")))])])],2)])],2)],1)])],1),t._v(" "),t.settings.wepos_general?s("div",{staticClass:"cart-panel"},[s("div",{staticClass:"cart-content"},[s("table",{staticClass:"cart-table"},[s("thead",[s("tr",[s("th",{attrs:{width:"65%"}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),s("th",{attrs:{width:"15%"}},[t._v(t._s(t.__("Qty","wepos")))]),t._v(" "),s("th",{attrs:{width:"30%"}},[t._v(t._s(t.__("Price","wepos")))]),t._v(" "),s("th"),t._v(" "),s("th")])]),t._v(" "),s("tbody",[t.orderdata.line_items.length>0?[t._l(t.orderdata.line_items,function(e,a){return[s("tr",[s("td",{staticClass:"name",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"qty",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[e.on_sale?[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-right-arrow",class:{open:e.editQuantity},on:{click:function(s){s.preventDefault(),t.toggleEditQuantity(e,a)}}})]),t._v(" "),s("td",{staticClass:"remove"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeItem(a)}}})])]),t._v(" "),e.editQuantity?s("tr",{staticClass:"update-quantity-wrap"},[s("td",{attrs:{colspan:"5"}},[s("span",{staticClass:"qty"},[t._v(t._s(t.__("Quantity","wepos")))]),t._v(" "),s("span",{staticClass:"qty-number"},[s("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(s){s.target.composing||t.$set(e,"quantity",s.target.value)}}})]),t._v(" "),s("span",{staticClass:"qty-action"},[s("a",{staticClass:"add",attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.addQuantity(e)}}},[t._v("+")]),t._v(" "),s("a",{staticClass:"minus",attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.removeQuantity(e)}}},[t._v("-")])])])]):t._e()]})]:[s("tr",{staticClass:"no-item"},[s("td",{attrs:{colspan:"5"}},[s("img",{attrs:{src:t.wepos.assets_url+"/images/empty-cart.png",alt:"",width:"120px"}}),t._v(" "),s("p",[t._v(t._s(t.__("Empty Cart","wepos")))])])])]],2)])]),t._v(" "),s("div",{staticClass:"cart-calculation"},[s("form",{attrs:{autocomplete:"off"}},[s("table",{staticClass:"cart-total-table"},[s("tbody",[s("tr",[s("td",{staticClass:"label"},[t._v(t._s(t.__("Subtotal","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.getSubtotal)))]),t._v(" "),s("td",{staticClass:"action"})]),t._v(" "),t.orderdata.fee_lines.length>0?t._l(t.orderdata.fee_lines,function(e,a){return s("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[s("td",{staticClass:"label"},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"name"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("−"+t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]:[e.isEdit?[s("td",{staticClass:"label",attrs:{colspan:"2"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.fee_lines[a].name,expression:"orderdata.fee_lines[key].name"}],ref:"fee_name",refInFor:!0,staticClass:"fee-name",attrs:{type:"text",placeholder:t.__("Fee Name","wepos")},domProps:{value:t.orderdata.fee_lines[a].name},on:{input:function(e){e.target.composing||t.$set(t.orderdata.fee_lines[a],"name",e.target.value)}}}),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.fee_lines[a].total,expression:"orderdata.fee_lines[key].total"}],ref:"fee_total",refInFor:!0,staticClass:"fee-amount",attrs:{type:"number",min:"0",step:"any",placeholder:t.__("Total","wepos")},domProps:{value:t.orderdata.fee_lines[a].total},on:{input:function(e){e.target.composing||t.$set(t.orderdata.fee_lines[a],"total",e.target.value)}}}),t._v(" "),"yes"==t.settings.wepos_general.enable_fee_tax?[s("label",{attrs:{for:"fee-tax-status"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.fee_lines[a].tax_status,expression:"orderdata.fee_lines[key].tax_status"}],staticClass:"fee-tax-status",attrs:{type:"checkbox",id:"fee-tax-status","true-value":"taxable","false-value":"none"},domProps:{checked:Array.isArray(t.orderdata.fee_lines[a].tax_status)?t._i(t.orderdata.fee_lines[a].tax_status,null)>-1:t._q(t.orderdata.fee_lines[a].tax_status,"taxable")},on:{change:function(e){var s=t.orderdata.fee_lines[a].tax_status,i=e.target,o=i.checked?"taxable":"none";if(Array.isArray(s)){var r=t._i(s,null);i.checked?r<0&&(t.orderdata.fee_lines[a].tax_status=s.concat([null])):r>-1&&(t.orderdata.fee_lines[a].tax_status=s.slice(0,r).concat(s.slice(r+1)))}else t.$set(t.orderdata.fee_lines[a],"tax_status",o)}}}),t._v(" Taxable")]),t._v(" "),"taxable"==t.orderdata.fee_lines[a].tax_status?s("select",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.fee_lines[a].tax_class,expression:"orderdata.fee_lines[key].tax_class"}],staticClass:"fee-tax-class",on:{change:function(e){var s=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.orderdata.fee_lines[a],"tax_class",e.target.multiple?s:s[0])}}},t._l(t.availableTax,function(e){return s("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(" "),s("button",{attrs:{disabled:""==t.orderdata.fee_lines[a].name},on:{click:function(e){t.saveFee(a)}}},[t._v(t._s(t.__("Apply","wepos")))])],2),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]:[s("td",{staticClass:"label",on:{dblclick:function(e){t.orderdata.fee_lines[a].isEdit=!0}}},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"name"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]]],2)}):t._e(),t._v(" "),t.getTotalTax?s("tr",{staticClass:"tax"},[s("td",{staticClass:"label"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.getTotalTax)))]),t._v(" "),s("td",{staticClass:"action"})]):t._e(),t._v(" "),s("tr",{staticClass:"cart-action"},[s("td",{attrs:{colspan:"3"}},[s("fee-keypad",{attrs:{name:t.__("Discount","wepos"),"short-key":"discount"},on:{inputfee:t.setDiscount}}),t._v(" "),s("fee-keypad",{attrs:{name:t.__("Fee","wepos"),"short-key":"fee"},on:{inputfee:t.setFee}}),t._v(" "),""==t.orderdata.customer_note?s("customer-note",{on:{addnote:t.addCustomerNote}}):t._e()],1)]),t._v(" "),t.orderdata.customer_note?s("tr",{staticClass:"note"},[s("td",{staticClass:"note-text",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.orderdata.customer_note)+"\n ")]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.orderdata.customer_note=""}}})])]):t._e(),t._v(" "),s("tr",{staticClass:"pay-now",on:{click:function(e){t.initPayment()}}},[s("td",[t._v(t._s(t.__("Pay Now","wepos")))]),t._v(" "),s("td",{staticClass:"amount"},[t._v(t._s(t.formatPrice(t.getTotal)))]),t._v(" "),t._m(0)])],2)])])])]):t._e()]),t._v(" "),t.showPaymentReceipt?s("modal",{attrs:{width:"600px",height:"400px"},on:{close:function(e){t.createNewSale()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-payment-receipt"},[s("div",{staticClass:"sale-completed"},[s("img",{attrs:{src:t.wepos.assets_url+"/images/sale-completed.png",alt:"",width:"120px"}}),t._v(" "),s("h2",[t._v(t._s(t.__("Sale Completed","wepos")))])]),t._v(" "),s("div",{staticClass:"print-section"},[s("print-receipt"),t._v(" "),s("button",{staticClass:"new-sale-btn",on:{click:function(e){e.preventDefault(),t.createNewSale()}}},[s("span",{staticClass:"icon flaticon-add"}),t._v(" "),s("span",{staticClass:"label"},[t._v(t._s(t.__("New Sale","wepos")))])])],1)])])],2):t._e(),t._v(" "),t.showHelp?s("modal",{attrs:{width:"700px",height:"500px"},on:{close:function(e){t.closeHelp()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-help-wrapper"},[s("h2",[t._v(t._s(t.__("Shortcut Keys","wepos")))]),t._v(" "),s("ul",[s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f1")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Search Product","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f2")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Scan Product","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f3")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Toggle Product View","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f4")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Fee in cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f5")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Discount in cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f6")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Customer note","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f7")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Customer Search","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("shift+f7")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add new Customer","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f8")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Create New Sale","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("shift+f8")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Empty your cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f9")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Go to payment receipt","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f10")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Process Payment","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("ctrl/cmd+p")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Print Receipt","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("ctrl/cmd+?")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Show/Close(Toggle) Help","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("esc")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Close anything","wepos")))])])])])])],2):t._e(),t._v(" "),t.showModal?s("modal",{attrs:{width:"98%",height:"95vh"},on:{close:function(e){t.backToSale()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-checkout-wrapper"},[s("div",{staticClass:"left-content"},[s("div",{staticClass:"header"},[t._v("\n "+t._s(t.__("Sale Summary","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"content",style:{height:t.modalLeftContentHeight}},[s("table",{staticClass:"sale-summary-cart"},[s("tbody",t._l(t.orderdata.line_items,function(e){return s("tr",[s("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price"},[e.on_sale?[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}))])]),t._v(" "),s("div",{staticClass:"footer"},[s("ul",[s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Subtotal","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.getSubtotal)))])]),t._v(" "),t.orderdata.fee_lines.length>0?t._l(t.orderdata.fee_lines,function(e,a){return s("li",{staticClass:"wepos-clearfix"},["discount"==e.type?[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(e.total)))])]],2)}):t._e(),t._v(" "),t.getTotalTax?s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.getTotalTax)))])]):t._e(),t._v(" "),s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.getTotal)))])]),t._v(" "),s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.getTotal)))])])],2)])]),t._v(" "),s("div",{staticClass:"right-content"},[s("div",{staticClass:"header wepos-clearfix"},[s("h2",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),s("span",{staticClass:"pay-amount wepos-right"},[t._v(t._s(t.formatPrice(t.getTotal)))])]),t._v(" "),s("div",{staticClass:"content"},[s("div",{staticClass:"payment-gateway"},[t.availableGateways.length>0?[t._l(t.availableGateways,function(e){return s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.payment_method,expression:"orderdata.payment_method"}],attrs:{type:"radio",name:"gateway",checked:""},domProps:{value:e.id,checked:t._q(t.orderdata.payment_method,e.id)},on:{change:function(s){t.$set(t.orderdata,"payment_method",e.id)}}}),t._v(" "),s("span",{staticClass:"gateway"},[t._v("\n "+t._s(e.title)+"\n ")])])}),t._v(" "),t.emptyGatewayDiv>0?t._l(t.emptyGatewayDiv,function(t){return s("label",{key:t},[s("span",{staticClass:"grid-placeholder"})])}):t._e()]:[s("p",[t._v(t._s(t.__("No gateway found","wepos")))])]],2),t._v(" "),"wepos_cash"==t.orderdata.payment_method?[s("div",{staticClass:"payment-option"},[s("div",{staticClass:"payment-amount"},[s("div",{staticClass:"input-part"},[s("div",{staticClass:"input-wrap"},[s("p",[t._v(t._s(t.__("Cash","wepos")))]),t._v(" "),s("div",{staticClass:"input-addon"},[s("span",{staticClass:"currency"},[t._v(t._s(t.wepos.currency_format_symbol))]),t._v(" "),s("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(" "),s("div",{staticClass:"change-money"},[s("p",[t._v(t._s(t.__("Change money","wepos"))+": "+t._s(t.formatPrice(t.changeAmount)))])])])])]:t._e()],2),t._v(" "),s("div",{staticClass:"footer wepos-clearfix"},[s("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(" "),s("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(" "),s("overlay",{attrs:{show:t.showOverlay}}),t._v(" "),s("print-receipt-html",{directives:[{name:"show",rawName:"v-show",value:t.createprintreceipt,expression:"createprintreceipt"}],attrs:{printdata:t.printdata,settings:t.settings.wepos_receipts}})],1)};a._withStripped=!0;var i={render:a,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}]),[132]);1 pluginWebpack([0],Array(56).concat([function(t,e,s){"use strict";e.a={name:"App"}},function(t,e,s){"use strict";var a=s(140),i=s(143),o=s(146),r=s(149),n=s(65),c=s.n(n),l=s(156),d=s(159),u=s(162);let p=wepos_get_lib("Modal");e.a={name:"Home",components:{ProductSearch:i.a,CustomerSearch:o.a,Overlay:a.a,Modal:p,MugenScroll:c.a,FeeKeypad:r.a,PrintReceipt:l.a,PrintReceiptHtml:d.a,CustomerNote:u.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:[],modalLeftContentHeight:"",emptyGatewayDiv:0,cashAmount:"",availableTax:[],settings:{},printdata:{gateway:{id:"",title:""}},createprintreceipt:!1,orderdata:{billing:{},shipping:{},line_items:[],fee_lines:[],customer_note:""},selectedCategory:"",categories:[],quickLinkList:wepos.hooks.applyFilters("wepos_quick_links",[])}),computed:{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},getSubtotal(){var t=0;return weLo_.forEach(this.orderdata.line_items,function(e,s){e.on_sale?t+=e.quantity*e.sale_price:t+=e.quantity*e.regular_price}),t},getTotalFee(){var t=0;return weLo_.forEach(this.orderdata.fee_lines,function(e,s){"fee"==e.type&&(t+=Math.abs(e.total))}),t},getTotalDiscount(){var t=0;return weLo_.forEach(this.orderdata.fee_lines,function(e,s){"discount"==e.type&&(t+=Number(Math.abs(e.total)))}),t},getTotalTax(){var t=this,e=0,s=0;return weLo_.forEach(this.orderdata.line_items,function(t,s){e+=Math.abs(t.tax_amount*t.quantity)}),weLo_.forEach(this.orderdata.fee_lines,function(e,a){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&&(s+=Math.abs(e.total)*Math.abs(o.rate)/100)}}),e+s},getOrderTotal(){return this.getSubtotal+this.getTotalFee+this.getTotalTax},getTotal(){return this.getOrderTotal-this.getTotalDiscount},changeAmount(){var t=this.cashAmount-this.getTotal;return t>0?this.formatNumber(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)}),s=weLo_.findIndex(this.categories,e),a=t.splice(0,s+1),i=[];if(a.length>0){for(var o=a.length-1;o>=0;o--)if(i.length>0){var r=weLo_.find(a,{id:a[o+1].parent_id});if(void 0!=r&&(i.push(r),null==r.parent_id))break}else i.push(a[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)}))}},methods:{openQucikMenu(){this.showQucikMenu=!0},openHelp(t){t.preventDefault(),this.showHelp=!0,this.showQucikMenu=!1},closeHelp(){this.showHelp=!1},addCustomerNote(t){this.orderdata.customer_note=t.trim()},removeBreadcrums(){this.$router.push({name:"Home"})},logout(){wepos.hooks.doAction("wepos_before_logout"),window.location.href=wepos.logout_url.toString()},emptyCart(){this.orderdata={billing:{},shipping:{},customer_id:0,line_items:[],fee_lines:[],customer_note:""},this.printdata={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.orderdata.line_items.length>0&&this.isSelectGateway()},processPayment(t){if(t.preventDefault(),this.ableToProcess()){var e=weLo_.find(this.availableGateways,{id:this.orderdata.payment_method});this.orderdata.payment_method_title=e.title,this.orderdata.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()}];var s=jQuery(".wepos-checkout-wrapper .right-content").find(".content");s.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",this.orderdata).done(t=>{wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/payment/process",t).done(e=>{"success"==e.result?(this.$router.push({name:"Home",query:{order_key:t.order_key,payment:"success"}}),this.printdata={line_items:this.orderdata.line_items,fee_lines:this.orderdata.fee_lines,subtotal:this.getSubtotal,taxtotal:this.getTotalTax,ordertotal:this.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()}):s.unblock()}).fail(t=>{s.unblock(),alert(t.responseJSON.message)})}).fail(t=>{s.unblock(),alert(t.responseJSON.message)})}},backGatewaySelection(){this.orderdata.payment_method="",this.orderdata.payment_method_title=""},initPayment(){this.showModal=!0,this.orderdata.payment_method=this.availableGateways[0].id},backToSale(){this.showModal=!1,this.showHelp=!1,this.orderdata.payment_method=""},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.orderdata.fee_lines.push({name:this.__("Discount","wepos"),type:"discount",value:t.toString(),isEdit:!1,discount_type:e,tax_status:"none",tax_class:"",total:0}),this.calculateDiscount(),this.calculateFee()},saveFee(t){this.orderdata.fee_lines[t].isEdit=!1,this.$nextTick(()=>{jQuery(this.$refs.fee_name).focus()})},setFee(t,e){this.orderdata.fee_lines.push({name:this.__("Fee","wepos"),type:"fee",value:t.toString(),isEdit:!1,fee_type:e,tax_status:"none",tax_class:"",total:0}),this.calculateFee(),this.calculateDiscount()},removeFeeLine(t){this.orderdata.fee_lines.splice(t,1)},calculateDiscount(){this.orderdata.fee_lines.length>0&&weLo_.forEach(this.orderdata.fee_lines,(t,e)=>{"discount"==t.type&&("percent"==t.discount_type?this.orderdata.fee_lines[e].total="-"+this.getSubtotal*Math.abs(t.value)/100:this.orderdata.fee_lines[e].total="-"+Math.abs(t.value))})},calculateFee(){this.orderdata.fee_lines.length>0&&weLo_.forEach(this.orderdata.fee_lines,(t,e)=>{"fee"==t.type&&("percent"==t.fee_type?this.orderdata.fee_lines[e].total=(this.getSubtotal*Math.abs(t.value)/100).toString():this.orderdata.fee_lines[e].total=Math.abs(t.value).toString())})},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,s)=>{this.products=this.products.concat(t),this.page+=1,this.totalPages=parseInt(s.getResponseHeader("X-WP-TotalPages")),this.productLoading=!1}).then((t,e,s)=>{this.fetchProducts()}):this.productLoading=!1},selectCustomer(t){Object.keys(t).length>0?(this.orderdata.billing=t.billing,this.orderdata.shipping=t.shipping,this.orderdata.customer_id=t.id):(this.orderdata.billing={},this.orderdata.shipping={},this.orderdata.customer_id=0)},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.addToCart(t)},addToCart(t){var e={};e.product_id=0===t.parent_id?t.id:t.parent_id,e.name=t.name,e.quantity=1,e.regular_price=t.regular_display_price,e.sale_price=t.sales_display_price,e.on_sale=t.on_sale,e.attribute=t.attributes,e.variation_id=0!==t.parent_id?t.id:0,e.editQuantity=!1,e.type=t.type,e.tax_amount=t.tax_amount,e.manage_stock=t.manage_stock,e.stock_status=t.stock_status,e.backorders_allowed=t.backorders_allowed,e.stock_quantity=t.stock_quantity;var s=weLo_.findIndex(this.orderdata.line_items,{product_id:e.product_id,variation_id:e.variation_id});s<0?this.hasStock(t)&&this.orderdata.line_items.push(e):this.hasStock(t,this.orderdata.line_items[s].quantity)&&(this.orderdata.line_items[s].quantity+=1),this.calculateDiscount(),this.calculateFee()},toggleEditQuantity(t,e){this.orderdata.line_items[e].editQuantity=!this.orderdata.line_items[e].editQuantity},removeItem(t){this.orderdata.line_items.splice(t,1),this.calculateDiscount(),this.calculateFee()},addQuantity(t){this.hasStock(t,t.quantity)&&t.quantity++,this.calculateDiscount(),this.calculateFee()},removeQuantity(t){if(t.quantity<=1)return this.calculateDiscount(),this.calculateFee(),1;t.quantity--,this.calculateDiscount(),this.calculateFee()},hasStock:(t,e=0)=>t.manage_stock?!!t.backorders_allowed||t.stock_quantity>e:"outofstock"!=t.stock_status,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})},fetchTaxes(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/taxes").done(t=>{this.availableTax=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").then(s=>{s.sort(function(t,e){return t.name.localeCompare(e.name)});var a=(t=[],e={},s.forEach(function(s){e[s.id]={response:s,children:e[s.id]&&e[s.id].children},null===s.parent_id?t.push(e[s.id]):(e[s.parent_id]=e[s.parent_id]||{},e[s.parent_id].children=e[s.parent_id].children||[],e[s.parent_id].children.push(e[s.id]))}),t),i={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},o=a.reduce(function t(e){return function(s,a){return a.response.level=e,s.concat(a.response,(a.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(s,{id:parseInt(this.$route.query.category)}))})},filterProducts(){this.products=this.products.filter(t=>weLo_.findIndex(t.categories,{id:this.$route.query.category})>0)}},created(){if(this.fetchSettings(),this.fetchTaxes(),this.fetchProducts(),this.fetchGateway(),this.fetchCategories(),"undefined"!=typeof localStorage){var t=JSON.parse(localStorage.getItem("cartdata"));this.orderdata=t||this.orderdata}window.addEventListener("beforeunload",()=>{"undefined"!=typeof localStorage&&localStorage.setItem("cartdata",JSON.stringify(this.orderdata))},!1)}}},function(t,e,s){"use strict";e.a={name:"Overlay",props:{show:{type:Boolean}}}},function(t,e,s){"use strict";var a=s(60),i=s(26);s.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:a.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,s={},a=this.products.filter(t=>{if("simple"==t.type&&t[e].toString()==this.serachInput)return!0;if("variable"==t.type){var s=!1;if(t.variations.length>0&&weLo_.forEach(t.variations,(t,a)=>{t[e].toString()==this.serachInput&&(s=!0)}),s)return!0}return!1});if(a.length>0)if("variable"==(a=a[0]).type)(s=a.variations.filter(t=>t[e].toString()==this.serachInput)[0]).parent_id=a.id,s.type=a.type,s.name=a.name,this.$emit("onProductAdded",s);else this.$emit("onProductAdded",a);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,s){"use strict";var a=s(61),i=s(0)(a.a,null,!1,null,null,null);i.options.__file="assets/src/frontend/components/KeyboardControl.vue",e.a=i.exports},function(t,e,s){"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<this.listLength-1&&this.selectedIndex++},addKeyHandler(t){window.addEventListener("keydown",this.keyHandler)},removeKeyHandler(){window.removeEventListener("keydown",this.keyHandler)}},created(){this.addKeyHandler()},destroyed(){this.removeKeyHandler()}}},function(t,e,s){"use strict";var a=s(60);let i=wepos_get_lib("Modal");e.a={name:"CustomerSearch",components:{Modal:i,KeyboardControl:a.a},data:()=>({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]}))},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}},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 s=void 0!==wepos.states[t.code]?wepos.states[t.code]:[],a=Object.keys(s);a.length>0?this.stateList=a.map(t=>({code:t,name:s[t]})):(this.stateList=s,this.selectedState=null)},generatePassword(t){for(var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",s="",a=0,i=e.length;a<t;++a)s+=e.charAt(Math.floor(Math.random()*i));return s}},mounted(){this.eventBus.$on("emptycart",t=>{this.serachInput=""})}}},function(t,e,s){"use strict";var a=s(151);e.a={name:"FeeKeypad",components:{keyboard:a.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|{<span class="keypord-icon flaticon-backspace"></span>: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,s){"use strict";const a="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("||",a).replace("{{",i).replace("}}",o).split("|")},buttons(){return this.lines.map(t=>{let e=[],s=null;return t.match(new RegExp(`(${i}|${o}|${a}|.)`,"g")).forEach(t=>{if("{"===t)s="";else if("}"===t){let t=s.split(":"),a=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:a,args:o}),s=null}else null!==s?s+=t:(t===a&&(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<this.layouts.length))throw new Error("The requested layout does not exist.");this.layout=t},clear(){this.mutate("")}}}},,function(t,e,s){"use strict";e.a={name:"ReceiptPrint",methods:{printReceipt(){setTimeout(()=>{window.print()},500)}}}},function(t,e,s){"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,s){"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,s){"use strict";var a=o(s(133)),i=o(s(137));function o(t){return t&&t.__esModule?t:{default:t}}var r=wepos_get_lib("Vue");r.config.productionTip=!1,new r({el:"#vue-frontend-app",router:i.default,render:function(t){return t(a.default)}})},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(56),i=s(136),o=!1;var r=function(t){o||s(134)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"vue-frontend-app"}},[e("router-view")],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a,i=s(138),o=(a=i)&&a.__esModule?a:{default:a};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,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(57),i=s(165),o=!1;var r=function(t){o||s(139)},n=s(0)(a.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,s){"use strict";var a=s(58),i=s(142),o=!1;var r=function(t){o||s(141)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this.$createElement,e=this._self._c||t;return this.show?e("div",{staticClass:"overlay"}):this._e()};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(59),i=s(145),o=!1;var r=function(t){o||s(144)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.outside,expression:"outside"}],staticClass:"search-box"},[s("form",{attrs:{action:"",autocomplete:"off"},on:{submit:function(e){e.preventDefault(),t.handleProductScan(e)}}},[s("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?s("span",{staticClass:"search-icon flaticon-musica-searcher"}):t._e(),t._v(" "),"scan"==t.mode?s("span",{staticClass:"search-icon flaticon-supermarket-scanner"}):t._e(),t._v(" "),s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"search-type"},[s("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(" "),s("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(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showResults&&"product"==t.mode,expression:"showResults && mode=='product'"}],staticClass:"search-result"},[t.searchableProduct.length?s("div",[s("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 a=e.selectedIndex;return t._l(t.searchableProduct,function(e,i){return s("li",{key:i,staticClass:"product-search-item",class:{selected:i===a}},["simple"==e.type?[s("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(s){t.addToCartAction(e)}}},[t._v(t._s(e.name)+"\n "),s("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?s("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e(),t._v(" "),"variable"==e.type?[s("a",{attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.selectVariation(e)}}},[t._v(t._s(e.name)+"\n "),s("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?s("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e()],2)})}}])})],1):s("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No product found","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"suggession"},[s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showVariationModal?s("modal",{attrs:{title:t.__("Select Variations","wepos"),width:"500px",height:"auto",footer:!0,header:!0},on:{close:function(e){t.showVariationModal=!1}}},[s("template",{slot:"body"},t._l(t.selectedVariationProduct.attributes,function(e){return s("div",{staticClass:"variation-attribute-wrapper"},[s("div",{staticClass:"attribute"},[s("p",[t._v(t._s(e.name))]),t._v(" "),s("div",{staticClass:"options"},[t._l(e.options,function(a){return[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.chosenAttribute[e.name],expression:"chosenAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:a,checked:t._q(t.chosenAttribute[e.name],a)},on:{change:function(s){t.$set(t.chosenAttribute,e.name,a)}}}),t._v(" "),s("div",{staticClass:"box"},[t._v("\n "+t._s(a)+"\n ")])])]})],2)])])})),t._v(" "),s("template",{slot:"footer"},[s("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)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(62),i=s(148),o=!1;var r=function(t){o||s(147)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("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"},[s("form",{attrs:{action:"",autocomplete:"off"}},[s("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"}},[s("defs",[s("linearGradient",{attrs:{x1:"14.5524094%",y1:"14.6909544%",x2:"82.7722259%",y2:"85.2519444%",id:"linearGradient-1"}},[s("stop",{attrs:{"stop-color":"#C444FB",offset:"0%"}}),t._v(" "),s("stop",{attrs:{"stop-color":"#5B56D7",offset:"100%"}})],1)],1),t._v(" "),s("g",{attrs:{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[s("g",{attrs:{id:"POS-Design---Dokan-P2",transform:"translate(-759.000000, -27.000000)"}},[s("g",{attrs:{id:"Group",transform:"translate(759.000000, 27.000000)"}},[s("circle",{attrs:{id:"Oval",fill:"url(#linearGradient-1)","fill-rule":"nonzero",cx:"9.5",cy:"9.5",r:"9.5"}}),t._v(" "),s("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)"}},[s("g",{attrs:{id:"flaticon1543304699-svg"}},[s("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(" "),s("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(" "),s("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(" "),s("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(" "),s("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(" "),s("span",{staticClass:"add-new-customer flaticon-add",on:{click:function(e){e.preventDefault(),t.addNewCustomer()}}}),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showCustomerResults,expression:"showCustomerResults"}],staticClass:"search-result"},[t.customers.length?s("div",[s("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 a=e.selectedIndex;return t._l(t.customers,function(e,i){return s("li",{key:i,staticClass:"customer-search-item",class:{selected:i===a}},[s("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(s){t.selectCustomer(e)}}},[s("span",{staticClass:"avatar wepos-left"},[s("img",{attrs:{src:e.avatar_url,alt:e.first_name+" "+e.last_name}})]),t._v(" "),s("span",{staticClass:"name wepos-left"},[t._v(t._s(e.first_name+" "+e.last_name)),s("span",{staticClass:"metadata"},[t._v(t._s(e.email))])]),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])])})}}])})],1):s("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No customer found","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"suggession"},[s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showNewCustomerModal?s("modal",{attrs:{title:t.__("Add New Customer","wepos"),width:"700px",footer:!0,header:!0},on:{close:t.closeNewCustomerModal}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-new-customer-form"},[s("form",{staticClass:"wepos-form",attrs:{action:"",autocomplete:"off"}},[s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row"},[s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedCountry,callback:function(e){t.selectedCountry=e},expression:"selectedCountry"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2),t._v(" "),t.stateList.length>0?[s("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[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedState,callback:function(e){t.selectedState=e},expression:"selectedState"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2)]:[s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row"},[s("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(" "),s("template",{slot:"footer"},[s("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)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(63),i=s(154),o=!1;var r=function(t){o||s(150)},n=s(0)(a.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,s){"use strict";var a=s(64),i=s(153),o=!1;var r=function(t){o||s(152)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("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 s("div",{staticClass:"vue-keyboard-row",attrs:{role:"row","data-keys":e.length}},t._l(e,function(e){return s("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)}}})}))}))};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-fee-keypad-wrap",class:t.className},[s("v-popover",{attrs:{offset:"5","popover-base-class":"fee-keypad tooltip popover",placement:"top",open:t.viewFeeKeypad}},[s("a",{attrs:{href:"#"},on:{click:t.showFeeKeypad}},[t._v(t._s(t.__("Add","wepos"))+" "+t._s(t.name))]),t._v(" "),s("template",{slot:"popover"},[s("form",[s("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(" "),s("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)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},,function(t,e,s){"use strict";var a=s(66),i=s(158),o=!1;var r=function(t){o||s(157)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"wepos-print-receipt"}},[s("button",{staticClass:"print-btn",on:{click:function(e){e.preventDefault(),t.printReceipt()}}},[s("span",{staticClass:"icon flaticon-printer"}),t._v(" "),s("span",{staticClass:"label"},[t._v(t._s(t.__("Print Receipt","wepos")))])])])};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(67),i=s(161),o=!1;var r=function(t){o||s(160)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"wepos-checkout-print-wrapper"},[s("div",{staticClass:"header",domProps:{innerHTML:t._s(t.settings.receipt_header)}}),t._v(" "),s("div",{staticClass:"order-info"},[s("span",{staticClass:"wepos-left"},[s("strong",[t._v(t._s(t.__("Order ID","wepos"))+": #"+t._s(t.printdata.order_id))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[s("strong",[t._v(t._s(t.__("Order Date","wepos"))+": "+t._s(t.formatDate(t.printdata.order_date)))])]),t._v(" "),s("div",{staticClass:"wepos-clearfix"})]),t._v(" "),s("div",{staticClass:"content"},[s("table",{staticClass:"sale-summary"},[s("tbody",[t._l(t.printdata.line_items,function(e){return s("tr",[s("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price"},[e.on_sale?[s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))]),t._v(" "),s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}),t._v(" "),s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Subtotal","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.subtotal)))])]),t._v(" "),t._l(t.printdata.fee_lines,function(e,a){return s("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]],2)}),t._v(" "),t.printdata.taxtotal?s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.taxtotal)))])]):t._e(),t._v(" "),s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.ordertotal)))])]),t._v(" "),t._m(0),t._v(" "),s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Payment method","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.printdata.gateway.title||""))])]),t._v(" "),(t.printdata.gateway.id="wepos_cash")?[s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Cash Given","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.cashamount)))])]),t._v(" "),s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Change Money","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.changeamount)))])])]:t._e()],2)])]),t._v(" "),s("div",{staticClass:"footer",domProps:{innerHTML:t._s(t.settings.receipt_footer)}})])};a._withStripped=!0;var i={render:a,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,s){"use strict";var a=s(68),i=s(164),o=!1;var r=function(t){o||s(163)},n=s(0)(a.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,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-custom-note-wrap"},[s("v-popover",{attrs:{offset:"5","popover-base-class":"customer-note tooltip popover",placement:"top",open:t.viewNotePopover}},[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openNote(e)}}},[t._v(t._s(t.__("Add Note","wepos")))]),t._v(" "),s("template",{slot:"popover"},[s("form",{on:{submit:function(e){e.preventDefault(),t.addCustomerNote(e)}}},[s("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(" "),s("button",{staticClass:"add-note-btn",attrs:{type:"submit",disabled:""==t.customerNote}},[t._v(t._s(t.__("Add Note","wepos")))])])])],2)],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],attrs:{id:"wepos-main"}},[s("div",{staticClass:"content-product"},[s("div",{staticClass:"top-panel wepos-clearfix"},[s("div",{staticClass:"search-bar"},[s("product-search",{attrs:{products:t.products,settings:t.settings},on:{onProductAdded:t.addToCart}})],1),t._v(" "),s("div",{staticClass:"category"},[s("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[s("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"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("Not found","wepos")))])])],2)],1),t._v(" "),s("div",{staticClass:"toggle-view"},[s("div",{staticClass:"product-toggle"},[s("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(" "),s("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?s("div",{staticClass:"breadcrumb"},[s("ul",[t._l(t.getBreadCrums,function(e){return[s("router-link",{attrs:{tag:"li",to:{name:"Home",query:{category:e.id}}}},[s("a",[t._v(t._s(e.name))])])]})],2),t._v(" "),s("span",{staticClass:"close-breadcrumb flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeBreadcrums(e)}}})]):t._e(),t._v(" "),s("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?s("div",{staticClass:"item"},["simple"==e.type?[s("div",{staticClass:"item-wrap",on:{click:function(s){if(!("button"in s)&&t._k(s.keyCode,"prevnt",void 0,s.key))return null;t.addToCart(e)}}},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"==t.productView?s("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n\n ")]):s("div",{staticClass:"title"},[s("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),s("ul",{staticClass:"meta"},[e.sku?s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Sku :","wepos")))]),t._v(" "),s("span",{staticClass:"value"},[t._v(t._s(e.sku))])]):t._e(),t._v(" "),s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),s("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),s("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})])]:t._e(),t._v(" "),"variable"==e.type?[s("v-popover",{attrs:{offset:"10","popover-base-class":"product-variation tooltip popover",placement:"left-end"}},[s("div",{staticClass:"item-wrap",on:{click:function(s){t.selectVariationProduct(e)}}},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"==t.productView?s("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n ")]):s("div",{staticClass:"title"},[s("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),s("ul",{staticClass:"meta"},[s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),s("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),s("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})]),t._v(" "),s("template",{slot:"popover"},[s("div",{staticClass:"variation-header"},[t._v("\n "+t._s(t.__("Select Variations","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"variation-body"},[t._l(e.attributes,function(e){return[s("div",{staticClass:"attribute"},[s("p",[t._v(t._s(e.name))]),t._v(" "),s("div",{staticClass:"options"},[t._l(e.options,function(a){return[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedAttribute[e.name],expression:"selectedAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:a,checked:t._q(t.selectedAttribute[e.name],a)},on:{change:function(s){t.$set(t.selectedAttribute,e.name,a)}}}),t._v(" "),s("div",{staticClass:"box"},[t._v("\n "+t._s(a)+"\n ")])])]})],2)])]})],2),t._v(" "),s("div",{staticClass:"variation-footer"},[s("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?s("div",{staticClass:"no-product-found"},[s("img",{attrs:{src:t.wepos.assets_url+"/images/no-product.png",alt:"",width:"120px"}}),t._v(" "),s("p",[t._v(t._s(t.__("No Product Found","wepos")))])]):t._e()],t._v(" "),t.productLoading?s("div",{staticClass:"product-loading"},[s("div",{staticClass:"spinner spinner-loading"})]):t._e()],2)]),t._v(" "),s("div",{staticClass:"content-cart"},[s("div",{staticClass:"top-panel"},[s("customer-search",{on:{onCustomerSelected:t.selectCustomer}}),t._v(" "),s("div",{staticClass:"action"},[s("div",{staticClass:"more-options"},[s("v-popover",{attrs:{offset:"5","popover-base-class":"wepos-dropdown-menu tooltip popover",placement:"bottom-end",open:t.showQucikMenu}},[s("button",{staticClass:"wepos-button",on:{click:function(e){e.preventDefault(),t.openQucikMenu()}}},[s("span",{staticClass:"more-icon flaticon-more"})]),t._v(" "),s("template",{slot:"popover"},[s("ul",[s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.emptyCart(e)}}},[s("span",{staticClass:"flaticon-empty-cart quick-menu-icon"}),t._v(t._s(t.__("Empty Cart","wepos")))])]),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openHelp(e)}}},[s("span",{staticClass:"flaticon-information quick-menu-icon"}),t._v(t._s(t.__("Help","wepos")))])]),t._v(" "),s("li",{staticClass:"divider"}),t._v(" "),t._l(t.quickLinkList,function(t,e){return s(t,{key:e,tag:"component"})}),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.logout(e)}}},[s("span",{staticClass:"flaticon-logout quick-menu-icon"}),t._v(t._s(t.__("Logout","wepos")))])])],2)])],2)],1)])],1),t._v(" "),t.settings.wepos_general?s("div",{staticClass:"cart-panel"},[s("div",{staticClass:"cart-content"},[s("table",{staticClass:"cart-table"},[s("thead",[s("tr",[s("th",{attrs:{width:"65%"}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),s("th",{attrs:{width:"15%"}},[t._v(t._s(t.__("Qty","wepos")))]),t._v(" "),s("th",{attrs:{width:"30%"}},[t._v(t._s(t.__("Price","wepos")))]),t._v(" "),s("th"),t._v(" "),s("th")])]),t._v(" "),s("tbody",[t.orderdata.line_items.length>0?[t._l(t.orderdata.line_items,function(e,a){return[s("tr",[s("td",{staticClass:"name",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"qty",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[e.on_sale?[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-right-arrow",class:{open:e.editQuantity},on:{click:function(s){s.preventDefault(),t.toggleEditQuantity(e,a)}}})]),t._v(" "),s("td",{staticClass:"remove"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeItem(a)}}})])]),t._v(" "),e.editQuantity?s("tr",{staticClass:"update-quantity-wrap"},[s("td",{attrs:{colspan:"5"}},[s("span",{staticClass:"qty"},[t._v(t._s(t.__("Quantity","wepos")))]),t._v(" "),s("span",{staticClass:"qty-number"},[s("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(s){s.target.composing||t.$set(e,"quantity",s.target.value)}}})]),t._v(" "),s("span",{staticClass:"qty-action"},[s("a",{staticClass:"add",attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.addQuantity(e)}}},[t._v("+")]),t._v(" "),s("a",{staticClass:"minus",attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.removeQuantity(e)}}},[t._v("-")])])])]):t._e()]})]:[s("tr",{staticClass:"no-item"},[s("td",{attrs:{colspan:"5"}},[s("img",{attrs:{src:t.wepos.assets_url+"/images/empty-cart.png",alt:"",width:"120px"}}),t._v(" "),s("p",[t._v(t._s(t.__("Empty Cart","wepos")))])])])]],2)])]),t._v(" "),s("div",{staticClass:"cart-calculation"},[s("form",{attrs:{autocomplete:"off"}},[s("table",{staticClass:"cart-total-table"},[s("tbody",[s("tr",[s("td",{staticClass:"label"},[t._v(t._s(t.__("Subtotal","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.getSubtotal)))]),t._v(" "),s("td",{staticClass:"action"})]),t._v(" "),t.orderdata.fee_lines.length>0?t._l(t.orderdata.fee_lines,function(e,a){return s("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[s("td",{staticClass:"label"},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"name"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("−"+t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]:[e.isEdit?[s("td",{staticClass:"label",attrs:{colspan:"2"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.fee_lines[a].name,expression:"orderdata.fee_lines[key].name"}],ref:"fee_name",refInFor:!0,staticClass:"fee-name",attrs:{type:"text",placeholder:t.__("Fee Name","wepos")},domProps:{value:t.orderdata.fee_lines[a].name},on:{input:function(e){e.target.composing||t.$set(t.orderdata.fee_lines[a],"name",e.target.value)}}}),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.fee_lines[a].total,expression:"orderdata.fee_lines[key].total"}],ref:"fee_total",refInFor:!0,staticClass:"fee-amount",attrs:{type:"number",min:"0",step:"any",placeholder:t.__("Total","wepos")},domProps:{value:t.orderdata.fee_lines[a].total},on:{input:function(e){e.target.composing||t.$set(t.orderdata.fee_lines[a],"total",e.target.value)}}}),t._v(" "),"yes"==t.settings.wepos_general.enable_fee_tax?[s("label",{attrs:{for:"fee-tax-status"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.fee_lines[a].tax_status,expression:"orderdata.fee_lines[key].tax_status"}],staticClass:"fee-tax-status",attrs:{type:"checkbox",id:"fee-tax-status","true-value":"taxable","false-value":"none"},domProps:{checked:Array.isArray(t.orderdata.fee_lines[a].tax_status)?t._i(t.orderdata.fee_lines[a].tax_status,null)>-1:t._q(t.orderdata.fee_lines[a].tax_status,"taxable")},on:{change:function(e){var s=t.orderdata.fee_lines[a].tax_status,i=e.target,o=i.checked?"taxable":"none";if(Array.isArray(s)){var r=t._i(s,null);i.checked?r<0&&(t.orderdata.fee_lines[a].tax_status=s.concat([null])):r>-1&&(t.orderdata.fee_lines[a].tax_status=s.slice(0,r).concat(s.slice(r+1)))}else t.$set(t.orderdata.fee_lines[a],"tax_status",o)}}}),t._v(" Taxable")]),t._v(" "),"taxable"==t.orderdata.fee_lines[a].tax_status?s("select",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.fee_lines[a].tax_class,expression:"orderdata.fee_lines[key].tax_class"}],staticClass:"fee-tax-class",on:{change:function(e){var s=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.orderdata.fee_lines[a],"tax_class",e.target.multiple?s:s[0])}}},t._l(t.availableTax,function(e){return s("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(" "),s("button",{attrs:{disabled:""==t.orderdata.fee_lines[a].name},on:{click:function(e){t.saveFee(a)}}},[t._v(t._s(t.__("Apply","wepos")))])],2),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]:[s("td",{staticClass:"label",on:{dblclick:function(e){t.orderdata.fee_lines[a].isEdit=!0}}},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"name"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]]],2)}):t._e(),t._v(" "),t.getTotalTax?s("tr",{staticClass:"tax"},[s("td",{staticClass:"label"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.getTotalTax)))]),t._v(" "),s("td",{staticClass:"action"})]):t._e(),t._v(" "),s("tr",{staticClass:"cart-action"},[s("td",{attrs:{colspan:"3"}},[s("fee-keypad",{attrs:{name:t.__("Discount","wepos"),"short-key":"discount"},on:{inputfee:t.setDiscount}}),t._v(" "),s("fee-keypad",{attrs:{name:t.__("Fee","wepos"),"short-key":"fee"},on:{inputfee:t.setFee}}),t._v(" "),""==t.orderdata.customer_note?s("customer-note",{on:{addnote:t.addCustomerNote}}):t._e()],1)]),t._v(" "),t.orderdata.customer_note?s("tr",{staticClass:"note"},[s("td",{staticClass:"note-text",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.orderdata.customer_note)+"\n ")]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.orderdata.customer_note=""}}})])]):t._e(),t._v(" "),s("tr",{staticClass:"pay-now",on:{click:function(e){t.initPayment()}}},[s("td",[t._v(t._s(t.__("Pay Now","wepos")))]),t._v(" "),s("td",{staticClass:"amount"},[t._v(t._s(t.formatPrice(t.getTotal)))]),t._v(" "),t._m(0)])],2)])])])]):t._e()]),t._v(" "),t.showPaymentReceipt?s("modal",{attrs:{width:"600px",height:"400px"},on:{close:function(e){t.createNewSale()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-payment-receipt"},[s("div",{staticClass:"sale-completed"},[s("img",{attrs:{src:t.wepos.assets_url+"/images/sale-completed.png",alt:"",width:"120px"}}),t._v(" "),s("h2",[t._v(t._s(t.__("Sale Completed","wepos")))])]),t._v(" "),s("div",{staticClass:"print-section"},[s("print-receipt"),t._v(" "),s("button",{staticClass:"new-sale-btn",on:{click:function(e){e.preventDefault(),t.createNewSale()}}},[s("span",{staticClass:"icon flaticon-add"}),t._v(" "),s("span",{staticClass:"label"},[t._v(t._s(t.__("New Sale","wepos")))])])],1)])])],2):t._e(),t._v(" "),t.showHelp?s("modal",{attrs:{width:"700px",height:"500px"},on:{close:function(e){t.closeHelp()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-help-wrapper"},[s("h2",[t._v(t._s(t.__("Shortcut Keys","wepos")))]),t._v(" "),s("ul",[s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f1")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Search Product","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f2")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Scan Product","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f3")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Toggle Product View","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f4")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Fee in cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f5")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Discount in cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f6")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Customer note","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f7")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Customer Search","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("shift+f7")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add new Customer","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f8")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Create New Sale","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("shift+f8")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Empty your cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f9")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Go to payment receipt","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f10")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Process Payment","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("ctrl/cmd+p")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Print Receipt","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("ctrl/cmd+?")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Show/Close(Toggle) Help","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("esc")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Close anything","wepos")))])])])])])],2):t._e(),t._v(" "),t.showModal?s("modal",{attrs:{width:"98%",height:"95vh"},on:{close:function(e){t.backToSale()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-checkout-wrapper"},[s("div",{staticClass:"left-content"},[s("div",{staticClass:"header"},[t._v("\n "+t._s(t.__("Sale Summary","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"content",style:{height:t.modalLeftContentHeight}},[s("table",{staticClass:"sale-summary-cart"},[s("tbody",t._l(t.orderdata.line_items,function(e){return s("tr",[s("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price"},[e.on_sale?[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}))])]),t._v(" "),s("div",{staticClass:"footer"},[s("ul",[s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Subtotal","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.getSubtotal)))])]),t._v(" "),t.orderdata.fee_lines.length>0?t._l(t.orderdata.fee_lines,function(e,a){return s("li",{staticClass:"wepos-clearfix"},["discount"==e.type?[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(e.total)))])]],2)}):t._e(),t._v(" "),t.getTotalTax?s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.getTotalTax)))])]):t._e(),t._v(" "),s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.getTotal)))])]),t._v(" "),s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.getTotal)))])])],2)])]),t._v(" "),s("div",{staticClass:"right-content"},[s("div",{staticClass:"header wepos-clearfix"},[s("h2",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),s("span",{staticClass:"pay-amount wepos-right"},[t._v(t._s(t.formatPrice(t.getTotal)))])]),t._v(" "),s("div",{staticClass:"content"},[s("div",{staticClass:"payment-gateway"},[t.availableGateways.length>0?[t._l(t.availableGateways,function(e){return s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.orderdata.payment_method,expression:"orderdata.payment_method"}],attrs:{type:"radio",name:"gateway",checked:""},domProps:{value:e.id,checked:t._q(t.orderdata.payment_method,e.id)},on:{change:function(s){t.$set(t.orderdata,"payment_method",e.id)}}}),t._v(" "),s("span",{staticClass:"gateway"},[t._v("\n "+t._s(e.title)+"\n ")])])}),t._v(" "),t.emptyGatewayDiv>0?t._l(t.emptyGatewayDiv,function(t){return s("label",{key:t},[s("span",{staticClass:"grid-placeholder"})])}):t._e()]:[s("p",[t._v(t._s(t.__("No gateway found","wepos")))])]],2),t._v(" "),"wepos_cash"==t.orderdata.payment_method?[s("div",{staticClass:"payment-option"},[s("div",{staticClass:"payment-amount"},[s("div",{staticClass:"input-part"},[s("div",{staticClass:"input-wrap"},[s("p",[t._v(t._s(t.__("Cash","wepos")))]),t._v(" "),s("div",{staticClass:"input-addon"},[s("span",{staticClass:"currency"},[t._v(t._s(t.wepos.currency_format_symbol))]),t._v(" "),s("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(" "),s("div",{staticClass:"change-money"},[s("p",[t._v(t._s(t.__("Change money","wepos"))+": "+t._s(t.formatPrice(t.changeAmount)))])])])])]:t._e()],2),t._v(" "),s("div",{staticClass:"footer wepos-clearfix"},[s("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(" "),s("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(" "),s("overlay",{attrs:{show:t.showOverlay}}),t._v(" "),s("print-receipt-html",{directives:[{name:"show",rawName:"v-show",value:t.createprintreceipt,expression:"createprintreceipt"}],attrs:{printdata:t.printdata,settings:t.settings.wepos_receipts}})],1)};a._withStripped=!0;var i={render:a,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}]),[132]); -
wepos/trunk/includes/class-rest-api.php
r2064842 r2089750 23 23 public function __construct() { 24 24 $this->class_map = apply_filters( 'wepos_rest_api_class_map', array( 25 WEPOS_INCLUDES . '/api/class-payment-controller.php' => 'WePOS\api\Payment', 26 WEPOS_INCLUDES . '/api/class-settings-controller.php' => 'WePOS\api\Settings', 27 WEPOS_INCLUDES . '/api/class-tax-controller.php' => 'WePOS\api\Tax', 25 WEPOS_INCLUDES . '/api/class-payment-controller.php' => 'WePOS\api\Payment', 26 WEPOS_INCLUDES . '/api/class-settings-controller.php' => 'WePOS\api\Settings', 27 WEPOS_INCLUDES . '/api/class-tax-controller.php' => 'WePOS\api\Tax', 28 WEPOS_INCLUDES . '/api/class-customers-controller.php' => 'WePOS\api\Customer', 29 WEPOS_INCLUDES . '/api/class-products-controller.php' => 'WePOS\api\Products' 28 30 ) ); 29 31 … … 34 36 add_filter( 'woocommerce_rest_prepare_product_cat', [ $this, 'category_response' ], 10, 3 ); 35 37 add_filter( 'woocommerce_rest_prepare_tax', [ $this, 'tax_response' ], 10, 3 ); 38 add_filter( 'woocommerce_rest_pre_insert_shop_order_object', [ $this, 'validate_item_stock_before_order' ], 10, 3 ); 36 39 } 37 40 … … 58 61 public function product_response( $response, $product, $request ) { 59 62 global $_wp_additional_image_sizes; 60 61 63 $data = $response->get_data(); 62 64 $type = isset( $data['type'] ) ? $data['type'] : ''; … … 75 77 } 76 78 77 $data['variations'] = []; 78 $data['variations'] = $variation_data; 79 $price_excl_tax = wc_get_price_excluding_tax( $product ); 80 $price_incl_tax = wc_get_price_including_tax( $product ); 81 $tax_amount = (float)$price_incl_tax - (float)$price_excl_tax; 79 82 83 $data['variations'] = []; 84 $data['variations'] = $variation_data; 85 $data['tax_amount'] = wc_format_decimal( $tax_amount, wc_get_price_decimals() ); 80 86 $data['regular_display_price'] = wc_format_decimal( wc_get_price_to_display( $product, [ 'price' => $product->get_regular_price() ] ), wc_get_price_decimals() ); 81 87 $data['sales_display_price'] = wc_format_decimal( wc_get_price_to_display( $product, ['price' => $product->get_sale_price() ] ), wc_get_price_decimals() ); 82 88 $data['barcode'] = $product->get_meta( '_wepos_barcode' ); 83 84 $price_excl_tax = wc_get_price_excluding_tax( $product );85 $price_incl_tax = wc_get_price_including_tax( $product );86 $tax_amount = (float)$price_incl_tax - (float)$price_excl_tax;87 $data['tax_amount'] = wc_format_decimal( $tax_amount, wc_get_price_decimals() );88 89 89 90 if ( ! empty( $data['images'] ) ) { … … 98 99 99 100 $response->set_data( $data ); 101 100 102 return $response; 101 103 } … … 128 130 return $response; 129 131 } 132 133 /** 134 * Validate Stock in order item 135 * 136 * @since 1.0.0 137 * 138 * @return void 139 */ 140 public function validate_item_stock_before_order( $order, $request, $creating ) { 141 if ( ! $creating ) { 142 return $order; 143 } 144 145 $items = $order->get_items(); 146 147 foreach ( $items as $item ) { 148 $product = $item->get_product(); 149 $is_manage_stock = $product->get_manage_stock(); 150 $is_backorder_allowed = $product->get_backorders(); 151 152 if ( ! $is_manage_stock || 'no' !== $is_backorder_allowed ) { 153 return $order; 154 } 155 156 $stock_quantity = $product->get_stock_quantity(); 157 $order_quantity = $item->get_quantity(); 158 159 if ( $order_quantity > $stock_quantity ) { 160 throw new \WC_REST_Exception( 'woocommerce_rest_invalid_product_quantity', sprintf( __( 'The item %s already out of stock. Please remove this from cart', 'wepos' ), $product->get_name() ), 400 ); 161 } 162 } 163 164 return $order; 165 } 130 166 } -
wepos/trunk/languages/wepos.pot
r2079800 r2089750 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: wePOS - Point Of Sale (POS) for WooCommerce 1.0. 4\n"5 "Project-Id-Version: wePOS - Point Of Sale (POS) for WooCommerce 1.0.5\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wepos\n" 7 "POT-Creation-Date: 2019-05- 03 10:47:53+00:00\n"7 "POT-Creation-Date: 2019-05-17 09:25:11+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" … … 15 15 16 16 #: assets/js/admin.js:114 assets/js/admin.js:361 assets/js/admin.js:453 17 #: assets/js/admin.js:1421 assets/js/bootstrap.js:89 718 #: assets/js/frontend.js:26 69 assets/js/frontend.js:285119 #: assets/js/frontend.js:29 35 assets/js/frontend.js:344520 #: assets/js/frontend.js:4 494 assets/js/frontend.js:466121 #: assets/js/frontend.js:47 65 assets/js/frontend.js:510622 #: assets/js/frontend.js:52 17assets/js/vendor.js:2619917 #: assets/js/admin.js:1421 assets/js/bootstrap.js:898 18 #: assets/js/frontend.js:2691 assets/js/frontend.js:2873 19 #: assets/js/frontend.js:2957 assets/js/frontend.js:3467 20 #: assets/js/frontend.js:4507 assets/js/frontend.js:4674 21 #: assets/js/frontend.js:4778 assets/js/frontend.js:5119 22 #: assets/js/frontend.js:5230 assets/js/vendor.js:26199 23 23 #: assets/js/vendor.js:26775 assets/js/vendor.js:26885 24 24 #: assets/js/vendor.js:27005 assets/js/vendor.js:27027 … … 80 80 msgstr "" 81 81 82 #: assets/js/bootstrap.js:80 682 #: assets/js/bootstrap.js:807 83 83 msgid "textarea" 84 84 msgstr "" 85 85 86 #: assets/js/frontend.js:75 9 assets/js/frontend.js:109987 #: assets/js/frontend.js:11 27assets/js/frontend.min.js:186 #: assets/js/frontend.js:752 assets/js/frontend.js:1113 87 #: assets/js/frontend.js:1141 assets/js/frontend.min.js:1 88 88 #: assets/src/frontend/components/Home.vue:721 89 #: assets/src/frontend/components/Home.vue:10 7190 #: assets/src/frontend/components/Home.vue:1 09989 #: assets/src/frontend/components/Home.vue:1092 90 #: assets/src/frontend/components/Home.vue:1120 91 91 msgid "All categories" 92 92 msgstr "" 93 93 94 #: assets/js/frontend.js:90 8assets/js/frontend.min.js:194 #: assets/js/frontend.js:901 assets/js/frontend.min.js:1 95 95 #: assets/src/frontend/components/Home.vue:245 96 96 #: assets/src/frontend/components/Home.vue:434 … … 100 100 msgstr "" 101 101 102 #: assets/js/frontend.js:92 8assets/js/frontend.min.js:1102 #: assets/js/frontend.js:921 assets/js/frontend.min.js:1 103 103 #: assets/src/frontend/components/Home.vue:265 104 104 #: assets/src/frontend/components/Home.vue:438 … … 108 108 msgstr "" 109 109 110 #: assets/js/frontend.js:13 20assets/js/frontend.min.js:1110 #: assets/js/frontend.js:1334 assets/js/frontend.min.js:1 111 111 #: assets/src/frontend/components/ProductSearch.vue:120 112 112 msgid "Scan your product" 113 113 msgstr "" 114 114 115 #: assets/js/frontend.js:13 20assets/js/frontend.min.js:1115 #: assets/js/frontend.js:1334 assets/js/frontend.min.js:1 116 116 #: assets/src/frontend/components/ProductSearch.vue:120 117 117 msgid "Search product by typing" 118 118 msgstr "" 119 119 120 #: assets/js/frontend.js:19 24assets/js/frontend.min.js:1121 #: assets/src/frontend/components/CustomerSearch.vue: 295120 #: assets/js/frontend.js:1965 assets/js/frontend.min.js:1 121 #: assets/src/frontend/components/CustomerSearch.vue:326 122 122 msgid "Please enter an email address for customer" 123 123 msgstr "" 124 124 125 #: assets/js/frontend.js:44 28125 #: assets/js/frontend.js:4441 126 126 msgid "aside" 127 127 msgstr "" 128 128 129 #: assets/js/frontend.js:50 20129 #: assets/js/frontend.js:5033 130 130 msgid "tr" 131 131 msgstr "" 132 132 133 #: assets/js/frontend.js:77 18133 #: assets/js/frontend.js:7731 134 134 msgid "td" 135 135 msgstr "" … … 518 518 msgstr "" 519 519 520 #: includes/api/class-customers-controller.php:42 521 msgid "New user email address." 522 msgstr "" 523 524 #: includes/api/class-customers-controller.php:46 525 msgid "New user username." 526 msgstr "" 527 528 #: includes/api/class-customers-controller.php:51 529 msgid "New user password." 530 msgstr "" 531 532 #: includes/api/class-customers-controller.php:69 533 #: includes/api/class-customers-controller.php:84 534 #: includes/api/class-products-controller.php:47 535 #: includes/api/class-products-controller.php:62 536 #: includes/api/class-tax-controller.php:46 537 msgid "Sorry, you are not allowed view this resource." 538 msgstr "" 539 520 540 #: includes/api/class-payment-controller.php:62 521 541 msgid "Sorry, you cannot access this resources." … … 530 550 msgstr "" 531 551 532 #: includes/api/class-tax-controller.php:46533 msgid "Sorry, you are not allowed view this resource."534 msgstr ""535 536 552 #: includes/class-dokan.php:154 537 553 msgid "Show POS menu" … … 552 568 #: includes/class-frontend.php:95 553 569 msgid "Point of Sale" 570 msgstr "" 571 572 #: includes/class-rest-api.php:160 573 msgid "The item %s already out of stock. Please remove this from cart" 554 574 msgstr "" 555 575 -
wepos/trunk/readme.txt
r2079800 r2089750 4 4 Tags: WooCommerce POS, point of sale, free pos, pos plugin, woocommerce point of sale 5 5 Requires at least: 4.4 6 Tested up to: 5. 1.16 Tested up to: 5.2 7 7 WC requires at least: 3.0 8 WC tested up to: 3.6. 28 WC tested up to: 3.6.3 9 9 Requires PHP: 5.6 10 10 Stable tag: trunk … … 54 54 == Changelog == 55 55 56 = v1.0.5 -> 17 May, 2019 = 57 ---------------------------- 58 - **Fix** Customer not created if WooCommerce default `Automatic username and passowrd create` options is changed 59 - **Fix** Customer creating and serching issue for Dokan vendors 60 - **Fix** Stock level manage during cart and checkout process 61 - **Fix** Tax not displaying when exclusive tax applied from WooCommerce settings 62 - **Tweak** Move product api endpoints to wepos custom endpoint 63 - **Tweak** Remove some unwanted code 64 56 65 = v1.0.4 -> 3 May, 2019 = 57 66 ---------------------------- -
wepos/trunk/wepos.php
r2079800 r2089750 4 4 Plugin URI: https://wedevs.com/wepos 5 5 Description: A beautiful and fast Point of Sale (POS) system for WooCommerce 6 Version: 1.0. 46 Version: 1.0.5 7 7 Author: weDevs 8 8 Author URI: https://wedevs.com/ 9 Text Domain: wepos 10 Domain Path: /languages 11 WC requires at least: 3.0 12 WC tested up to: 3.6.3 9 13 License: GPL2 10 14 License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 Text Domain: wepos12 Domain Path: /languages13 15 */ 14 16 … … 54 56 * @var string 55 57 */ 56 public $version = '1.0. 4';58 public $version = '1.0.5'; 57 59 58 60 /** … … 80 82 81 83 add_action( 'woocommerce_loaded', array( $this, 'init_plugin' ) ); 84 add_action( 'woocommerce_init', array( $this, 'on_wc_init' ) ); 82 85 } 83 86 … … 356 359 } 357 360 361 /** 362 * On WC init, include cart required files in REST request 363 * 364 * @since 1.0.5 365 * 366 * @return void 367 */ 368 public function on_wc_init() { 369 if ( wc()->is_rest_api_request() ) { 370 $namespace = '/wepos/v1/'; 371 372 $rest_bases = [ 373 'products', 374 ]; 375 376 foreach ( $rest_bases as $rest_base ) { 377 $endpoint = $namespace . $rest_base; 378 379 if ( strpos( $_SERVER['REQUEST_URI'], $endpoint ) ) { 380 $this->include_wc_files(); 381 break; 382 } 383 } 384 } 385 } 386 387 /** 388 * Include cart required files in REST request 389 * 390 * @since 1.0.5 391 * 392 * @return void 393 */ 394 public function include_wc_files() { 395 if ( ! wc()->cart ) { 396 include_once WC_ABSPATH . 'includes/wc-cart-functions.php'; 397 include_once WC_ABSPATH . 'includes/wc-notice-functions.php'; 398 include_once WC_ABSPATH . 'includes/class-wc-cart.php'; 399 include_once WC_ABSPATH . 'includes/class-wc-tax.php'; 400 include_once WC_ABSPATH . 'includes/class-wc-shipping-zones.php'; 401 include_once WC_ABSPATH . 'includes/class-wc-customer.php'; 402 include_once WC_ABSPATH . 'includes/class-wc-session-handler.php'; 403 404 // Session class, handles session data for users - can be overwritten if custom handler is needed. 405 $session_class = apply_filters( 'woocommerce_session_handler', 'WC_Session_Handler' ); 406 wc()->session = new $session_class(); 407 wc()->session->init(); 408 409 wc()->customer = new WC_Customer( get_current_user_id(), true ); 410 // Cart needs the customer info. 411 wc()->cart = new WC_Cart(); 412 413 // Customer should be saved during shutdown. 414 add_action( 'shutdown', array( wc()->customer, 'save' ), 10 ); 415 } 416 } 417 358 418 } // We_POS 359 419
Note: See TracChangeset
for help on using the changeset viewer.