feat(svr): enablable from configuration
This commit is contained in:
parent
c9bde31ef2
commit
69e673e47e
3 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
fr:
|
||||
title: "Silence Vaut Accord"
|
||||
title: "Silence Vaut Accord ou Rejet"
|
||||
subtitle: "Accepter ou Refuser un dossier après un délai"
|
||||
ready: "Configuré"
|
||||
needs_configuration: "À configurer"
|
||||
|
|
|
@ -20,7 +20,7 @@ class Procedure::SVASVRFormComponent < ApplicationComponent
|
|||
[
|
||||
{ label: t("disabled", scope:), value: "disabled", disabled: form_disabled? },
|
||||
{ label: t("sva", scope:), value: "sva", hint: t("sva_hint", scope:) },
|
||||
{ label: t("svr", scope:), value: "svr", hint: t("svr_hint", scope:), disabled: true, after_label: tag.span("Disponible prochainement", class: "fr-badge fr-badge--sm fr-ml-1w") }
|
||||
{ label: t("svr", scope:), value: "svr", hint: t("svr_hint", scope:) }
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class SVASVRConfiguration
|
|||
UNIT_OPTIONS = ['days', 'weeks', 'months']
|
||||
RESUME_OPTIONS = ['continue', 'reset']
|
||||
|
||||
validates :decision, inclusion: { in: DECISION_OPTIONS.without('svr') }
|
||||
validates :decision, inclusion: { in: DECISION_OPTIONS }
|
||||
validates :period, presence: true, numericality: { only_integer: true }, if: -> { enabled? }
|
||||
validates :unit, presence: true, inclusion: { in: UNIT_OPTIONS }, if: -> { enabled? }
|
||||
validates :resume, presence: true, inclusion: { in: RESUME_OPTIONS }, if: -> { enabled? }
|
||||
|
|
Loading…
Add table
Reference in a new issue