Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import * as types from '../mutation-types';
|
||||
|
||||
const state = {
|
||||
records: {},
|
||||
};
|
||||
|
||||
export const getters = {
|
||||
getConversationMetadata: $state => id => {
|
||||
return $state.records[Number(id)] || {};
|
||||
},
|
||||
};
|
||||
|
||||
export const actions = {};
|
||||
|
||||
export const mutations = {
|
||||
[types.default.SET_CONVERSATION_METADATA]: ($state, { id, data }) => {
|
||||
$state.records = { ...$state.records, [id]: data };
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations,
|
||||
};
|
||||
Reference in New Issue
Block a user