From 72b702a4aed9b2f6b4f34936604f511cbe04cd0b Mon Sep 17 00:00:00 2001 From: faxblaster Date: Tue, 16 Aug 2022 15:11:32 -0400 Subject: [PATCH] add parsing for json data --- dist/js/tool.js | 2 +- dist/lang/en.json | 3 +- .../js/components/cards/ChargeDetailCard.vue | 33 ++++++++++++++----- resources/lang/en.json | 3 +- 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/dist/js/tool.js b/dist/js/tool.js index 01ea782..a32a2d0 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -1 +1 @@ -(()=>{var e,a={746:(e,a,n)=>{"use strict";var i=n(740),t=n.n(i);function o(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a&&(i=i.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,i)}return n}function l(e){for(var a=1;a{},744:(e,a)=>{"use strict";a.Z=(e,a)=>{const n=e.__vccOpts||e;for(const[e,i]of a)n[e]=i;return n}},588:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>d});var i=n(311),t={class:"flex justify-end p-2 py-3 border-b border-gray-200 dark:border-gray-700"},o={class:"m-2"},l=["id","value"],r=["for"];const s={props:{resource:{type:Object,required:!0}},data:function(){return{checkedColumns:this.$attrs.modelValue}}};const d=(0,n(744).Z)(s,[["render",function(e,a,n,s,d,u){var m=(0,i.resolveComponent)("DropdownTrigger"),c=(0,i.resolveComponent)("DropdownMenu"),g=(0,i.resolveComponent)("Dropdown");return(0,i.openBlock)(),(0,i.createElementBlock)("div",t,[(0,i.createVNode)(g,{placement:"bottom-end"},{menu:(0,i.withCtx)((function(){return[(0,i.createVNode)(c,{style:{width:"100%",columns:"25vw 3"},class:"p-3 text-90"},{default:(0,i.withCtx)((function(){return[n.resource?((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,{key:0},(0,i.renderList)(n.resource,(function(n,t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",o,[(0,i.withDirectives)((0,i.createElementVNode)("input",{class:"mr-2",type:"checkbox",id:t,value:t,"onUpdate:modelValue":a[0]||(a[0]=function(e){return d.checkedColumns=e}),onChange:a[1]||(a[1]=function(a){return e.$emit("checkedColumns",d.checkedColumns)})},null,40,l),[[i.vModelCheckbox,d.checkedColumns]]),(0,i.createElementVNode)("label",{for:t,class:"capitalize"},(0,i.toDisplayString)(e.__(t.replaceAll("_"," "))),9,r)])})),256)):(0,i.createCommentVNode)("",!0)]})),_:1})]})),default:(0,i.withCtx)((function(){return[(0,i.createVNode)(m,{class:"text-90 px-3 shadow rounded bg-gray-100 dark:bg-gray-800"},{default:(0,i.withCtx)((function(){return[(0,i.createTextVNode)((0,i.toDisplayString)(e.__("Select Columns")),1)]})),_:1})]})),_:1})])}]])},464:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>d});var i=n(311),t={class:"bg-gray-50 dark:bg-gray-800 rounded-b-lg"},o={key:0,class:"flex"},l=["disabled"],r=["disabled"];const s={props:{resource:{type:Array,required:!0},hasMore:{type:Boolean,required:!0},hasPrevious:{type:Boolean,required:!0}},methods:{previousPage:function(){this.$emit("previous")},nextPage:function(){this.$emit("next")}}};const d=(0,n(744).Z)(s,[["render",function(e,a,n,s,d,u){return(0,i.openBlock)(),(0,i.createElementBlock)("div",t,[n.resource.length>0?((0,i.openBlock)(),(0,i.createElementBlock)("nav",o,[(0,i.createElementVNode)("button",{disabled:!n.hasPrevious,class:(0,i.normalizeClass)(["btn btn-link py-3 px-4",{"text-gray-500 dark:text-gray-400":n.hasPrevious,"text-80 opacity-50 cursor-not-allowed":!n.hasPrevious}]),rel:"prev",onClick:a[0]||(a[0]=(0,i.withModifiers)((function(e){return u.previousPage()}),["prevent"])),dusk:"previous"},(0,i.toDisplayString)(e.__("Previous")),11,l),(0,i.createElementVNode)("button",{disabled:!n.hasMore,class:(0,i.normalizeClass)(["ml-auto btn btn-link py-3 px-4",{"text-gray-500 dark:text-gray-400":n.hasMore,"text-80 opacity-50 cursor-not-allowed":!n.hasMore}]),rel:"next",onClick:a[1]||(a[1]=(0,i.withModifiers)((function(e){return u.nextPage()}),["prevent"])),dusk:"next"},(0,i.toDisplayString)(e.__("Next")),11,r)])):(0,i.createCommentVNode)("",!0)])}]])},236:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>m});var i=n(311),t={class:"w-1/2"},o={class:"text-sm uppercase mb-2 text-80"},l={class:"text-2xl"},r={class:"w-1/2"},s={class:"text-sm uppercase mb-2 text-80"},d={class:"text-2xl"};const u={data:function(){return{initialLoading:!0,balance:{}}},methods:{getBalance:function(){var e=this;Nova.request().get("/nova-vendor/nova-stripe/stripe/balance").then((function(a){e.balance=a.data.balance,e.initialLoading=!1}))}},created:function(){this.getBalance()}};const m=(0,n(744).Z)(u,[["render",function(e,a,n,u,m,c){var g=(0,i.resolveComponent)("LoadingCard");return(0,i.openBlock)(),(0,i.createBlock)(g,{loading:m.initialLoading,class:"flex flex-wrap py-8 mb-8 text-center"},{default:(0,i.withCtx)((function(){return[(0,i.createElementVNode)("div",t,[(0,i.createElementVNode)("p",o,(0,i.toDisplayString)(e.__("Available Balance")),1),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(m.balance.available,(function(a){return(0,i.openBlock)(),(0,i.createElementBlock)("div",null,[(0,i.createElementVNode)("p",l,(0,i.toDisplayString)(e.$filters.money(a.currency,a.amount)),1)])})),256))]),(0,i.createElementVNode)("div",r,[(0,i.createElementVNode)("p",s,(0,i.toDisplayString)(e.__("Pending Balance")),1),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(m.balance.pending,(function(a){return(0,i.openBlock)(),(0,i.createElementBlock)("div",null,[(0,i.createElementVNode)("p",d,(0,i.toDisplayString)(e.$filters.money(a.currency,a.amount)),1)])})),256))])]})),_:1},8,["loading"])}]])},200:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var i=n(311);const t={props:{chargeId:{type:String,required:!0}},data:function(){return{initialLoading:!0,charge:{amount:0,currency:""}}},computed:{fee:function(){return this.charge.balance_transaction?this.$filters.money(this.charge.balance_transaction.currency,this.charge.balance_transaction.fee):0},net:function(){return this.charge.balance_transaction?this.$filters.money(this.charge.currency,this.charge.amount-this.charge.balance_transaction.fee):0}},methods:{getCharge:function(){var e=this;Nova.request().get("/nova-vendor/nova-stripe/stripe/charges/"+this.chargeId).then((function(a){e.charge=a.data.charge,e.initialLoading=!1,e.$emit("charge-loaded",a.data.charge)}))}},created:function(){this.getCharge()}};const o=(0,n(744).Z)(t,[["render",function(e,a,n,t,o,l){var r=this,s=(0,i.resolveComponent)("DetailTextField"),d=(0,i.resolveComponent)("DetailBooleanField"),u=(0,i.resolveComponent)("LoadingCard");return(0,i.openBlock)(),(0,i.createBlock)(u,{loading:o.initialLoading,class:"mb-6 px-6"},{default:(0,i.withCtx)((function(){return[(0,i.createVNode)(s,{field:{name:e.__("ID"),value:o.charge.id}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Amount"),value:e.$filters.money(r.charge.currency,r.charge.amount)}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Fee"),value:l.fee}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Net"),value:l.net}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Status"),value:o.charge.status}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Created"),value:e.$filters.date(o.charge.created)}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Metadata"),value:o.charge.metadata}},null,8,["field"]),(0,i.createVNode)(d,{field:{name:e.__("Livemode"),value:o.charge.livemode}},null,8,["field"]),(0,i.createVNode)(d,{field:{name:e.__("Captured"),value:o.charge.captured}},null,8,["field"]),(0,i.createVNode)(d,{field:{name:e.__("Paid"),value:o.charge.paid}},null,8,["field"]),(0,i.createVNode)(d,{field:{name:e.__("Refunded"),value:o.charge.refunded}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Dispute"),value:o.charge.dispute}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Fraud Details"),value:o.charge.fraud_details}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Transfer Group"),value:o.charge.transfer_group}},null,8,["field"])]})),_:1},8,["loading"])}]])},407:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var i=n(311);const t={props:{customerId:{type:String,required:!0}},data:function(){return{customer:{},initialLoading:!0,shippingAddress:null}},methods:{loadCustomer:function(){var e=this;Nova.request().get("/nova-vendor/nova-stripe/stripe/customers/"+this.customerId).then((function(a){e.customer=a.data.customer,e.initialLoading=!1}))},formatAddress:function(e){return null!=e&&e.line1?"".concat(e.line1,"\n ").concat(e.line2," \n ").concat(e.city,",\n ").concat(e.state,"\n ").concat(e.postal_code):"—"}},created:function(){this.loadCustomer()}};const o=(0,n(744).Z)(t,[["render",function(e,a,n,t,o,l){var r=(0,i.resolveComponent)("DetailTextField"),s=(0,i.resolveComponent)("DetailBooleanField"),d=(0,i.resolveComponent)("LoadingCard");return(0,i.openBlock)(),(0,i.createBlock)(d,{loading:o.initialLoading,class:"mb-6 px-6"},{default:(0,i.withCtx)((function(){var a,n;return[(0,i.createVNode)(r,{field:{name:e.__("ID"),value:o.customer.id}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Name"),value:o.customer.name}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Address"),value:l.formatAddress(o.customer.address)}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Email"),value:o.customer.email}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Phone"),value:o.customer.phone}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Balance"),value:e.$filters.money(null!==(a=o.customer.currency)&&void 0!==a?a:"usd",o.customer.balance)}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Created"),value:e.$filters.date(o.customer.created)}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Shipping Address"),value:l.formatAddress(null===(n=o.customer.shipping)||void 0===n?void 0:n.address)}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Currency"),value:o.customer.currency}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Default Source"),value:o.customer.default_source}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Delinquent"),value:!o.customer.delinquent}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Description"),value:o.customer.description}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Discount"),value:o.customer.discount}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Invoice Prefix"),value:o.customer.invoice_prefix}},null,8,["field"]),(0,i.createVNode)(s,{field:{name:e.__("Livemode"),value:o.customer.livemode}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Metadata"),value:o.customer.metadata}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Next Invoice Sequence"),value:o.customer.next_invoice_sequence}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Preferred Locales"),value:o.customer.preferred_locales}},null,8,["field"]),(0,i.createVNode)(r,{field:{name:e.__("Tax Exempt"),value:o.customer.tax_exempt}},null,8,["field"])]})),_:1},8,["loading"])}]])},4:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>l});var i=n(311),t={class:"text-90 font-normal text-xl md:text-2xl mb-3 flex items-center"};const o={props:{meta:{type:Object,required:!0},heading:String}};const l=(0,n(744).Z)(o,[["render",function(e,a,n,o,l,r){var s=(0,i.resolveComponent)("Head");return(0,i.openBlock)(),(0,i.createElementBlock)("div",null,[(0,i.createVNode)(s,{title:e.__(n.meta.title)},null,8,["title"]),(0,i.createElementVNode)("h1",t,(0,i.toDisplayString)(e.__(n.heading)),1),(0,i.renderSlot)(e.$slots,"default")])}]])},426:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>m});var i=n(311),t={class:"bg-gray-50 dark:bg-gray-800"},o=(0,i.createTextVNode)(" "),l={class:"group"},r={key:0},s={key:1},d={key:3};const u={props:{columns:{type:Array,required:!0}},data:function(){return{charges:{},loading:!1,hasMore:!1,moneyColumns:["amount","amount_captured","amount_refunded","application_fee_amount"],dateColumns:["created"],statusClassList:{succeeded:"bg-green-100 text-green-600",pending:"bg-gray-100 text-gray-600",disputed:"bg-orange-100 text-orange-600",failed:"bg-red-100 text-red-600"},page:1}},methods:{listCharges:function(e){var a=this;this.loading=!0,Nova.request().get("/nova-vendor/nova-stripe/stripe/charges",{params:e}).then((function(e){a.charges=e.data.charges.data,a.charges.length>0&&a.$emit("charge",a.charges[0]),a.hasMore=e.data.charges.has_more,a.loading=!1}))},nextPage:function(){this.listCharges({starting_after:this.charges[this.charges.length-1].id})},previousPage:function(){this.listCharges(2!==this.page?{ending_before:this.charges[0].id}:{})},statusClass:function(e){var a=e.status;return e.refunded?a="pending":e.disputed&&(a="disputed"),this.statusClassList[a]},statusLabel:function(e){var a=e.status;return e.refunded?a="Refunded":e.disputed&&(a="Disputed"),a}},created:function(){this.listCharges()}};const m=(0,n(744).Z)(u,[["render",function(e,a,n,u,m,c){var g=(0,i.resolveComponent)("HeaderCell"),_=(0,i.resolveComponent)("BodyCell"),p=(0,i.resolveComponent)("HeroiconsOutlineEye"),b=(0,i.resolveComponent)("InertiaLink"),y=(0,i.resolveComponent)("BaseTable");return(0,i.openBlock)(),(0,i.createElementBlock)("div",null,[(0,i.createVNode)(y,{data:m.charges,"model-name":"charges",loading:m.loading,"has-more":m.hasMore,"get-previous-page":c.previousPage,"get-next-page":c.nextPage,onPageUpdated:a[0]||(a[0]=function(e){return m.page=e})},{default:(0,i.withCtx)((function(){return[(0,i.createElementVNode)("thead",t,[(0,i.createElementVNode)("tr",null,[n.columns?((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,{key:0},(0,i.renderList)(n.columns,(function(a){return(0,i.openBlock)(),(0,i.createBlock)(g,null,{default:(0,i.withCtx)((function(){return[(0,i.createTextVNode)((0,i.toDisplayString)(e.__(a.replaceAll("_"," "))),1)]})),_:2},1024)})),256)):(0,i.createCommentVNode)("",!0),(0,i.createVNode)(g,null,{default:(0,i.withCtx)((function(){return[o]})),_:1})])]),(0,i.createElementVNode)("tbody",null,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(m.charges,(function(a){return(0,i.openBlock)(),(0,i.createElementBlock)("tr",l,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(n.columns,(function(n){return(0,i.openBlock)(),(0,i.createBlock)(_,null,{default:(0,i.withCtx)((function(){return[m.moneyColumns.find((function(e){return e===n}))?((0,i.openBlock)(),(0,i.createElementBlock)("span",r,(0,i.toDisplayString)(e.$filters.money(a.currency,a[n])),1)):m.dateColumns.find((function(e){return e===n}))?((0,i.openBlock)(),(0,i.createElementBlock)("span",s,(0,i.toDisplayString)(e.$filters.date(a[n])),1)):"status"===n?((0,i.openBlock)(),(0,i.createElementBlock)("span",{key:2,class:(0,i.normalizeClass)(["rounded-lg px-3 py-1 capitalize text-xs font-bold",c.statusClass(a)])},(0,i.toDisplayString)(c.statusLabel(a)),3)):((0,i.openBlock)(),(0,i.createElementBlock)("span",d,(0,i.toDisplayString)(a[n]),1))]})),_:2},1024)})),256)),(0,i.createVNode)(_,null,{default:(0,i.withCtx)((function(){return[(0,i.createElementVNode)("span",null,[(0,i.createVNode)(b,{href:"/nova/nova-stripe/charges/".concat(a.id),"aria-label":e.__("View")},{default:(0,i.withCtx)((function(){return[(0,i.createVNode)(p)]})),_:2},1032,["href","aria-label"])])]})),_:2},1024)])})),256))])]})),_:1},8,["data","loading","has-more","get-previous-page","get-next-page"])])}]])},294:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>u});var i=n(311),t={class:"bg-gray-50 dark:bg-gray-800"},o=(0,i.createTextVNode)(" "),l={class:"group"},r={key:0},s={key:1};const d={data:function(){return{customers:{},loading:!1,hasMore:!1,page:1}},methods:{listCustomers:function(e){var a=this;this.loading=!0,Nova.request().get("/nova-vendor/nova-stripe/stripe/customers",{params:e}).then((function(e){a.customers=e.data.customers.data,a.hasMore=e.data.customers.has_more,a.loading=!1}))},nextPage:function(){this.listCustomers({starting_after:this.customers[this.customers.length-1].id})},previousPage:function(){this.listCustomers({ending_before:this.customers[0].id})}},created:function(){this.listCustomers()}};const u=(0,n(744).Z)(d,[["render",function(e,a,n,d,u,m){var c=(0,i.resolveComponent)("HeaderCell"),g=(0,i.resolveComponent)("BodyCell"),_=(0,i.resolveComponent)("HeroiconsOutlineEye"),p=(0,i.resolveComponent)("InertiaLink"),b=(0,i.resolveComponent)("BaseTable");return(0,i.openBlock)(),(0,i.createElementBlock)("div",null,[(0,i.createVNode)(b,{data:u.customers,"model-name":"customers",loading:u.loading,"has-more":u.hasMore,"get-previous-page":m.previousPage,"get-next-page":m.nextPage,onPageUpdated:a[0]||(a[0]=function(e){return u.page=e})},{default:(0,i.withCtx)((function(){return[(0,i.createElementVNode)("thead",t,[(0,i.createElementVNode)("tr",null,[(0,i.createVNode)(c,null,{default:(0,i.withCtx)((function(){return[(0,i.createTextVNode)((0,i.toDisplayString)(e.__("Customer ID")),1)]})),_:1}),(0,i.createVNode)(c,null,{default:(0,i.withCtx)((function(){return[(0,i.createTextVNode)((0,i.toDisplayString)(e.__("Name")),1)]})),_:1}),(0,i.createVNode)(c,null,{default:(0,i.withCtx)((function(){return[(0,i.createTextVNode)((0,i.toDisplayString)(e.__("Email")),1)]})),_:1}),(0,i.createVNode)(c,null,{default:(0,i.withCtx)((function(){return[(0,i.createTextVNode)((0,i.toDisplayString)(e.__("Balance")),1)]})),_:1}),(0,i.createVNode)(c,null,{default:(0,i.withCtx)((function(){return[o]})),_:1})])]),(0,i.createElementVNode)("tbody",null,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(u.customers,(function(a){return(0,i.openBlock)(),(0,i.createElementBlock)("tr",l,[(0,i.createVNode)(g,null,{default:(0,i.withCtx)((function(){return[(0,i.createTextVNode)((0,i.toDisplayString)(a.id),1)]})),_:2},1024),(0,i.createVNode)(g,null,{default:(0,i.withCtx)((function(){return[(0,i.createTextVNode)((0,i.toDisplayString)(a.name),1)]})),_:2},1024),(0,i.createVNode)(g,null,{default:(0,i.withCtx)((function(){return[(0,i.createTextVNode)((0,i.toDisplayString)(a.email),1)]})),_:2},1024),(0,i.createVNode)(g,null,{default:(0,i.withCtx)((function(){return[a.currency?((0,i.openBlock)(),(0,i.createElementBlock)("span",r,(0,i.toDisplayString)(e.$filters.money(a.currency,a.balance)),1)):((0,i.openBlock)(),(0,i.createElementBlock)("span",s,"-"))]})),_:2},1024),(0,i.createVNode)(g,null,{default:(0,i.withCtx)((function(){return[(0,i.createElementVNode)("span",null,[(0,i.createVNode)(p,{href:"/nova/nova-stripe/customers/".concat(a.id),"aria-label":e.__("View")},{default:(0,i.withCtx)((function(){return[(0,i.createVNode)(_)]})),_:2},1032,["href","aria-label"])])]})),_:2},1024)])})),256))])]})),_:1},8,["data","loading","has-more","get-previous-page","get-next-page"])])}]])},624:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>s});var i=n(311),t={class:"overflow-hidden overflow-x-auto relative"},o={key:0,class:"w-full table-default","data-testid":"resource-table"},l={key:1,class:"w-full italic"};const r={props:{data:Array,modelName:String,loading:Boolean,hasMore:Boolean,getPreviousPage:Function,getNextPage:Function},data:function(){return{page:1,initialLoading:!0}},computed:{hasPrevious:function(){return this.page>1}},watch:{loading:function(){this.initialLoading=!1},page:function(e){this.$emit("page-updated",e)}},methods:{nextPage:function(){this.getNextPage(),this.page++},previousPage:function(){this.getPreviousPage(),this.hasPrevious&&this.page--}}};const s=(0,n(744).Z)(r,[["render",function(e,a,n,r,s,d){var u=(0,i.resolveComponent)("PaginationLinks"),m=(0,i.resolveComponent)("LoadingCard"),c=(0,i.resolveComponent)("LoadingView");return(0,i.openBlock)(),(0,i.createBlock)(c,{loading:s.initialLoading},{default:(0,i.withCtx)((function(){return[(0,i.createVNode)(m,{loading:n.loading,class:"card relative"},{default:(0,i.withCtx)((function(){return[(0,i.createElementVNode)("div",t,[n.data.length?((0,i.openBlock)(),(0,i.createElementBlock)("table",o,[(0,i.renderSlot)(e.$slots,"default")])):((0,i.openBlock)(),(0,i.createElementBlock)("div",l,"No "+(0,i.toDisplayString)(n.modelName),1))]),(0,i.createVNode)(u,{resource:n.data,hasMore:n.hasMore,hasPrevious:d.hasPrevious,onPrevious:d.previousPage,onNext:d.nextPage},null,8,["resource","hasMore","hasPrevious","onPrevious","onNext"])]})),_:3},8,["loading"])]})),_:3},8,["loading"])}]])},859:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>l});var i=n(311),t={class:"py-4 border-t border-gray-100 dark:border-gray-700 px-2 cursor-pointer pl-5 pr-5 dark:bg-gray-800 group-hover:bg-gray-50 dark:group-hover:bg-gray-900"};const o={},l=(0,n(744).Z)(o,[["render",function(e,a){return(0,i.openBlock)(),(0,i.createElementBlock)("td",t,[(0,i.renderSlot)(e.$slots,"default")])}]])},186:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>l});var i=n(311),t={class:"text-left px-2 whitespace-nowrap uppercase text-xxs text-gray-500 tracking-wide pl-5 pr-2 py-2"};const o={},l=(0,n(744).Z)(o,[["render",function(e,a){return(0,i.openBlock)(),(0,i.createElementBlock)("th",t,[(0,i.renderSlot)(e.$slots,"default")])}]])},722:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var i=n(311);const t={props:{customerId:{type:String,required:!0}}};const o=(0,n(744).Z)(t,[["render",function(e,a,n,t,o,l){var r=(0,i.resolveComponent)("CustomerDetailCard"),s=(0,i.resolveComponent)("NovaStripeLayout");return(0,i.openBlock)(),(0,i.createBlock)(s,{meta:{title:"Customer Details"},heading:"Customer Details"},{default:(0,i.withCtx)((function(){return[(0,i.createVNode)(r,{"customer-id":n.customerId},null,8,["customer-id"])]})),_:1})}]])},709:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var i=n(311);const t={},o=(0,n(744).Z)(t,[["render",function(e,a){var n=(0,i.resolveComponent)("CustomersTable"),t=(0,i.resolveComponent)("NovaStripeLayout");return(0,i.openBlock)(),(0,i.createBlock)(t,{meta:{title:"Customers"},heading:"Customers"},{default:(0,i.withCtx)((function(){return[(0,i.createVNode)(n)]})),_:1})}]])},798:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>r});var i=n(311),t={class:"flex flex-row-reverse mb-3"},o=["disabled"];const l={props:{chargeId:{type:String,required:!0}},data:function(){return{charge:null,deleting:!1}},methods:{refund:function(){var e=this;this.deleting=!0,Nova.request().post("/nova-vendor/nova-stripe/stripe/charges/"+this.chargeId+"/refund").then((function(a){Nova.success("Charge Successfully Refunded!"),e.$refs.detail.getCharge()})),this.deleting=!1}}};const r=(0,n(744).Z)(l,[["render",function(e,a,n,l,r,s){var d=(0,i.resolveComponent)("ChargeDetailCard"),u=(0,i.resolveComponent)("NovaStripeLayout");return(0,i.openBlock)(),(0,i.createBlock)(u,{meta:{title:"Charge Details"},heading:"Charge Details"},{default:(0,i.withCtx)((function(){return[(0,i.createElementVNode)("div",t,[r.charge&&!r.charge.refunded&&"succeeded"===r.charge.status?((0,i.openBlock)(),(0,i.createElementBlock)("button",{key:0,class:"shadow rounded focus:outline-none ring-primary-200 dark:ring-gray-600 focus:ring bg-primary-500 hover:bg-primary-400 active:bg-primary-600 text-white dark:text-gray-800 inline-flex items-center font-bold px-4 h-9 text-sm",onClick:a[0]||(a[0]=function(){return s.refund&&s.refund.apply(s,arguments)}),disabled:r.deleting},(0,i.toDisplayString)(e.__("Refund")),9,o)):(0,i.createCommentVNode)("",!0)]),(0,i.createVNode)(d,{ref:"detail","charge-id":n.chargeId,onChargeLoaded:a[1]||(a[1]=function(e){return r.charge=e})},null,8,["charge-id"])]})),_:1})}]])},231:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var i=n(311);const t={data:function(){return{selectedColumns:["id","amount","created","status"],singleCharge:{}}}};const o=(0,n(744).Z)(t,[["render",function(e,a,n,t,o,l){var r=(0,i.resolveComponent)("BalanceCard"),s=(0,i.resolveComponent)("ColumnSelect"),d=(0,i.resolveComponent)("ChargesTable"),u=(0,i.resolveComponent)("Card"),m=(0,i.resolveComponent)("NovaStripeLayout");return(0,i.openBlock)(),(0,i.createBlock)(m,{heading:"Stripe Dashboard",meta:{title:"Stripe Dashboard"}},{default:(0,i.withCtx)((function(){return[(0,i.createVNode)(r),(0,i.createVNode)(u,null,{default:(0,i.withCtx)((function(){return[(0,i.createVNode)(s,{modelValue:o.selectedColumns,"onUpdate:modelValue":a[0]||(a[0]=function(e){return o.selectedColumns=e}),resource:o.singleCharge,onCheckedColumns:a[1]||(a[1]=function(e){return o.selectedColumns=e})},null,8,["modelValue","resource"]),(0,i.createVNode)(d,{onCharge:a[2]||(a[2]=function(e){return o.singleCharge=e}),columns:o.selectedColumns},null,8,["columns"])]})),_:1})]})),_:1})}]])},642:(e,a,n)=>{var i={"./components/ColumnSelect.vue":588,"./components/PaginationLinks.vue":464,"./components/cards/BalanceCard.vue":236,"./components/cards/ChargeDetailCard.vue":200,"./components/cards/CustomerDetailCard.vue":407,"./components/layouts/NovaStripeLayout.vue":4,"./components/tables/ChargesTable.vue":426,"./components/tables/CustomersTable.vue":294,"./components/tables/_shared/BaseTable.vue":624,"./components/tables/_shared/BodyCell.vue":859,"./components/tables/_shared/HeaderCell.vue":186,"./pages/CustomerDetail.vue":722,"./pages/Customers.vue":709,"./pages/Detail.vue":798,"./pages/Tool.vue":231};function t(e){var a=o(e);return n(a)}function o(e){if(!n.o(i,e)){var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}return i[e]}t.keys=function(){return Object.keys(i)},t.resolve=o,e.exports=t,t.id=642},311:e=>{"use strict";e.exports=Vue}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return a[e].call(o.exports,o,o.exports,i),o.exports}i.m=a,e=[],i.O=(a,n,t,o)=>{if(!n){var l=1/0;for(u=0;u=o)&&Object.keys(i.O).every((e=>i.O[e](n[s])))?n.splice(s--,1):(r=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,t,o]},i.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return i.d(a,{a}),a},i.d=(e,a)=>{for(var n in a)i.o(a,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},i.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={103:0,990:0};i.O.j=a=>0===e[a];var a=(a,n)=>{var t,o,[l,r,s]=n,d=0;if(l.some((a=>0!==e[a]))){for(t in r)i.o(r,t)&&(i.m[t]=r[t]);if(s)var u=s(i)}for(a&&a(n);di(746)));var t=i.O(void 0,[990],(()=>i(762)));t=i.O(t)})(); \ No newline at end of file +(()=>{var e,a={746:(e,a,n)=>{"use strict";var t=n(740),i=n.n(t);function o(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a{},744:(e,a)=>{"use strict";a.Z=(e,a)=>{const n=e.__vccOpts||e;for(const[e,t]of a)n[e]=t;return n}},588:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>d});var t=n(311),i={class:"flex justify-end p-2 py-3 border-b border-gray-200 dark:border-gray-700"},o={class:"m-2"},l=["id","value"],r=["for"];const s={props:{resource:{type:Object,required:!0}},data:function(){return{checkedColumns:this.$attrs.modelValue}}};const d=(0,n(744).Z)(s,[["render",function(e,a,n,s,d,u){var c=(0,t.resolveComponent)("DropdownTrigger"),m=(0,t.resolveComponent)("DropdownMenu"),g=(0,t.resolveComponent)("Dropdown");return(0,t.openBlock)(),(0,t.createElementBlock)("div",i,[(0,t.createVNode)(g,{placement:"bottom-end"},{menu:(0,t.withCtx)((function(){return[(0,t.createVNode)(m,{style:{width:"100%",columns:"25vw 3"},class:"p-3 text-90"},{default:(0,t.withCtx)((function(){return[n.resource?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(n.resource,(function(n,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",o,[(0,t.withDirectives)((0,t.createElementVNode)("input",{class:"mr-2",type:"checkbox",id:i,value:i,"onUpdate:modelValue":a[0]||(a[0]=function(e){return d.checkedColumns=e}),onChange:a[1]||(a[1]=function(a){return e.$emit("checkedColumns",d.checkedColumns)})},null,40,l),[[t.vModelCheckbox,d.checkedColumns]]),(0,t.createElementVNode)("label",{for:i,class:"capitalize"},(0,t.toDisplayString)(e.__(i.replaceAll("_"," "))),9,r)])})),256)):(0,t.createCommentVNode)("",!0)]})),_:1})]})),default:(0,t.withCtx)((function(){return[(0,t.createVNode)(c,{class:"text-90 px-3 shadow rounded bg-gray-100 dark:bg-gray-800"},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Select Columns")),1)]})),_:1})]})),_:1})])}]])},464:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>d});var t=n(311),i={class:"bg-gray-50 dark:bg-gray-800 rounded-b-lg"},o={key:0,class:"flex"},l=["disabled"],r=["disabled"];const s={props:{resource:{type:Array,required:!0},hasMore:{type:Boolean,required:!0},hasPrevious:{type:Boolean,required:!0}},methods:{previousPage:function(){this.$emit("previous")},nextPage:function(){this.$emit("next")}}};const d=(0,n(744).Z)(s,[["render",function(e,a,n,s,d,u){return(0,t.openBlock)(),(0,t.createElementBlock)("div",i,[n.resource.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("nav",o,[(0,t.createElementVNode)("button",{disabled:!n.hasPrevious,class:(0,t.normalizeClass)(["btn btn-link py-3 px-4",{"text-gray-500 dark:text-gray-400":n.hasPrevious,"text-80 opacity-50 cursor-not-allowed":!n.hasPrevious}]),rel:"prev",onClick:a[0]||(a[0]=(0,t.withModifiers)((function(e){return u.previousPage()}),["prevent"])),dusk:"previous"},(0,t.toDisplayString)(e.__("Previous")),11,l),(0,t.createElementVNode)("button",{disabled:!n.hasMore,class:(0,t.normalizeClass)(["ml-auto btn btn-link py-3 px-4",{"text-gray-500 dark:text-gray-400":n.hasMore,"text-80 opacity-50 cursor-not-allowed":!n.hasMore}]),rel:"next",onClick:a[1]||(a[1]=(0,t.withModifiers)((function(e){return u.nextPage()}),["prevent"])),dusk:"next"},(0,t.toDisplayString)(e.__("Next")),11,r)])):(0,t.createCommentVNode)("",!0)])}]])},236:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>c});var t=n(311),i={class:"w-1/2"},o={class:"text-sm uppercase mb-2 text-80"},l={class:"text-2xl"},r={class:"w-1/2"},s={class:"text-sm uppercase mb-2 text-80"},d={class:"text-2xl"};const u={data:function(){return{initialLoading:!0,balance:{}}},methods:{getBalance:function(){var e=this;Nova.request().get("/nova-vendor/nova-stripe/stripe/balance").then((function(a){e.balance=a.data.balance,e.initialLoading=!1}))}},created:function(){this.getBalance()}};const c=(0,n(744).Z)(u,[["render",function(e,a,n,u,c,m){var g=(0,t.resolveComponent)("LoadingCard");return(0,t.openBlock)(),(0,t.createBlock)(g,{loading:c.initialLoading,class:"flex flex-wrap py-8 mb-8 text-center"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",i,[(0,t.createElementVNode)("p",o,(0,t.toDisplayString)(e.__("Available Balance")),1),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.balance.available,(function(a){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("p",l,(0,t.toDisplayString)(e.$filters.money(a.currency,a.amount)),1)])})),256))]),(0,t.createElementVNode)("div",r,[(0,t.createElementVNode)("p",s,(0,t.toDisplayString)(e.__("Pending Balance")),1),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.balance.pending,(function(a){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("p",d,(0,t.toDisplayString)(e.$filters.money(a.currency,a.amount)),1)])})),256))])]})),_:1},8,["loading"])}]])},715:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var t=n(311);const i={props:{chargeId:{type:String,required:!0}},data:function(){return{initialLoading:!0,charge:{amount:0,currency:""}}},computed:{fee:function(){return this.charge.balance_transaction?this.$filters.money(this.charge.balance_transaction.currency,this.charge.balance_transaction.fee):0},net:function(){return this.charge.balance_transaction?this.$filters.money(this.charge.currency,this.charge.amount-this.charge.balance_transaction.fee):0}},methods:{getCharge:function(){var e=this;Nova.request().get("/nova-vendor/nova-stripe/stripe/charges/"+this.chargeId).then((function(a){e.charge=a.data.charge,e.initialLoading=!1,e.$emit("charge-loaded",a.data.charge)}))}},created:function(){this.getCharge()}};const o=(0,n(744).Z)(i,[["render",function(e,a,n,i,o,l){var r=this,s=(0,t.resolveComponent)("DetailTextField"),d=(0,t.resolveComponent)("DetailKeyValueField"),u=(0,t.resolveComponent)("DetailBooleanField"),c=(0,t.resolveComponent)("LoadingCard");return(0,t.openBlock)(),(0,t.createBlock)(c,{loading:o.initialLoading,class:"mb-6 px-6"},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(s,{field:{name:e.__("ID"),value:o.charge.id}},null,8,["field"]),(0,t.createVNode)(s,{field:{name:e.__("Amount"),value:e.$filters.money(r.charge.currency,r.charge.amount)}},null,8,["field"]),(0,t.createVNode)(s,{field:{name:e.__("Fee"),value:l.fee}},null,8,["field"]),(0,t.createVNode)(s,{field:{name:e.__("Net"),value:l.net}},null,8,["field"]),(0,t.createVNode)(s,{field:{name:e.__("Status"),value:o.charge.status}},null,8,["field"]),(0,t.createVNode)(s,{field:{name:e.__("Created"),value:e.$filters.date(o.charge.created)}},null,8,["field"]),!o.initialLoading&&Object.keys(o.charge.metadata).length?((0,t.openBlock)(),(0,t.createBlock)(d,{key:0,field:{name:e.__("Metadata"),value:o.charge.metadata}},null,8,["field"])):(0,t.createCommentVNode)("",!0),!o.initialLoading&&Object.keys(o.charge.outcome).length?((0,t.openBlock)(),(0,t.createBlock)(d,{key:1,field:{name:e.__("Outcome"),value:o.charge.outcome}},null,8,["field"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(u,{field:{name:e.__("Livemode"),value:o.charge.livemode}},null,8,["field"]),(0,t.createVNode)(u,{field:{name:e.__("Captured"),value:o.charge.captured}},null,8,["field"]),(0,t.createVNode)(u,{field:{name:e.__("Paid"),value:o.charge.paid}},null,8,["field"]),(0,t.createVNode)(u,{field:{name:e.__("Refunded"),value:o.charge.refunded}},null,8,["field"]),(0,t.createVNode)(u,{field:{name:e.__("Disputed"),value:o.charge.disputed}},null,8,["field"]),!o.initialLoading&&Object.keys(o.charge.fraud_details).length?((0,t.openBlock)(),(0,t.createBlock)(d,{key:2,field:{name:e.__("Fraud Details"),value:o.charge.fraud_details}},null,8,["field"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(s,{field:{name:e.__("Transfer Group"),value:o.charge.transfer_group}},null,8,["field"])]})),_:1},8,["loading"])}]])},407:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var t=n(311);const i={props:{customerId:{type:String,required:!0}},data:function(){return{customer:{},initialLoading:!0,shippingAddress:null}},methods:{loadCustomer:function(){var e=this;Nova.request().get("/nova-vendor/nova-stripe/stripe/customers/"+this.customerId).then((function(a){e.customer=a.data.customer,e.initialLoading=!1}))},formatAddress:function(e){return null!=e&&e.line1?"".concat(e.line1,"\n ").concat(e.line2," \n ").concat(e.city,",\n ").concat(e.state,"\n ").concat(e.postal_code):"—"}},created:function(){this.loadCustomer()}};const o=(0,n(744).Z)(i,[["render",function(e,a,n,i,o,l){var r=(0,t.resolveComponent)("DetailTextField"),s=(0,t.resolveComponent)("DetailBooleanField"),d=(0,t.resolveComponent)("LoadingCard");return(0,t.openBlock)(),(0,t.createBlock)(d,{loading:o.initialLoading,class:"mb-6 px-6"},{default:(0,t.withCtx)((function(){var a,n;return[(0,t.createVNode)(r,{field:{name:e.__("ID"),value:o.customer.id}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Name"),value:o.customer.name}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Address"),value:l.formatAddress(o.customer.address)}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Email"),value:o.customer.email}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Phone"),value:o.customer.phone}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Balance"),value:e.$filters.money(null!==(a=o.customer.currency)&&void 0!==a?a:"usd",o.customer.balance)}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Created"),value:e.$filters.date(o.customer.created)}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Shipping Address"),value:l.formatAddress(null===(n=o.customer.shipping)||void 0===n?void 0:n.address)}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Currency"),value:o.customer.currency}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Default Source"),value:o.customer.default_source}},null,8,["field"]),(0,t.createVNode)(s,{field:{name:e.__("Delinquent"),value:!o.customer.delinquent}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Description"),value:o.customer.description}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Discount"),value:o.customer.discount}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Invoice Prefix"),value:o.customer.invoice_prefix}},null,8,["field"]),(0,t.createVNode)(s,{field:{name:e.__("Livemode"),value:o.customer.livemode}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Metadata"),value:o.customer.metadata}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Next Invoice Sequence"),value:o.customer.next_invoice_sequence}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Preferred Locales"),value:o.customer.preferred_locales}},null,8,["field"]),(0,t.createVNode)(r,{field:{name:e.__("Tax Exempt"),value:o.customer.tax_exempt}},null,8,["field"])]})),_:1},8,["loading"])}]])},4:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>l});var t=n(311),i={class:"text-90 font-normal text-xl md:text-2xl mb-3 flex items-center"};const o={props:{meta:{type:Object,required:!0},heading:String}};const l=(0,n(744).Z)(o,[["render",function(e,a,n,o,l,r){var s=(0,t.resolveComponent)("Head");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createVNode)(s,{title:e.__(n.meta.title)},null,8,["title"]),(0,t.createElementVNode)("h1",i,(0,t.toDisplayString)(e.__(n.heading)),1),(0,t.renderSlot)(e.$slots,"default")])}]])},426:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>c});var t=n(311),i={class:"bg-gray-50 dark:bg-gray-800"},o=(0,t.createTextVNode)(" "),l={class:"group"},r={key:0},s={key:1},d={key:3};const u={props:{columns:{type:Array,required:!0}},data:function(){return{charges:{},loading:!1,hasMore:!1,moneyColumns:["amount","amount_captured","amount_refunded","application_fee_amount"],dateColumns:["created"],statusClassList:{succeeded:"bg-green-100 text-green-600",pending:"bg-gray-100 text-gray-600",disputed:"bg-orange-100 text-orange-600",failed:"bg-red-100 text-red-600"},page:1}},methods:{listCharges:function(e){var a=this;this.loading=!0,Nova.request().get("/nova-vendor/nova-stripe/stripe/charges",{params:e}).then((function(e){a.charges=e.data.charges.data,a.charges.length>0&&a.$emit("charge",a.charges[0]),a.hasMore=e.data.charges.has_more,a.loading=!1}))},nextPage:function(){this.listCharges({starting_after:this.charges[this.charges.length-1].id})},previousPage:function(){this.listCharges(2!==this.page?{ending_before:this.charges[0].id}:{})},statusClass:function(e){var a=e.status;return e.refunded?a="pending":e.disputed&&(a="disputed"),this.statusClassList[a]},statusLabel:function(e){var a=e.status;return e.refunded?a="Refunded":e.disputed&&(a="Disputed"),a}},created:function(){this.listCharges()}};const c=(0,n(744).Z)(u,[["render",function(e,a,n,u,c,m){var g=(0,t.resolveComponent)("HeaderCell"),_=(0,t.resolveComponent)("BodyCell"),p=(0,t.resolveComponent)("HeroiconsOutlineEye"),b=(0,t.resolveComponent)("InertiaLink"),y=(0,t.resolveComponent)("BaseTable");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createVNode)(y,{data:c.charges,"model-name":"charges",loading:c.loading,"has-more":c.hasMore,"get-previous-page":m.previousPage,"get-next-page":m.nextPage,onPageUpdated:a[0]||(a[0]=function(e){return c.page=e})},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("thead",i,[(0,t.createElementVNode)("tr",null,[n.columns?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(n.columns,(function(a){return(0,t.openBlock)(),(0,t.createBlock)(g,null,{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__(a.replaceAll("_"," "))),1)]})),_:2},1024)})),256)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(g,null,{default:(0,t.withCtx)((function(){return[o]})),_:1})])]),(0,t.createElementVNode)("tbody",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.charges,(function(a){return(0,t.openBlock)(),(0,t.createElementBlock)("tr",l,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.columns,(function(n){return(0,t.openBlock)(),(0,t.createBlock)(_,null,{default:(0,t.withCtx)((function(){return[c.moneyColumns.find((function(e){return e===n}))?((0,t.openBlock)(),(0,t.createElementBlock)("span",r,(0,t.toDisplayString)(e.$filters.money(a.currency,a[n])),1)):c.dateColumns.find((function(e){return e===n}))?((0,t.openBlock)(),(0,t.createElementBlock)("span",s,(0,t.toDisplayString)(e.$filters.date(a[n])),1)):"status"===n?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:2,class:(0,t.normalizeClass)(["rounded-lg px-3 py-1 capitalize text-xs font-bold",m.statusClass(a)])},(0,t.toDisplayString)(m.statusLabel(a)),3)):((0,t.openBlock)(),(0,t.createElementBlock)("span",d,(0,t.toDisplayString)(a[n]),1))]})),_:2},1024)})),256)),(0,t.createVNode)(_,null,{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("span",null,[(0,t.createVNode)(b,{href:"/nova/nova-stripe/charges/".concat(a.id),"aria-label":e.__("View")},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(p)]})),_:2},1032,["href","aria-label"])])]})),_:2},1024)])})),256))])]})),_:1},8,["data","loading","has-more","get-previous-page","get-next-page"])])}]])},294:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>u});var t=n(311),i={class:"bg-gray-50 dark:bg-gray-800"},o=(0,t.createTextVNode)(" "),l={class:"group"},r={key:0},s={key:1};const d={data:function(){return{customers:{},loading:!1,hasMore:!1,page:1}},methods:{listCustomers:function(e){var a=this;this.loading=!0,Nova.request().get("/nova-vendor/nova-stripe/stripe/customers",{params:e}).then((function(e){a.customers=e.data.customers.data,a.hasMore=e.data.customers.has_more,a.loading=!1}))},nextPage:function(){this.listCustomers({starting_after:this.customers[this.customers.length-1].id})},previousPage:function(){this.listCustomers({ending_before:this.customers[0].id})}},created:function(){this.listCustomers()}};const u=(0,n(744).Z)(d,[["render",function(e,a,n,d,u,c){var m=(0,t.resolveComponent)("HeaderCell"),g=(0,t.resolveComponent)("BodyCell"),_=(0,t.resolveComponent)("HeroiconsOutlineEye"),p=(0,t.resolveComponent)("InertiaLink"),b=(0,t.resolveComponent)("BaseTable");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createVNode)(b,{data:u.customers,"model-name":"customers",loading:u.loading,"has-more":u.hasMore,"get-previous-page":c.previousPage,"get-next-page":c.nextPage,onPageUpdated:a[0]||(a[0]=function(e){return u.page=e})},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("thead",i,[(0,t.createElementVNode)("tr",null,[(0,t.createVNode)(m,null,{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Customer ID")),1)]})),_:1}),(0,t.createVNode)(m,null,{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Name")),1)]})),_:1}),(0,t.createVNode)(m,null,{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Email")),1)]})),_:1}),(0,t.createVNode)(m,null,{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Balance")),1)]})),_:1}),(0,t.createVNode)(m,null,{default:(0,t.withCtx)((function(){return[o]})),_:1})])]),(0,t.createElementVNode)("tbody",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(u.customers,(function(a){return(0,t.openBlock)(),(0,t.createElementBlock)("tr",l,[(0,t.createVNode)(g,null,{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.id),1)]})),_:2},1024),(0,t.createVNode)(g,null,{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.name),1)]})),_:2},1024),(0,t.createVNode)(g,null,{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.email),1)]})),_:2},1024),(0,t.createVNode)(g,null,{default:(0,t.withCtx)((function(){return[a.currency?((0,t.openBlock)(),(0,t.createElementBlock)("span",r,(0,t.toDisplayString)(e.$filters.money(a.currency,a.balance)),1)):((0,t.openBlock)(),(0,t.createElementBlock)("span",s,"-"))]})),_:2},1024),(0,t.createVNode)(g,null,{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("span",null,[(0,t.createVNode)(p,{href:"/nova/nova-stripe/customers/".concat(a.id),"aria-label":e.__("View")},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(_)]})),_:2},1032,["href","aria-label"])])]})),_:2},1024)])})),256))])]})),_:1},8,["data","loading","has-more","get-previous-page","get-next-page"])])}]])},624:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>s});var t=n(311),i={class:"overflow-hidden overflow-x-auto relative"},o={key:0,class:"w-full table-default","data-testid":"resource-table"},l={key:1,class:"w-full italic"};const r={props:{data:Array,modelName:String,loading:Boolean,hasMore:Boolean,getPreviousPage:Function,getNextPage:Function},data:function(){return{page:1,initialLoading:!0}},computed:{hasPrevious:function(){return this.page>1}},watch:{loading:function(){this.initialLoading=!1},page:function(e){this.$emit("page-updated",e)}},methods:{nextPage:function(){this.getNextPage(),this.page++},previousPage:function(){this.getPreviousPage(),this.hasPrevious&&this.page--}}};const s=(0,n(744).Z)(r,[["render",function(e,a,n,r,s,d){var u=(0,t.resolveComponent)("PaginationLinks"),c=(0,t.resolveComponent)("LoadingCard"),m=(0,t.resolveComponent)("LoadingView");return(0,t.openBlock)(),(0,t.createBlock)(m,{loading:s.initialLoading},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(c,{loading:n.loading,class:"card relative"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",i,[n.data.length?((0,t.openBlock)(),(0,t.createElementBlock)("table",o,[(0,t.renderSlot)(e.$slots,"default")])):((0,t.openBlock)(),(0,t.createElementBlock)("div",l,"No "+(0,t.toDisplayString)(n.modelName),1))]),(0,t.createVNode)(u,{resource:n.data,hasMore:n.hasMore,hasPrevious:d.hasPrevious,onPrevious:d.previousPage,onNext:d.nextPage},null,8,["resource","hasMore","hasPrevious","onPrevious","onNext"])]})),_:3},8,["loading"])]})),_:3},8,["loading"])}]])},859:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>l});var t=n(311),i={class:"py-4 border-t border-gray-100 dark:border-gray-700 px-2 cursor-pointer pl-5 pr-5 dark:bg-gray-800 group-hover:bg-gray-50 dark:group-hover:bg-gray-900"};const o={},l=(0,n(744).Z)(o,[["render",function(e,a){return(0,t.openBlock)(),(0,t.createElementBlock)("td",i,[(0,t.renderSlot)(e.$slots,"default")])}]])},186:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>l});var t=n(311),i={class:"text-left px-2 whitespace-nowrap uppercase text-xxs text-gray-500 tracking-wide pl-5 pr-2 py-2"};const o={},l=(0,n(744).Z)(o,[["render",function(e,a){return(0,t.openBlock)(),(0,t.createElementBlock)("th",i,[(0,t.renderSlot)(e.$slots,"default")])}]])},722:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var t=n(311);const i={props:{customerId:{type:String,required:!0}}};const o=(0,n(744).Z)(i,[["render",function(e,a,n,i,o,l){var r=(0,t.resolveComponent)("CustomerDetailCard"),s=(0,t.resolveComponent)("NovaStripeLayout");return(0,t.openBlock)(),(0,t.createBlock)(s,{meta:{title:"Customer Details"},heading:"Customer Details"},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(r,{"customer-id":n.customerId},null,8,["customer-id"])]})),_:1})}]])},709:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var t=n(311);const i={},o=(0,n(744).Z)(i,[["render",function(e,a){var n=(0,t.resolveComponent)("CustomersTable"),i=(0,t.resolveComponent)("NovaStripeLayout");return(0,t.openBlock)(),(0,t.createBlock)(i,{meta:{title:"Customers"},heading:"Customers"},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(n)]})),_:1})}]])},798:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>r});var t=n(311),i={class:"flex flex-row-reverse mb-3"},o=["disabled"];const l={props:{chargeId:{type:String,required:!0}},data:function(){return{charge:null,deleting:!1}},methods:{refund:function(){var e=this;this.deleting=!0,Nova.request().post("/nova-vendor/nova-stripe/stripe/charges/"+this.chargeId+"/refund").then((function(a){Nova.success("Charge Successfully Refunded!"),e.$refs.detail.getCharge()})),this.deleting=!1}}};const r=(0,n(744).Z)(l,[["render",function(e,a,n,l,r,s){var d=(0,t.resolveComponent)("ChargeDetailCard"),u=(0,t.resolveComponent)("NovaStripeLayout");return(0,t.openBlock)(),(0,t.createBlock)(u,{meta:{title:"Charge Details"},heading:"Charge Details"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",i,[r.charge&&!r.charge.refunded&&"succeeded"===r.charge.status?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,class:"shadow rounded focus:outline-none ring-primary-200 dark:ring-gray-600 focus:ring bg-primary-500 hover:bg-primary-400 active:bg-primary-600 text-white dark:text-gray-800 inline-flex items-center font-bold px-4 h-9 text-sm",onClick:a[0]||(a[0]=function(){return s.refund&&s.refund.apply(s,arguments)}),disabled:r.deleting},(0,t.toDisplayString)(e.__("Refund")),9,o)):(0,t.createCommentVNode)("",!0)]),(0,t.createVNode)(d,{ref:"detail","charge-id":n.chargeId,onChargeLoaded:a[1]||(a[1]=function(e){return r.charge=e})},null,8,["charge-id"])]})),_:1})}]])},231:(e,a,n)=>{"use strict";n.r(a),n.d(a,{default:()=>o});var t=n(311);const i={data:function(){return{selectedColumns:["id","amount","created","status"],singleCharge:{}}}};const o=(0,n(744).Z)(i,[["render",function(e,a,n,i,o,l){var r=(0,t.resolveComponent)("BalanceCard"),s=(0,t.resolveComponent)("ColumnSelect"),d=(0,t.resolveComponent)("ChargesTable"),u=(0,t.resolveComponent)("Card"),c=(0,t.resolveComponent)("NovaStripeLayout");return(0,t.openBlock)(),(0,t.createBlock)(c,{heading:"Stripe Dashboard",meta:{title:"Stripe Dashboard"}},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(r),(0,t.createVNode)(u,null,{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(s,{modelValue:o.selectedColumns,"onUpdate:modelValue":a[0]||(a[0]=function(e){return o.selectedColumns=e}),resource:o.singleCharge,onCheckedColumns:a[1]||(a[1]=function(e){return o.selectedColumns=e})},null,8,["modelValue","resource"]),(0,t.createVNode)(d,{onCharge:a[2]||(a[2]=function(e){return o.singleCharge=e}),columns:o.selectedColumns},null,8,["columns"])]})),_:1})]})),_:1})}]])},642:(e,a,n)=>{var t={"./components/ColumnSelect.vue":588,"./components/PaginationLinks.vue":464,"./components/cards/BalanceCard.vue":236,"./components/cards/ChargeDetailCard.vue":715,"./components/cards/CustomerDetailCard.vue":407,"./components/layouts/NovaStripeLayout.vue":4,"./components/tables/ChargesTable.vue":426,"./components/tables/CustomersTable.vue":294,"./components/tables/_shared/BaseTable.vue":624,"./components/tables/_shared/BodyCell.vue":859,"./components/tables/_shared/HeaderCell.vue":186,"./pages/CustomerDetail.vue":722,"./pages/Customers.vue":709,"./pages/Detail.vue":798,"./pages/Tool.vue":231};function i(e){var a=o(e);return n(a)}function o(e){if(!n.o(t,e)){var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}return t[e]}i.keys=function(){return Object.keys(t)},i.resolve=o,e.exports=i,i.id=642},311:e=>{"use strict";e.exports=Vue}},n={};function t(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return a[e].call(o.exports,o,o.exports,t),o.exports}t.m=a,e=[],t.O=(a,n,i,o)=>{if(!n){var l=1/0;for(u=0;u=o)&&Object.keys(t.O).every((e=>t.O[e](n[s])))?n.splice(s--,1):(r=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,i,o]},t.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},t.d=(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},t.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={103:0,990:0};t.O.j=a=>0===e[a];var a=(a,n)=>{var i,o,[l,r,s]=n,d=0;if(l.some((a=>0!==e[a]))){for(i in r)t.o(r,i)&&(t.m[i]=r[i]);if(s)var u=s(t)}for(a&&a(n);dt(746)));var i=t.O(void 0,[990],(()=>t(762)));i=t.O(i)})(); \ No newline at end of file diff --git a/dist/lang/en.json b/dist/lang/en.json index 361af7a..c04822c 100644 --- a/dist/lang/en.json +++ b/dist/lang/en.json @@ -13,7 +13,7 @@ "Delinquent": "Delinquent", "Description": "Description", "Discount": "Discount", - "Dispute": "Dispute", + "Disputed": "Disputed", "Email": "Email", "Fee": "Fee", "Fraud Details": "Fraud Details", @@ -25,6 +25,7 @@ "Net": "Net", "Next Invoice Sequence": "Next Invoice Sequence", "Next": "Next", + "Outcome": "Outcome", "Paid": "Paid", "Pending Balance": "Pending Balance", "Phone": "Phone", diff --git a/resources/js/components/cards/ChargeDetailCard.vue b/resources/js/components/cards/ChargeDetailCard.vue index cf01bd8..d358d90 100644 --- a/resources/js/components/cards/ChargeDetailCard.vue +++ b/resources/js/components/cards/ChargeDetailCard.vue @@ -24,9 +24,20 @@ value: $filters.date(charge.created), }" > - + + @@ -39,12 +50,16 @@ - - + +