Refactorings and gui improvements
Some checks failed
/ Run tests (push) Successful in 1m22s
/ Run system tests (push) Failing after 1m33s
/ Build, push and deploy image (push) Successful in 3m22s

This commit is contained in:
david 2024-11-03 21:58:25 +01:00
parent c965e03e5a
commit d1294c2fc4
46 changed files with 358 additions and 128020 deletions

View file

@ -7,7 +7,7 @@ class ChecksController < ApplicationController
# GET /checks or /checks.json
def index
@pagy, @checks = pagy(Check.filter_by(filter_params).order(:external_number))
@pagy, @checks = pagy(Check.filter_by(filter_params).order(:external_number_1, :external_number_2, :external_number_3))
end
# GET /checks/1 or /checks/1.json
@ -69,7 +69,7 @@ class ChecksController < ApplicationController
end
def filter_params
@filter_params ||= params.permit(filter: [ :s, priority: [], conformity_level: [], standard_ids: [], principle_id: [], target_disabilities: []])[:filter] || {}
@filter_params ||= params.permit(filter: [ :s, priority: [], conformity_level: [], standard_ids: [], principle_id: [], target_disabilities: [] ])[:filter] || {}
end
private

View file

@ -58,7 +58,7 @@ class ElementsController < ApplicationController
# DELETE /elements/1
def destroy
@element.destroy!
redirect_to elements_url, notice: "Element was successfully destroyed.", status: :see_other
redirect_to page_elements_url(@element.page), notice: "Element was successfully destroyed.", status: :see_other
end
private

View file

@ -44,7 +44,7 @@ class PagesController < ApplicationController
# DELETE /pages/1
def destroy
@page.destroy!
redirect_to pages_url, notice: "Page was successfully destroyed.", status: :see_other
redirect_to report_pages_url(@page.report), notice: "Page was successfully destroyed.", status: :see_other
end
private

View file

@ -60,7 +60,7 @@ class SuccessCriteriaController < ApplicationController
@success_criterion.destroy!
respond_to do |format|
format.html do
redirect_to success_criteria_url, notice: "Erfolgskriterium was successfully destroyed.", status: :see_other
redirect_to element_success_criteria_url(@success_criterion.element), notice: "Erfolgskriterium was successfully destroyed.", status: :see_other
end
format.turbo_stream
end