mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
1 line
18 KiB
JavaScript
Vendored
1 line
18 KiB
JavaScript
Vendored
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7951],{8728:(t,a,e)=>{e.d(a,{Z:()=>n});var s=e(3645),i=e.n(s)()((function(t){return t[1]}));i.push([t.id,".page-tab-group[data-v-0f332276]{margin-bottom:65px}",""]);const n=i},8520:(t,a,e)=>{e.d(a,{Z:()=>n});var s=e(3645),i=e.n(s)()((function(t){return t[1]}));i.push([t.id,".color-label.purple[data-v-3ff27c4c]{background:rgba(157,102,254,.1);color:#9d66fe}.color-label.yellow[data-v-3ff27c4c]{background:rgba(255,189,45,.1);color:#ffbd2d}.color-label.green[data-v-3ff27c4c]{background:rgba(0,188,126,.1);color:#00bc7e}.color-label.red[data-v-3ff27c4c]{background:rgba(253,57,122,.1);color:#fd397a}",""]);const n=i},6355:(t,a,e)=>{e.d(a,{Z:()=>n});var s=e(3645),i=e.n(s)()((function(t){return t[1]}));i.push([t.id,".info-box[data-v-783003cd]{background:#f4f5f6;border-radius:10px;margin-bottom:32px;padding:20px;text-align:left}.info-box.error[data-v-783003cd]{background:rgba(253,57,122,.1)}.info-box.error a[data-v-783003cd],.info-box.error p[data-v-783003cd]{color:#fd397a}.info-box.error a[data-v-783003cd]{text-decoration:underline}.info-box p[data-v-783003cd]{font-weight:600;line-height:1.6;word-break:break-word}.info-box p[data-v-783003cd],.info-box p>a[data-v-783003cd],.info-box p>b[data-v-783003cd]{font-size:15px}.info-box a[data-v-783003cd],.info-box b[data-v-783003cd],.info-box p>b[data-v-783003cd]{font-weight:700}.info-box a[data-v-783003cd]{font-size:.9375em;line-height:1.6}.info-box ul[data-v-783003cd]{margin-top:15px}.info-box ul[data-v-783003cd],.info-box ul li[data-v-783003cd],.info-box ul li a[data-v-783003cd]{display:block}@media only screen and (max-width:690px){.info-box[data-v-783003cd]{padding:15px}}.dark .info-box[data-v-783003cd]{background:#1e2024}.dark .info-box.error[data-v-783003cd]{background:rgba(253,57,122,.1)}.dark .info-box.error a[data-v-783003cd],.dark .info-box.error p[data-v-783003cd]{color:#fd397a}.dark .info-box.error a[data-v-783003cd]{text-decoration:underline}.dark .info-box p[data-v-783003cd],.dark .info-box ul li[data-v-783003cd]{color:#bec6cf}",""]);const n=i},3428:(t,a,e)=>{e.d(a,{Z:()=>n});var s=e(3645),i=e.n(s)()((function(t){return t[1]}));i.push([t.id,".table-row[data-v-61827e38]{border-radius:8px}.table-row[data-v-61827e38]:hover{background:#f4f5f6}.table-row .table-cell[data-v-61827e38]{padding-bottom:15px;padding-top:15px}.table-row .table-cell[data-v-61827e38]:first-child{padding-left:15px}.table-row .table-cell[data-v-61827e38]:last-child{padding-right:15px;text-align:right}.table-row .table-cell span[data-v-61827e38]{font-size:1em;font-weight:700}",""]);const n=i},9905:(t,a,e)=>{e.d(a,{Z:()=>n});var s=e(3645),i=e.n(s)()((function(t){return t[1]}));i.push([t.id,".info .description[data-v-47cc578e],.info .name[data-v-47cc578e]{display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.info .name[data-v-47cc578e]{color:#1b2539;font-size:.9375em;line-height:1}.info .description[data-v-47cc578e]{color:rgba(27,37,57,.7);font-size:.75em}.dark .cell-image-thumbnail .image img.blurred[data-v-47cc578e]{display:none}.dark .cell-image-thumbnail .info .name[data-v-47cc578e]{color:#bec6cf}.dark .cell-image-thumbnail .info .description[data-v-47cc578e]{color:#7d858c}",""]);const n=i},6345:(t,a,e)=>{e.d(a,{Z:()=>i});const s={name:"PageTab",props:["isLoading"],components:{Spinner:e(3592).Z}};const i=(0,e(1900).Z)(s,(function(){var t=this,a=t._self._c;return a("div",{staticClass:"page-tab"},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.isLoading,expression:"isLoading"}],attrs:{id:"loader"}},[a("Spinner")],1),t._v(" "),t._t("default")],2)}),[],!1,null,null,null).exports},7689:(t,a,e)=>{e.d(a,{Z:()=>l});const s={name:"PageTabGroup"};var i=e(3379),n=e.n(i),r=e(8728),o={insert:"head",singleton:!1};n()(r.Z,o);r.Z.locals;const l=(0,e(1900).Z)(s,(function(){return(0,this._self._c)("div",{staticClass:"page-tab-group"},[this._t("default")],2)}),[],!1,null,"0f332276",null).exports},7009:(t,a,e)=>{e.d(a,{Z:()=>l});const s={name:"ColorLabel",props:["color"]};var i=e(3379),n=e.n(i),r=e(8520),o={insert:"head",singleton:!1};n()(r.Z,o);r.Z.locals;const l=(0,e(1900).Z)(s,(function(){var t=this;return(0,t._self._c)("b",{staticClass:"color-label inline-block rounded-lg py-1 px-2 text-xs font-bold capitalize",class:t.color},[t._t("default")],2)}),[],!1,null,"3ff27c4c",null).exports},3666:(t,a,e)=>{e.d(a,{Z:()=>l});const s={name:"InfoBox",props:["type"]};var i=e(3379),n=e.n(i),r=e(6355),o={insert:"head",singleton:!1};n()(r.Z,o);r.Z.locals;const l=(0,e(1900).Z)(s,(function(){var t=this;return(0,t._self._c)("div",{staticClass:"info-box",class:t.type},[t._t("default")],2)}),[],!1,null,"783003cd",null).exports},3867:(t,a,e)=>{e.d(a,{Z:()=>l});const s={name:"DatatableCellImage",props:["member","title","description","image-size"],components:{MemberAvatar:e(4509).Z}};var i=e(3379),n=e.n(i),r=e(9905),o={insert:"head",singleton:!1};n()(r.Z,o);r.Z.locals;const l=(0,e(1900).Z)(s,(function(){var t=this,a=t._self._c;return a("div",{staticClass:"flex shrink-0 grow-0 items-center"},[a("MemberAvatar",{staticClass:"mr-3 shrink-0",attrs:{"is-border":!1,size:52,member:t.member}}),t._v(" "),a("div",{staticClass:"info"},[t.title?a("b",{staticClass:"name"},[t._v(t._s(t.title))]):t._e(),t._v(" "),t.description?a("span",{staticClass:"description"},[t._v(t._s(t.description))]):t._e()])],1)}),[],!1,null,"47cc578e",null).exports},5508:(t,a,e)=>{e.d(a,{Z:()=>f});var s=e(9101);const i={props:["data"],computed:{normalizedColumns:function(){return this.data.id&&delete this.data.id,Object.values(this.data)}}};var n=e(3379),r=e.n(n),o=e(3428),l={insert:"head",singleton:!1};r()(o.Z,l);o.Z.locals;var c=e(1900);const d=(0,c.Z)(i,(function(){var t=this,a=t._self._c;return a("tr",{staticClass:"table-row"},t._l(t.normalizedColumns,(function(e,s){return a("td",{key:s,staticClass:"table-cell"},[a("span",[t._v(t._s(e))])])})),0)}),[],!1,null,"61827e38",null).exports;var p=e(9669),u=e.n(p);const b={name:"DatatableWrapper",props:["paginator","tableData","columns","scope","api"],components:{ChevronRightIcon:s.XCv,ChevronLeftIcon:s.wyc,DatatableCell:d,ChevronUpIcon:s.g8U},computed:{hasData:function(){return this.data&&this.data.data&&this.data.data.length>0},floatPages:function(){return[this.pageIndex-1,this.pageIndex,this.pageIndex+1]}},data:function(){return{data:void 0,isLoading:!0,pageIndex:1,filter:{sort:"DESC",field:void 0}}},methods:{goToPage:function(t){t>this.data.meta.last_page||0===t||(this.pageIndex=t,this.getPage(t))},sort:function(t,a){a&&(this.filter.field=t,"DESC"===this.filter.sort?this.filter.sort="ASC":"ASC"===this.filter.sort&&(this.filter.sort="DESC"),this.getPage(this.pageIndex))},getPage:function(t){var a=this;this.URI=this.api,this.paginator&&(this.URI=this.URI+"?page="+t),this.filter.field&&(this.URI=this.URI+(this.paginator?"&":"?")+"sort="+this.filter.field+"&direction="+this.filter.sort),this.isLoading=!0,u().get(this.URI).then((function(t){a.data=t.data,a.$emit("data",t.data)})).catch((function(){return a.$isSomethingWrong()})).finally((function(){a.$emit("init",!0),a.isLoading=!1}))}},created:function(){this.api&&this.getPage(this.pageIndex),this.tableData&&(this.data=this.tableData,this.isLoading=!1)}};const f=(0,c.Z)(b,(function(){var t=this,a=t._self._c;return a("div",{staticClass:"w-full"},[t.hasData?a("table",{staticClass:"w-full"},[a("thead",[a("tr",{staticClass:"whitespace-nowrap"},t._l(t.columns,(function(e,s){return e.hidden?t._e():a("th",{key:s,staticClass:"text-left",class:{"sortable cursor-pointer":e.sortable,"text-right":Object.values(t.columns).length-1===s},on:{click:function(a){return t.sort(e.field,e.sortable)}}},[a("span",{staticClass:"text-xs text-gray-400 dark:text-gray-500"},[t._v("\n "+t._s(t.$t(e.label))+"\n ")]),t._v(" "),e.sortable?a("chevron-up-icon",{staticClass:"vue-feather inline-block text-gray-300 dark:text-gray-500",class:{"arrow-down":"ASC"===t.filter.sort},attrs:{size:"12"}}):t._e()],1)})),0)]),t._v(" "),a("tbody",{staticClass:"table-body"},[t._l(t.data.data,(function(e){return t._t("default",(function(){return[a("DatatableCell",{key:e.id,attrs:{data:e}})]}),{row:e})}))],2)]):t._e(),t._v(" "),t.isLoading||t.hasData?t._e():t._t("empty-page"),t._v(" "),t.paginator&&t.hasData?a("div",{staticClass:"mt-6 sm:flex sm:items-center sm:justify-between"},[t.data.meta.total>15&&t.data.meta.last_page<=6?a("ul",{staticClass:"pagination flex justify-center items-center"},[a("li",{staticClass:"previous inline-block p-1"},[a("a",{staticClass:"page-link",class:{"cursor-default opacity-20":1===t.pageIndex},on:{click:function(a){return t.goToPage(t.pageIndex-1)}}},[a("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t._l(t.data.meta.last_page,(function(e,s){return a("li",{key:s,staticClass:"inline-block p-1",on:{click:function(a){return t.goToPage(e)}}},[a("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===e}},[t._v("\n "+t._s(e)+"\n ")])])})),t._v(" "),a("li",{staticClass:"next inline-block p-1"},[a("a",{staticClass:"page-link",class:{"cursor-default opacity-20":t.pageIndex===t.data.meta.last_page},on:{click:function(a){return t.goToPage(t.pageIndex+1)}}},[a("chevron-right-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)])],2):t._e(),t._v(" "),t.data.meta.total>15&&t.data.meta.last_page>6?a("ul",{staticClass:"pagination flex justify-center items-center"},[a("li",{staticClass:"previous inline-block p-1"},[a("a",{staticClass:"page-link",class:{"cursor-default opacity-20":1===t.pageIndex},on:{click:function(a){return t.goToPage(t.pageIndex-1)}}},[a("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t.pageIndex>=5?a("li",{staticClass:"inline-block p-1",on:{click:function(a){return t.goToPage(1)}}},[a("a",{staticClass:"page-link"},[t._v(" 1 ")])]):t._e(),t._v(" "),t._l(5,(function(e,s){return t.pageIndex<5?a("li",{key:s,staticClass:"inline-block p-1",on:{click:function(a){return t.goToPage(e)}}},[a("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===e}},[t._v("\n "+t._s(e)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex>=5?a("li",{staticClass:"inline-block p-1"},[a("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(t.floatPages,(function(e,s){return t.pageIndex>=5&&t.pageIndex<t.data.meta.last_page-3?a("li",{key:s,staticClass:"inline-block p-1",on:{click:function(a){return t.goToPage(e)}}},[a("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===e}},[t._v("\n "+t._s(e)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex<t.data.meta.last_page-3?a("li",{staticClass:"inline-block p-1"},[a("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(5,(function(e,s){return t.pageIndex>t.data.meta.last_page-4?a("li",{key:s,staticClass:"inline-block p-1",on:{click:function(a){t.goToPage(t.data.meta.last_page-(4-s))}}},[a("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===t.data.meta.last_page-(4-s)}},[t._v("\n "+t._s(t.data.meta.last_page-(4-s))+"\n ")])]):t._e()})),t._v(" "),t.pageIndex<t.data.meta.last_page-3?a("li",{staticClass:"inline-block p-1",on:{click:function(a){return t.goToPage(t.data.meta.last_page)}}},[a("a",{staticClass:"page-link"},[t._v("\n "+t._s(t.data.meta.last_page)+"\n ")])]):t._e(),t._v(" "),a("li",{staticClass:"next inline-block p-1"},[a("a",{staticClass:"page-link",class:{"cursor-default opacity-20":t.pageIndex===t.data.meta.last_page},on:{click:function(a){return t.goToPage(t.pageIndex+1)}}},[a("chevron-right-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)])],2):t._e(),t._v(" "),a("span",{staticClass:"text-xs text-gray-600 dark:text-gray-500 block text-center sm:mt-0 mt-4"},[t._v("\n\t\t\t\t"+t._s(t.$t("paginator",{from:t.data.meta.from,to:t.data.meta.to,total:t.data.meta.total}))+"\n ")])]):t._e()],2)}),[],!1,null,null,null).exports},6034:(t,a,e)=>{e.r(a),e.d(a,{default:()=>m});var s=e(7009),i=e(4509),n=e(3867),r=e(9101),o=e(5508),l=e(7689),c=e(6345),d=e(3666),p=e(629);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function b(t,a){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),e.push.apply(e,s)}return e}function f(t){for(var a=1;a<arguments.length;a++){var e=null!=arguments[a]?arguments[a]:{};a%2?b(Object(e),!0).forEach((function(a){g(t,a,e[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):b(Object(e)).forEach((function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(e,a))}))}return t}function g(t,a,e){return(a=function(t){var a=function(t,a){if("object"!==u(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,a||"default");if("object"!==u(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===a?String:Number)(t)}(t,"string");return"symbol"===u(a)?a:String(a)}(a))in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}const v={name:"PlanSubscribers",components:{DatatableCellImage:n.Z,DownloadCloudIcon:r.NDL,DatatableWrapper:o.Z,PageTabGroup:l.Z,MemberAvatar:i.Z,ColorLabel:s.Z,Trash2Icon:r.Bf1,Edit2Icon:r.me4,PageTab:c.Z,InfoBox:d.Z},computed:f(f({},(0,p.Se)(["config"])),{},{columns:function(){return{metered:[{label:this.$t("user"),field:"user_id",sortable:!0},{label:this.$t("renews_at"),field:"created_at",sortable:!0},{label:this.$t("service"),field:"driver",sortable:!0}],fixed:[{label:this.$t("user"),field:"user_id",sortable:!0},{label:this.$t("status"),field:"status",sortable:!0},{label:this.$t("note"),field:"plan.name",sortable:!0},{label:this.$t("renews_at"),field:"created_at",sortable:!0},{label:this.$t("ends_at"),field:"ends_at",sortable:!0},{label:this.$t("service"),field:"driver",sortable:!0}]}[this.config.subscriptionType]}}),data:function(){return{subscribers:void 0,isLoading:!0}}};const m=(0,e(1900).Z)(v,(function(){var t=this,a=t._self._c;return a("PageTab",{attrs:{"is-loading":t.isLoading}},[a("DatatableWrapper",{staticClass:"card overflow-x-auto shadow-card",attrs:{api:"/api/subscriptions/admin/plans/".concat(this.$route.params.id,"/subscribers"),paginator:!0,columns:t.columns},on:{data:function(a){t.subscribers=a},init:function(a){t.isLoading=!1}},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return["metered"===t.config.subscriptionType?a("tr",{staticClass:"whitespace-nowrap border-b border-dashed border-light dark:border-opacity-5"},[a("td",{staticClass:"py-3 pr-3 md:pr-1"},[a("router-link",{staticClass:"flex items-center",attrs:{to:{name:"UserDetail",params:{id:s.data.relationships.user.data.id}}}},[a("MemberAvatar",{attrs:{"is-border":!1,size:36,member:s.data.relationships.user}}),t._v(" "),a("div",{staticClass:"ml-3 pr-10"},[a("b",{staticClass:"max-w-1 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold",staticStyle:{"max-width":"155px"}},[t._v("\n "+t._s(s.data.relationships.user.data.attributes.name)+"\n ")]),t._v(" "),a("span",{staticClass:"block text-xs text-gray-600 dark:text-gray-500"},[t._v("\n "+t._s(s.data.relationships.user.data.attributes.email)+"\n ")])])],1)],1),t._v(" "),a("td",{staticClass:"px-3 md:px-1"},[a("span",{staticClass:"whitespace-nowrap text-sm font-bold"},[t._v("\n "+t._s(s.data.attributes.renews_at)+"\n ")])]),t._v(" "),a("td",{staticClass:"pl-3 text-right md:pl-1"},[a("img",{staticClass:"inline-block max-h-5",attrs:{src:t.$getPaymentLogo(s.data.attributes.driver),alt:s.data.attributes.driver}})])]):t._e(),t._v(" "),"fixed"===t.config.subscriptionType?a("tr",{staticClass:"whitespace-nowrap border-b border-dashed border-light dark:border-opacity-5"},[a("td",{staticClass:"py-3 pr-3 md:pr-1"},[a("router-link",{staticClass:"flex items-center",attrs:{to:{name:"UserDetail",params:{id:s.data.relationships.user.data.id}}}},[a("MemberAvatar",{attrs:{"is-border":!1,size:36,member:s.data.relationships.user}}),t._v(" "),a("div",{staticClass:"ml-3 pr-10"},[a("b",{staticClass:"max-w-1 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold",staticStyle:{"max-width":"155px"}},[t._v("\n "+t._s(s.data.relationships.user.data.attributes.name)+"\n ")]),t._v(" "),a("span",{staticClass:"block text-xs text-gray-600 dark:text-gray-500"},[t._v("\n "+t._s(s.data.relationships.user.data.attributes.email)+"\n ")])])],1)],1),t._v(" "),a("td",{staticClass:"px-3 md:px-1"},[a("ColorLabel",{attrs:{color:t.$getSubscriptionStatusColor(s.data.attributes.status)}},[t._v("\n "+t._s(t.$t(s.data.attributes.status))+"\n ")])],1),t._v(" "),a("td",{staticClass:"px-3 md:px-1"},[a("span",{staticClass:"text-limit text-sm font-bold capitalize",staticStyle:{"max-width":"160px"}},[t._v("\n "+t._s(s.data.attributes.name)+"\n ")])]),t._v(" "),a("td",{staticClass:"px-3 md:px-1"},[a("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(s.data.attributes.renews_at?s.data.attributes.renews_at:s.data.attributes.created_at)+"\n ")])]),t._v(" "),a("td",{staticClass:"px-3 md:px-1"},[a("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(s.data.attributes.ends_at?s.data.attributes.ends_at:"-")+"\n ")])]),t._v(" "),a("td",{staticClass:"pl-3 text-right md:pl-1"},[a("img",{staticClass:"inline-block max-h-5",attrs:{src:t.$getPaymentLogo(s.data.attributes.driver),alt:s.data.attributes.driver}})])]):t._e()]}},{key:"empty-page",fn:function(){return[a("InfoBox",{staticStyle:{"margin-bottom":"0"}},[a("p",[t._v(t._s(t.$t("admin_page_plans.subscribers.empty")))])])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports}}]); |