Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: une demande de correction de dossier peut être de type "outdated" #9744

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

"""
Expand Down
6 changes: 5 additions & 1 deletion app/models/dossier_correction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
1 change: 1 addition & 0 deletions config/locales/models/dossier_correction/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 1 addition & 0 deletions config/locales/models/dossier_correction/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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é"