|
|
@ -130,14 +130,12 @@ private |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def all_fields_completed? |
|
|
|
def all_fields_completed? |
|
|
|
subsection_statuses = form.subsections.map { |subsection| subsection.status(self) if subsection.displayed_in_tasklist?(self) }.uniq.compact |
|
|
|
form.subsections.all? { |subsection| subsection.complete?(self) || subsection.not_displayed_in_tasklist?(self) } |
|
|
|
subsection_statuses == [:completed] |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def all_fields_nil? |
|
|
|
def all_fields_nil? |
|
|
|
not_started_statuses = %i[not_started cannot_start_yet] |
|
|
|
not_started_statuses = %i[not_started cannot_start_yet] |
|
|
|
subsection_statuses = form.subsections.map { |subsection| subsection.status(self) }.uniq |
|
|
|
form.subsections.all? { |subsection| not_started_statuses.include? subsection.status(self) } |
|
|
|
subsection_statuses.all? { |status| not_started_statuses.include?(status) } |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def reset_invalidated_dependent_fields! |
|
|
|
def reset_invalidated_dependent_fields! |
|
|
|