Initial commit: Add logistics and order_detail message types
Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
- Add Logistics component with progress tracking - Add OrderDetail component for order information - Support data-driven steps and actions - Add blue color scale to widget SCSS - Fix node overflow and progress bar rendering issues - Add English translations for dashboard components Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
7
app/views/api/v1/widget/campaigns/index.json.jbuilder
Normal file
7
app/views/api/v1/widget/campaigns/index.json.jbuilder
Normal file
@@ -0,0 +1,7 @@
|
||||
json.array! @campaigns do |campaign|
|
||||
json.id campaign.display_id
|
||||
json.trigger_rules campaign.trigger_rules
|
||||
json.trigger_only_during_business_hours campaign.trigger_only_during_business_hours
|
||||
json.message campaign.message
|
||||
json.sender campaign.sender&.push_event_data
|
||||
end
|
||||
36
app/views/api/v1/widget/configs/create.json.jbuilder
Normal file
36
app/views/api/v1/widget/configs/create.json.jbuilder
Normal file
@@ -0,0 +1,36 @@
|
||||
json.website_channel_config do
|
||||
json.allow_messages_after_resolved @web_widget.inbox.allow_messages_after_resolved
|
||||
json.api_host ENV.fetch('FRONTEND_URL', nil)
|
||||
json.auth_token @token
|
||||
json.avatar_url @web_widget.inbox.avatar_url
|
||||
json.csat_survey_enabled @web_widget.inbox.csat_survey_enabled
|
||||
json.disable_branding @web_widget.inbox.account.feature_enabled?('disable_branding')
|
||||
json.enabled_features @web_widget.selected_feature_flags
|
||||
json.enabled_languages available_locales_with_name
|
||||
json.locale @web_widget.account.locale
|
||||
json.out_of_office_message @web_widget.inbox.out_of_office_message
|
||||
json.portal @web_widget.inbox.portal
|
||||
json.pre_chat_form_enabled @web_widget.pre_chat_form_enabled
|
||||
json.pre_chat_form_options @web_widget.pre_chat_form_options
|
||||
json.reply_time @web_widget.reply_time
|
||||
json.timezone @web_widget.inbox.timezone
|
||||
json.utc_off_set ActiveSupport::TimeZone[@web_widget.inbox.timezone].now.formatted_offset
|
||||
json.website_name @web_widget.inbox.name
|
||||
json.website_token @web_widget.website_token
|
||||
json.welcome_tagline @web_widget.welcome_tagline
|
||||
json.welcome_title @web_widget.welcome_title
|
||||
json.widget_color @web_widget.widget_color
|
||||
json.working_hours @web_widget.inbox.working_hours
|
||||
json.working_hours_enabled @web_widget.inbox.working_hours_enabled
|
||||
end
|
||||
|
||||
json.contact do
|
||||
json.email @contact.email
|
||||
json.id @contact.id
|
||||
json.identifier @contact.identifier
|
||||
json.name @contact.name
|
||||
json.phone_number @contact.phone_number
|
||||
json.pubsub_token @contact_inbox.pubsub_token
|
||||
end
|
||||
|
||||
json.global_config @global_config
|
||||
5
app/views/api/v1/widget/contacts/set_user.json.jbuilder
Normal file
5
app/views/api/v1/widget/contacts/set_user.json.jbuilder
Normal file
@@ -0,0 +1,5 @@
|
||||
json.id @contact.id
|
||||
json.has_email @contact.email.present?
|
||||
json.has_name @contact.name.present?
|
||||
json.has_phone_number @contact.phone_number.present?
|
||||
json.widget_auth_token @widget_auth_token if @widget_auth_token.present?
|
||||
5
app/views/api/v1/widget/contacts/show.json.jbuilder
Normal file
5
app/views/api/v1/widget/contacts/show.json.jbuilder
Normal file
@@ -0,0 +1,5 @@
|
||||
json.id @contact.id
|
||||
json.has_email @contact.email.present?
|
||||
json.has_name @contact.name.present?
|
||||
json.has_phone_number @contact.phone_number.present?
|
||||
json.identifier @contact.identifier
|
||||
4
app/views/api/v1/widget/contacts/update.json.jbuilder
Normal file
4
app/views/api/v1/widget/contacts/update.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.id @contact.id
|
||||
json.has_email @contact.email.present?
|
||||
json.has_name @contact.name.present?
|
||||
json.has_phone_number @contact.phone_number.present?
|
||||
11
app/views/api/v1/widget/conversations/create.json.jbuilder
Normal file
11
app/views/api/v1/widget/conversations/create.json.jbuilder
Normal file
@@ -0,0 +1,11 @@
|
||||
json.id @conversation.display_id
|
||||
json.inbox_id @conversation.inbox_id
|
||||
json.contact_last_seen_at @conversation.contact_last_seen_at.to_i
|
||||
json.status @conversation.status
|
||||
json.messages do
|
||||
json.array! @conversation.messages do |message|
|
||||
json.partial! 'api/v1/models/widget_message', resource: message
|
||||
end
|
||||
end
|
||||
json.custom_attributes @conversation.custom_attributes
|
||||
json.contact @conversation.contact
|
||||
@@ -0,0 +1,6 @@
|
||||
if @conversation
|
||||
json.id @conversation.display_id
|
||||
json.inbox_id @conversation.inbox_id
|
||||
json.contact_last_seen_at @conversation.contact_last_seen_at.to_i
|
||||
json.status @conversation.status
|
||||
end
|
||||
10
app/views/api/v1/widget/inbox_members/index.json.jbuilder
Normal file
10
app/views/api/v1/widget/inbox_members/index.json.jbuilder
Normal file
@@ -0,0 +1,10 @@
|
||||
json.payload do
|
||||
json.array! @inbox_members do |inbox_member|
|
||||
next if inbox_member.user.blank?
|
||||
|
||||
json.id inbox_member.user.id
|
||||
json.name inbox_member.user.available_name
|
||||
json.avatar_url inbox_member.user.avatar_url
|
||||
json.availability_status inbox_member.user.account_users.find_by(account_id: @current_account.id)&.availability_status
|
||||
end
|
||||
end
|
||||
11
app/views/api/v1/widget/messages/create.json.jbuilder
Normal file
11
app/views/api/v1/widget/messages/create.json.jbuilder
Normal file
@@ -0,0 +1,11 @@
|
||||
json.id @message.id
|
||||
json.content @message.content
|
||||
json.inbox_id @message.inbox_id
|
||||
json.conversation_id @message.conversation.display_id
|
||||
json.message_type @message.message_type_before_type_cast
|
||||
json.created_at @message.created_at.to_i
|
||||
json.private @message.private
|
||||
json.source_id @message.source_id
|
||||
json.content_attributes @message.content_attributes
|
||||
json.attachments @message.attachments.map(&:push_event_data) if @message.attachments.present?
|
||||
json.sender @message.sender.push_event_data if @message.sender
|
||||
16
app/views/api/v1/widget/messages/index.json.jbuilder
Normal file
16
app/views/api/v1/widget/messages/index.json.jbuilder
Normal file
@@ -0,0 +1,16 @@
|
||||
json.payload do
|
||||
json.array! @messages do |message|
|
||||
json.id message.id
|
||||
json.content message.content
|
||||
json.message_type message.message_type_before_type_cast
|
||||
json.content_type message.content_type
|
||||
json.content_attributes message.content_attributes
|
||||
json.created_at message.created_at.to_i
|
||||
json.conversation_id message.conversation.display_id
|
||||
json.attachments message.attachments.map(&:push_event_data) if message.attachments.present?
|
||||
json.sender message.sender.push_event_data if message.sender
|
||||
end
|
||||
end
|
||||
json.meta do
|
||||
json.contact_last_seen_at @conversation.contact_last_seen_at.to_i if @conversation.present?
|
||||
end
|
||||
1
app/views/api/v1/widget/messages/update.json.jbuilder
Normal file
1
app/views/api/v1/widget/messages/update.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.contact @contact if @contact
|
||||
Reference in New Issue
Block a user