Gui improvements, ordering
Some checks failed
/ Run tests (push) Failing after 1m9s
/ Run system tests (push) Failing after 1m13s
/ Build, push and deploy image (push) Has been skipped

This commit is contained in:
david 2024-11-01 03:26:46 +01:00
parent 6db0b64f4c
commit 42c077f6ab
28 changed files with 105 additions and 40 deletions

View file

@ -14,6 +14,8 @@ class SuccessCriterion < ApplicationRecord
enum :result, %i[passed failed not_applicable]
enum :level, %i[A AA AAA]
before_save :set_position
def level_value
return nil unless level
@ -23,4 +25,10 @@ class SuccessCriterion < ApplicationRecord
def header
"HEADER"
end
private
def set_position
self.position ||= (element.success_criteria.pluck(:position).max || 0) + 1
Rails.logger.debug("set position: "+position.to_s)
end
end