2020-10-24 23:57:45 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Projects::IncidentsHelper
|
2021-01-03 14:25:43 +05:30
|
|
|
def incidents_data(project, params)
|
2020-10-24 23:57:45 +05:30
|
|
|
{
|
|
|
|
'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),
|
2021-01-03 14:25:43 +05:30
|
|
|
'empty-list-svg-path' => image_path('illustrations/incident-empty-state.svg'),
|
|
|
|
'text-query': params[:search],
|
|
|
|
'author-username-query': params[:author_username],
|
|
|
|
'assignee-username-query': params[:assignee_username]
|
2020-10-24 23:57:45 +05:30
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
Projects::IncidentsHelper.prepend_mod_with('Projects::IncidentsHelper')
|