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:
@@ -1,8 +1,6 @@
|
||||
json.data do
|
||||
json.payload do
|
||||
json.array! @agents do |agent|
|
||||
json.user_id agent.id
|
||||
json.name agent.name
|
||||
end
|
||||
json.payload do
|
||||
json.array! @agents do |agent|
|
||||
json.user_id agent.id
|
||||
json.name agent.name
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
json.data do
|
||||
json.meta do
|
||||
end
|
||||
|
||||
json.payload do
|
||||
json.array! @inboxes do |inbox|
|
||||
json.id inbox.id
|
||||
json.channel_id inbox.channel_id
|
||||
json.name inbox.name
|
||||
json.channel_type inbox.channel_type
|
||||
json.avatar_url inbox.channel.try(:avatar).try(:url)
|
||||
json.page_id inbox.channel.try(:page_id)
|
||||
json.widget_color inbox.channel.try(:widget_color)
|
||||
json.website_token inbox.channel.try(:website_token)
|
||||
end
|
||||
json.payload do
|
||||
json.array! @inboxes do |inbox|
|
||||
json.id inbox.id
|
||||
json.channel_id inbox.channel_id
|
||||
json.name inbox.name
|
||||
json.channel_type inbox.channel_type
|
||||
json.avatar_url inbox.channel.try(:avatar).try(:url)
|
||||
json.page_id inbox.channel.try(:page_id)
|
||||
json.widget_color inbox.channel.try(:widget_color)
|
||||
json.website_token inbox.channel.try(:website_token)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,3 +3,4 @@ json.channel_id @inbox.channel_id
|
||||
json.name @inbox.name
|
||||
json.channel_type @inbox.channel_type
|
||||
json.website_token @inbox.channel.try(:website_token)
|
||||
json.widget_color @inbox.channel.try(:widget_color)
|
||||
|
||||
6
app/views/api/v1/widget/inboxes/update.json.jbuilder
Normal file
6
app/views/api/v1/widget/inboxes/update.json.jbuilder
Normal file
@@ -0,0 +1,6 @@
|
||||
json.id @inbox.id
|
||||
json.channel_id @inbox.channel_id
|
||||
json.name @inbox.name
|
||||
json.channel_type @inbox.channel_type
|
||||
json.website_token @inbox.channel.website_token
|
||||
json.widget_color @inbox.channel.widget_color
|
||||
Reference in New Issue
Block a user