2024-06-05 17:08:00 +02:00
|
|
|
class Procedure::Card::IneligibiliteDossierComponent < ApplicationComponent
|
|
|
|
def initialize(procedure:)
|
|
|
|
@procedure = procedure
|
|
|
|
end
|
|
|
|
|
|
|
|
def ready?
|
|
|
|
@procedure.draft_revision
|
|
|
|
.conditionable_types_de_champ
|
2024-06-05 19:16:41 +02:00
|
|
|
.present? && @procedure.draft_revision.ineligibilite_enabled
|
2024-06-05 17:08:00 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def error?
|
|
|
|
!@procedure.draft_revision.validate(:ineligibilite_rules_editor)
|
|
|
|
end
|
|
|
|
|
|
|
|
def completed?
|
|
|
|
@procedure.draft_revision.ineligibilite_enabled
|
|
|
|
end
|
|
|
|
end
|