mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	Refactor: Inbox store, remove inboxes from sidebar (#387)
* Refactor: Inbox store, remove inboxes from sidebar * Add a new page for inbox settings * Show inboxes on sidebar * Add inbox_members API * Disable similar-code check * Fix codeclimate scss issues * Add widget_color update API and actions * Add specs for inbox store * Fix Facebook auth flow * Fix agent loading, inbox name
This commit is contained in:
		@@ -6,6 +6,15 @@ export const create = (state, data) => {
 | 
			
		||||
  state.records.push(data);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const setSingleRecord = (state, data) => {
 | 
			
		||||
  const recordIndex = state.records.findIndex(record => record.id === data.id);
 | 
			
		||||
  if (recordIndex > -1) {
 | 
			
		||||
    state.records[recordIndex] = data;
 | 
			
		||||
  } else {
 | 
			
		||||
    create(state, data);
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const update = (state, data) => {
 | 
			
		||||
  state.records.forEach((element, index) => {
 | 
			
		||||
    if (element.id === data.id) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user