mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'issue_vendee_456_document_field_not_required' into 'master'
doc generation: add age and obele in the mainPerson, person1 and person2 list... See merge request Chill-Projet/chill-bundles!336
This commit is contained in:
commit
9ead38ee22
@ -12,6 +12,9 @@ and this project adheres to
|
||||
* AddPersons: remove ul-li html tags from AddPersons (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/419)
|
||||
|
||||
<!-- write down unreleased development here -->
|
||||
* [doc-generator] do not set required fields for mainPerson, person1, person2 (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement#456)
|
||||
* [doc-generation] add age and obele in the mainPerson, person1 and person2 list + add obele in person renderString if addAge (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/370)
|
||||
* [person] accompanying course work: fix on-the-fly update of thirdParty
|
||||
* fix normalisation of accompanying course requestor api (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/378)
|
||||
* [person] add a returnPath when clicking on some Person or ThirdParty badge (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/427)
|
||||
* [person] accompanying course work: fix on-the-fly update of thirdParty
|
||||
|
@ -11,7 +11,6 @@
|
||||
* buttonText string
|
||||
* displayBadge boolean (default: false) replace button by badge, need to define buttonText for content
|
||||
* parent object (optional) pass parent context of the targetEntity (used for course resource comment)
|
||||
* isDead boolean (default: false) is the person dead
|
||||
|
||||
#}
|
||||
<span class="onthefly-container"
|
||||
@ -29,10 +28,6 @@
|
||||
data-button-text="{{ buttonText|e('html_attr') }}"
|
||||
{% endif %}
|
||||
|
||||
{% if isDead is defined and isDead == 1 %}
|
||||
data-is-dead="true"
|
||||
{% endif %}
|
||||
|
||||
{% if displayBadge is defined and displayBadge == 1 %}
|
||||
data-display-badge="true"
|
||||
{% endif %}
|
||||
|
@ -62,7 +62,6 @@ class AccompanyingPeriodWorkVoter extends Voter
|
||||
case self::UPDATE:
|
||||
return $this->security->isGranted(AccompanyingPeriodVoter::EDIT, $subject->getAccompanyingPeriod());
|
||||
|
||||
|
||||
default:
|
||||
throw new UnexpectedValueException("attribute {$attribute} is not supported");
|
||||
}
|
||||
|
@ -161,11 +161,13 @@ class AccompanyingPeriodContext implements
|
||||
'class' => Person::class,
|
||||
'choices' => $persons,
|
||||
'choice_label' => function (Person $p) {
|
||||
return $this->personRender->renderString($p, []);
|
||||
return $this->personRender->renderString($p, ['addAge' => true]);
|
||||
},
|
||||
'multiple' => false,
|
||||
'expanded' => true,
|
||||
'required' => false,
|
||||
'label' => $options[$key . 'Label'],
|
||||
'placeholder' => $this->translator->trans('Any person selected'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -83,6 +83,12 @@ class PersonRender extends AbstractChillEntityRender
|
||||
. $this->addAltNames($person, false) . ' (' . $this->translator->trans('years_old', ['age' => $person->getAge()]) . ')';
|
||||
}
|
||||
|
||||
if (null !== $person->getDeathDate() && $options['addAge']) {
|
||||
return $person->getFirstName() . ' ' . $person->getLastName()
|
||||
. ' (‡)'
|
||||
. $this->addAltNames($person, false);
|
||||
}
|
||||
|
||||
return $person->getFirstName() . ' ' . $person->getLastName()
|
||||
. $this->addAltNames($person, false);
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ Course number: Parcours n°
|
||||
Civility: Civilité
|
||||
choose civility: --
|
||||
All genders: tous les genres
|
||||
Any person selected: Aucune personne sélectionnée
|
||||
|
||||
# dédoublonnage
|
||||
Old person: Doublon
|
||||
|
Loading…
x
Reference in New Issue
Block a user