mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
1 line
14 KiB
JavaScript
Vendored
1 line
14 KiB
JavaScript
Vendored
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[372],{4949:(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-532740dd]{background:rgba(157,102,254,.1);color:#9d66fe}.color-label.yellow[data-v-532740dd]{background:rgba(255,189,45,.1);color:#ffbd2d}.color-label.green[data-v-532740dd]{background:rgba(0,188,126,.1);color:#00bc7e}.color-label.red[data-v-532740dd]{background:rgba(253,57,122,.1);color:#fd397a}",""]);const n=i},2449:(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-5683add0]{border-radius:8px}.table-row[data-v-5683add0]:hover{background:#f4f5f6}.table-row .table-cell[data-v-5683add0]{padding-bottom:15px;padding-top:15px}.table-row .table-cell[data-v-5683add0]:first-child{padding-left:15px}.table-row .table-cell[data-v-5683add0]:last-child{padding-right:15px;text-align:right}.table-row .table-cell span[data-v-5683add0]{font-size:1em;font-weight:700}",""]);const n=i},340:(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-link[data-v-0ed4edbe]{@apply w-8 h-8 flex justify-center items-center block rounded-lg font-bold text-sm cursor-pointer hover:bg-light-background transition duration-200}",""]);const n=i},631:(t,a,e)=>{e.d(a,{Z:()=>i});const s={name:"MemberAvatar",props:["isBorder","member","size"],computed:{letter:function(){return(this.member.data.attributes.name?this.member.data.attributes.name:this.member.data.attributes.email).substr(0,1)},borderRadius:function(){return this.size>32?"rounded-xl":"rounded-lg"},fontSize:function(){return this.size>42?"text-lg":this.size>32?"text-base":"text-sm"},avatar:function(){return this.size>=52?this.member.data.attributes.avatar.md:this.size>32?this.member.data.attributes.avatar.sm:this.member.data.attributes.avatar.xs}}};const i=(0,e(1900).Z)(s,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"shrink-0 grow-0"},[t.member.data.attributes.avatar?e("img",{class:[t.borderRadius,{"border-3 border-white dark:border-dark-background":t.isBorder}],style:{width:t.size+"px",height:t.size+"px"},attrs:{src:t.avatar}}):e("div",{staticClass:"flex items-center justify-center",class:[t.borderRadius,{"border-3 border-white dark:border-dark-background":t.isBorder}],style:{width:t.size+"px",height:t.size+"px",background:t.member.data.attributes.color?t.member.data.attributes.color:"#f4f5f6"}},[e("span",{staticClass:"uppercase font-extrabold text-gray-900",class:t.fontSize},[t._v("\n\t\t\t"+t._s(t.letter)+"\n\t\t")])])])}),[],!1,null,null,null).exports},9480:(t,a,e)=>{e.d(a,{Z:()=>o});const s={name:"ColorLabel",props:["color"]};var i=e(3379),n=e.n(i),r=e(4949),l={insert:"head",singleton:!1};n()(r.Z,l);r.Z.locals;const o=(0,e(1900).Z)(s,(function(){var t=this,a=t.$createElement;return(t._self._c||a)("b",{staticClass:"color-label capitalize inline-block text-xs font-bold rounded-lg py-1 px-2",class:t.color},[t._t("default")],2)}),[],!1,null,"532740dd",null).exports},9569:(t,a,e)=>{e.d(a,{Z:()=>h});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),l=e(2449),o={insert:"head",singleton:!1};r()(l.Z,o);l.Z.locals;var c=e(1900);const d=(0,c.Z)(i,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("tr",{staticClass:"table-row"},t._l(t.normalizedColumns,(function(a,s){return e("td",{key:s,staticClass:"table-cell"},[e("span",[t._v(t._s(a))])])})),0)}),[],!1,null,"5683add0",null).exports;var u=e(9669),p=e.n(u);const g={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,p().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)}};var b=e(340),f={insert:"head",singleton:!1};r()(b.Z,f);b.Z.locals;const h=(0,c.Z)(g,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"w-full"},[t.hasData?e("table",{staticClass:"w-full"},[e("thead",[e("tr",{staticClass:"whitespace-nowrap"},t._l(t.columns,(function(a,s){return a.hidden?t._e():e("th",{key:s,staticClass:"text-left",class:{"sortable cursor-pointer":a.sortable,"text-right":Object.values(t.columns).length-1===s},on:{click:function(e){return t.sort(a.field,a.sortable)}}},[e("span",{staticClass:"dark:text-gray-500 text-gray-400 text-xs"},[t._v("\n\t\t\t\t\t\t\t"+t._s(a.label)+"\n\t\t\t\t\t\t")]),t._v(" "),a.sortable?e("chevron-up-icon",{staticClass:"inline-block vue-feather dark:text-gray-500 text-gray-300",class:{"arrow-down":"ASC"===t.filter.sort},attrs:{size:"12"}}):t._e()],1)})),0)]),t._v(" "),e("tbody",{staticClass:"table-body"},[t._l(t.data.data,(function(a){return t._t("default",(function(){return[e("DatatableCell",{key:a.id,attrs:{data:a}})]}),{row:a})}))],2)]):t._e(),t._v(" "),t.isLoading||t.hasData?t._e():t._t("empty-page"),t._v(" "),t.paginator&&t.hasData?e("div",{staticClass:"mt-6 flex justify-between items-center"},[t.data.meta.total>15&&t.data.meta.last_page<=6?e("ul",{staticClass:"pagination flex items-center"},[e("li",{staticClass:"p-1 inline-block previous"},[e("a",{staticClass:"page-link",class:{"opacity-20 cursor-default":1===t.pageIndex},on:{click:function(a){return t.goToPage(t.pageIndex-1)}}},[e("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t._l(t.data.meta.last_page,(function(a,s){return e("li",{key:s,staticClass:"p-1 inline-block",on:{click:function(e){return t.goToPage(a)}}},[e("a",{staticClass:"page-link",class:{"dark:text-gray-300 dark:bg-4x-dark-foreground bg-light-background":t.pageIndex===a}},[t._v("\n "+t._s(a)+"\n ")])])})),t._v(" "),e("li",{staticClass:"p-1 inline-block next"},[e("a",{staticClass:"page-link",class:{"opacity-20 cursor-default":t.pageIndex===t.data.meta.last_page},on:{click:function(a){return t.goToPage(t.pageIndex+1)}}},[e("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?e("ul",{staticClass:"pagination flex items-center"},[e("li",{staticClass:"p-1 inline-block previous"},[e("a",{staticClass:"page-link",class:{"opacity-20 cursor-default":1===t.pageIndex},on:{click:function(a){return t.goToPage(t.pageIndex-1)}}},[e("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t.pageIndex>=5?e("li",{staticClass:"p-1 inline-block",on:{click:function(a){return t.goToPage(1)}}},[e("a",{staticClass:"page-link"},[t._v("\n 1\n ")])]):t._e(),t._v(" "),t._l(5,(function(a,s){return t.pageIndex<5?e("li",{key:s,staticClass:"p-1 inline-block",on:{click:function(e){return t.goToPage(a)}}},[e("a",{staticClass:"page-link",class:{"dark:text-gray-300 dark:bg-4x-dark-foreground bg-light-background":t.pageIndex===a}},[t._v("\n "+t._s(a)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex>=5?e("li",{staticClass:"p-1 inline-block"},[e("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(t.floatPages,(function(a,s){return t.pageIndex>=5&&t.pageIndex<t.data.meta.last_page-3?e("li",{key:s,staticClass:"p-1 inline-block",on:{click:function(e){return t.goToPage(a)}}},[e("a",{staticClass:"page-link",class:{"dark:text-gray-300 dark:bg-4x-dark-foreground bg-light-background":t.pageIndex===a}},[t._v("\n "+t._s(a)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex<t.data.meta.last_page-3?e("li",{staticClass:"p-1 inline-block"},[e("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(5,(function(a,s){return t.pageIndex>t.data.meta.last_page-4?e("li",{key:s,staticClass:"p-1 inline-block",on:{click:function(a){t.goToPage(t.data.meta.last_page-(4-s))}}},[e("a",{staticClass:"page-link",class:{"dark:text-gray-300 dark:bg-4x-dark-foreground bg-light-background":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?e("li",{staticClass:"p-1 inline-block",on:{click:function(a){return t.goToPage(t.data.meta.last_page)}}},[e("a",{staticClass:"page-link"},[t._v("\n "+t._s(t.data.meta.last_page)+"\n ")])]):t._e(),t._v(" "),e("li",{staticClass:"p-1 inline-block next"},[e("a",{staticClass:"page-link",class:{"opacity-20 cursor-default":t.pageIndex===t.data.meta.last_page},on:{click:function(a){return t.goToPage(t.pageIndex+1)}}},[e("chevron-right-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)])],2):t._e(),t._v(" "),e("span",{staticClass:"dark:text-gray-500 text-xs text-gray-600"},[t._v("\n\t\t\t\tShowing "+t._s(t.data.meta.from)+" - "+t._s(t.data.meta.to)+" from "+t._s(t.data.meta.total)+" records\n\t\t\t")])]):t._e()],2)}),[],!1,null,"0ed4edbe",null).exports},6144:(t,a,e)=>{e.r(a),e.d(a,{default:()=>d});var s=e(9480),i=e(631),n=e(9569),r=e(629);function l(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 o(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}const c={name:"Subscriptions",components:{ColorLabel:s.Z,MemberAvatar:i.Z,DatatableWrapper:n.Z},computed:function(t){for(var a=1;a<arguments.length;a++){var e=null!=arguments[a]?arguments[a]:{};a%2?l(Object(e),!0).forEach((function(a){o(t,a,e[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(e,a))}))}return t}({},(0,r.Se)(["config"])),data:function(){return{isLoading:!0,columns:[{label:this.$t("admin_page_user.table.name"),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:"created_at",sortable:!0},{label:this.$t("Service"),field:"driver.driver",sortable:!0}]}}};const d=(0,e(1900).Z)(c,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[t.config.isEmptySubscriptions?t._e():e("DatatableWrapper",{staticClass:"card shadow-card overflow-x-auto",attrs:{api:"/api/subscriptions/admin",paginator:!0,columns:t.columns},on:{init:function(a){t.isLoading=!1}},scopedSlots:t._u([{key:"default",fn:function(a){var s=a.row;return[e("tr",{staticClass:"border-b dark:border-opacity-5 border-light border-dashed whitespace-nowrap"},[e("td",{staticClass:"py-5 md:pr-1 pr-3"},[e("router-link",{staticClass:"flex items-center",attrs:{to:{name:"UserDetail",params:{id:s.data.relationships.user.data.id}}}},[e("MemberAvatar",{attrs:{"is-border":!1,size:36,member:s.data.relationships.user}}),t._v(" "),e("div",{staticClass:"ml-3 pr-10"},[e("b",{staticClass:"text-sm font-bold block max-w-1 overflow-hidden text-ellipsis whitespace-nowrap",staticStyle:{"max-width":"155px"}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.data.relationships.user.data.attributes.name)+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),e("span",{staticClass:"block text-xs dark:text-gray-500 text-gray-600"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.data.relationships.user.data.attributes.email)+"\n\t\t\t\t\t\t\t\t")])])],1)],1),t._v(" "),e("td",{staticClass:"md:px-1 px-3"},[e("ColorLabel",{attrs:{color:t.$getSubscriptionStatusColor(s.data.attributes.status)}},[t._v("\n\t\t\t\t\t\t\t"+t._s(s.data.attributes.status)+"\n\t\t\t\t\t\t")])],1),t._v(" "),e("td",{staticClass:"md:px-1 px-3"},[e("span",{staticClass:"text-sm font-bold capitalize text-limit",staticStyle:{"max-width":"160px"}},[t._v("\n\t\t\t\t\t\t\t"+t._s(s.data.attributes.name)+"\n\t\t\t\t\t\t")]),t._v(" "),e("span",{staticClass:"block text-xs font-bold text-gray-400"},[t._v("\n\t\t\t\t\t\t\t"+t._s(s.data.relationships.plan.data.attributes.price)+" / "+t._s(t.$t("interval."+s.data.relationships.plan.data.attributes.interval))+"\n\t\t\t\t\t\t")])]),t._v(" "),e("td",{staticClass:"md:px-1 px-3"},[e("span",{staticClass:"text-sm font-bold"},[t._v("\n\t\t\t\t\t\t\t"+t._s(s.data.attributes.renews_at?s.data.attributes.renews_at:s.data.attributes.created_at)+"\n\t\t\t\t\t\t")])]),t._v(" "),e("td",{staticClass:"md:px-1 px-3"},[e("span",{staticClass:"text-sm font-bold"},[t._v("\n\t\t\t\t\t\t\t"+t._s(s.data.attributes.ends_at?s.data.attributes.ends_at:"-")+"\n\t\t\t\t\t\t")])]),t._v(" "),e("td",{staticClass:"md:pl-1 pl-3 text-right"},[e("img",{staticClass:"inline-block max-h-5",attrs:{src:t.$getPaymentLogo(s.data.attributes.driver),alt:s.data.attributes.driver}})])])]}}],null,!1,1797778511)}),t._v(" "),t.config.isEmptySubscriptions?e("div",{staticClass:"flex items-center justify-center h-full"},[e("div",{staticClass:"text-center"},[e("img",{staticClass:"w-28 inline-block mb-6",attrs:{src:"https://twemoji.maxcdn.com/v/13.1.0/svg/1f5c3.svg",alt:"transaction"}}),t._v(" "),e("h1",{staticClass:"text-2xl font-bold mb-1"},[t._v("\n\t\t\t\t\t"+t._s(t.$t("There is Nothing"))+"\n\t\t\t\t")]),t._v(" "),e("p",{staticClass:"text-sm text-gray-600"},[t._v("\n\t\t\t\t\t"+t._s(t.$t("All your subscriptions will be visible here"))+"\n\t\t\t\t")])])]):t._e()],1)}),[],!1,null,null,null).exports}}]); |