Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove planning application edit action #208

Merged
merged 2 commits into from Feb 15, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions app/controllers/planning_applications_controller.rb
Expand Up @@ -3,7 +3,6 @@
class PlanningApplicationsController < AuthenticationController
before_action :set_planning_application, only: %i[show
assign
edit
recommendation_form
recommend
submit_recommendation
Expand Down Expand Up @@ -46,8 +45,6 @@ def assign
end
end

def edit; end

def start
@planning_application.start!

Expand Down
9 changes: 0 additions & 9 deletions app/helpers/document_helper.rb
Expand Up @@ -12,13 +12,4 @@ def filter_current(documents)
def archive_reason_collection_for_radio_buttons
Document.archive_reasons.keys.map { |k| [k, I18n.t(k)] }
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot! I was convinced we were still using that somewhere, but have checked and indeed we are not!

def tag_collection_for_checkboxes
Document::TAGS.map do |tag|
[
tag,
tag.humanize,
]
end
end
end
31 changes: 0 additions & 31 deletions app/helpers/planning_application_helper.rb
Expand Up @@ -64,35 +64,4 @@ def cancelled_at(planning_application)
planning_application.returned_at
end
end

def proposal_step_mark_completed?(step_name, application)
case step_name
when "Check documents"
application.not_started? == false
when "Assess the proposal"
application.assessor_decision&.valid?
when "Reassess the proposal"
application.assessor_decision_updated?
when "Review the recommendation"
application.reviewer_decision&.valid? &&
application.reviewer_decision_updated?
when "View the assessment"
application.determined?
else
false
end
end

def recommendation_step_mark_completed?(step_name, application)
case step_name
when "Submit the recommendation"
application.awaiting_determination?
when "Publish the recommendation"
application.determined?
when "View the decision notice"
application.determined?
else
false
end
end
end
51 changes: 0 additions & 51 deletions app/views/planning_applications/edit.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion config/routes.rb
Expand Up @@ -8,7 +8,7 @@
devise_for :users
mount Rswag::Ui::Engine => "api-docs"

resources :planning_applications, only: %i[show index edit] do
resources :planning_applications, only: %i[show index] do
member do
get :assign
patch :assign
Expand Down