export const state = () => ({ buyerAccount: { fetching: false, data: [] }, buyerRecord: { fetching: false, data: [] }, vendorAccount: { fetching: false, data: [] }, vendorRecord: { fetching: false, data: [] } }) export const mutations = { REQUEST_BUYER_ACCOUNT (state) { state.buyerAccount.fetching = true }, GET_BUYER_ACCOUNT_FAILURE (state) { state.buyerAccount.fetching = false }, GET_BUYER_ACCOUNT_SUCCESS (state, result) { state.buyerAccount.fetching = false state.buyerAccount.data = result }, REQUEST_BUYER_RECORD (state) { state.buyerRecord.fetching = true }, GET_BUYER_RECORD_FAILURE (state) { state.buyerRecord.fetching = false }, GET_BUYER_RECORD_SUCCESS (state, result) { state.buyerRecord.fetching = false state.buyerRecord.data = result }, REQUEST_VENDOR_ACCOUNT (state) { state.vendorAccount.fetching = true }, GET_VENDOR_ACCOUNT_FAILURE (state) { state.vendorAccount.fetching = false }, GET_VENDOR_ACCOUNT_SUCCESS (state, result) { state.vendorAccount.fetching = false state.vendorAccount.data = result }, REQUEST_VENDOR_RECORD (state) { state.vendorRecord.fetching = true }, GET_VENDOR_RECORD_FAILURE (state) { state.vendorRecord.fetching = false }, GET_VENDOR_RECORD_SUCCESS (state, result) { state.vendorRecord.fetching = false state.vendorRecord.data = result } }