new build 603

This commit is contained in:
Mohit Panjwani
2022-02-16 10:47:32 +05:30
parent 8da5f99511
commit 68575b69b9
119 changed files with 399 additions and 399 deletions

View File

@@ -0,0 +1 @@
import{h as a}from"./auth.e6e11d4c.js";import{a as n}from"./vendor.d12b5734.js";const{defineStore:s}=window.pinia,h=s({id:"customerInvoiceStore",state:()=>({totalInvoices:0,invoices:[],selectedViewInvoice:[]}),actions:{fetchInvoices(t,i){return new Promise((o,c)=>{n.get(`/api/v1/${i}/customer/invoices`,{params:t}).then(e=>{this.invoices=e.data.data,this.totalInvoices=e.data.meta.invoiceTotalCount,o(e)}).catch(e=>{a(e),c(e)})})},fetchViewInvoice(t,i){return new Promise((o,c)=>{n.get(`/api/v1/${i}/customer/invoices/${t.id}`,{params:t}).then(e=>{this.selectedViewInvoice=e.data.data,o(e)}).catch(e=>{a(e),c(e)})})},searchInvoice(t,i){return new Promise((o,c)=>{n.get(`/api/v1/${i}/customer/invoices`,{params:t}).then(e=>{this.invoices=e.data,o(e)}).catch(e=>{a(e),c(e)})})}}});export{h as u};