The commit introduces new functionality in the bundle that allows storing the closing motive when a course is closed. This is achieved by modifying the model and database schema to include a new `closingMotive` field in AccompanyingPeriodStepHistory entity.
- internally, the entity remove the addressLocation when the
personLocation is set, and vice-versa;
- this commit add a migration which may solve the case when both case
happens (priority to personLocation + keep the history)
- add a constraint on the database to avoid such situation
* filters call static entity method
* add renderString option to manage add_children
* add tests on new entity method getDescendantsWithThisFor..()
* rename function in repository
* rename 'Select2..' classes by 'Pick..' and replace all occurences
Each time a step is changed on an history, a record is stored in a
dedicated table.
When the acp's opening date is moved, the first row is adapted to match the new opening's date. This
mechanisme does not work if the opening date is move beyon the first end
date (if any), nor on the closing date.
The association between Person and Center is now stored in a dedicated
Entity: `PersonCenterHistory`, which have a date interval (start date
and endDate). The SQL counterpart is a table, with a constraint which
ensure that no person might be associated with two center at the same time.
For ease, a view is created to get the current center associated with
the person.
The dedicated migration creates also:
* indexes for a rapid search for person at current date;
* and populate the table from current data, setting the startdate to the
person's creation date and time if any, `NOW()` unless.
The `Person` entity is also updated to use the information from the
PersonCenterHistory classes, but this commit does not yet delete the
`Center` column.