From 249539fc27cf82ffaf56dea944cdc5f1f8ade4cc Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Wed, 22 Nov 2023 17:10:37 +0100 Subject: [PATCH] feat(dossier): correction can be of kind "outdated" by API, which will later improve UI wording Cf #9485 --- app/graphql/schema.graphql | 5 +++++ app/models/dossier_correction.rb | 6 +++++- config/locales/models/dossier_correction/en.yml | 1 + config/locales/models/dossier_correction/fr.yml | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/graphql/schema.graphql b/app/graphql/schema.graphql index f0af9351a..f855c6049 100644 --- a/app/graphql/schema.graphql +++ b/app/graphql/schema.graphql @@ -568,6 +568,11 @@ enum CorrectionReason { Le dossier n’est pas valide et nécessite une correction """ incorrect + + """ + Le dossier doit être mis à jour et revalidé + """ + outdated } """ diff --git a/app/models/dossier_correction.rb b/app/models/dossier_correction.rb index 001da4f75..7c6150e69 100644 --- a/app/models/dossier_correction.rb +++ b/app/models/dossier_correction.rb @@ -6,7 +6,11 @@ class DossierCorrection < ApplicationRecord scope :pending, -> { where(resolved_at: nil) } - enum reason: { incorrect: 'incorrect', incomplete: 'incomplete' }, _prefix: :dossier + enum reason: { + incorrect: 'incorrect', + incomplete: 'incomplete', + outdated: 'outdated' + }, _prefix: :dossier def resolved? resolved_at.present? diff --git a/config/locales/models/dossier_correction/en.yml b/config/locales/models/dossier_correction/en.yml index ae14b3766..46eacf18c 100644 --- a/config/locales/models/dossier_correction/en.yml +++ b/config/locales/models/dossier_correction/en.yml @@ -5,3 +5,4 @@ en: reasons: incorrect: "The file is invalid and needs to be corrected" incomplete: "The file is incomplete and needs to be completed" + outdated: "The file needs to be updated and revalidated" diff --git a/config/locales/models/dossier_correction/fr.yml b/config/locales/models/dossier_correction/fr.yml index f80d37a8c..9b064c279 100644 --- a/config/locales/models/dossier_correction/fr.yml +++ b/config/locales/models/dossier_correction/fr.yml @@ -5,3 +5,4 @@ fr: reasons: incorrect: "Le dossier n’est pas valide et nécessite une correction" incomplete: "Le dossier est incomplet et nécessite d’être complété" + outdated: "Le dossier doit être mis à jour et revalidé"