chatwoot/chatwoot

View on GitHub
enterprise/app/views/enterprise/api/v1/conversations/partials/_conversation.json.jbuilder

Summary

Maintainability
Test Coverage
if conversation.account.feature_enabled?('sla')
  json.applied_sla do
    json.partial! 'api/v1/models/applied_sla', formats: [:json], resource: conversation.applied_sla if conversation.applied_sla.present?
  end
  json.sla_events do
    json.array! conversation.sla_events do |sla_event|
      json.partial! 'api/v1/models/sla_event', formats: [:json], sla_event: sla_event
    end
  end
end