1var M=Object.defineProperty;var G=(e,t,n)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var r=(e,t,n)=>(G(e,typeof t!="symbol"?t+"":t,n),n);import{P as K,aQ as Q,V as J,aG as X,cd as Z,_ as x,ce as ee,a as te}from"./common-4ebc591d.js";import{v as ne}from"./vdlAddFundsDialog-db193c34.js";import{P as C,O as k,V as ae,dg as se,_ as q,o as u,g as $,w as l,b as o,a as c,t as p,c as f,h as b,d as y,n as D,aH as I,bU as j,cb as oe,bV as ie,m as le,bY as re,ee as de,bD as P,B as ce,r as U,dK as pe,dL as ue,j as _e,l as me,aB as ge,aC as fe,aD as ye}from"./vendor-147ef0d1.js";import{_ as he}from"./vdlDataList-96569067.js";import"./vdlTabs-463f8eea.js";import"./vdlPagination.vue_vue_type_style_index_0_lang-a47b7663.js";import"./vdlFormDialog-95ff4290.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"[email protected]"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="25f71bf9-a946-4483-8df8-c6bf5fbda4c6",e._sentryDebugIdIdentifier="sentry-dbid-25f71bf9-a946-4483-8df8-c6bf5fbda4c6")}catch{}})();var ve=Object.defineProperty,be=Object.getOwnPropertyDescriptor,h=(e,t,n,a)=>{for(var i=a>1?void 0:a?be(t,n):t,_=e.length-1,d;_>=0;_--)(d=e[_])&&(i=(a?d(t,n,i):d(i))||i);return a&&i&&ve(t,n,i),i};let m=class extends ae{constructor(){super(...arguments);r(this,"mdiChevronRight",se);r(this,"title");r(this,"line1");r(this,"line2");r(this,"icon");r(this,"className");r(this,"tooltip")}};h([C()],m.prototype,"title",2);h([C()],m.prototype,"line1",2);h([C()],m.prototype,"line2",2);h([C()],m.prototype,"icon",2);h([C()],m.prototype,"className",2);h([C()],m.prototype,"tooltip",2);m=h([k({})],m);const Ce=m;const Se={class:"md-list-text-container"},we={class:"md-title"},$e={key:0},Pe={key:1};function Te(e,t,n,a,i,_){const d=I,w=j,T=oe,v=ie;return u(),$(v,{class:D(["stat",e.className])},{default:l(()=>[o(w,null,{default:l(()=>[o(d,{class:"md-primary",mdSvg:e.icon},null,8,["mdSvg"]),c("div",Se,[c("span",we,p(e.title),1),e.line1?(u(),f("span",$e,p(e.line1),1)):b("",!0),e.line2?(u(),f("span",Pe,p(e.line2),1)):b("",!0)]),o(d,{class:"md-primary",mdSvg:e.mdiChevronRight},null,8,["mdSvg"])]),_:1}),e.tooltip?(u(),$(T,{key:0,"md-direction":"top"},{default:l(()=>[y(p(e.tooltip),1)]),_:1})):b("",!0)]),_:1},8,["class"])}const De=q(Ce,[["render",Te],["__scopeId","data-v-bd0bfd47"]]);var Re=Object.defineProperty,Ue=Object.getOwnPropertyDescriptor,S=(e,t,n,a)=>{for(var i=a>1?void 0:a?Ue(t,n):t,_=e.length-1,d;_>=0;_--)(d=e[_])&&(i=(a?d(t,n,i):d(i))||i);return a&&i&&Re(t,n,i),i};let g=class extends le(K,Q){constructor(){super(...arguments);r(this,"mdiDownload",re);r(this,"mdiCurrencyUsd",de);r(this,"loadingData",!1);r(this,"paginationSettings",{totalRows:0,pageSize:10,currentPage:1});r(this,"isLoggedIn");r(this,"attributes");r(this,"walletTransactions");r(this,"walletTransactionsStats");r(this,"getWalletTransactions")}get pageTitle(){return this.loadingData?"Loading...":"Transactions"}get usd(){return J(this.attributes,"currencies",1)}get fundsHeldInSecurePayments(){return this.activeUser&&this.activeUser.services&&this.activeUser.services[0]&&this.activeUser.services[0].stats&&this.activeUser.services[0].stats.funds_held_in_secure_payments}transactionTitle(t){let n;return t.type==="payment_request_paid"?n="Voice123 Secure Payment":t.type==="funds_added"?n="Funds added to your available balance":t.type==="refund"&&(t.payment_method.includes("card")||t.payment_method.includes("PayPal"))?n=`Refunded to ${t.payment_method}`:t.type==="refund"&&(n="Refunded"),n}transactionPaymentMethod(t){let n="";return t.payment_method?(n="Paid using ",t.payment_method==="Cash"||t.payment_method==="Balance"?n+="available balance":t.payment_method==="Check (Cheque)"?n+="check (cheque)":n+=t.payment_method):t.paymentRequest&&(n+=X(t.paymentRequest.project)),n}openInNewTab(t){window.open(t,"_blank")}goToPendingPayments(){this.$router.push({name:"activeProjects",query:{type:"all",active:"true",secure_payments:"pending"}})}goToPaidAndOpen(){this.$router.push({name:"activeProjects",query:{type:"all",active:"true",secure_payments:"paid"}})}openInvoiceDialog(){var n;const t=this.$refs.invoiceDialog;(n=t==null?void 0:t.open)==null||n.call(t)}closeInvoiceDialog(){var n;const t=this.$refs.invoiceDialog;(n=t==null?void 0:t.close)==null||n.call(t)}openAddFundsDialog(){var t,n;if(this.activeUser&&this.activeUser.type===Z.UNTRUSTED){const a=this.$refs.addFundsContactUsDialog;(t=a==null?void 0:a.openDialog)==null||t.call(a,"addFundsContactUsDialog")}else{const a=this.$refs.addFundsDialog;(n=a==null?void 0:a.openDialog)==null||n.call(a,"addFunds")}}async onParamsChanged(t){const{page:n,size:a}=t;this.paginationSettings.currentPage=n,this.paginationSettings.pageSize=a||10,await this.updateNavigation({page:n,size:a}),await this.getWalletTransactions({params:t})}async updateNavigation(t){var n;try{await this.$router.replace({query:{...t}})}catch(a){const i=a;
1if(i.name!=="NavigationDuplicated"&&!((n=i.message)!=null&&n.includes("Navigation cancelled")))throw a}}getRequestParams(){const{page:t,size:n}=this.$route.query;return{page:t?Number(t):1,size:n?Number(n):10}}async created(){if(this.isLoggedIn){const t=this.getRequestParams();await this.getWalletTransactions({params:t}),this.paginationSettings={pageSize:this.walletTransactionsStats.page_size,currentPage:this.walletTransactionsStats.current_page,totalRows:this.walletTransactionsStats.total_rows},this.loadingData=!1}}};S([P],g.prototype,"isLoggedIn",2);S([P],g.prototype,"attributes",2);S([P],g.prototype,"walletTransactions",2);S([P],g.prototype,"walletTransactionsStats",2);S([ce],g.prototype,"getWalletTransactions",2);g=S([k({components:{ClientStat:De}})],g);const ke={key:0,class:"stats-container"},qe={key:1,class:"stats-container"},Ie=c("p",{class:"walletTransactions-description"},[y(" Need to add Voice123 as a vendor? For vendor onboardings, purchase orders, banking details or invoices, submit a request "),c("a",{href:"https://forms.gle/qjR6UnEBRPfuvz6w8",target:"_blank",rel:"noopener"},"here"),y(". ")],-1),je={class:"page-actions"},Fe={class:"wallet-transaction-amount"},Ne={class:"wallet-transaction-info"},Ve={class:"item-least-content"},Oe={class:"md-caption"},Ae={class:"md-list-text-container"},Ee={class:"item-title"},ze={key:0},Be={key:1},He={key:0},Le={class:"mobile-action"},We={class:"md-subheading-1 empty-state"},Ye={href:"mailto:[email protected]",target:"_blank"};function Me(e,t,n,a,i,_){const d=U("client-stat"),w=pe,T=ue,v=_e,R=I,F=U("router-link"),N=me,V=j,O=he,A=x,E=ge,z=fe,B=ye,H=ne,L=ee,W=te;return u(),$(W,{class:"walletTransactions",loading:e.loadingData,title:e.pageTitle},{default:l(()=>[e.isUnderMobileWidth?(u(),f("div",ke,[o(T,{"md-infinite":!1,"md-controls":!1,"md-swipeable":!0},{default:l(()=>[o(w,null,{default:l(()=>[o(d,{onClick:e.goToPendingPayments,icon:e.mdiCurrencyUsd,title:e.format.vdlCurrencyFormatter(e.activeUser.balance,e.usd,{format:"SV"}),line1:e.$t("Your available balance"),line2:e.$t("See your pending payments")},null,8,["onClick","icon","title","line1","line2"])]),_:1}),o(w,null,{default:l(()=>[o(d,{onClick:e.goToPaidAndOpen,icon:e.mdiCurrencyUsd,title:e.format.vdlCurrencyFormatter(e.fundsHeldInSecurePayments||0,e.usd,{format:"SV"}),line1:e.$t("Held in Secure Payments"),line2:e.$t("See active paid projects")},null,8,["onClick","icon","title","line1","line2"])]),_:1})]),_:1})])):(u(),f("div",qe,[o(d,{onClick:e.goToPendingPayments,icon:e.mdiCurrencyUsd,title:e.format.vdlCurrencyFormatter(e.activeUser.balance,e.usd,{format:"SV"}),line1:e.$t("Your available balance"),line2:e.$t("See your pending payments")},null,8,["onClick","icon","title","line1","line2"]),o(d,{onClick:e.goToPaidAndOpen,icon:e.mdiCurrencyUsd,title:e.format.vdlCurrencyFormatter(e.fundsHeldInSecurePayments||0,e.usd,{format:"SV"}),line1:e.$t("Held in Secure Payments"),line2:e.$t("See your active paid projects")},null,8,["onClick","icon","title","line1","line2"])])),Ie,c("div",je,[o(v,{class:"md-primary md-raised",onClick:e.openAddFundsDialog},{default:l(()=>[y("Add funds")]),_:1},8,["onClick"])]),o(O,{items:e.walletTransactions,"pagination-settings":e.paginationSettings,disableSearch:!0,onUpdateFilters:e.onParamsChanged},{default:l(({item:s})=>[(u(),$(V,{key:"transaction-"+s.id},{default:l(()=>[c("span",Fe,p(e.format.vdlCurrencyFormatter(s.amount,e.usd,{format:"SV"})),1),c("div",Ne,[c("div",Ve,[c("span",Oe,p(e.format.datetime(s.created_at)),1),o(v,{class:"md-icon-button",onClick:Y=>s.paymentRequest&&s.type!=="funds_added"?e.openInNewTab(s.paymentRequest.invoice_url):e.openInvoiceDialog()},{default:l(()=>[o(R,{class:D({"md-primary enabled":!!s.paymentRequest&&s.type!=="funds_added"}),mdSvg:e.mdiDownload},null,8,["class","mdSvg"])]),_:2},1032,["onClick"])]),c("div",Ae,[c("span",Ee,p(e.transactionTitle(s)),1),s&&s.paymentRequest&&s.paymentRequest.project?(u(),f("span",ze,[o(F,{class:"md-theme-v123 md-primary",to:{name:"specsView",params:{id:s.paymentRequest.project.public_hash,slug:s.paymentRequest.project.slug}},"aria-label":s.paymentRequest.project.name},{default:l(()=>[y(p(s.paymentRequest.project.name),1)]),_:2},1032,["to","aria-label"])])):b("",!0),s.type!=="refund"?(u(),f("span",Be,[y(p(e.transactionPaymentMethod(s))+" ",1),s.type==="payment_request_paid"&&s.project&&s.project.charge_status==="funds_released"?(u(),f("span",He," - Funds released to the voice actor")):b("",!0)])):b("",!0)]),c("div",Le,[o(v,{class:"md-icon-button",onClick:Y=>s.paymentRequest&&s.type!=="funds_added"?e.openInNewTab(s.paymentRequest.invoice_url):e.openInvoiceDialog()},{default:l(()=>[o(R,{class:D({"md-primary enabled":!!s.paymentRequest&&s.type!=="funds_added"}),mdSvg:e.mdiDownload},null,8,["class","mdSvg"])]),_:2},1032,["onClick"])])]),o(N)]),_:2},1024))]),"empty-state":l(()=>[c("p",We,p(e.$t("You don't have any wallet transactions.")),1)]),_:1},8,["items","pagination-settings","onUpdateFilters"]),o(B,{ref:"invoiceDialog"},{default:l(()=>[o(E,{class:"md-layout"},{default:l(()=>[o(A,{tag:"p",text:e.$t("Contact our Customer Success Team at <help/> to receive a copy of the invoice for this transaction.")},{help:l(()=>[c("a",Ye,p(e.$t("[email protected]")),1)]),_:1},8,["text"])]),_:1}),o(z,null,{default:l(()=>[o(v,{class:"md-primary",onClick:t[0]||(t[0]=s=>e.closeInvoiceDialog())},{default:l(()=>[y(p(e.$t("Close")),1)]),_:1})]),_:1})]),_:1},512),o(H,{ref:"addFundsDialog"},null,512),o(L,{ref:"addFundsContactUsDialog"},null,512)]),_:1},8,["loading","title"])}const nt=q(g,[["render",Me]]);export{nt as default}; 2//# sourceMappingURL=index-0bfda135.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.