Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/controllers/admin/downloads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def csv_filename

def task_notification_list(file)
case params[:id]
when 'late', 'overdue'
when 'late', 'duetoday', 'overdue'
Task::OverdueUserNotificationList.new(month: latest_period.month, year: latest_period.year, output: file)
when 'due'
Task::AnticipatedUserNotificationList.new(month: current_date.month, year: current_date.year, output: file)
Expand Down Expand Up @@ -65,6 +65,6 @@ def valid_date_order?
end

def catch_unrecognised_download
head(:not_found) unless %w[due late overdue unfinished].include?(params[:id])
head(:not_found) unless %w[due duetoday late overdue unfinished].include?(params[:id])
end
end
12 changes: 8 additions & 4 deletions app/views/admin/downloads/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,21 @@
%tbody.govuk-table__body
%tr.govuk-table__row#notify-download-due
%td.govuk-table__cell
Management information is due
01 Management information is due
%td.govuk-table__cell= link_to 'Download CSV', admin_download_path(:due)
%tr.govuk-table__row#notify-download-due-today
%td.govuk-table__cell
01+ Management information is due today
%td.govuk-table__cell= link_to 'Download CSV', admin_download_path(:duetoday)
%tr.govuk-table__row#notify-download-overdue
%td.govuk-table__cell
Management information is overdue
02 Management information is overdue
%td.govuk-table__cell= link_to 'Download CSV', admin_download_path(:overdue)
%tr.govuk-table__row#notify-download-late
%td.govuk-table__cell
Management information is late
03 Management information is late
%td.govuk-table__cell= link_to 'Download CSV', admin_download_path(:late)
%tr.govuk-table__row#notify-download-unfinished
%td.govuk-table__cell
Management information submission is unfinished
04 Management information is incomplete/unfinished
%td.govuk-table__cell= link_to 'Download CSV', admin_download_path(:unfinished)
2 changes: 1 addition & 1 deletion spec/requests/admin/notify_downloads_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
expect(response.body).to include(admin_download_path(:overdue))
expect(response.body).to include('Management information is late')
expect(response.body).to include(admin_download_path(:late))
expect(response.body).to include('Management information submission is unfinished')
expect(response.body).to include('Management information is incomplete/unfinished')
expect(response.body).to include(admin_download_path(:unfinished))
end
end
Expand Down
Loading