data.js 693 B

123456789101112131415161718192021222324252627282930313233
  1. export const state = () => ({
  2. invoices: {
  3. fetching: false,
  4. data: []
  5. },
  6. Buyerinvoices: {
  7. fetching: false,
  8. data: []
  9. }
  10. })
  11. export const mutations = {
  12. REQUEST_INV (state) {
  13. state.invoices.fetching = true
  14. },
  15. GET_INV_FAILURE (state) {
  16. state.invoices.fetching = false
  17. },
  18. GET_INV_SUCCESS (state, result) {
  19. state.invoices.fetching = false
  20. state.invoices.data = result
  21. },
  22. REQUEST_BUYERINV (state) {
  23. state.Buyerinvoices.fetching = true
  24. },
  25. GET_BUYERINV_FAILURE (state) {
  26. state.Buyerinvoices.fetching = false
  27. },
  28. GET_BUYERINV_SUCCESS (state, result) {
  29. state.Buyerinvoices.fetching = false
  30. state.Buyerinvoices.data = result
  31. }
  32. }