From 1d3d4ec283be40a29285cd0b5ab2093a8c71245f Mon Sep 17 00:00:00 2001 From: Benjamin Eskola Date: Tue, 18 Feb 2025 15:56:00 +0000 Subject: [PATCH] Rename anchors for consistency --- .../review/cil_liability_controller.rb | 2 +- .../review/immunity_details_controller.rb | 2 +- .../immunity_enforcements_controller.rb | 2 +- .../review/neighbour_responses_controller.rb | 4 +- .../policy_areas/policy_classes_controller.rb | 2 +- .../review/publicities_controller.rb | 4 +- .../policy_classes/index.html.erb | 2 +- .../review/tasks/_review_assessment.html.erb | 2 +- .../review/tasks/_review_conditions.html.erb | 10 ++--- .../tasks/_review_consultation.html.erb | 6 +-- .../assessing/immunity_spec.rb | 10 ++--- .../review/check_cil_liability_spec.rb | 26 ++++++------ .../check_neighbour_notifications_spec.rb | 30 +++++++------- .../review/check_publicity_spec.rb | 40 +++++++++---------- .../review/evidence_of_immunity_spec.rb | 10 ++--- .../review/immunity_enforcement_spec.rb | 12 +++--- 16 files changed, 82 insertions(+), 82 deletions(-) diff --git a/app/controllers/planning_applications/review/cil_liability_controller.rb b/app/controllers/planning_applications/review/cil_liability_controller.rb index e1a003b851..e006a7bd56 100644 --- a/app/controllers/planning_applications/review/cil_liability_controller.rb +++ b/app/controllers/planning_applications/review/cil_liability_controller.rb @@ -9,7 +9,7 @@ def update @previous_decision = @planning_application.cil_liable if @planning_application.update(cil_liability_params) record_audit_for_cil_liability! - redirect_to planning_application_review_tasks_path(@planning_application, anchor: "check-cil"), notice: t(".success") + redirect_to planning_application_review_tasks_path(@planning_application, anchor: "review-cil-liability"), notice: t(".success") else render :edit end diff --git a/app/controllers/planning_applications/review/immunity_details_controller.rb b/app/controllers/planning_applications/review/immunity_details_controller.rb index 3e940a414c..71ad9fc440 100644 --- a/app/controllers/planning_applications/review/immunity_details_controller.rb +++ b/app/controllers/planning_applications/review/immunity_details_controller.rb @@ -16,7 +16,7 @@ def update respond_to do |format| format.html do if @review_immunity_detail.update(review_immunity_detail_params) - redirect_to planning_application_review_tasks_path(@planning_application, anchor: "review-evidence"), + redirect_to planning_application_review_tasks_path(@planning_application, anchor: "review-immunity-details"), notice: I18n.t("planning_applications.review..immunity_details.successfully_updated") else flash.now[:alert] = @review_immunity_detail.errors.messages.values.flatten.join(", ") diff --git a/app/controllers/planning_applications/review/immunity_enforcements_controller.rb b/app/controllers/planning_applications/review/immunity_enforcements_controller.rb index 92fbeea280..aa57356a41 100644 --- a/app/controllers/planning_applications/review/immunity_enforcements_controller.rb +++ b/app/controllers/planning_applications/review/immunity_enforcements_controller.rb @@ -13,7 +13,7 @@ def update respond_to do |format| format.html do if @review_immunity_detail.update(review_immunity_detail_params) - redirect_to planning_application_review_tasks_path(@planning_application, anchor: "review-enforcement"), + redirect_to planning_application_review_tasks_path(@planning_application, anchor: "review-immunity-enforcements"), notice: I18n.t("review_immunity_enforcements.successfully_updated") else flash.now[:alert] = @review_immunity_detail.errors.messages.values.flatten.join(", ") diff --git a/app/controllers/planning_applications/review/neighbour_responses_controller.rb b/app/controllers/planning_applications/review/neighbour_responses_controller.rb index ca0455b769..67f8f761c2 100644 --- a/app/controllers/planning_applications/review/neighbour_responses_controller.rb +++ b/app/controllers/planning_applications/review/neighbour_responses_controller.rb @@ -12,7 +12,7 @@ def update respond_to do |format| format.html do if @neighbour_review.update(review_params) && @consultation.update(status: consultation_status) - redirect_to planning_application_review_tasks_path(@planning_application, anchor: "check-neighbour-notifications"), notice: t(".success") + redirect_to planning_application_review_tasks_path(@planning_application, anchor: "review-neighbour-responses"), notice: t(".success") else error = @neighbour_review.errors.group_by_attribute.transform_values { |errors| errors.map(&:full_message) }.values.flatten redirect_failed_create_error(error) @@ -27,7 +27,7 @@ def create respond_to do |format| format.html do if @neighbour_review.save && @consultation.update(status: consultation_status) - redirect_to planning_application_review_tasks_path(@planning_application, anchor: "check-neighbour-notifications"), notice: t(".success") + redirect_to planning_application_review_tasks_path(@planning_application, anchor: "review-neighbour-responses"), notice: t(".success") else error = @neighbour_review.errors.group_by_attribute.transform_values { |errors| errors.map(&:full_message) }.values.flatten redirect_failed_create_error(error) diff --git a/app/controllers/planning_applications/review/policy_areas/policy_classes_controller.rb b/app/controllers/planning_applications/review/policy_areas/policy_classes_controller.rb index 1550706ef1..2469a78e2d 100644 --- a/app/controllers/planning_applications/review/policy_areas/policy_classes_controller.rb +++ b/app/controllers/planning_applications/review/policy_areas/policy_classes_controller.rb @@ -30,7 +30,7 @@ def update @form.update(policy_section_status_params) if @planning_application_policy_class.update_review(review_params) - redirect_to planning_application_review_policy_areas_policy_classes_path(@planning_application, anchor: "review-legislation"), notice: t(".success") + redirect_to planning_application_review_policy_areas_policy_classes_path(@planning_application, anchor: "review-policy-classes"), notice: t(".success") else render :edit end diff --git a/app/controllers/planning_applications/review/publicities_controller.rb b/app/controllers/planning_applications/review/publicities_controller.rb index b1787e346d..0c4e2fe90c 100644 --- a/app/controllers/planning_applications/review/publicities_controller.rb +++ b/app/controllers/planning_applications/review/publicities_controller.rb @@ -12,7 +12,7 @@ def update respond_to do |format| format.html do if @assessment_detail.update(assessment_detail_params) - redirect_to planning_application_review_tasks_path(@planning_application, anchor: "check-publicity"), notice: t(".success") + redirect_to planning_application_review_tasks_path(@planning_application, anchor: "review-publicities"), notice: t(".success") else flash.now[:alert] = @assessment_detail.errors.messages.values.flatten.join(", ") render_review_tasks @@ -27,7 +27,7 @@ def create respond_to do |format| format.html do if @assessment_detail.save - redirect_to planning_application_review_tasks_path(@planning_application, anchor: "check-publicity"), notice: t(".success") + redirect_to planning_application_review_tasks_path(@planning_application, anchor: "review-publicities"), notice: t(".success") else flash.now[:alert] = @assessment_detail.errors.messages.values.flatten.join(", ") render_review_tasks diff --git a/app/views/planning_applications/review/policy_areas/policy_classes/index.html.erb b/app/views/planning_applications/review/policy_areas/policy_classes/index.html.erb index 472b253066..0a5f0ed3f2 100644 --- a/app/views/planning_applications/review/policy_areas/policy_classes/index.html.erb +++ b/app/views/planning_applications/review/policy_areas/policy_classes/index.html.erb @@ -14,7 +14,7 @@ <%= render "shared/dates_and_assignment_header" %> -