芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/public/build/assets/invoice-DVTYh_ZQ.js
import{h as a}from"./auth-BcagBUX6.js";import{s as n}from"./main-WS8l16KQ.js";const{defineStore:s}=window.pinia,r=s({id:"customerInvoiceStore",state:()=>({totalInvoices:0,invoices:[],selectedViewInvoice:[]}),actions:{fetchInvoices(e,i){return new Promise((o,c)=>{n.get(`/api/v1/${i}/customer/invoices`,{params:e}).then(t=>{this.invoices=t.data.data,this.totalInvoices=t.data.meta.invoiceTotalCount,o(t)}).catch(t=>{a(t),c(t)})})},fetchViewInvoice(e,i){return new Promise((o,c)=>{n.get(`/api/v1/${i}/customer/invoices/${e.id}`,{params:e}).then(t=>{this.selectedViewInvoice=t.data.data,o(t)}).catch(t=>{a(t),c(t)})})},searchInvoice(e,i){return new Promise((o,c)=>{n.get(`/api/v1/${i}/customer/invoices`,{params:e}).then(t=>{this.invoices=t.data,o(t)}).catch(t=>{a(t),c(t)})})}}});export{r as u};