diff --git a/CHANGELOG.md b/CHANGELOG.md index cb821031d..15d07a076 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ and this project adheres to * [person] order accompanying period by opening date in search persons, person and household period lists (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/493) - +* [parcours] autosave of the pinned comment for draft accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/477) +* [main] filter user job in undispatch acc period to assign (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/472) * [main] filter user job in undispatch acc period to assign (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/472) * [person] Add url in accompanying period work evaluations entity and form (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/476) * [person] Add document generation in admin and in person/{id}/document (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/464) @@ -32,9 +33,16 @@ and this project adheres to * [confidential] Fix position of toggle button so it does not cover text nor fall outside of box (no issue) * [parcours] Fix edit of both thirdparty and contact name (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/474) * [template] do not list inactive templates (for doc generator) +* [household] bugfix if position of member is null, renderbox no longer throws an error (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/480) * [parcours] location cannot be removed if linked to a user (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/478) * [person] email added to twig personRenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/490) * [person] Add link to current household in person banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/484) +* [address] person badge in address history changed to open OnTheFly with all person info (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/489) +* [person] Change 'personne' with 'usager' and '&' with 'ET' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/499) +* [thirdparty] Add parameter condition to display centers or not (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/500) +* [phonenumber] Remove placeholder in phonenumber field (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/496) +* [contact] add contact button color changed plus the pipe at the side removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/506) +* [blur] Improved positioning of toggle icon (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/486) ## Test releases diff --git a/phpstan-types.neon b/phpstan-types.neon index ed2de3c91..ddde5cc03 100644 --- a/phpstan-types.neon +++ b/phpstan-types.neon @@ -350,11 +350,6 @@ parameters: count: 6 path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 2 - path: src/Bundle/ChillPersonBundle/Entity/PersonPhone.php - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 1 diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php index 9de76e039..b978173d9 100644 --- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php +++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php @@ -192,7 +192,7 @@ class EntityWorkflowStep * You should **not** rely on this method to get all users which are able to * apply a transition on this step. Use @see{EntityWorkflowStep::getAllDestUser} instead. */ - public function getDestUser(): collection + public function getDestUser(): Collection { return $this->destUser; } diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php index 547782943..2580058e8 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php @@ -16,9 +16,7 @@ use libphonenumber\PhoneNumberUtil; use Misd\PhoneNumberBundle\Form\Type\PhoneNumberType; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; -use function array_key_exists; class ChillPhoneNumberType extends AbstractType { @@ -37,21 +35,7 @@ class ChillPhoneNumberType extends AbstractType $resolver ->setDefault('default_region', $this->defaultCarrierCode) ->setDefault('format', PhoneNumberFormat::NATIONAL) - ->setDefault('type', \libphonenumber\PhoneNumberType::FIXED_LINE_OR_MOBILE) - ->setNormalizer('attr', function (Options $options, $value) { - if (array_key_exists('placeholder', $value)) { - return $value; - } - - $examplePhoneNumber = $this->phoneNumberUtil->getExampleNumberForType($this->defaultCarrierCode, $options['type']); - - return array_merge( - $value, - [ - 'placeholder' => PhoneNumberUtil::getInstance()->format($examplePhoneNumber, $options['format']), - ] - ); - }); + ->setDefault('type', \libphonenumber\PhoneNumberType::FIXED_LINE_OR_MOBILE); } public function getParent() diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss index 3a9b6df80..248b32cfc 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss @@ -25,7 +25,7 @@ $chill-theme-buttons: ( "notify": $chill-blue, "search": $gray-300, "unlink": $chill-red, - "tpchild": $chill-pink, + "tpchild": $chill-green, ); @each $button, $color in $chill-theme-buttons { diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.js b/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.js index 67f3e2f42..75f1a21c8 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.js +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.js @@ -1,17 +1,22 @@ /** * Generic api method that can be adapted to any fetch request */ -const makeFetch = (method, url, body) => { - return fetch(url, { +const makeFetch = (method, url, body, options) => { + let opts = { method: method, headers: { 'Content-Type': 'application/json;charset=utf-8' }, body: (body !== null) ? JSON.stringify(body) : null - }) + }; + + if (typeof options !== 'undefined') { + opts = Object.assign(opts, options); + } + + return fetch(url, opts) .then(response => { if (response.ok) { - console.log('200 error') return response.json(); } diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss b/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss index a53ea69d9..9f2ef7bbe 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss @@ -1,37 +1,26 @@ .confidential { display: flex; position: relative; -} -.toggle-far-twig { - i { - bottom: 0px; - right: -30px; - } + margin-right: 20px } -.toggle-close-twig { - i { - bottom: 0px; - right: -5px; - } +.toggle-container { + position: absolute; + width: 100%; + top: 0; + left: 0; + cursor: pointer; + z-index: 5; + padding-right: 1rem; } .toggle{ - margin-left: 30px; - margin-top: 5px; - cursor: pointer; position: absolute; - z-index: 5; - right: -30px -} - -.toggle-far { - bottom: 0px; - right: 20px !important; -} - -.toggle-close { - bottom: 125px; - right: 15px !important; + right: 4px; + &-twig { + position: absolute; + right: -25px; + bottom: 20px; + } } .blur { diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js index 1d66d25e6..3245512e9 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js @@ -2,18 +2,19 @@ require('./blur.scss'); document.querySelectorAll('.confidential').forEach(function (el) { let i = document.createElement('i'); - const classes = ['fa', 'fa-eye', 'toggle']; + const classes = ['fa', 'fa-eye-slash', 'toggle-twig']; i.classList.add(...classes); el.appendChild(i); + const toggleBlur = function(e) { for (let child of el.children) { - if (!child.classList.contains('toggle')) { + if (!child.classList.contains('toggle-twig')) { child.classList.toggle('blur'); } } - i.classList.toggle('fa-eye'); i.classList.toggle('fa-eye-slash'); + i.classList.toggle('fa-eye'); } i.addEventListener('click', toggleBlur); toggleBlur(); -}); +}); \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/api.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/api.js index 1dbc85dee..b1489bfb6 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/api.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/api.js @@ -22,6 +22,7 @@ const fetchCountries = () => { */ const fetchCities = (country) => { //console.log('<<< fetching cities for', country); + // warning: do not use fetchResults (in apiMethods): we need only a **part** of the results in the db const url = `/api/1.0/main/postal-code.json?item_per_page=1000&country=${country.id}`; return fetch(url) .then(response => { diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue index f5a555520..837440524 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue @@ -3,8 +3,8 @@
-
- +
+
@@ -12,28 +12,24 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig index 54a0b86b7..3dfc27d2f 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig @@ -59,7 +59,7 @@ must be shown in such list #} {%- if render == 'list' -%} -
  • +
  • {% if options['with_picto'] %} {% endif %} @@ -68,7 +68,7 @@ {%- endif -%} {%- if render == 'inline' -%} - + {% if options['with_picto'] %} {% endif %} @@ -77,7 +77,7 @@ {%- endif -%} {%- if render == 'bloc' -%} -
    +
    {% if options['has_no_address'] == true and address.isNoAddress == true %} {% if address.postCode is not empty %}
    diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig index 6fb3fe2ff..a62f37e0a 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig @@ -9,6 +9,12 @@ {{ 'Le'|trans ~ ' : ' }} {{ step.previous.transitionAt|format_datetime('short', 'short') }}
  • +
  • + {{ 'workflow.For'|trans ~ ' : ' }} + + {% for d in step.destUser %}{{ d|chill_entity_render_string }}{% if not loop.last %}, {% endif %}{% endfor %} + +
  • {% else %}
  • {{ 'workflow.Created by'|trans ~ ' : ' }} diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php index 78e8729be..ccb48c160 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php @@ -113,6 +113,7 @@ class AddressNormalizer implements ContextAwareNormalizerInterface, NormalizerAw [ 'postcode' => $helper->normalize(self::NULL_POSTCODE_COUNTRY, $format, $context), 'country' => $helper->normalize(self::NULL_POSTCODE_COUNTRY, $format, $context), + 'lines' => [], ] ); } diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index e907f187f..685a0c373 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -413,6 +413,7 @@ workflow: Previous workflow without reaction help: Liste des workflows où vous avez été cité comme pouvant réagir à une étape, mais où un autre utilisateur a exécuté une action avant vous. Previous transitionned: Anciens workflows Previous workflow transitionned help: Workflows où vous avez exécuté une action. + For: Pour Subscribe final: Recevoir une notification à l'étape finale diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index b05da5626..1f85e4ad0 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -15,6 +15,7 @@ use Chill\MainBundle\DependencyInjection\MissingBundleException; use Chill\MainBundle\Security\Authorization\ChillExportVoter; use Chill\PersonBundle\Controller\HouseholdCompositionTypeApiController; use Chill\PersonBundle\Doctrine\DQL\AddressPart; +use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodCommentVoter; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodResourceVoter; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; use Chill\PersonBundle\Security\Authorization\PersonVoter; @@ -415,6 +416,25 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], ], + [ + 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Comment::class, + 'name' => 'accompanying_period_comment', + 'base_path' => '/api/1.0/person/accompanying-period/comment', + 'base_role' => 'ROLE_USER', + 'actions' => [ + '_entity' => [ + 'methods' => [ + Request::METHOD_GET => false, + Request::METHOD_PATCH => true, + Request::METHOD_HEAD => false, + Request::METHOD_DELETE => false, + ], + 'roles' => [ + Request::METHOD_PATCH => AccompanyingPeriodCommentVoter::EDIT, + ], + ], + ], + ], [ 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Resource::class, 'name' => 'accompanying_period_resource', diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index d75ade12b..bd3211c5d 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -257,9 +257,11 @@ class AccompanyingPeriod implements /** * @ORM\ManyToOne( - * targetEntity=Comment::class + * targetEntity=Comment::class, + * cascade={"persist"}, * ) * @Groups({"read"}) + * @ORM\JoinColumn(onDelete="SET NULL") */ private ?Comment $pinnedComment = null; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss index 92542f178..fba0516a7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss @@ -33,6 +33,8 @@ div.banner { padding-top: 1em; padding-bottom: 1em; div.contact { + display: flex; + align-content: center; & > * { margin-right: 1em; } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue index a852d71a0..8ae7dfff4 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue @@ -14,24 +14,27 @@ -
    - {{ $t('comment.created_by', [ - pinnedComment.creator.text, - $d(pinnedComment.createdAt.datetime, 'long') - ]) }} +
    + +
    + +