summaryrefslogtreecommitdiff
path: root/app/helpers/projects/incidents_helper.rb
blob: 0cac142f2dc252335bcf6502a9701c2dae6d497d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Projects::IncidentsHelper
  def incidents_data(project, params)
    {
      'project-path' => project.full_path,
      'new-issue-path' => new_project_issue_path(project),
      'incident-template-name' => 'incident',
      'incident-type' => 'incident',
      'issue-path' => project_issues_path(project),
      'empty-list-svg-path' => image_path('illustrations/incident-empty-state.svg'),
      'text-query': params[:search],
      'author-usernames-query': params[:author_username],
      'assignee-usernames-query': params[:assignee_username]
    }
  end
end

Projects::IncidentsHelper.prepend_if_ee('EE::Projects::IncidentsHelper')