mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-11 08:27:44 +00:00
Compare commits
10 Commits
replace_we
...
487-addres
| Author | SHA1 | Date | |
|---|---|---|---|
| e48aad487c | |||
| fa5eff1e4c | |||
| d398fad42c | |||
| eee0593700 | |||
| ec5ca626a4 | |||
| 47b285b584 | |||
| 7c9b4d02f6 | |||
| 3ff9bba4de | |||
| c0f9e953fb | |||
| a49ea2b6b9 |
@@ -1,6 +0,0 @@
|
|||||||
kind: Feature
|
|
||||||
body: 'Add filtering to admin lists: social actions, social issues, goals, results, and evaluations'
|
|
||||||
time: 2025-12-10T03:20:45.135973502+01:00
|
|
||||||
custom:
|
|
||||||
Issue: "478"
|
|
||||||
SchemaChange: No schema change
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixed
|
|
||||||
body: |
|
|
||||||
Fix migration query after previous fix
|
|
||||||
time: 2025-12-11T21:49:08.899926492+01:00
|
|
||||||
custom:
|
|
||||||
Issue: "466"
|
|
||||||
SchemaChange: No schema change
|
|
||||||
6
.changes/unreleased/Fixed-20251218-102405.yaml
Normal file
6
.changes/unreleased/Fixed-20251218-102405.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: Fix the condition to display concerned persons in calendar list items.
|
||||||
|
time: 2025-12-18T10:24:05.885090777+01:00
|
||||||
|
custom:
|
||||||
|
Issue: "480"
|
||||||
|
SchemaChange: No schema change
|
||||||
6
.changes/unreleased/Fixed-20251218-110722.yaml
Normal file
6
.changes/unreleased/Fixed-20251218-110722.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: 'Fix ordering of social actions: actions with a closing date in the future should be considered as ''still open''.'
|
||||||
|
time: 2025-12-18T11:07:22.699897317+01:00
|
||||||
|
custom:
|
||||||
|
Issue: "481"
|
||||||
|
SchemaChange: No schema change
|
||||||
6
.changes/unreleased/Fixed-20251230-125728.yaml
Normal file
6
.changes/unreleased/Fixed-20251230-125728.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: Fix export group by center for persons without a center in CenterAggregator.php
|
||||||
|
time: 2025-12-30T12:57:28.773521385+01:00
|
||||||
|
custom:
|
||||||
|
Issue: "477"
|
||||||
|
SchemaChange: No schema change
|
||||||
6
.changes/unreleased/UX-20260106-142813.yaml
Normal file
6
.changes/unreleased/UX-20260106-142813.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: UX
|
||||||
|
body: Improve the ux of the address field in the person creation form
|
||||||
|
time: 2026-01-06T14:28:13.033420033+01:00
|
||||||
|
custom:
|
||||||
|
Issue: "487"
|
||||||
|
SchemaChange: No schema change
|
||||||
9
.changes/v4.11.0.md
Normal file
9
.changes/v4.11.0.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
## v4.11.0 - 2025-12-17
|
||||||
|
### Feature
|
||||||
|
* ([#478](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/478)) Add filtering to admin lists: social actions, social issues, goals, results, and evaluations
|
||||||
|
### Fixed
|
||||||
|
* ([#466](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/466)) Fix migration query after previous fix
|
||||||
|
|
||||||
|
* Fix translation key/value
|
||||||
|
|
||||||
|
Cannot start with % and should be wrapped in "".
|
||||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -6,6 +6,16 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||||
|
|
||||||
|
|
||||||
|
## v4.11.0 - 2025-12-17
|
||||||
|
### Feature
|
||||||
|
* ([#478](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/478)) Add filtering to admin lists: social actions, social issues, goals, results, and evaluations
|
||||||
|
### Fixed
|
||||||
|
* ([#466](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/466)) Fix migration query after previous fix
|
||||||
|
|
||||||
|
* Fix translation key/value
|
||||||
|
|
||||||
|
Cannot start with % and should be wrapped in "".
|
||||||
|
|
||||||
## v4.10.1 - 2025-12-11
|
## v4.10.1 - 2025-12-11
|
||||||
### Fixed
|
### Fixed
|
||||||
* Fix missing translation variable in NewLocation component
|
* Fix missing translation variable in NewLocation component
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if calendar.comment.comment is not empty
|
{% if calendar.comment.comment is not empty
|
||||||
or calendar.users|length > 0
|
or calendar.persons|length > 0
|
||||||
or calendar.thirdParties|length > 0
|
or calendar.thirdParties|length > 0
|
||||||
or calendar.users|length > 0 %}
|
or calendar.users|length > 0 %}
|
||||||
<div class="item-row details separator">
|
<div class="item-row details separator">
|
||||||
|
|||||||
@@ -189,14 +189,14 @@ crud:
|
|||||||
title_edit: Rapport "belemmering" bewerken
|
title_edit: Rapport "belemmering" bewerken
|
||||||
title_delete: Belemmering verwijderen
|
title_delete: Belemmering verwijderen
|
||||||
button_delete: Verwijderen
|
button_delete: Verwijderen
|
||||||
confirm_message_delete: %as_string% verwijderen?
|
confirm_message_delete: "%as_string% verwijderen?"
|
||||||
cscv:
|
cscv:
|
||||||
title_new: Nieuw CV voor %person%
|
title_new: Nieuw CV voor %person%
|
||||||
title_view: CV voor %person%
|
title_view: CV voor %person%
|
||||||
title_edit: CV bewerken
|
title_edit: CV bewerken
|
||||||
title_delete: CV verwijderen
|
title_delete: CV verwijderen
|
||||||
button_delete: Verwijderen
|
button_delete: Verwijderen
|
||||||
confirm_message_delete: %as_string% verwijderen?
|
confirm_message_delete: "%as_string% verwijderen?"
|
||||||
no_date: Geen datum aangegeven
|
no_date: Geen datum aangegeven
|
||||||
no_end_date: einddatum onbekend
|
no_end_date: einddatum onbekend
|
||||||
no_start_date: startdatum onbekend
|
no_start_date: startdatum onbekend
|
||||||
@@ -206,7 +206,7 @@ crud:
|
|||||||
title_edit: Immersie bewerken
|
title_edit: Immersie bewerken
|
||||||
title_delete: Immersie verwijderen
|
title_delete: Immersie verwijderen
|
||||||
button_delete: Verwijderen
|
button_delete: Verwijderen
|
||||||
confirm_message_delete: %as_string% verwijderen?
|
confirm_message_delete: "%as_string% verwijderen?"
|
||||||
projet_prof:
|
projet_prof:
|
||||||
title_new: Nieuw professioneel project voor %person%
|
title_new: Nieuw professioneel project voor %person%
|
||||||
title_view: Professioneel project voor %person%
|
title_view: Professioneel project voor %person%
|
||||||
|
|||||||
@@ -45,10 +45,10 @@
|
|||||||
:class="getClassButton"
|
:class="getClassButton"
|
||||||
type="button"
|
type="button"
|
||||||
name="button"
|
name="button"
|
||||||
:title="trans(getTextButton)"
|
:title="getTextButton"
|
||||||
>
|
>
|
||||||
<span v-if="displayTextButton">{{
|
<span v-if="displayTextButton">{{
|
||||||
trans(getTextButton)
|
getTextButton
|
||||||
}}</span>
|
}}</span>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
@@ -73,10 +73,10 @@
|
|||||||
:class="getClassButton"
|
:class="getClassButton"
|
||||||
type="button"
|
type="button"
|
||||||
name="button"
|
name="button"
|
||||||
:title="trans(getTextButton)"
|
:title="getTextButton"
|
||||||
>
|
>
|
||||||
<span v-if="displayTextButton">{{
|
<span v-if="displayTextButton">{{
|
||||||
trans(getTextButton)
|
getTextButton
|
||||||
}}</span>
|
}}</span>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
@@ -97,11 +97,9 @@
|
|||||||
:class="getClassButton"
|
:class="getClassButton"
|
||||||
type="button"
|
type="button"
|
||||||
name="button"
|
name="button"
|
||||||
:title="trans(getTextButton)"
|
:title="getTextButton"
|
||||||
>
|
>
|
||||||
<span v-if="displayTextButton">{{
|
<span v-if="displayTextButton">{{ getTextButton }}</span>
|
||||||
trans(getTextButton)
|
|
||||||
}}</span>
|
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</action-buttons>
|
</action-buttons>
|
||||||
@@ -177,16 +175,18 @@ export default {
|
|||||||
},
|
},
|
||||||
getTextButton() {
|
getTextButton() {
|
||||||
if (
|
if (
|
||||||
typeof this.options.button.text !== "undefined" &&
|
typeof this.options.button !== "undefined" &&
|
||||||
(this.options.button.text.edit !== null ||
|
typeof this.options.button.text !== "undefined"
|
||||||
this.options.button.text.create !== null)
|
|
||||||
) {
|
) {
|
||||||
// console.log('this.options.button.text', this.options.button.text)
|
const customText = this.context.edit
|
||||||
return this.context.edit
|
? this.options.button.text.edit
|
||||||
? ACTIVITY_CREATE_ADDRESS
|
: this.options.button.text.create;
|
||||||
: ACTIVITY_EDIT_ADDRESS;
|
|
||||||
|
if (customText !== null) {
|
||||||
|
return customText;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
console.log("defaultz", this.defaultz);
|
|
||||||
return this.context.edit
|
return this.context.edit
|
||||||
? this.defaultz.button.text.edit
|
? this.defaultz.button.text.edit
|
||||||
: this.defaultz.button.text.create;
|
: this.defaultz.button.text.create;
|
||||||
|
|||||||
@@ -135,15 +135,13 @@ final class PersonController extends AbstractController
|
|||||||
$this->lastPostDataReset();
|
$this->lastPostDataReset();
|
||||||
|
|
||||||
$address = $form->get('address')->getData();
|
$address = $form->get('address')->getData();
|
||||||
$addressForm = (bool) $form->get('addressForm')->getData();
|
|
||||||
|
|
||||||
if (null !== $address && $addressForm) {
|
if (null !== $address) {
|
||||||
$household = new Household();
|
$household = new Household();
|
||||||
|
|
||||||
$member = new HouseholdMember();
|
$member = new HouseholdMember();
|
||||||
$member->setPerson($person);
|
$member->setPerson($person);
|
||||||
$member->setStartDate(new \DateTimeImmutable());
|
$member->setStartDate(new \DateTimeImmutable());
|
||||||
|
|
||||||
$household->addMember($member);
|
$household->addMember($member);
|
||||||
$household->setForceAddress($address);
|
$household->setForceAddress($address);
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface;
|
|||||||
use Chill\PersonBundle\Export\Declarations;
|
use Chill\PersonBundle\Export\Declarations;
|
||||||
use Doctrine\ORM\QueryBuilder;
|
use Doctrine\ORM\QueryBuilder;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
final readonly class CenterAggregator implements AggregatorInterface
|
final readonly class CenterAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
@@ -27,6 +28,7 @@ final readonly class CenterAggregator implements AggregatorInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private CenterRepositoryInterface $centerRepository,
|
private CenterRepositoryInterface $centerRepository,
|
||||||
private RollingDateConverterInterface $rollingDateConverter,
|
private RollingDateConverterInterface $rollingDateConverter,
|
||||||
|
private TranslatorInterface $translator,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder): void
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
@@ -62,7 +64,7 @@ final readonly class CenterAggregator implements AggregatorInterface
|
|||||||
{
|
{
|
||||||
return function (int|string|null $value) {
|
return function (int|string|null $value) {
|
||||||
if (null === $value || '' === $value) {
|
if (null === $value || '' === $value) {
|
||||||
return '';
|
return $this->translator->trans('person.export.aggregator.by_center.no_center');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('_header' === $value) {
|
if ('_header' === $value) {
|
||||||
@@ -94,15 +96,18 @@ final readonly class CenterAggregator implements AggregatorInterface
|
|||||||
$atDate = 'pers_center_agg_at_date';
|
$atDate = 'pers_center_agg_at_date';
|
||||||
|
|
||||||
$qb->leftJoin('person.centerHistory', $alias);
|
$qb->leftJoin('person.centerHistory', $alias);
|
||||||
$qb
|
$qb->andWhere(
|
||||||
->andWhere(
|
$qb->expr()->orX(
|
||||||
$qb->expr()->lte($alias.'.startDate', ':'.$atDate),
|
$qb->expr()->isNull($alias.'.id'),
|
||||||
)->andWhere(
|
$qb->expr()->andX(
|
||||||
$qb->expr()->orX(
|
$qb->expr()->lte($alias.'.startDate', ':'.$atDate),
|
||||||
$qb->expr()->isNull($alias.'.endDate'),
|
$qb->expr()->orX(
|
||||||
$qb->expr()->gt($alias.'.endDate', ':'.$atDate)
|
$qb->expr()->isNull($alias.'.endDate'),
|
||||||
|
$qb->expr()->gt($alias.'.endDate', ':'.$atDate)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
)
|
||||||
|
);
|
||||||
$qb->setParameter($atDate, $this->rollingDateConverter->convert($data['at_date']));
|
$qb->setParameter($atDate, $this->rollingDateConverter->convert($data['at_date']));
|
||||||
|
|
||||||
$qb->addSelect("IDENTITY({$alias}.center) AS ".self::COLUMN_NAME);
|
$qb->addSelect("IDENTITY({$alias}.center) AS ".self::COLUMN_NAME);
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Chill\PersonBundle\Form;
|
namespace Chill\PersonBundle\Form;
|
||||||
|
|
||||||
use Chill\MainBundle\Entity\Address;
|
|
||||||
use Chill\MainBundle\Form\Event\CustomizeFormEvent;
|
use Chill\MainBundle\Form\Event\CustomizeFormEvent;
|
||||||
use Chill\MainBundle\Form\Type\ChillDateType;
|
use Chill\MainBundle\Form\Type\ChillDateType;
|
||||||
use Chill\MainBundle\Form\Type\ChillPhoneNumberType;
|
use Chill\MainBundle\Form\Type\ChillPhoneNumberType;
|
||||||
@@ -27,12 +26,9 @@ use libphonenumber\PhoneNumberType;
|
|||||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
|
||||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Symfony\Component\Validator\Constraints\Callback;
|
|
||||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
|
||||||
|
|
||||||
final class CreationPersonType extends AbstractType
|
final class CreationPersonType extends AbstractType
|
||||||
{
|
{
|
||||||
@@ -77,16 +73,10 @@ final class CreationPersonType extends AbstractType
|
|||||||
->add('email', EmailType::class, [
|
->add('email', EmailType::class, [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
])
|
])
|
||||||
->add('addressForm', CheckboxType::class, [
|
|
||||||
'label' => 'Create a household and add an address',
|
|
||||||
'required' => false,
|
|
||||||
'mapped' => false,
|
|
||||||
'help' => 'A new household will be created. The person will be member of this household.',
|
|
||||||
])
|
|
||||||
->add('address', PickAddressType::class, [
|
->add('address', PickAddressType::class, [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'mapped' => false,
|
'mapped' => false,
|
||||||
'label' => false,
|
'label' => 'Address',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($this->askCenters) {
|
if ($this->askCenters) {
|
||||||
@@ -113,9 +103,6 @@ final class CreationPersonType extends AbstractType
|
|||||||
{
|
{
|
||||||
$resolver->setDefaults([
|
$resolver->setDefaults([
|
||||||
'data_class' => Person::class,
|
'data_class' => Person::class,
|
||||||
'constraints' => [
|
|
||||||
new Callback($this->validateCheckedAddress(...)),
|
|
||||||
],
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,18 +113,4 @@ final class CreationPersonType extends AbstractType
|
|||||||
{
|
{
|
||||||
return self::NAME;
|
return self::NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateCheckedAddress($data, ExecutionContextInterface $context, $payload): void
|
|
||||||
{
|
|
||||||
/** @var bool $addressFrom */
|
|
||||||
$addressFrom = $context->getObject()->get('addressForm')->getData();
|
|
||||||
/** @var ?Address $address */
|
|
||||||
$address = $context->getObject()->get('address')->getData();
|
|
||||||
|
|
||||||
if ($addressFrom && null === $address) {
|
|
||||||
$context->buildViolation('person_creation.If you want to create an household, an address is required')
|
|
||||||
->atPath('addressForm')
|
|
||||||
->addViolation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,9 +100,9 @@ class AccompanyingPeriodWorkRepository implements ObjectRepository
|
|||||||
$rsm->addRootEntityFromClassMetadata(AccompanyingPeriodWork::class, 'w');
|
$rsm->addRootEntityFromClassMetadata(AccompanyingPeriodWork::class, 'w');
|
||||||
|
|
||||||
$sql = "SELECT {$rsm} FROM chill_person_accompanying_period_work w
|
$sql = "SELECT {$rsm} FROM chill_person_accompanying_period_work w
|
||||||
LEFT JOIN chill_person_accompanying_period_work_referrer AS rw ON accompanyingperiodwork_id = w.id
|
LEFT JOIN chill_person_accompanying_period_work_referrer AS rw ON accompanyingperiodwork_id = w.id
|
||||||
AND (rw.enddate IS NULL OR rw.enddate > CURRENT_DATE)
|
AND (rw.enddate IS NULL OR rw.enddate > CURRENT_DATE)
|
||||||
WHERE accompanyingPeriod_id = :periodId";
|
WHERE accompanyingPeriod_id = :periodId";
|
||||||
|
|
||||||
// implement filters
|
// implement filters
|
||||||
|
|
||||||
@@ -136,11 +136,14 @@ class AccompanyingPeriodWorkRepository implements ObjectRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set limit and offset
|
// set limit and offset
|
||||||
$sql .= " ORDER BY
|
$sql .= ' ORDER BY
|
||||||
CASE WHEN w.enddate IS NULL THEN '-infinity'::timestamp ELSE 'infinity'::timestamp END ASC,
|
CASE
|
||||||
w.startdate DESC,
|
WHEN w.enddate IS NULL OR w.enddate > CURRENT_DATE THEN 0
|
||||||
w.enddate DESC,
|
ELSE 1
|
||||||
w.id DESC";
|
END ASC,
|
||||||
|
w.startdate DESC,
|
||||||
|
w.enddate DESC,
|
||||||
|
w.id DESC';
|
||||||
|
|
||||||
$sql .= ' LIMIT :limit OFFSET :offset';
|
$sql .= ' LIMIT :limit OFFSET :offset';
|
||||||
|
|
||||||
|
|||||||
@@ -105,11 +105,14 @@
|
|||||||
{{ form_row(form.center) }}
|
{{ form_row(form.center) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id=addressForm>
|
<div id="address" class="row mb-1" style="display:flex;" title="{{ 'A new household will be created. The person will be member of this household.'|trans }}">
|
||||||
{{ form_row(form.addressForm) }}
|
{{ form_label(form.address, 'Address'|trans) }}
|
||||||
</div>
|
<div class="col-sm-8">
|
||||||
<div id=address>
|
{{ form_widget(form.address) }}
|
||||||
{{ form_row(form.address) }}
|
<div class="form-text text-muted">
|
||||||
|
{{ 'A new household will be created. The person will be member of this household.'|trans }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
|||||||
@@ -103,6 +103,11 @@ Employment status: Situation professionelle
|
|||||||
Administrative status: Situation administrative
|
Administrative status: Situation administrative
|
||||||
|
|
||||||
person:
|
person:
|
||||||
|
# trans key according to new conventions
|
||||||
|
export:
|
||||||
|
aggregator:
|
||||||
|
by_center:
|
||||||
|
no_center: Sans territoire
|
||||||
Identifiers: Identifiants
|
Identifiers: Identifiants
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user