PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
dokan-pro
/
modules
/
subscription
/
assets
/
js
!function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=80)}({0:function(t,n,e){"use strict";function o(t,n,e,o,r,s,i,a){var u,c="function"==typeof t?t.options:t;if(n&&(c.render=n,c.staticRenderFns=e,c._compiled=!0),o&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),i?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=u):r&&(u=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,n){return u.call(n),l(t,n)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,u):[u]}return{exports:t,options:c}}e.d(n,"a",(function(){return o}))},80:function(t,n,e){"use strict";e.r(n);var o={name:"Subscriptions",components:{ListTable:dokan_get_lib("ListTable")},data:function(){return{showCb:!0,counts:{all:0},totalItems:0,perPage:10,totalPages:1,loading:!1,columns:{user_name:{label:this.__("User Name","dokan")},subscription_title:{label:this.__("Subscription Pack","dokan")},start_date:{label:this.__("Start Date","dokan")},end_date:{label:this.__("End Date","dokan")},status:{label:this.__("Status","dokan")},action:{label:this.__("Action","dokan")}},actions:[],bulkActions:[{key:"cancel",label:this.__("Cancel Subscription","dokan")}],vendors:[]}},watch:{"$route.query.status":function(){this.fetchSubscription()},"$route.query.page":function(){this.fetchSubscription()},"$route.query.orderby":function(){this.fetchSubscription()},"$route.query.order":function(){this.fetchSubscription()}},computed:{currentStatus:function(){return this.$route.query.status||"all"},currentPage:function(){var t=this.$route.query.page||1;return parseInt(t)},sortBy:function(){return this.$route.query.orderby||"registered"},sortOrder:function(){return this.$route.query.order||"desc"}},created:function(){this.fetchSubscription()},methods:{cancelSubscription:function(t){confirm(this.__("Are you sure to cancel the subscription?","dokan"))&&this.deleteSubscripton(t)},updatedCounts:function(t){this.counts.all=parseInt(t.getResponseHeader("X-WP-Total"))},updatePagination:function(t){this.totalPages=parseInt(t.getResponseHeader("X-WP-TotalPages")),this.totalItems=parseInt(t.getResponseHeader("X-WP-Total"))},deleteSubscripton:function(t){this.loading=!0,dokan.api.delete("/subscription/"+t).done((function(t,n,e){location.reload()}))},fetchSubscription:function(){var t=this,n=this;n.loading=!0,dokan.api.get("/subscription",{per_page:n.perPage,paged:n.currentPage,order:this.sortOrder}).done((function(e,o,r){if("no_subscription"==e.code)return n.loading=!1;n.vendors=e,n.loading=!1,t.updatedCounts(r),t.updatePagination(r)}))},goToPage:function(t){this.$router.push({name:"Subscriptions",query:{page:t}})},onBulkAction:function(t,n){if(confirm(this.__("Are you sure to cancel the subscription?","dokan"))){var e={};e[t]=n,this.loading=!0,dokan.api.delete("/subscription/batch",e).done((function(t){location.reload()}))}},subscriptionUrl:function(t){return dokan.urls.adminRoot+"post.php?post="+t+"&action=edit"}}},r=e(0),s=Object(r.a)(o,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"subscription-list"},[e("h1",{staticClass:"wp-heading-inline"},[t._v(t._s(t.__("Subscription User List","dokan")))]),t._v(" "),e("hr",{staticClass:"wp-header-end"}),t._v(" "),e("ul",{staticClass:"subsubsub"},[e("li",[e("router-link",{attrs:{to:"","active-class":"current",exact:""},domProps:{innerHTML:t._s(t.sprintf(t.__("Total Subscribed Vendors <span class='count'>(%s)</span>","dokan"),t.counts.all))}})],1)]),t._v(" "),e("list-table",{attrs:{columns:t.columns,loading:t.loading,rows:t.vendors,actions:t.actions,"show-cb":t.showCb,"total-items":t.totalItems,"bulk-actions":t.bulkActions,"total-pages":t.totalPages,"per-page":t.perPage,"current-page":t.currentPage,"not-found":"No vendors found.","sort-order":t.sortOrder},on:{pagination:t.goToPage,"bulk:click":t.onBulkAction},scopedSlots:t._u([{key:"user_name",fn:function(n){return[e("strong",[e("a",{attrs:{href:n.row.user_link}},[t._v(t._s(n.row.user_name?n.row.user_name:t.__("(no name)","dokan")))])])]}},{key:"subscription_title",fn:function(n){return[e("strong",[e("a",{attrs:{href:t.subscriptionUrl(n.row.subscription_id)}},[t._v(t._s(n.row.subscription_title?n.row.subscription_title:t.__("(no name)","dokan")))])])]}},{key:"status",fn:function(n){return[t._v("\n "+t._s(1==n.row.status?t.__("Active","dokan"):t.__("Inactive","dokan"))+"\n ")]}},{key:"action",fn:function(n){return[e("button",{staticClass:"button button-primary",on:{click:function(e){return t.cancelSubscription(n.row.id)}}},[t._v(t._s(t.__("Cancel","dokan")))])]}}])})],1)}),[],!1,null,null,null).exports;dokan_add_route(s)}});
[+]
..
[-] subscription.js
[edit]
[-] script.js
[edit]
[-] admin-script.js
[edit]
[-] style.js
[edit]