diff --git a/.env b/.env
deleted file mode 100644
index 619f471ca..000000000
--- a/.env
+++ /dev/null
@@ -1,64 +0,0 @@
-##
-## Manually dump .env files in .env.local.php with
-## `$ composer symfony:dump-env prod`
-##
-
-## Project environment
-APP_ENV=dev
-
-## Enable debug
-APP_DEBUG=true
-
-## Locale
-LOCALE=fr
-
-## Framework secret
-APP_SECRET=ThisTokenIsNotSoSecretChangeIt
-
-## Symfony/swiftmailer
-MAILER_TRANSPORT=smtp
-MAILER_HOST=smtp
-MAILER_PORT=1025
-MAILER_CRYPT=
-MAILER_AUTH=
-MAILER_USER=
-MAILER_PASSWORD=
-MAILER_URL=${MAILER_TRANSPORT}://${MAILER_HOST}:${MAILER_PORT}?encryption=${MAILER_CRYPT}&auth_mode=${MAILER_AUTH}&username=${MAILER_USER}&password=${MAILER_PASSWORD}
-
-## Notifications
-NOTIFICATION_HOST=localhost:8001
-NOTIFICATION_FROM_EMAIL=admin@chill.social
-NOTIFICATION_FROM_NAME=Chill
-
-## Gelf
-GELF_HOST=gelf
-GELF_PORT=12201
-
-## OVH OpenStack Storage User/Role
-OS_USERNAME=
-OS_PASSWORD=
-OS_TENANT_ID=
-OS_REGION_NAME=GRA
-OS_AUTH_URL=https://auth.cloud.ovh.net/v2.0/
-
-## OVH OpenStack Storage Container
-ASYNC_UPLOAD_TEMP_URL_KEY=
-ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
-ASYNC_UPLOAD_TEMP_URL_CONTAINER=
-
-## Redis Cache
-REDIS_HOST=redis
-REDIS_PORT=6379
-REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
-
-## Twilio
-TWILIO_SID=~
-TWILIO_SECRET=~
-
-## DOCKER IMAGES REGISTRY
-#IMAGE_PHP=
-#IMAGE_NGINX=
-
-## DOCKER IMAGES VERSION
-#VERSION=test
-VERSION=prod
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 34b1e72b4..a0a6019f1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,10 +11,26 @@ and this project adheres to
## Unreleased
+* AddPersons: remove ul-li html tags from AddPersons (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/419)
+* 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
+* [on-the-fly] close modal only after validation
+* [person] correct thirdparty PATCH url + add email and altnames in AddPerson and serializer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/433)
* change order for accompanying course work list
+* [parcours]: Mes parcours brouillon added to user menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/440)
+* [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414)
* [person]: style fix in parcours listing per person. (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/432)
* [parcours]: Only the referrer can toggle the intensity of the parcours (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/442)
-
+* [household]: display address of current household (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/415)
+* ajoute un ordre dans les localisation (api)
+* [pick entity]: fix translations in modal (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/419)
+* [homepage_widget]: fix translation on emergency badge (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/440)
+* [person]: create person and household added to button dropdown (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/454)
+* display full address in address.text in normalization. Adapt AddressRenderBox
+* [address]: Correction residential address 'depuis le' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/459)
+* [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414)
+* [Thirdparty_contact]: address blurred if confidential in view page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/450)
## Test releases
@@ -28,7 +44,7 @@ and this project adheres to
* [parcours]: validation + message for closing parcours adjusted.
* [household]: household composition double edit button replaced by a delete action (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/426)
[fast_actions] improve fast-actions buttons override mechanism, fix https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/413
-[homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
+[homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
* [person]: Comment on marital status is possible even if marital status is not defined (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/421)
* [parcours]: In the list of person results the requestor is not displayed if defined as anonymous (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/424)
* [bugfix]: modal closes and newly created person/thirdparty is selected when multiple persons/thirdparties are created through the modal (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/429)
@@ -36,7 +52,7 @@ and this project adheres to
* [workflow][notification] improve how notifications and workflows are 'attached' to entities: contextual list, counter, buttons and vue modal
* [AddAddress] disable multiselect search, and rely only on most pertinent Cities and Street computed backend
* [fast_actions] improve fast-actions buttons override mechanism, fix https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/413
-* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
+* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
### test release 2021-01-31
@@ -85,7 +101,7 @@ and this project adheres to
* [popover] add popover html popup mechanism (used by workflow breadcrumb)
* [templates] improve updatedBy macro in item metadatas
* [parcours]: bug fix when comment is pinned all other comments remain in the collection (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/385)
-* [workflow]
+* [workflow]
* add My workflow section with my opened subscriptions
* apply workflow on documents, accompanyingCourseWork and Evaluations
* [wopi-link] a new vue component allow to open wopi link in a fullscreen chill-themed modal
diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon
index bc372e96b..7489d4d80 100644
--- a/phpstan-deprecations.neon
+++ b/phpstan-deprecations.neon
@@ -408,24 +408,6 @@ parameters:
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php
- -
- message:
- """
- #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:
- Use getReachableCircles$#
- """
- count: 1
- path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
- -
- message:
- """
- #^Parameter \\$translator of method Chill\\\\DocStoreBundle\\\\Controller\\\\DocumentPersonController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
- since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
- """
- count: 1
- path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
-
message:
"""
@@ -927,15 +909,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php
- -
- message:
- """
- #^Parameter \\$trans of method Chill\\\\PersonBundle\\\\Controller\\\\AccompanyingCourseWorkController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
- since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
- """
- count: 1
- path: src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
-
-
message:
"""
diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue
index 45483dc95..7ec62d07d 100644
--- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue
+++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue
@@ -19,14 +19,18 @@
-
-
+
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_draft_periods_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_draft_periods_list.html.twig
new file mode 100644
index 000000000..33317d51d
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_draft_periods_list.html.twig
@@ -0,0 +1,32 @@
+{% extends "@ChillMain/layout.html.twig" %}
+
+{% set activeRouteKey = 'chill_person_accompanying_period_user_list' %}
+
+{% block title %}{{ 'My accompanying periods in draft'|trans }}{% endblock title %}
+
+{% macro recordAction(period) %}
+
+
+
+{% endmacro %}
+
+
+{% block content %}
+
+
+
{{ 'My accompanying periods in draft'|trans }}
+
+
+ {% for period in accompanyingPeriods %}
+ {% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {'period': period, 'recordAction': _self.recordAction(period)} %}
+ {% else %}
+
diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkVoter.php
index 039baafaa..750cdd2dd 100644
--- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkVoter.php
+++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkVoter.php
@@ -58,6 +58,11 @@ class AccompanyingPeriodWorkVoter extends Voter
case self::SEE:
return $this->security->isGranted(AccompanyingPeriodVoter::SEE_DETAILS, $subject->getAccompanyingPeriod());
+ case self::CREATE:
+ case self::UPDATE:
+ return $this->security->isGranted(AccompanyingPeriodVoter::EDIT, $subject->getAccompanyingPeriod());
+
+
default:
throw new UnexpectedValueException("attribute {$attribute} is not supported");
}
@@ -66,6 +71,9 @@ class AccompanyingPeriodWorkVoter extends Voter
case self::SEE:
return $this->security->isGranted(AccompanyingPeriodVoter::SEE_DETAILS, $subject);
+ case self::CREATE:
+ return $this->security->isGranted(AccompanyingPeriodVoter::CREATE, $subject);
+
default:
throw new UnexpectedValueException(sprintf(
"attribute {$attribute} is not supported on instance %s",
@@ -79,6 +87,6 @@ class AccompanyingPeriodWorkVoter extends Voter
private function getRoles(): array
{
- return [self::SEE];
+ return [self::SEE, self::CREATE, self::UPDATE];
}
}
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
index 6288663e2..e91748de8 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
@@ -91,6 +91,7 @@ class PersonJsonNormalizer implements
'deathdate',
'center',
'altNames',
+ 'email',
];
$fields = array_filter(
@@ -161,6 +162,11 @@ class PersonJsonNormalizer implements
}
}
+ break;
+
+ case 'email':
+ $person->setEmail($data[$item]);
+
break;
}
}
@@ -189,6 +195,7 @@ class PersonJsonNormalizer implements
'centers' => $this->normalizer->normalize($this->centerResolverManager->resolveCenters($person), $format, $context),
'phonenumber' => $person->getPhonenumber(),
'mobilenumber' => $person->getMobilenumber(),
+ 'email' => $person->getEmail(),
'altNames' => $this->normalizeAltNames($person->getAltNames()),
'gender' => $person->getGender(),
'current_household_address' => $this->normalizer->normalize($person->getCurrentHouseholdAddress(), $format, $context),
diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php
index fc19b6590..02cedaad8 100644
--- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php
+++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php
@@ -241,7 +241,8 @@ class AccompanyingPeriodContext implements
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
{
$doc = new AccompanyingCourseDocument();
- $doc->setTitle($this->translatableStringHelper->localize($template->getName()))
+ $doc->setTemplate($template)
+ ->setTitle($this->translatableStringHelper->localize($template->getName()))
->setDate(new DateTime())
->setDescription($this->translatableStringHelper->localize($template->getName()))
->setCourse($entity)
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php
index 419179077..08034978e 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php
@@ -21,6 +21,7 @@ use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Entity\Person;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
+use RuntimeException;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Request;
use function array_map;
@@ -58,10 +59,16 @@ final class HouseholdApiControllerTest extends WebTestCase
$centerA = $em->getRepository(Center::class)->findOneBy(['name' => 'Center A']);
$nbReference = $em->createQueryBuilder()->select('count(ar)')->from(AddressReference::class, 'ar')
->getQuery()->getSingleScalarResult();
+
+ if (0 === $nbReference) {
+ throw new RuntimeException('any reference found. Add a reference in database to perform this test');
+ }
+
$reference = $em->createQueryBuilder()->select('ar')->from(AddressReference::class, 'ar')
->setFirstResult(random_int(0, $nbReference))
->setMaxResults(1)
->getQuery()->getSingleResult();
+
$p = new Person();
$p->setFirstname('test')->setLastName('test lastname')
->setGender(Person::BOTH_GENDER)
@@ -79,6 +86,7 @@ final class HouseholdApiControllerTest extends WebTestCase
[HouseholdMember::class, $m->getId()],
[User::class, $p->getId()],
[Household::class, $h->getId()],
+ [Person::class, $p->getId()],
];
yield [$reference->getId(), $h->getId()];
diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php
index a459c3c18..6c78d817d 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php
@@ -129,20 +129,27 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
$this->assertNull($period->getPinnedComment());
$period->setPinnedComment($comment);
+
$this->assertSame($period->getPinnedComment(), $comment);
- $this->assertSame($period, $comment->getAccompanyingPeriod());
- $this->assertEquals(0, count($period->getComments()), 'The initial comment should not appears in the list of comments');
+ $this->assertNull($comment->getAccompanyingPeriod());
+ $this->assertEquals(0, count($period->getComments()));
$period->setPinnedComment($replacingComment);
+
$this->assertSame($period->getPinnedComment(), $replacingComment);
- $this->assertSame($period, $replacingComment->getAccompanyingPeriod());
- $this->assertEquals(0, count($period->getComments()), 'The initial comment should not appears in the list of comments');
- $this->assertNull($comment->getAccompanyingPeriod());
+ $this->assertNull($replacingComment->getAccompanyingPeriod());
+ $this->assertSame($period, $comment->getAccompanyingPeriod());
+ $this->assertEquals(1, count($period->getComments()));
+ $this->assertContains($comment, $period->getComments());
$period->setPinnedComment(null);
+
$this->assertNull($period->getPinnedComment());
- $this->assertNull($replacingComment->getAccompanyingPeriod());
- $this->assertEquals(0, count($period->getComments()), 'The initial comment should not appears in the list of comments');
+ $this->assertSame($period, $comment->getAccompanyingPeriod());
+ $this->assertSame($period, $replacingComment->getAccompanyingPeriod());
+ $this->assertEquals(2, count($period->getComments()));
+ $this->assertContains($comment, $period->getComments());
+ $this->assertContains($replacingComment, $period->getComments());
}
public function testRequestor()
diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml
index ecafb367e..aded38b4a 100644
--- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml
+++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml
@@ -98,6 +98,7 @@ household:
from: Depuis
to: Jusqu'au
person history: Ménages
+ As member: En tant que
household_composition:
Since: >-
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
index 91aed0304..2c796c163 100644
--- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
@@ -124,7 +124,7 @@ address_country_code: Code pays
'Alreay existing person': 'Dossiers déjà encodés'
'Add the person': 'Ajouter la personne'
'Add the person and create an accompanying period': "Créer la personne & créer une période d'accompagnement"
-'Add the person and create an household': "Créer la personne & créer un ménage"
+'Add the person and create a household': "Créer la personne & créer un ménage"
Show person: Voir le dossier de la personne
'Confirm the creation': 'Confirmer la création'
'You will create this person': 'Vous allez créer le dossier suivant'
@@ -179,6 +179,7 @@ An accompanying period is open: Une période d'accompagnement est ouverte
Accompanying period list: Périodes d'accompagnement
Accompanying period list for person: Périodes d'accompagnement de la personne
Accompanying period: Parcours d'accompagnement
+Any accompanying period: Aucun parcours d'accompagnement
period: Parcours
New accompanying course: Nouveau parcours d'accompagnement
Choose a motive: Motif de fermeture
@@ -566,3 +567,4 @@ Linked evaluations: Évaluations associées
# Accompanying period per user
My accompanying periods: Mes parcours
+My accompanying periods in draft: Mes parcours brouillons
diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig
index 8d40a8a34..824438fa3 100644
--- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig
+++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig
@@ -115,7 +115,7 @@