[GraphQL]: normalize date names in French (#4561)
GraphQL : normalise le nom des dates en français
This commit is contained in:
commit
c4fc213384
5 changed files with 64 additions and 31 deletions
|
@ -1,10 +1,12 @@
|
|||
type Avis {
|
||||
answer: String
|
||||
attachmentUrl: URL
|
||||
createdAt: ISO8601DateTime!
|
||||
email: String!
|
||||
dateQuestion: ISO8601DateTime!
|
||||
dateReponse: ISO8601DateTime
|
||||
expert: Profile
|
||||
id: ID!
|
||||
instructeur: Profile!
|
||||
question: String!
|
||||
reponse: String
|
||||
}
|
||||
|
||||
type CarteChamp implements Champ {
|
||||
|
@ -160,12 +162,30 @@ Une demarche
|
|||
"""
|
||||
type Demarche {
|
||||
annotationDescriptors: [ChampDescriptor!]!
|
||||
archivedAt: ISO8601DateTime
|
||||
champDescriptors: [ChampDescriptor!]!
|
||||
createdAt: ISO8601DateTime!
|
||||
|
||||
"""
|
||||
Déscription de la démarche.
|
||||
Date de la création.
|
||||
"""
|
||||
dateCreation: ISO8601DateTime!
|
||||
|
||||
"""
|
||||
Date de la dernière modification.
|
||||
"""
|
||||
dateDerniereModification: ISO8601DateTime!
|
||||
|
||||
"""
|
||||
Date de la fermeture.
|
||||
"""
|
||||
dateFermeture: ISO8601DateTime
|
||||
|
||||
"""
|
||||
Date de la publication.
|
||||
"""
|
||||
datePublication: ISO8601DateTime!
|
||||
|
||||
"""
|
||||
Description de la démarche.
|
||||
"""
|
||||
description: String!
|
||||
|
||||
|
@ -225,8 +245,11 @@ type Demarche {
|
|||
L'état de la démarche.
|
||||
"""
|
||||
state: DemarcheState!
|
||||
|
||||
"""
|
||||
Le titre de la démarche.
|
||||
"""
|
||||
title: String!
|
||||
updatedAt: ISO8601DateTime!
|
||||
}
|
||||
|
||||
enum DemarcheState {
|
||||
|
@ -280,6 +303,11 @@ type Dossier {
|
|||
avis: [Avis!]!
|
||||
champs: [Champ!]!
|
||||
|
||||
"""
|
||||
Date de la dernière modification.
|
||||
"""
|
||||
dateDerniereModification: ISO8601DateTime!
|
||||
|
||||
"""
|
||||
Date de dépôt.
|
||||
"""
|
||||
|
@ -309,11 +337,6 @@ type Dossier {
|
|||
L'état du dossier.
|
||||
"""
|
||||
state: DossierState!
|
||||
|
||||
"""
|
||||
Date de dernière mise à jour.
|
||||
"""
|
||||
updatedAt: ISO8601DateTime!
|
||||
usager: Profile!
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
module Types
|
||||
class AvisType < Types::BaseObject
|
||||
global_id_field :id
|
||||
field :email, String, null: false
|
||||
|
||||
field :question, String, null: false, method: :introduction
|
||||
field :answer, String, null: true
|
||||
field :created_at, GraphQL::Types::ISO8601DateTime, null: false
|
||||
field :reponse, String, null: true, method: :answer
|
||||
field :date_question, GraphQL::Types::ISO8601DateTime, null: false, method: :created_at
|
||||
field :date_reponse, GraphQL::Types::ISO8601DateTime, null: true, method: :updated_at
|
||||
|
||||
field :attachment_url, Types::URL, null: true, extensions: [
|
||||
{ Extensions::Attachment => { attachment: :piece_justificative_file } }
|
||||
]
|
||||
|
||||
field :instructeur, Types::ProfileType, null: false, method: :claimant
|
||||
field :expert, Types::ProfileType, null: true, method: :instructeur
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,13 +10,14 @@ module Types
|
|||
|
||||
global_id_field :id
|
||||
field :number, Int, "Le numero de la démarche.", null: false, method: :id
|
||||
field :title, String, null: false, method: :libelle
|
||||
field :description, String, "Déscription de la démarche.", null: false
|
||||
field :title, String, "Le titre de la démarche.", null: false, method: :libelle
|
||||
field :description, String, "Description de la démarche.", null: false
|
||||
field :state, DemarcheState, "L'état de la démarche.", null: false
|
||||
|
||||
field :created_at, GraphQL::Types::ISO8601DateTime, null: false
|
||||
field :updated_at, GraphQL::Types::ISO8601DateTime, null: false
|
||||
field :archived_at, GraphQL::Types::ISO8601DateTime, null: true
|
||||
field :date_creation, GraphQL::Types::ISO8601DateTime, "Date de la création.", null: false, method: :created_at
|
||||
field :date_publication, GraphQL::Types::ISO8601DateTime, "Date de la publication.", null: false, method: :published_at
|
||||
field :date_derniere_modification, GraphQL::Types::ISO8601DateTime, "Date de la dernière modification.", null: false, method: :updated_at
|
||||
field :date_fermeture, GraphQL::Types::ISO8601DateTime, "Date de la fermeture.", null: true, method: :archived_at
|
||||
|
||||
field :groupe_instructeurs, [Types::GroupeInstructeurType], null: false
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@ module Types
|
|||
global_id_field :id
|
||||
field :number, Int, "Le numero du dossier.", null: false, method: :id
|
||||
field :state, DossierState, "L'état du dossier.", null: false
|
||||
field :updated_at, GraphQL::Types::ISO8601DateTime, "Date de dernière mise à jour.", null: false
|
||||
|
||||
field :date_passage_en_construction, GraphQL::Types::ISO8601DateTime, "Date de dépôt.", null: false, method: :en_construction_at
|
||||
field :date_passage_en_instruction, GraphQL::Types::ISO8601DateTime, "Date de passage en instruction.", null: true, method: :en_instruction_at
|
||||
field :date_traitement, GraphQL::Types::ISO8601DateTime, "Date de traitement.", null: true, method: :processed_at
|
||||
field :date_derniere_modification, GraphQL::Types::ISO8601DateTime, "Date de la dernière modification.", null: false, method: :updated_at
|
||||
|
||||
field :archived, Boolean, null: false
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ describe API::V2::GraphqlController do
|
|||
title
|
||||
description
|
||||
state
|
||||
createdAt
|
||||
updatedAt
|
||||
archivedAt
|
||||
dateCreation
|
||||
dateDerniereModification
|
||||
dateFermeture
|
||||
groupeInstructeurs {
|
||||
label
|
||||
instructeurs {
|
||||
|
@ -80,9 +80,9 @@ describe API::V2::GraphqlController do
|
|||
title: procedure.libelle,
|
||||
description: procedure.description,
|
||||
state: 'brouillon',
|
||||
archivedAt: nil,
|
||||
createdAt: procedure.created_at.iso8601,
|
||||
updatedAt: procedure.updated_at.iso8601,
|
||||
dateFermeture: nil,
|
||||
dateCreation: procedure.created_at.iso8601,
|
||||
dateDerniereModification: procedure.updated_at.iso8601,
|
||||
groupeInstructeurs: [
|
||||
{
|
||||
instructeurs: [{ email: instructeur.email }],
|
||||
|
@ -139,7 +139,7 @@ describe API::V2::GraphqlController do
|
|||
id
|
||||
number
|
||||
state
|
||||
updatedAt
|
||||
dateDerniereModification
|
||||
datePassageEnConstruction
|
||||
datePassageEnInstruction
|
||||
dateTraitement
|
||||
|
@ -159,9 +159,13 @@ describe API::V2::GraphqlController do
|
|||
attachmentUrl
|
||||
}
|
||||
avis {
|
||||
expert {
|
||||
email
|
||||
}
|
||||
question
|
||||
answer
|
||||
reponse
|
||||
dateQuestion
|
||||
dateReponse
|
||||
attachmentUrl
|
||||
}
|
||||
champs {
|
||||
|
@ -179,7 +183,7 @@ describe API::V2::GraphqlController do
|
|||
id: dossier.to_typed_id,
|
||||
number: dossier.id,
|
||||
state: 'en_construction',
|
||||
updatedAt: dossier.updated_at.iso8601,
|
||||
dateDerniereModification: dossier.updated_at.iso8601,
|
||||
datePassageEnConstruction: dossier.en_construction_at.iso8601,
|
||||
datePassageEnInstruction: nil,
|
||||
dateTraitement: nil,
|
||||
|
|
Loading…
Reference in a new issue