added doleance fields to graphql #2246

This commit is contained in:
Bachir Soussi Chiadmi 2023-10-02 11:19:08 +02:00
parent d5963b40e6
commit 5006cb7082
2 changed files with 65 additions and 0 deletions

View File

@ -98,19 +98,23 @@ type Doleance implements NodeInterface {
created: String
changed: String
#1
date_leprobleme: Date
leprobleme: String
lenquete: String
groupesinterets: [GroupeInterets]
#2
date_adresse: Date
entite_addresse_doleance: String
comment_ennonce_doleance: String
aqui_addresse_doleance: String
reception_traitement: [ReceptionTraitement]
#3
date_decision: Date
entites_decisionnaires: String
decision_formule: String
mise_en_oeuvre_decision: [MiseEnoeuvreDecision]
#4
date_application: Date
entite_adresse_application: String
aqui_adresse_decision: String
comment_formule_decision: String
@ -121,12 +125,14 @@ type Doleance implements NodeInterface {
}
type GroupeInterets {
date: Date
groupe_interets: String
accorder_interets: String
formuler: String
}
type ReceptionTraitement {
date: Date
entite_adressee: String
doleance_formulee: String
traite_doleance: String
@ -134,12 +140,14 @@ type ReceptionTraitement {
}
type MiseEnoeuvreDecision {
date: Date
entite_adresse_decision: String
formule_decision: String
entite_metenoeuvre_decisio: String
}
type ReceptionsApplications {
date: Date
applique_decision: String
formule_decision_applic: String
entite_recoit_decision: String

View File

@ -885,6 +885,13 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_le_probleme.value'))
);
// date_leprobleme: Date
$registry->addFieldResolver('Doleance', 'date_leprobleme',
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:node'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_date_leprobleme'))
);
// lenquete: String
$registry->addFieldResolver('Doleance', 'lenquete',
$builder->produce('property_path')
@ -901,6 +908,13 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
// #2
// date_adresse_doleance: Date
$registry->addFieldResolver('Doleance', 'date_adresse',
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:node'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_date_adresse_doleance'))
);
// entite_addresse_doleance: String
$registry->addFieldResolver('Doleance', 'entite_addresse_doleance',
$builder->produce('property_path')
@ -930,6 +944,13 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
);
// #3
// field_date_decision: Date
$registry->addFieldResolver('Doleance', 'date_decision',
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:node'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_date_decision'))
);
// entites_decisionnaires: String
$registry->addFieldResolver('Doleance', 'entites_decisionnaires',
$builder->produce('property_path')
@ -952,6 +973,13 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
);
// #4
// date_adresse_decision: Date
$registry->addFieldResolver('Doleance', 'date_application',
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:node'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_date_adresse_decision'))
);
// entite_addresse_application: String
$registry->addFieldResolver('Doleance', 'entite_adresse_application',
$builder->produce('property_path')
@ -1009,6 +1037,14 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
// \____|_| \___/ \__,_| .__/ \___| |___|_| |_|\__\___|_| \___|\__|___/
// |_|
protected function addGroupeInterets(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
// field_date_groupe_interets: Date
$registry->addFieldResolver('GroupeInterets', 'date',
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:paragraph'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_date_groupe_interets'))
);
// groupe_interets: String
$registry->addFieldResolver('GroupeInterets', 'groupe_interets',
$builder->produce('property_path')
@ -1039,6 +1075,13 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
// |_| \_\___|\___\___| .__/ \__|_|\___/|_| |_| |_||_| \__,_|_|\__\___|_| |_| |_|\___|_| |_|\__|
// |_|
protected function addReceptionTraitement(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
// field_date_reception_traite: Date
$registry->addFieldResolver('ReceptionTraitement', 'date',
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:paragraph'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_date_reception_traite'))
);
// entite_adressee: String
$registry->addFieldResolver('ReceptionTraitement', 'entite_adressee',
$builder->produce('property_path')
@ -1075,6 +1118,13 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
// | | | | \__ \ __/ | |___| | | | (_) | __/ |_| |\ V /| | | __/ | |_| | __/ (__| \__ \ | (_) | | | |
// |_| |_|_|___/\___| |_____|_| |_|\___/ \___|\__,_| \_/ |_| \___| |____/ \___|\___|_|___/_|\___/|_| |_|
protected function addMiseEnoeuvreDecision(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
// field_date_miseeoeuvre_decision: Date
$registry->addFieldResolver('MiseEnoeuvreDecision', 'date',
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:paragraph'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_date_miseeoeuvre_decision'))
);
// entite_adresse_decision: String
$registry->addFieldResolver('MiseEnoeuvreDecision', 'entite_adresse_decision',
$builder->produce('property_path')
@ -1105,6 +1155,13 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
// |_| \_\___|\___\___| .__/ \__|_|\___/|_| |_|___/ /_/ \_\ .__/| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|___/
// |_| |_| |_|
protected function addReceptionsApplications(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
// field_date_date_traitement_decis: Date
$registry->addFieldResolver('ReceptionsApplications', 'date',
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:paragraph'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_date_date_traitement_decis'))
);
// applique_decision: String
$registry->addFieldResolver('ReceptionsApplications', 'applique_decision',
$builder->produce('property_path')