2020-07-23 05:09:18 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Projects::IncidentsHelper
|
2020-09-21 08:09:34 -04:00
|
|
|
def incidents_data(project, params)
|
2020-07-23 05:09:18 -04:00
|
|
|
{
|
2020-07-24 20:09:23 -04:00
|
|
|
'project-path' => project.full_path,
|
|
|
|
'new-issue-path' => new_project_issue_path(project),
|
2020-07-27 11:09:25 -04:00
|
|
|
'incident-template-name' => 'incident',
|
2020-08-17 08:10:12 -04:00
|
|
|
'incident-type' => 'incident',
|
2020-08-19 08:10:17 -04:00
|
|
|
'issue-path' => project_issues_path(project),
|
2020-09-21 08:09:34 -04:00
|
|
|
'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]
|
2020-07-23 05:09:18 -04:00
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2020-08-04 23:10:58 -04:00
|
|
|
|
|
|
|
Projects::IncidentsHelper.prepend_if_ee('EE::Projects::IncidentsHelper')
|