PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
dokan-pro
/
modules
/
wholesale
/
assets
/
js
!function(e){var t={};function o(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,s){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(o.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(s,n,function(t){return e[t]}.bind(null,n));return s},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=81)}({0:function(e,t,o){"use strict";function s(e,t,o,s,n,r,a,i){var u,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=o,l._compiled=!0),s&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),a?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=u):n&&(u=i?function(){n.call(this,this.$root.$options.shadowRoot)}:n),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(e,t){return u.call(t),c(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:l}}o.d(t,"a",(function(){return s}))},16:function(e,t,o){},74:function(e,t,o){"use strict";var s=o(16);o.n(s).a},81:function(e,t,o){"use strict";o.r(t);var s={name:"WholesaleCustomer",components:{ListTable:dokan_get_lib("ListTable"),Switches:dokan_get_lib("Switches"),Search:dokan_get_lib("Search")},data:function(){return{showCb:!0,counts:{deactive:0,active:0,all:0},totalItems:0,perPage:20,totalPages:1,loading:!1,columns:{full_name:{label:this.__("Name","dokan")},email:{label:this.__("E-mail","dokan")},username:{label:this.__("Username","dokan")},role:{label:this.__("Roles","dokan")},registered:{label:this.__("Registered","dokan"),sortable:!0},wholesale_status:{label:this.__("Status","dokan")}},actionColumn:"full_name",actions:[{key:"edit",label:this.__("Edit","dokan")},{key:"orders",label:this.__("Orders","dokan")},{key:"delete",label:this.__("Remove","dokan")}],bulkActions:[{key:"activate",label:this.__("Active","dokan")},{key:"deactivate",label:this.__("Deactive","dokan")}],customers:[]}},watch:{"$route.query.status":function(){this.fetchWholesaleCustomers()},"$route.query.page":function(){this.fetchWholesaleCustomers()},"$route.query.orderby":function(){this.fetchWholesaleCustomers()},"$route.query.order":function(){this.fetchWholesaleCustomers()}},computed:{currentStatus:function(){return this.$route.query.status||"all"},currentPage:function(){var e=this.$route.query.page||1;return parseInt(e)},sortBy:function(){return this.$route.query.orderby||"registered"},sortOrder:function(){return this.$route.query.order||"desc"}},created:function(){this.fetchWholesaleCustomers()},methods:{getFullName:function(e){return e.first_name+" "+e.last_name},doSearch:function(e){var t=this,o=this;o.loading=!0,dokan.api.get("/wholesale/customers/?search=".concat(e),{page:this.currentPage,orderby:this.sortBy,order:this.sortOrder}).done((function(e,s,n){o.customers=e,o.loading=!1,t.updatePagination(n)}))},updatedCounts:function(e){this.counts.deactive=parseInt(e.getResponseHeader("X-Status-Deactive")),this.counts.active=parseInt(e.getResponseHeader("X-Status-Active")),this.counts.all=parseInt(e.getResponseHeader("X-Status-All"))},updatePagination:function(e){this.totalPages=parseInt(e.getResponseHeader("X-WP-TotalPages")),this.totalItems=parseInt(e.getResponseHeader("X-WP-Total"))},fetchWholesaleCustomers:function(){var e=this,t=this;t.loading=!0,dokan.api.get("/wholesale/customers",{per_page:this.perPage,page:this.currentPage,status:this.currentStatus,orderby:this.sortBy,order:this.sortOrder}).done((function(o,s,n){t.customers=o,t.loading=!1,e.updatedCounts(n),e.updatePagination(n)}))},onActionClick:function(e,t){var o=this;"delete"===e&&confirm("Are you sure to delete?")&&dokan.api.put("/wholesale/customer/"+t.id,{status:"delete"}).done((function(e){o.$notify({title:o.__("Success!","dokan"),type:"success",text:o.__("Successfully removed from wholesale customer lists","dokan")}),o.fetchWholesaleCustomers()}))},onSwitch:function(e,t){var o=this,s=!1===e?this.__("The customer has been disabled for wholesale.","dokan"):this.__("Wholesale capability activate","dokan");dokan.api.put("/wholesale/customer/"+t,{status:!1===e?"deactivate":"activate"}).done((function(e){o.$notify({title:o.__("Success!","dokan"),type:"success",text:s}),"all"!==o.currentStatus&&o.fetchWholesaleCustomers()}))},moment:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return moment(e)})),goToPage:function(e){this.$router.push({name:"WholesaleCustomer",query:{status:this.currentStatus,page:e}})},onBulkAction:function(e,t){var o=this,s={};s[e]=t,this.loading=!0,dokan.api.put("/wholesale/customers/batch",s).done((function(e){o.bulkLocal=-1,o.checkedItems=[],o.loading=!1,o.fetchWholesaleCustomers()}))},sortCallback:function(e,t){this.$router.push({name:"WholesaleCustomer",query:{status:this.currentStatus,page:1,orderby:e,order:t}})},ordersUrl:function(e){return dokan.urls.adminRoot+"edit.php?post_type=shop_order&_customer_user="+e},editUrl:function(e){return dokan.urls.adminRoot+"user-edit.php?user_id="+e}}},n=(o(74),o(0)),r=Object(n.a)(s,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"wholesale-customer-list"},[o("h1",{staticClass:"wp-heading-inline"},[e._v(e._s(e.__("Wholesale Customers","dokan")))]),e._v(" "),o("hr",{staticClass:"wp-header-end"}),e._v(" "),o("ul",{staticClass:"subsubsub"},[o("li",[o("router-link",{attrs:{to:{name:"WholesaleCustomer",query:{status:"all"}},"active-class":"current",exact:""},domProps:{innerHTML:e._s(e.sprintf(e.__("All <span class='count'>(%s)</span>","dokan"),e.counts.all))}}),e._v(" | ")],1),e._v(" "),o("li",[o("router-link",{attrs:{to:{name:"WholesaleCustomer",query:{status:"active"}},"active-class":"current",exact:""},domProps:{innerHTML:e._s(e.sprintf(e.__("Active <span class='count'>(%s)</span>","dokan"),e.counts.active))}}),e._v(" | ")],1),e._v(" "),o("li",[o("router-link",{attrs:{to:{name:"WholesaleCustomer",query:{status:"deactive"}},"active-class":"current",exact:""},domProps:{innerHTML:e._s(e.sprintf(e.__("Deactive <span class='count'>(%s)</span>","dokan"),e.counts.deactive))}})],1)]),e._v(" "),o("search",{attrs:{title:"Search Customer"},on:{searched:e.doSearch}}),e._v(" "),o("list-table",{attrs:{columns:e.columns,loading:e.loading,rows:e.customers,actions:e.actions,actionColumn:"full_name","show-cb":e.showCb,"total-items":e.totalItems,"bulk-actions":e.bulkActions,"total-pages":e.totalPages,"per-page":e.perPage,"current-page":e.currentPage,"action-column":e.actionColumn,"not-found":"No customers found.","sort-by":e.sortBy,"sort-order":e.sortOrder},on:{sort:e.sortCallback,pagination:e.goToPage,"bulk:click":e.onBulkAction,searched:e.doSearch},scopedSlots:e._u([{key:"full_name",fn:function(t){return[o("img",{attrs:{src:t.row.avatar,alt:e.getFullName(t.row),width:"50"}}),e._v(" "),o("strong",[o("a",{attrs:{href:e.editUrl(t.row.id)}},[e._v(e._s(e.getFullName(t.row)?e.getFullName(t.row):e.__("(no name)","dokan")))])])]}},{key:"email",fn:function(t){return[o("a",{attrs:{href:"mailto:"+t.row.email}},[e._v(e._s(t.row.email))])]}},{key:"registered",fn:function(t){return[e._v("\n "+e._s(e.moment(t.row.registered).format("MMM D, YYYY"))+"\n ")]}},{key:"wholesale_status",fn:function(t){return[o("switches",{attrs:{enabled:"active"==t.row.wholesale_status,value:t.row.id},on:{input:e.onSwitch}})]}},{key:"row-actions",fn:function(t){return e._l(e.actions,(function(s,n){return o("span",{class:s.key},["edit"==s.key?o("a",{attrs:{href:e.editUrl(t.row.id)}},[e._v(e._s(s.label))]):"orders"==s.key?o("a",{attrs:{href:e.ordersUrl(t.row.id)}},[e._v(e._s(s.label))]):o("a",{attrs:{href:"#"},on:{click:function(o){return o.preventDefault(),e.onActionClick(s.key,t.row)}}},[e._v(e._s(s.label))]),e._v(" "),n!==e.actions.length-1?[e._v(" | ")]:e._e()],2)}))}}])})],1)}),[],!1,null,null,null).exports;dokan_add_route(r)}});
[+]
..
[-] scripts.js
[edit]
[-] admin.js
[edit]