mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 23:39:52 +00:00
Merge branch 'master' of https://gitlab.com/Chill-Projet/chill-bundles into chill_amli
This commit is contained in:
commit
ad63df85c7
@ -18,3 +18,10 @@ max_line_length = 80
|
|||||||
|
|
||||||
[COMMIT_EDITMSG]
|
[COMMIT_EDITMSG]
|
||||||
max_line_length = 0
|
max_line_length = 0
|
||||||
|
<<<<<<< Updated upstream
|
||||||
|
=======
|
||||||
|
|
||||||
|
[*.{js, vue, ts}]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
>>>>>>> Stashed changes
|
||||||
|
28
CHANGELOG.md
28
CHANGELOG.md
@ -11,6 +11,31 @@ and this project adheres to
|
|||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
<!-- write down unreleased development here -->
|
<!-- write down unreleased development here -->
|
||||||
|
* [workflow]: added pagination to workflow list page
|
||||||
|
* [homepage_widget]: null error on tasks widget fixed
|
||||||
|
* [person-thirdparty]: fix quick-add of names that consist of multiple parts (eg. De Vlieger) within onthefly modal person/thirdparty
|
||||||
|
* [search]: Order of birthdate fields changed in advanced search to avoid confusion.
|
||||||
|
* [workflow]: Constraint added to workflow (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/675)
|
||||||
|
* [action]: Agents traitants should be prefilled with referrer of the parcours or left empty if there is no referrer (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/696)
|
||||||
|
|
||||||
|
## Test releases
|
||||||
|
|
||||||
|
### 2022-05-30
|
||||||
|
|
||||||
|
* fix creating a new AccompanyingPeriodWorkEvaluationDocument when replacing the document (the workflow was lost)
|
||||||
|
|
||||||
|
### 2022-05-27
|
||||||
|
|
||||||
|
* [storedobject] add title field on StoredObject entity + use it in activity documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/604)
|
||||||
|
* [main] add a "read more..." on comment embeddable when overflown (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/604)
|
||||||
|
* [person] add closing motive to closed acc course (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/603)
|
||||||
|
* [person] household filiation: fetch person info when unfolding person (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/586)
|
||||||
|
* [admin] repair edit of social action in the admin (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/601)
|
||||||
|
* [admin]: add select2 to Goal form type entity fields (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/702)
|
||||||
|
* [main] allow hide permissions group list menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
||||||
|
* [main] allow hide change user password menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
||||||
|
* [main] filter user jobs by active jobs (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
||||||
|
* [main] add civility to User (entity, migration and form type) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
||||||
* [admin] refactorisation of the admin section: reorganisation of the menu, translations, form types, new entities (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/592)
|
* [admin] refactorisation of the admin section: reorganisation of the menu, translations, form types, new entities (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/592)
|
||||||
* [admin] add admin section for languages and countries (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/596)
|
* [admin] add admin section for languages and countries (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/596)
|
||||||
* [activity] activity admin: translations + remove label field for comment on admin activity type (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/587)
|
* [activity] activity admin: translations + remove label field for comment on admin activity type (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/587)
|
||||||
@ -18,8 +43,6 @@ and this project adheres to
|
|||||||
* [address] can add extra address info even if noAddress (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/576)
|
* [address] can add extra address info even if noAddress (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/576)
|
||||||
|
|
||||||
|
|
||||||
## Test releases
|
|
||||||
|
|
||||||
### 2022-05-06
|
### 2022-05-06
|
||||||
|
|
||||||
* [person] add civility when creating a person (with the on-the-fly component or in the php form) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/557)
|
* [person] add civility when creating a person (with the on-the-fly component or in the php form) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/557)
|
||||||
@ -32,6 +55,7 @@ and this project adheres to
|
|||||||
* [person] add maritalStatusComment to PersonDocGenNormalizer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/582)
|
* [person] add maritalStatusComment to PersonDocGenNormalizer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/582)
|
||||||
* Load relationships without gender in french fixtures
|
* Load relationships without gender in french fixtures
|
||||||
* Add command to remove old draft accompanying periods
|
* Add command to remove old draft accompanying periods
|
||||||
|
* [parcours]: If users assings him/herself as referrer and job is not null. Update parcours job (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/578)
|
||||||
|
|
||||||
### 2021-04-28
|
### 2021-04-28
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": "^7.4",
|
"php": "^7.4",
|
||||||
"champs-libres/async-uploader-bundle": "dev-sf4#d57134aee8e504a83c902ff0cf9f8d36ac418290",
|
"champs-libres/async-uploader-bundle": "dev-sf4#d57134aee8e504a83c902ff0cf9f8d36ac418290",
|
||||||
"champs-libres/wopi-bundle": "dev-master#59b468503b9413f8d588ef9e626e7675560db3d8",
|
"champs-libres/wopi-bundle": "dev-master#6dd8e0a14e00131eb4b889ecc30270ee4a0e5224",
|
||||||
"champs-libres/wopi-lib": "dev-master#0e1da19bb6de820080b8651867a7e475be590060",
|
"champs-libres/wopi-lib": "dev-master#8615f4a45a39fc2b6a98765ea835fcfd39618787",
|
||||||
"doctrine/doctrine-bundle": "^2.1",
|
"doctrine/doctrine-bundle": "^2.1",
|
||||||
"doctrine/doctrine-migrations-bundle": "^3.0",
|
"doctrine/doctrine-migrations-bundle": "^3.0",
|
||||||
"doctrine/orm": "^2.7",
|
"doctrine/orm": "^2.7",
|
||||||
@ -45,6 +45,7 @@
|
|||||||
"symfony/translation": "^4.4",
|
"symfony/translation": "^4.4",
|
||||||
"symfony/twig-bundle": "^4.4",
|
"symfony/twig-bundle": "^4.4",
|
||||||
"symfony/validator": "^4.4",
|
"symfony/validator": "^4.4",
|
||||||
|
"symfony/web-link": "*",
|
||||||
"symfony/webpack-encore-bundle": "^1.11",
|
"symfony/webpack-encore-bundle": "^1.11",
|
||||||
"symfony/workflow": "^4.4",
|
"symfony/workflow": "^4.4",
|
||||||
"symfony/yaml": "^4.4",
|
"symfony/yaml": "^4.4",
|
||||||
|
@ -471,11 +471,6 @@ parameters:
|
|||||||
count: 1
|
count: 1
|
||||||
path: src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php
|
path: src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: src/Bundle/ChillMainBundle/Form/UserType.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||||
count: 2
|
count: 2
|
||||||
|
@ -15,6 +15,7 @@ use Chill\ActivityBundle\Validator\Constraints as ActivityValidator;
|
|||||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||||
use Chill\MainBundle\Entity\Center;
|
use Chill\MainBundle\Entity\Center;
|
||||||
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
|
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
|
||||||
|
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
|
||||||
use Chill\MainBundle\Entity\HasCenterInterface;
|
use Chill\MainBundle\Entity\HasCenterInterface;
|
||||||
use Chill\MainBundle\Entity\HasScopeInterface;
|
use Chill\MainBundle\Entity\HasScopeInterface;
|
||||||
use Chill\MainBundle\Entity\Location;
|
use Chill\MainBundle\Entity\Location;
|
||||||
@ -134,6 +135,11 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
|||||||
*/
|
*/
|
||||||
private ?Collection $persons = null;
|
private ?Collection $persons = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable", columnPrefix="privateComment_")
|
||||||
|
*/
|
||||||
|
private PrivateCommentEmbeddable $privateComment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToMany(targetEntity="Chill\ActivityBundle\Entity\ActivityReason")
|
* @ORM\ManyToMany(targetEntity="Chill\ActivityBundle\Entity\ActivityReason")
|
||||||
* @Groups({"docgen:read"})
|
* @Groups({"docgen:read"})
|
||||||
@ -193,6 +199,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
|||||||
{
|
{
|
||||||
$this->reasons = new ArrayCollection();
|
$this->reasons = new ArrayCollection();
|
||||||
$this->comment = new CommentEmbeddable();
|
$this->comment = new CommentEmbeddable();
|
||||||
|
$this->privateComment = new PrivateCommentEmbeddable();
|
||||||
$this->persons = new ArrayCollection();
|
$this->persons = new ArrayCollection();
|
||||||
$this->thirdParties = new ArrayCollection();
|
$this->thirdParties = new ArrayCollection();
|
||||||
$this->documents = new ArrayCollection();
|
$this->documents = new ArrayCollection();
|
||||||
@ -400,6 +407,11 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPrivateComment(): PrivateCommentEmbeddable
|
||||||
|
{
|
||||||
|
return $this->privateComment;
|
||||||
|
}
|
||||||
|
|
||||||
public function getReasons(): Collection
|
public function getReasons(): Collection
|
||||||
{
|
{
|
||||||
return $this->reasons;
|
return $this->reasons;
|
||||||
@ -586,6 +598,13 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setPrivateComment(PrivateCommentEmbeddable $privateComment): self
|
||||||
|
{
|
||||||
|
$this->privateComment = $privateComment;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setReasons(?ArrayCollection $reasons): self
|
public function setReasons(?ArrayCollection $reasons): self
|
||||||
{
|
{
|
||||||
$this->reasons = $reasons;
|
$this->reasons = $reasons;
|
||||||
|
@ -167,6 +167,16 @@ class ActivityType
|
|||||||
*/
|
*/
|
||||||
private int $personVisible = self::FIELD_REQUIRED;
|
private int $personVisible = self::FIELD_REQUIRED;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||||
|
*/
|
||||||
|
private string $privateCommentLabel = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||||
|
*/
|
||||||
|
private int $privateCommentVisible = self::FIELD_OPTIONAL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||||
*/
|
*/
|
||||||
@ -416,6 +426,16 @@ class ActivityType
|
|||||||
return $this->personVisible;
|
return $this->personVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPrivateCommentLabel(): string
|
||||||
|
{
|
||||||
|
return $this->privateCommentLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPrivateCommentVisible(): int
|
||||||
|
{
|
||||||
|
return $this->privateCommentVisible;
|
||||||
|
}
|
||||||
|
|
||||||
public function getReasonsLabel(): string
|
public function getReasonsLabel(): string
|
||||||
{
|
{
|
||||||
return $this->reasonsLabel;
|
return $this->reasonsLabel;
|
||||||
@ -688,6 +708,20 @@ class ActivityType
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setPrivateCommentLabel(string $privateCommentLabel): self
|
||||||
|
{
|
||||||
|
$this->privateCommentLabel = $privateCommentLabel;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPrivateCommentVisible(int $privateCommentVisible): self
|
||||||
|
{
|
||||||
|
$this->privateCommentVisible = $privateCommentVisible;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setReasonsLabel(string $reasonsLabel): self
|
public function setReasonsLabel(string $reasonsLabel): self
|
||||||
{
|
{
|
||||||
$this->reasonsLabel = $reasonsLabel;
|
$this->reasonsLabel = $reasonsLabel;
|
||||||
|
@ -20,6 +20,7 @@ use Chill\MainBundle\Entity\User;
|
|||||||
use Chill\MainBundle\Form\Type\ChillCollectionType;
|
use Chill\MainBundle\Form\Type\ChillCollectionType;
|
||||||
use Chill\MainBundle\Form\Type\ChillDateType;
|
use Chill\MainBundle\Form\Type\ChillDateType;
|
||||||
use Chill\MainBundle\Form\Type\CommentType;
|
use Chill\MainBundle\Form\Type\CommentType;
|
||||||
|
use Chill\MainBundle\Form\Type\PrivateCommentType;
|
||||||
use Chill\MainBundle\Form\Type\ScopePickerType;
|
use Chill\MainBundle\Form\Type\ScopePickerType;
|
||||||
use Chill\MainBundle\Form\Type\UserPickerType;
|
use Chill\MainBundle\Form\Type\UserPickerType;
|
||||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||||
@ -251,6 +252,13 @@ class ActivityType extends AbstractType
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($activityType->isVisible('privateComment')) {
|
||||||
|
$builder->add('privateComment', PrivateCommentType::class, [
|
||||||
|
'label' => '' === $activityType->getLabel('privateComment') ? 'private comment' : $activityType->getPrivateCommentLabel(),
|
||||||
|
'required' => false,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($activityType->isVisible('persons')) {
|
if ($activityType->isVisible('persons')) {
|
||||||
$builder->add('persons', HiddenType::class);
|
$builder->add('persons', HiddenType::class);
|
||||||
$builder->get('persons')
|
$builder->get('persons')
|
||||||
@ -313,6 +321,7 @@ class ActivityType extends AbstractType
|
|||||||
'button_add_label' => 'activity.Insert a document',
|
'button_add_label' => 'activity.Insert a document',
|
||||||
'button_remove_label' => 'activity.Remove a document',
|
'button_remove_label' => 'activity.Remove a document',
|
||||||
'empty_collection_explain' => 'No documents',
|
'empty_collection_explain' => 'No documents',
|
||||||
|
'entry_options' => ['has_title' => true],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class ActivityTypeType extends AbstractType
|
|||||||
$fields = [
|
$fields = [
|
||||||
'persons', 'user', 'date', 'location', 'persons',
|
'persons', 'user', 'date', 'location', 'persons',
|
||||||
'thirdParties', 'durationTime', 'travelTime', 'attendee',
|
'thirdParties', 'durationTime', 'travelTime', 'attendee',
|
||||||
'reasons', 'sentReceived', 'documents',
|
'reasons', 'comment', 'privateComment', 'sentReceived', 'documents',
|
||||||
'emergency', 'socialIssues', 'socialActions', 'users',
|
'emergency', 'socialIssues', 'socialActions', 'users',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -83,6 +83,10 @@
|
|||||||
{{ form_row(edit_form.comment) }}
|
{{ form_row(edit_form.comment) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if edit_form.privateComment is defined -%}
|
||||||
|
{{ form_row(edit_form.privateComment) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{%- if edit_form.attendee is defined -%}
|
{%- if edit_form.attendee is defined -%}
|
||||||
{{ form_row(edit_form.attendee) }}
|
{{ form_row(edit_form.attendee) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -2,12 +2,30 @@
|
|||||||
{% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %}
|
{% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %}
|
||||||
{% if no_action is not defined or no_action == false %}
|
{% if no_action is not defined or no_action == false %}
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_main_notification_create', {
|
{% set showGroup = activity.accompanyingPeriod is not null and activity.accompanyingPeriod.hasUser and activity.accompanyingPeriod.user is not same as(app.user) %}
|
||||||
'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity',
|
<div class="{% if showGroup %}btn-group{% endif %}" {% if showGroup %}role="group"{% endif %}>
|
||||||
'entityId': activity.id
|
{% if showGroup %}
|
||||||
}) }}">
|
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
<i class="fa fa-paper-plane fa-fw"></i>
|
{{ 'notification.Notify'|trans }}
|
||||||
{{ 'notification.Notify'|trans }}</a>
|
</button>
|
||||||
|
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': activity.id, 'tos': [activity.accompanyingPeriod.user.id]}) }}">
|
||||||
|
{{ 'notification.Notify referrer'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': activity.id}) }}">
|
||||||
|
{{ 'notification.Notify any'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': activity.id}) }}">
|
||||||
|
{{ 'notification.Notify'|trans }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
|
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
|
||||||
|
@ -81,10 +81,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{%- if form.comment is defined -%}
|
{%- if form.comment is defined -%}
|
||||||
{# TODO .. public and private #}
|
|
||||||
{{ form_row(form.comment) }}
|
{{ form_row(form.comment) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if form.privateComment is defined -%}
|
||||||
|
{{ form_row(form.privateComment) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{%- if form.attendee is defined -%}
|
{%- if form.attendee is defined -%}
|
||||||
{{ form_row(form.attendee) }}
|
{{ form_row(form.attendee) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{%- set t = entity.type -%}
|
{%- set t = entity.type -%}
|
||||||
|
{% set userId = app.user.id %}
|
||||||
{%- import "@ChillDocStore/Macro/macro.html.twig" as m -%}
|
{%- import "@ChillDocStore/Macro/macro.html.twig" as m -%}
|
||||||
|
|
||||||
<h1>{{ "Activity"|trans }}</h1>
|
<h1>{{ "Activity"|trans }}</h1>
|
||||||
@ -146,13 +147,28 @@
|
|||||||
</dd>
|
</dd>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if t.privateCommentVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) and entity.privateComment.hasCommentForUser(app.user) %}
|
||||||
|
{% if t.privateCommentLabel is not empty %}
|
||||||
|
<dt class="inline">{{ t.privateCommentLabel }}</dt>
|
||||||
|
{% else %}
|
||||||
|
<dt class="inline">{{ 'Private comment'|trans }}</dt>
|
||||||
|
{% endif %}
|
||||||
|
<dd>
|
||||||
|
<section class="chill-entity entity-comment-embeddable">
|
||||||
|
<blockquote class="chill-user-quote private-quote">
|
||||||
|
{{ entity.privateComment.comments[userId] }}
|
||||||
|
</blockquote>
|
||||||
|
</section>
|
||||||
|
</dd>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if t.documentsVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
|
{% if t.documentsVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
|
||||||
<dt class="inline">{{ 'Documents'|trans }}</dt>
|
<dt class="inline">{{ 'Documents'|trans }}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{% if entity.documents|length > 0 %}
|
{% if entity.documents|length > 0 %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for d in entity.documents %}
|
{% for d in entity.documents %}
|
||||||
<li>{{ m.download_button(d) }}</li>
|
<li>{{ d.title }}{{ m.download_button(d) }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -201,9 +217,30 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
|
{% set showGroup = entity.accompanyingPeriod is not null and entity.accompanyingPeriod.hasUser and entity.accompanyingPeriod.user is not same as(app.user) %}
|
||||||
{{ 'notification.Notify'|trans }}
|
<div class="{% if showGroup %}btn-group{% endif %}" {% if showGroup %}role="group"{% endif %}>
|
||||||
</a>
|
{% if showGroup %}
|
||||||
|
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
|
{{ 'notification.Notify'|trans }}
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id, 'tos': [entity.accompanyingPeriod.user.id]}) }}">
|
||||||
|
{{ 'notification.Notify referrer'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
|
||||||
|
{{ 'notification.Notify any'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
|
||||||
|
{{ 'notification.Notify'|trans }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}
|
{% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}
|
||||||
<li>
|
<li>
|
||||||
|
@ -209,6 +209,7 @@ class ActivityContext implements
|
|||||||
*/
|
*/
|
||||||
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
|
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
|
||||||
{
|
{
|
||||||
|
$storedObject->setTitle($this->translatableStringHelper->localize($template->getName()));
|
||||||
$entity->addDocument($storedObject);
|
$entity->addDocument($storedObject);
|
||||||
|
|
||||||
$this->em->persist($storedObject);
|
$this->em->persist($storedObject);
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\Migrations\Activity;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
final class Version20220425133027 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE activitytype DROP privateCommentLabel');
|
||||||
|
$this->addSql('ALTER TABLE activitytype DROP privateCommentVisible');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'add private comment option to activity types';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE activitytype ADD privateCommentLabel VARCHAR(255) DEFAULT \'\' NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE activitytype ADD privateCommentVisible SMALLINT DEFAULT 1 NOT NULL');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\Migrations\Activity;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
final class Version20220527124438 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE chill_person_accompanying_period_work DROP privateComment_comments');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'add private comment to activity';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE activity ADD privateComment_comments JSON DEFAULT \'{}\'');
|
||||||
|
}
|
||||||
|
}
|
@ -44,6 +44,7 @@ Received: Recevoir
|
|||||||
by: 'Par '
|
by: 'Par '
|
||||||
location: Lieu
|
location: Lieu
|
||||||
Reasons: Sujets
|
Reasons: Sujets
|
||||||
|
Private comment: Commentaire privé
|
||||||
|
|
||||||
|
|
||||||
#forms
|
#forms
|
||||||
@ -175,6 +176,8 @@ Reasons visible: Visibilité du champ Sujet
|
|||||||
Reasons label: Libellé du champ Sujet
|
Reasons label: Libellé du champ Sujet
|
||||||
Comment visible: Visibilité du champ Commentaire
|
Comment visible: Visibilité du champ Commentaire
|
||||||
Comment label: Libellé du champ Commentaire
|
Comment label: Libellé du champ Commentaire
|
||||||
|
Private comment visible: Visibilité du champ Commentaire Privé
|
||||||
|
Private comment label: Libellé du champ Commentaire Privé
|
||||||
Emergency visible: Visibilité du champ Urgent
|
Emergency visible: Visibilité du champ Urgent
|
||||||
Emergency label: Libellé du champ Urgent
|
Emergency label: Libellé du champ Urgent
|
||||||
Accompanying period visible: Visibilité du champ Période d'accompagnement
|
Accompanying period visible: Visibilité du champ Période d'accompagnement
|
||||||
|
234
src/Bundle/ChillActivityBundle/translations/messages.nl.yaml
Normal file
234
src/Bundle/ChillActivityBundle/translations/messages.nl.yaml
Normal file
@ -0,0 +1,234 @@
|
|||||||
|
#general
|
||||||
|
Show the activity: Toon activiteit
|
||||||
|
Edit the activity: Wijzig activiteit
|
||||||
|
Activity: Activiteit
|
||||||
|
Duration time: Duur
|
||||||
|
Duration Time: Duur
|
||||||
|
durationTime: duur
|
||||||
|
Travel time: Duur van verplaatsing
|
||||||
|
Attendee: Aanwezigheden
|
||||||
|
attendee: aanwezigheden
|
||||||
|
list_reasons: Onderwerpen
|
||||||
|
user_username: gebruikersnaam
|
||||||
|
circle_name: naam kring
|
||||||
|
Remark: Opmerking
|
||||||
|
No comments: Geen opmerkingen
|
||||||
|
Add a new activity: Voeg een nieuwe activiteit toe
|
||||||
|
Activity list: Lijst van activiteiten
|
||||||
|
present: aanwezig
|
||||||
|
not present: afwezig
|
||||||
|
Delete: Verwijderen
|
||||||
|
Update: Bijwerken
|
||||||
|
Update activity: Activieit bijwerken
|
||||||
|
Scope: Werkingsgebied
|
||||||
|
Activity data: Gegevens activiteit
|
||||||
|
Activity location: Locatie activiteit
|
||||||
|
No reason associated: Geen onderwerp
|
||||||
|
No social issues associated: Geen sociaal vraagstuk
|
||||||
|
No social actions associated: Geen maatschappelijke actie
|
||||||
|
There isn't any activities.: Er zijn geen activiteiten
|
||||||
|
type_name: Soort activiteit
|
||||||
|
person_firstname: voornaam
|
||||||
|
person_lastname: familienaam
|
||||||
|
person_id: Identificatienummer persoon
|
||||||
|
Type: Soort
|
||||||
|
Invisible: Onzichtbaar
|
||||||
|
Optional: Optioneel
|
||||||
|
Required: Verplicht
|
||||||
|
Persons: Personen
|
||||||
|
Users: Gebruikers
|
||||||
|
Emergency: Dringend
|
||||||
|
Sent received: Inkomend / Uitgaand
|
||||||
|
Sent: Verzenden
|
||||||
|
Received: Ontvangen
|
||||||
|
by: 'Door '
|
||||||
|
location: Plaats
|
||||||
|
Reasons: Onderwerpen
|
||||||
|
|
||||||
|
|
||||||
|
#forms
|
||||||
|
Activity creation: Nouvelle activité
|
||||||
|
Create: Créer
|
||||||
|
Back to the list: Retour à la liste
|
||||||
|
Save activity: Sauver l'activité
|
||||||
|
Reset form: Remise à zéro du formulaire
|
||||||
|
Choose the duration: Choisir la durée
|
||||||
|
Choose a type: Choisir un type
|
||||||
|
5 minutes: 5 minutes
|
||||||
|
10 minutes: 10 minutes
|
||||||
|
15 minutes: 15 minutes
|
||||||
|
20 minutes: 20 minutes
|
||||||
|
25 minutes: 25 minutes
|
||||||
|
30 minutes: 30 minutes
|
||||||
|
45 minutes: 45 minutes
|
||||||
|
1 hour: 1 heure
|
||||||
|
1 hour 15: 1 heure 15
|
||||||
|
1 hour 30: 1 heure 30
|
||||||
|
1 hour 45: 1 heure 45
|
||||||
|
2 hours: 2 heures
|
||||||
|
Concerned groups: Parties concernées
|
||||||
|
Persons in accompanying course: Usagers du parcours
|
||||||
|
Third persons: Tiers non-pro.
|
||||||
|
Others persons: Usagers
|
||||||
|
Third parties: Tiers professionnels
|
||||||
|
Users concerned: T(M)S
|
||||||
|
activity:
|
||||||
|
Insert a document: Insérer un document
|
||||||
|
Remove a document: Supprimer le document
|
||||||
|
comment: Commentaire
|
||||||
|
No documents: Aucun document
|
||||||
|
|
||||||
|
#timeline
|
||||||
|
'%user% has done an %activity_type%': '%user% a effectué une activité de type "%activity_type%"'
|
||||||
|
|
||||||
|
#controller
|
||||||
|
'Success : activity created!': L'activité a été créée.
|
||||||
|
'The form is not valid. The activity has not been created !': Le formulaire est invalide. L'activité n'a pas été créée.
|
||||||
|
'Success : activity updated!': L'activité a été mise à jour.
|
||||||
|
'The form is not valid. The activity has not been updated !': Le formulaire est invalide. L'activité n'a pas été mise à jour.
|
||||||
|
|
||||||
|
# ROLES
|
||||||
|
CHILL_ACTIVITY_CREATE: Créer une activité
|
||||||
|
CHILL_ACTIVITY_UPDATE: Modifier une activité
|
||||||
|
CHILL_ACTIVITY_SEE: Voir une activité
|
||||||
|
CHILL_ACTIVITY_SEE_DETAILS: Voir le détail des activités
|
||||||
|
CHILL_ACTIVITY_DELETE: Supprimer une activité
|
||||||
|
CHILL_ACTIVITY_STATS: Statistique des activités
|
||||||
|
CHILL_ACTIVITY_LIST: Liste des activités
|
||||||
|
|
||||||
|
# admin
|
||||||
|
Activities: Activités
|
||||||
|
Activity configuration: Configuration des activités
|
||||||
|
Activity configuration menu: Configuration des activités
|
||||||
|
Activity types: Types d'activité
|
||||||
|
Activity type configuration: Configuration des categories d'activités
|
||||||
|
Activity Reasons: Sujets d'une activité
|
||||||
|
Activity Reasons Category: Catégories de sujet d'activités
|
||||||
|
Activity Types Categories: Catégories des types d'activité
|
||||||
|
Activity Presences: Presences des activités
|
||||||
|
|
||||||
|
|
||||||
|
# Crud
|
||||||
|
crud:
|
||||||
|
activity_type:
|
||||||
|
title_new: Nouveau type d'activité
|
||||||
|
title_edit: Edition d'un type d'activité
|
||||||
|
activity_type_category:
|
||||||
|
title_new: Nouvelle catégorie de type d'activité
|
||||||
|
title_edit: Edition d'une catégorie de type d'activité
|
||||||
|
|
||||||
|
# activity reason admin
|
||||||
|
ActivityReason list: Liste des sujets
|
||||||
|
Create a new activity reason: Créer un nouveau sujet
|
||||||
|
Active: Actif
|
||||||
|
Category: Catégorie
|
||||||
|
ActivityReason creation: Nouveau sujet
|
||||||
|
ActivityReason edit: Modification d'un sujet
|
||||||
|
ActivityReason: Sujet d'activité
|
||||||
|
The entity is inactive and won't be proposed: Le sujet est inactif et ne sera pas proposé
|
||||||
|
The entity is active and will be proposed: Le sujet est actif et sera proposé
|
||||||
|
|
||||||
|
#activity reason category admin
|
||||||
|
ActivityReasonCategory list: Catégories de sujets
|
||||||
|
Create a new activity category reason: Créer une nouvelle catégorie
|
||||||
|
ActivityReasonCategory creation: Nouvelle catégorie de sujet
|
||||||
|
ActivityReasonCategory edit: Modification d'une catégorie de sujet
|
||||||
|
ActivityReasonCategory: Catégorie de sujet d'activité
|
||||||
|
ActivityReasonCategory is active and will be proposed: La catégorie est active et sera proposée
|
||||||
|
ActivityReasonCategory is inactive and won't be proposed: La catégorie est inactive et ne sera pas proposée
|
||||||
|
|
||||||
|
# activity type type admin
|
||||||
|
ActivityType list: Types d'activités
|
||||||
|
Create a new activity type: Créer un nouveau type d'activité
|
||||||
|
Persons visible: Visibilité du champ Personnes
|
||||||
|
Persons label: Libellé du champ Personnes
|
||||||
|
User visible: Visibilité du champ Utilisateur
|
||||||
|
User label: Libellé du champ Utilisateur
|
||||||
|
Date visible: Visibilité du champ Date
|
||||||
|
Date label: Libellé du champ Date
|
||||||
|
Location visible: Visibilité du champ Lieu
|
||||||
|
Location label: Libellé du champ Lieu
|
||||||
|
Third parties visible: Visibilité du champ Tiers
|
||||||
|
Third parties label: Libellé du champ Tiers
|
||||||
|
Duration time visible: Visibilité du champ Durée
|
||||||
|
Duration time label: Libellé du champ Durée
|
||||||
|
Travel time visible: Visibilité du champ Durée de déplacement
|
||||||
|
Travel time label: Libellé du champ Durée de déplacement
|
||||||
|
Attendee visible: Visibilité du champ Présence de l'usager
|
||||||
|
Attendee label: Libellé du champ Présence de l'usager
|
||||||
|
Reasons visible: Visibilité du champ Sujet
|
||||||
|
Reasons label: Libellé du champ Sujet
|
||||||
|
Comment visible: Visibilité du champ Commentaire
|
||||||
|
Comment label: Libellé du champ Commentaire
|
||||||
|
Emergency visible: Visibilité du champ Urgent
|
||||||
|
Emergency label: Libellé du champ Urgent
|
||||||
|
Accompanying period visible: Visibilité du champ Période d'accompagnement
|
||||||
|
Accompanying period label: Libellé du champ Période d'accompagnement
|
||||||
|
Social issues visible: Visibilité du champ Problématiques sociales
|
||||||
|
Social issues label: Libellé du champ Problématiques sociales
|
||||||
|
Social actions visible: Visibilité du champ Action sociale
|
||||||
|
Social actions label: Libellé du champ Action sociale
|
||||||
|
Users visible: Visibilité du champ Utilisateurs
|
||||||
|
Users label: Libellé du champ Utilisateurs
|
||||||
|
Sent received visible: Visibilité du champ Entrant / Sortant
|
||||||
|
Sent received label: Libellé du champ Entrant / Sortant
|
||||||
|
Documents visible: Visibilité du champ Documents
|
||||||
|
Documents label: Libellé du champ Documents
|
||||||
|
|
||||||
|
# activity type category admin
|
||||||
|
ActivityTypeCategory list: Liste des catégories des types d'activité
|
||||||
|
Create a new activity type category: Créer une nouvelle catégorie de type d'activité
|
||||||
|
|
||||||
|
# activity delete
|
||||||
|
Remove activity: Supprimer une activité
|
||||||
|
Are you sure you want to remove the activity about "%name%" ?: Êtes-vous sûr de vouloir supprimer une activité qui concerne "%name%" ?
|
||||||
|
The activity has been successfully removed.: L'activité a été supprimée.
|
||||||
|
|
||||||
|
# exports
|
||||||
|
Count activities: Nombre d'activités
|
||||||
|
Count activities by various parameters.: Compte le nombre d'activités enregistrées en fonction de différents paramètres.
|
||||||
|
Sum activity duration: Total de la durée des activités
|
||||||
|
Sum activities duration by various parameters.: Additionne la durée des activités en fonction de différents paramètres.
|
||||||
|
List activities: Liste les activités
|
||||||
|
Number of activities: Nombre d'activités
|
||||||
|
|
||||||
|
#filters
|
||||||
|
Filter by reason: Filtrer par sujet d'activité
|
||||||
|
'Filtered by reasons: only %list%': 'Filtré par sujet: seulement %list%'
|
||||||
|
'Filtered by activity type: only %list%': "Filtré par type d'activity: seulement %list%"
|
||||||
|
Filtered by date activity: Filtrer par date d'activité
|
||||||
|
Activities after this date: Activités après cette date
|
||||||
|
Activities before this date: Activités avant cette date
|
||||||
|
"Filtered by date of activity: only between %date_from% and %date_to%": "Filtré par date de l'activité: uniquement entre %date_from% et %date_to%"
|
||||||
|
This date should be after the date given in "Implied in an activity after this date" field: Cette date devrait être postérieure à la date donnée dans le champ "activités après cette date"
|
||||||
|
|
||||||
|
Filtered by person having an activity in a period: Uniquement les personnes ayant eu une activité dans la période donnée
|
||||||
|
Implied in an activity after this date: Impliqué dans une activité après cette date
|
||||||
|
Implied in an activity before this date: Impliqué dans une activité avant cette date
|
||||||
|
Filtered by person having an activity between %date_from% and %date_to% with reasons %reasons_name%: Filtré par personnes associées à une activité entre %date_from% et %date_to% avec les sujets %reasons_name%
|
||||||
|
Activity reasons for those activities: Sujets de ces activités
|
||||||
|
|
||||||
|
Filter by activity type: Filtrer par type d'activité
|
||||||
|
|
||||||
|
#aggregators
|
||||||
|
Activity type: Type d'activité
|
||||||
|
Activity user: Utilisateur lié à l'activity
|
||||||
|
By reason: Par sujet
|
||||||
|
By category of reason: Par catégorie de sujet
|
||||||
|
Reason's level: Niveau du sujet
|
||||||
|
Group by reasons: Sujet d'activité
|
||||||
|
Aggregate by activity user: Aggréger par utilisateur lié à l'activité
|
||||||
|
Aggregate by activity type: Aggréger par type d'activité
|
||||||
|
Aggregate by activity reason: Aggréger par sujet de l'activité
|
||||||
|
|
||||||
|
Last activities: Les dernières activités
|
||||||
|
|
||||||
|
See activity in accompanying course context: Voir l'activité dans le contexte du parcours d'accompagnement
|
||||||
|
|
||||||
|
You get notified of an activity which does not exists any more: Cette notification ne correspond pas à une activité valide.
|
||||||
|
you are not allowed to see it details: La notification fait référence à une activité à laquelle vous n'avez pas accès.
|
||||||
|
This is the minimal activity data: Activité n°
|
||||||
|
|
||||||
|
docgen:
|
||||||
|
Activity basic: Echange
|
||||||
|
A basic context for activity: Contexte pour les échanges
|
@ -0,0 +1,23 @@
|
|||||||
|
The reasons's level should not be empty: Het onderwerp niveau mag niet leeg zijn.
|
||||||
|
At least one reason must be choosen: Kies minstens één onderwerp
|
||||||
|
For this type of activity, you must add at least one person: Voor dit soort activiteit dient u minstens één persoon toe te voegen.
|
||||||
|
For this type of activity, you must add at least one user: Voor dit soort activiteit dient u minstens één gebruiker toe te voegen.
|
||||||
|
For this type of activity, you must add at least one third party: Voor dit soort activiteit dient u minstens één externe partner toe te voegen.
|
||||||
|
For this type of activity, user is required: Voor dit soort activiteit, dient u een gebruiker in te vullen.
|
||||||
|
For this type of activity, date is required: Voor dit soort activiteit, dient u een datum in te vullen.
|
||||||
|
For this type of activity, location is required: Voor dit soort activiteit, dient u een locatie in te vullen.
|
||||||
|
For this type of activity, attendee is required: Voor dit soort activiteit, dient u minstend één 'aanwezige persoon' in te vullen.
|
||||||
|
For this type of activity, duration time is required: Voor dit soort activiteit, dient u een duur in te vullen.
|
||||||
|
For this type of activity, travel time is required: Voor dit soort activiteit, dient u een verplaatsingsduur in te vullen.
|
||||||
|
For this type of activity, reasons is required: Voor dit soort activiteit, dient u een onderwerp in te vullen.
|
||||||
|
For this type of activity, comment is required: Voor dit soort activiteit, dient u een opmerking in te vullen.
|
||||||
|
For this type of activity, sent/received is required: Voor dit soort activiteit, dient u het veld 'inkomend/uitgaand' in te vullen.
|
||||||
|
For this type of activity, document is required: Voor dit soort activiteit, dient u een document toe te voegen.
|
||||||
|
For this type of activity, emergency is required: Voor dit soort activiteit, is het veld 'dringend' verplicht.
|
||||||
|
For this type of activity, accompanying period is required: Voor dit soort activiteit, dient u een begeleidingstraject in te vullen.
|
||||||
|
For this type of activity, you must add at least one social issue: Voor dit soort activiteit, dient u een sociaal vraagstuk aan te duiden.
|
||||||
|
For this type of activity, you must add at least one social action: Voor dit soort activiteit, dient u een maatschappelijke actie toe te voegen.
|
||||||
|
|
||||||
|
# admin
|
||||||
|
This parameter must be equal to social issue parameter: Deze parameter moet gelijk zijn aan de parameter "zichtbaarheid veld sociaal vraagstuk".
|
||||||
|
The socialActionsVisible value is not compatible with the socialIssuesVisible value: De waarde van de parameter "zichtbaarheid veld maatschappelijke actie" is niet compatibel met de waarde van de parameter "zichtbaarheid veld sociaal vraagstuk".
|
@ -0,0 +1,167 @@
|
|||||||
|
#general
|
||||||
|
Show the aside activity: Toon de nevenactiviteit
|
||||||
|
Edit the aside activity: Wijzig de nevenactiviteit
|
||||||
|
Remove aside activity: Verwijder de nevenactiviteit
|
||||||
|
Aside activity: Nevenactiviteit
|
||||||
|
Aside Activity Type List: Lijst van nevenactiviteiten
|
||||||
|
Duration time: Duur
|
||||||
|
durationTime: duur
|
||||||
|
user_username: gebruikersnaam
|
||||||
|
Remark: Opmerking
|
||||||
|
No comments: Geen opmerkingen
|
||||||
|
Add a new aside activity: Nevenactiviteit toeveogen
|
||||||
|
Aside activity list: Nevenactiviteiten
|
||||||
|
present: aanwezig
|
||||||
|
not present: afwezig
|
||||||
|
Delete: Verwijderen
|
||||||
|
Update: Bijwerken
|
||||||
|
Aside activity data: Gegevens van nevenactiviteit
|
||||||
|
There aren't any aside activities.: Geen nevenactiviteiten om weer te geven
|
||||||
|
Type: Type
|
||||||
|
Invisible: Onzichtbaar
|
||||||
|
Optional: Optioneel
|
||||||
|
Required: Verplicht
|
||||||
|
Persons: Personen
|
||||||
|
Users: Gebruikers
|
||||||
|
Emergency: Dringend
|
||||||
|
by: "Door "
|
||||||
|
location: Plaats
|
||||||
|
|
||||||
|
# Crud
|
||||||
|
crud:
|
||||||
|
aside_activity:
|
||||||
|
title_view: Details nevenactiviteit
|
||||||
|
title_new: Nieuwe nevenactiviteit
|
||||||
|
title_edit: Wijzig nevenactiviteit
|
||||||
|
title_delete: Verwijder nevenactiviteit
|
||||||
|
button_delete: Verwijderen
|
||||||
|
confirm_message_delete: Bent u zeker deze nevenactiviteit te willen verwijderen?
|
||||||
|
aside_activity_category:
|
||||||
|
title_new: Nieuwe categorie nevenactiviteiten
|
||||||
|
title_edit: Wijzigen categorie nevenactiviteiten
|
||||||
|
|
||||||
|
#forms
|
||||||
|
Create a new aside activity type: Nieuwe categorie nevenactiviteiten
|
||||||
|
Back to the list: Terug naar de lijst
|
||||||
|
Choose the duration: Kies een duur
|
||||||
|
Choose a category: Kies een categorie
|
||||||
|
Is active: Actief
|
||||||
|
For agent: Voor de gebruiker
|
||||||
|
date: Datum
|
||||||
|
Duration: Duur
|
||||||
|
Note: Opmerking
|
||||||
|
Choose the agent for whom this activity is created: Kies de gebruiker voor wie deze nevenactiviteit wordt aangemaakt.
|
||||||
|
Choose the activity category: Kies een categorie
|
||||||
|
|
||||||
|
#Duration
|
||||||
|
minutes: minuten
|
||||||
|
hour: uur
|
||||||
|
hours: uren
|
||||||
|
day: dag
|
||||||
|
days: dagen
|
||||||
|
5 minutes: 5 minuten
|
||||||
|
10 minutes: 10 minuten
|
||||||
|
15 minutes: 15 minuten
|
||||||
|
20 minutes: 20 minuten
|
||||||
|
25 minutes: 25 minuten
|
||||||
|
30 minutes: 30 minuten
|
||||||
|
45 minutes: 45 minuten
|
||||||
|
1 hour: 1 uur
|
||||||
|
1 hour 15: 1 uur 15
|
||||||
|
1 hour 30: 1 uur 30
|
||||||
|
1 hour 45: 1 uur 45
|
||||||
|
2 hours: 2 uren
|
||||||
|
2 hours 30: 2 uur 30
|
||||||
|
3 hours: 3 uren
|
||||||
|
3 hours 30: 3 uur 30
|
||||||
|
4 hours: 4 uren
|
||||||
|
4 hours 30: 4 uur 30
|
||||||
|
5 hours: 5 uren
|
||||||
|
5 hours 30: 5 uur 30
|
||||||
|
6 hours: 6 uren
|
||||||
|
6 hours 30: 6 uur 30
|
||||||
|
7 hours: 7 uren
|
||||||
|
7 hours 30: 7 uur 30
|
||||||
|
8 hours: 8 uren
|
||||||
|
8 hours 30: 8 uur 30
|
||||||
|
9 hours: 9 uren
|
||||||
|
9 hours 30: 9 uur 30
|
||||||
|
10 hours: 10 uren
|
||||||
|
1/2 day: 1/2 dag
|
||||||
|
1 day: 1 dag
|
||||||
|
1 1/2 days: 1 1/2 dagen
|
||||||
|
2 days: 2 dagen
|
||||||
|
2 1/2 days: 2 1/2 dagen
|
||||||
|
3 days: 3 dagen
|
||||||
|
3 1/2 days: 3 1/2 dagen
|
||||||
|
4 days: 4 dagen
|
||||||
|
4 1/2 days: 4 1/2 dagen
|
||||||
|
5 days: 5 dagen
|
||||||
|
5 1/2 days: 5 1/2 dagen
|
||||||
|
6 days: 6 dagen
|
||||||
|
6 1/2 days: 6 1/2 dagen
|
||||||
|
7 days: 7 dagen
|
||||||
|
7 1/2 days: 7 1/2 dagen
|
||||||
|
8 days: 8 dagen
|
||||||
|
8 1/2 days: 8 1/2 dagen
|
||||||
|
9 days: 9 dagen
|
||||||
|
9 1/2 days: 9 1/2 dagen
|
||||||
|
10 days: 10 dagen
|
||||||
|
10 1/2 days: 10 1/2 dagen
|
||||||
|
11 days: 11 dagen
|
||||||
|
11 1/2 days: 11 1/2 dagen
|
||||||
|
12 days: 12 dagen
|
||||||
|
12 1/2 days: 12 1/2 dagen
|
||||||
|
13 days: 13 dagen
|
||||||
|
13 1/2 days: 13 1/2 dagen
|
||||||
|
14 days: 14 dagen
|
||||||
|
14 1/2 days: 14 1/2 dagen
|
||||||
|
15 days: 15 dagen
|
||||||
|
15 1/2 days: 15 1/2 dagen
|
||||||
|
16 days: 16 dagen
|
||||||
|
16 1/2 days: 16 1/2 dagen
|
||||||
|
17 days: 17 dagen
|
||||||
|
17 1/2 days: 17 1/2 dagen
|
||||||
|
18 days: 18 dagen
|
||||||
|
18 1/2 days: 18 1/2 dagen
|
||||||
|
19 days: 19 dagen
|
||||||
|
19 1/2 days: 19 1/2 dagen
|
||||||
|
20 days: 20 dagen
|
||||||
|
20 1/2 days: 20 1/2 dagen
|
||||||
|
21 days: 21 dagen
|
||||||
|
21 1/2 days: 21 1/2 dagen
|
||||||
|
22 days: 22 dagen
|
||||||
|
22 1/2 days: 22 1/2 dagen
|
||||||
|
23 days: 23 dagen
|
||||||
|
23 1/2 days: 23 1/2 dagen
|
||||||
|
24 days: 24 dagen
|
||||||
|
24 1/2 days: 24 1/2 dagen
|
||||||
|
25 days: 25 dagen
|
||||||
|
25 1/2 days: 25 1/2 dagen
|
||||||
|
26 days: 26 dagen
|
||||||
|
26 1/2 days: 26 1/2 dagen
|
||||||
|
27 days: 27 dagen
|
||||||
|
27 1/2 days: 27 1/2 dagen
|
||||||
|
28 days: 28 dagen
|
||||||
|
28 1/2 days: 28 1/2 dagen
|
||||||
|
29 days: 29 dagen
|
||||||
|
29 1/2 days: 29 1/2 dagen
|
||||||
|
30 days: 30 dagen
|
||||||
|
|
||||||
|
#list
|
||||||
|
My aside activities: Mijn nevenactiviteiten
|
||||||
|
#Aside activity delete
|
||||||
|
Delete aside activity: Verwijder een nevenactiviteit
|
||||||
|
Are you sure you want to remove the aside activity concerning "%name%" ?: Bent u zeker deze nevenactiviteit voor "%name%" te willen verwijderen ?
|
||||||
|
The activity has been successfully removed.: De nevenactiviteit werd verwijdert.
|
||||||
|
|
||||||
|
#Menu
|
||||||
|
Create an aside activity: "Maak een nevenactiviteit aan"
|
||||||
|
Aside activity categories: Categorieën van nevenactiviteiten
|
||||||
|
Aside activity configuration menu: "Configuratie menu voor nevenactiviteiten"
|
||||||
|
Phonecall: "Telefoon oproep"
|
||||||
|
|
||||||
|
# admin
|
||||||
|
Aside activities: Nevenactiviteiten
|
||||||
|
Aside activity types: Types nevenactiviteiten
|
||||||
|
Aside activity type configuration: Configuratie categorieën nevenactiviteiten
|
@ -0,0 +1 @@
|
|||||||
|
You must not add twice the same category in the parent tree (previous result returned): Je mag niet tweemaal dezelfde entiteit aanduiden in de stamboom. (Het vorige resultaat werd hersteld)
|
@ -0,0 +1,8 @@
|
|||||||
|
budget:
|
||||||
|
number of elements: >-
|
||||||
|
{nb_items, plural,
|
||||||
|
=0 {Geen element}
|
||||||
|
one {Één element}
|
||||||
|
many {# elementen}
|
||||||
|
other {# elementen}
|
||||||
|
}
|
@ -37,7 +37,7 @@ No charges registered: Aucune charge enregistrée
|
|||||||
No past resources registered: Aucune ressource passée
|
No past resources registered: Aucune ressource passée
|
||||||
No past charges registered: Aucune charge passée
|
No past charges registered: Aucune charge passée
|
||||||
No future resources registered: Aucune ressource future enregistrée
|
No future resources registered: Aucune ressource future enregistrée
|
||||||
No future charges registered: Aucune ressource future enregistrée
|
No future charges registered: Aucune charge future enregistrée
|
||||||
No current budget element registered: Pas des éléments de budget actuelles enregistrés
|
No current budget element registered: Pas des éléments de budget actuelles enregistrés
|
||||||
|
|
||||||
New resource: Nouvelle ressource
|
New resource: Nouvelle ressource
|
||||||
|
76
src/Bundle/ChillBudgetBundle/translations/messages.nl.yml
Normal file
76
src/Bundle/ChillBudgetBundle/translations/messages.nl.yml
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
Budget: Budget
|
||||||
|
Resource: Inkomsten
|
||||||
|
Charge: Onkosten
|
||||||
|
Budget for %name%: Budget van %name%
|
||||||
|
Budget for household %household%: Budget van gezin
|
||||||
|
Current budget household members: Actuele budget van gezinsleden
|
||||||
|
Show budget of %name%: Toon budget van %name%
|
||||||
|
See complete budget: Toon volledige budget
|
||||||
|
Hide budget: Verbergen
|
||||||
|
Hide budget of %name%: Verberg budget van %name%
|
||||||
|
Resource element type: Type inkomsten
|
||||||
|
Actual budget: Actuele elementen budget
|
||||||
|
Actual resources: Actuele inkomsten
|
||||||
|
Actual resources for %name%: Actuele inkomsten van %name%
|
||||||
|
Actual charges for %name%: Actuele onkosten van %name%
|
||||||
|
Actual charges: Actuele onkosten
|
||||||
|
Past budget: Elementen van afgelopen budget
|
||||||
|
Show past budget: Toon afgelopen budget
|
||||||
|
Show future budget: Toon toekomstig budget
|
||||||
|
Past resources: Afgelopen inkomsten
|
||||||
|
Past charges: Afgelopen onkosten
|
||||||
|
Future budget: Toekomstige elementen van budget
|
||||||
|
Future resources: Toekomstige inkomsten
|
||||||
|
Future charges: Toekomstige onkosten
|
||||||
|
Budget element type: Type
|
||||||
|
Validity period: Geldigheidsperiod
|
||||||
|
Start of validity period: Begin geldigheidsperiode
|
||||||
|
End of validity period: Eind geldigheidsperiode
|
||||||
|
Total: Totaal
|
||||||
|
Create new resource: Nieuwe inkomsten toevoegen
|
||||||
|
Create new charge: Nieuwe onkosten toevoegen
|
||||||
|
See person: Toon persoon
|
||||||
|
|
||||||
|
There isn't any element recorded: Geen budget elementen geregistreerd
|
||||||
|
No resources registered: Geen inkomsten geregistreerd
|
||||||
|
No charges registered: Geen onkosten geregistreerd
|
||||||
|
No past resources registered: Geen afgelopen inkomsten geregistreerd
|
||||||
|
No past charges registered: Geen afgelopen onkosten geregistreerd
|
||||||
|
No future resources registered: Geen toekomstige inkomsten geregistreerd
|
||||||
|
No future charges registered: Geen toekomste onkosten geregistreerd
|
||||||
|
No current budget element registered: Geen actuele budget elementen geregistreerd
|
||||||
|
|
||||||
|
New resource: Nieuwe inkomsten
|
||||||
|
New charge: Nieuwe onkosten
|
||||||
|
Edit resource: Wijzig inkomsten
|
||||||
|
Edit: Wijzigen
|
||||||
|
Edit charge: Wijzig onkosten
|
||||||
|
Remove resource: Verwijder inkomsten
|
||||||
|
Remove charge: Verwijder onkosten
|
||||||
|
Are you sure you want to remove the ressource "%type%" associated to "%name%" ?: Bent u zeker de inkomsten van het type "%type%" en geassocieerd met %name% te willen verwijderen?
|
||||||
|
Are you sure you want to remove the charge "%type%" associated to "%name%" ?: Bent u zeker de onkosten van het type "%type%" en geassocieerd met %name% te willen verwijderen?
|
||||||
|
Resource deleted: Inkomsten verwijdert
|
||||||
|
Charge deleted: Onkosten verwijdert
|
||||||
|
Charge created: Onkosten toegevoegd
|
||||||
|
Resource created: Inkomsten toegevoegd
|
||||||
|
Resource updated: Inkomsten bijgewerkt
|
||||||
|
Charge updated: Onkosten bijgewerkt
|
||||||
|
|
||||||
|
Choose a resource type: Kies een type inkomsten
|
||||||
|
Choose a charge type: Kies een type onkosten
|
||||||
|
Amount: Bedrag
|
||||||
|
Comment: Opmerking
|
||||||
|
|
||||||
|
Help to pay charges: Hulp bij afbetaling onkosten
|
||||||
|
Choose a status: Kies een status
|
||||||
|
charge.help.running: In uitvoering
|
||||||
|
charge.help.no: Niet gevraagd
|
||||||
|
charge.help.yes: Ja
|
||||||
|
charge.help.not-concerned: Niet betrokken
|
||||||
|
|
||||||
|
Budget calculator: Berekeningen en indicatoren van budget
|
||||||
|
Budget calculator result: Resultaten
|
||||||
|
The balance: Verschil tussen inkomsten en onkosten
|
||||||
|
|
||||||
|
Valid since %startDate% until %endDate%: Geldig sinds %startDate% tot %endDate%
|
||||||
|
Valid since %startDate%: Geldig sinds %startDate%
|
@ -0,0 +1,2 @@
|
|||||||
|
The amount cannot be empty: Le montant ne peut pas être vide ou égal à zéro
|
||||||
|
The budget element's end date must be after the start date: La date de fin doit être après la date de début
|
@ -14,6 +14,7 @@ namespace Chill\CalendarBundle\Entity;
|
|||||||
use Chill\ActivityBundle\Entity\Activity;
|
use Chill\ActivityBundle\Entity\Activity;
|
||||||
use Chill\CalendarBundle\Repository\CalendarRepository;
|
use Chill\CalendarBundle\Repository\CalendarRepository;
|
||||||
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
|
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
|
||||||
|
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
|
||||||
use Chill\MainBundle\Entity\Location;
|
use Chill\MainBundle\Entity\Location;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
@ -115,6 +116,12 @@ class Calendar
|
|||||||
*/
|
*/
|
||||||
private Collection $persons;
|
private Collection $persons;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Embedded(class=PrivateCommentEmbeddable::class, columnPrefix="privateComment_")
|
||||||
|
* @Serializer\Groups({"calendar:read"})
|
||||||
|
*/
|
||||||
|
private PrivateCommentEmbeddable $privateComment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToMany(
|
* @ORM\ManyToMany(
|
||||||
* targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty",
|
* targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty",
|
||||||
@ -151,6 +158,7 @@ class Calendar
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->comment = new CommentEmbeddable();
|
$this->comment = new CommentEmbeddable();
|
||||||
|
$this->privateComment = new PrivateCommentEmbeddable();
|
||||||
$this->persons = new ArrayCollection();
|
$this->persons = new ArrayCollection();
|
||||||
$this->professionals = new ArrayCollection();
|
$this->professionals = new ArrayCollection();
|
||||||
$this->invites = new ArrayCollection();
|
$this->invites = new ArrayCollection();
|
||||||
@ -278,6 +286,11 @@ class Calendar
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPrivateComment(): PrivateCommentEmbeddable
|
||||||
|
{
|
||||||
|
return $this->privateComment;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Collection|ThirdParty[]
|
* @return Collection|ThirdParty[]
|
||||||
*/
|
*/
|
||||||
@ -407,6 +420,13 @@ class Calendar
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setPrivateComment(PrivateCommentEmbeddable $privateComment): self
|
||||||
|
{
|
||||||
|
$this->privateComment = $privateComment;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setSendSMS(?bool $sendSMS): self
|
public function setSendSMS(?bool $sendSMS): self
|
||||||
{
|
{
|
||||||
$this->sendSMS = $sendSMS;
|
$this->sendSMS = $sendSMS;
|
||||||
|
@ -18,6 +18,7 @@ use Chill\CalendarBundle\Entity\Invite;
|
|||||||
use Chill\MainBundle\Entity\Location;
|
use Chill\MainBundle\Entity\Location;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
use Chill\MainBundle\Form\Type\CommentType;
|
use Chill\MainBundle\Form\Type\CommentType;
|
||||||
|
use Chill\MainBundle\Form\Type\PrivateCommentType;
|
||||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||||
@ -51,6 +52,10 @@ class CalendarType extends AbstractType
|
|||||||
->add('comment', CommentType::class, [
|
->add('comment', CommentType::class, [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
])
|
])
|
||||||
|
->add('privateComment', PrivateCommentType::class, [
|
||||||
|
'required' => false,
|
||||||
|
'label' => 'private comment',
|
||||||
|
])
|
||||||
// ->add('cancelReason', EntityType::class, [
|
// ->add('cancelReason', EntityType::class, [
|
||||||
// 'required' => false,
|
// 'required' => false,
|
||||||
// 'class' => CancelReason::class,
|
// 'class' => CancelReason::class,
|
||||||
|
@ -47,6 +47,10 @@
|
|||||||
{{ form_row(form.comment) }}
|
{{ form_row(form.comment) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if form.privateComment is defined -%}
|
||||||
|
{{ form_row(form.privateComment) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{%- if form.sendSMS is defined -%}
|
{%- if form.sendSMS is defined -%}
|
||||||
{{ form_row(form.sendSMS) }}
|
{{ form_row(form.sendSMS) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -43,6 +43,10 @@
|
|||||||
{{ form_row(form.comment) }}
|
{{ form_row(form.comment) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if form.privateComment is defined -%}
|
||||||
|
{{ form_row(form.privateComment) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{%- if form.sendSMS is defined -%}
|
{%- if form.sendSMS is defined -%}
|
||||||
{{ form_row(form.sendSMS) }}
|
{{ form_row(form.sendSMS) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -50,22 +54,22 @@
|
|||||||
<div id="fullCalendar"></div>
|
<div id="fullCalendar"></div>
|
||||||
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
<li class="cancel">
|
<li class="cancel">
|
||||||
<a
|
<a
|
||||||
class="btn btn-cancel"
|
class="btn btn-cancel"
|
||||||
{%- if context == 'person' -%}
|
{%- if context == 'person' -%}
|
||||||
href="{{ chill_return_path_or('chill_calendar_calendar_list', { 'person_id': person.id } )}}"
|
href="{{ chill_return_path_or('chill_calendar_calendar_list', { 'person_id': person.id } )}}"
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
href="{{ chill_return_path_or('chill_calendar_calendar_list', { 'accompanying_period_id': accompanyingCourse.id } )}}"
|
href="{{ chill_return_path_or('chill_calendar_calendar_list', { 'accompanying_period_id': accompanyingCourse.id } )}}"
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
>
|
>
|
||||||
{{ 'Cancel'|trans|chill_return_path_label }}
|
{{ 'Cancel'|trans|chill_return_path_label }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button class="btn btn-create" type="submit">
|
<button class="btn btn-create" type="submit">
|
||||||
{{ 'Create'|trans }}
|
{{ 'Create'|trans }}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{ form_end(form) }}
|
{{ form_end(form) }}
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\Migrations\Calendar;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
final class Version20220527124558 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE chill_calendar.calendar DROP privateComment_comments');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'add private comment to calendar';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE chill_calendar.calendar ADD privateComment_comments JSON DEFAULT NULL');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\Migrations\Calendar;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
final class Version20220527234046 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE chill_calendar.calendar ALTER COLUMN privateComment_comments DROP NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_calendar.calendar ALTER COLUMN privateComment_comments SET DEFAULT NULL');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('UPDATE chill_calendar.calendar SET privateComment_comments=\'{}\' WHERE privateComment_comments IS NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_calendar.calendar ALTER COLUMN privateComment_comments SET NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_calendar.calendar ALTER COLUMN privateComment_comments SET DEFAULT \'{}\'');
|
||||||
|
}
|
||||||
|
}
|
@ -26,6 +26,7 @@ The calendar item has been successfully removed.: Le rendez-vous a été supprim
|
|||||||
From the day: Du
|
From the day: Du
|
||||||
to the day: au
|
to the day: au
|
||||||
Transform to activity: Transformer en échange
|
Transform to activity: Transformer en échange
|
||||||
|
|
||||||
canceledBy: supprimé par
|
canceledBy: supprimé par
|
||||||
Canceled by: supprimé par
|
Canceled by: supprimé par
|
||||||
Calendar configuration: Gestion des rendez-vous
|
Calendar configuration: Gestion des rendez-vous
|
||||||
@ -36,4 +37,4 @@ crud:
|
|||||||
title: Liste des motifs d'annulation
|
title: Liste des motifs d'annulation
|
||||||
add_new: Ajouter un nouveau
|
add_new: Ajouter un nouveau
|
||||||
title_new: Nouveau motif d'annulation
|
title_new: Nouveau motif d'annulation
|
||||||
title_edit: Modifier le motif d'annulation
|
title_edit: Modifier le motif d'annulation
|
||||||
|
28
src/Bundle/ChillCalendarBundle/translations/messages.nl.yml
Normal file
28
src/Bundle/ChillCalendarBundle/translations/messages.nl.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Calendar: Afspraken
|
||||||
|
Calendar list: Lijst van afspraken
|
||||||
|
My calendar list: Mijn afspraken
|
||||||
|
There is no calendar items.: Er zijn geen afspraken
|
||||||
|
Remove calendar item: Verwijder afspraak
|
||||||
|
Are you sure you want to remove the calendar item?: Bent u zeker deze afspraak te willen verwijderen
|
||||||
|
Concerned groups: Betrokken partijen
|
||||||
|
Calendar data: Gegevens afspraak
|
||||||
|
Update calendar: Wijzig afspraak
|
||||||
|
main user concerned: Betrokken gebruiker
|
||||||
|
Main user: Hoofdgebruiker
|
||||||
|
Calendar item creation: Maak afspraak aan
|
||||||
|
start date: Begin afspraak
|
||||||
|
end date: Einde afspraak
|
||||||
|
cancel reason: reden van annulatie
|
||||||
|
status: Status van afspraak
|
||||||
|
calendar location: Locatie afspraak
|
||||||
|
calendar comment: Opmerkingen over afspraak
|
||||||
|
sendSMS: Verzenden sms
|
||||||
|
Send s m s: Sms verzenden?
|
||||||
|
Cancel reason: Reden van annulatie
|
||||||
|
Add a new calendar: Nieuwe afspraak toevoegen
|
||||||
|
"Success : calendar item updated!": "Afspraak bijgewerkt"
|
||||||
|
"Success : calendar item created!": "Afspraak aangemaakt"
|
||||||
|
The calendar item has been successfully removed.: De afspraak is verwijdert
|
||||||
|
From the day: Vanaf
|
||||||
|
to the day: tot
|
||||||
|
Transform to activity: In activiteit omzetten
|
@ -71,6 +71,12 @@ class StoredObject implements AsyncFileInterface, Document
|
|||||||
*/
|
*/
|
||||||
private array $keyInfos = [];
|
private array $keyInfos = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text", name="title")
|
||||||
|
* @Serializer\Groups({"read", "write"})
|
||||||
|
*/
|
||||||
|
private string $title = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="text", name="type")
|
* @ORM\Column(type="text", name="type")
|
||||||
* @Serializer\Groups({"read", "write"})
|
* @Serializer\Groups({"read", "write"})
|
||||||
@ -127,6 +133,11 @@ class StoredObject implements AsyncFileInterface, Document
|
|||||||
return $this->getFilename();
|
return $this->getFilename();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->title;
|
||||||
|
}
|
||||||
|
|
||||||
public function getType()
|
public function getType()
|
||||||
{
|
{
|
||||||
return $this->type;
|
return $this->type;
|
||||||
@ -177,6 +188,13 @@ class StoredObject implements AsyncFileInterface, Document
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setTitle(?string $title)
|
||||||
|
{
|
||||||
|
$this->title = (string) $title;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setType(?string $type)
|
public function setType(?string $type)
|
||||||
{
|
{
|
||||||
$this->type = (string) $type;
|
$this->type = (string) $type;
|
||||||
|
@ -12,6 +12,7 @@ declare(strict_types=1);
|
|||||||
namespace Chill\DocStoreBundle\Form;
|
namespace Chill\DocStoreBundle\Form;
|
||||||
|
|
||||||
use Chill\DocStoreBundle\Entity\Document;
|
use Chill\DocStoreBundle\Entity\Document;
|
||||||
|
use Chill\DocStoreBundle\Entity\DocumentCategory;
|
||||||
use Chill\DocStoreBundle\Entity\PersonDocument;
|
use Chill\DocStoreBundle\Entity\PersonDocument;
|
||||||
use Chill\MainBundle\Form\Type\ChillDateType;
|
use Chill\MainBundle\Form\Type\ChillDateType;
|
||||||
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
||||||
@ -63,7 +64,7 @@ class PersonDocumentType extends AbstractType
|
|||||||
->add('date', ChillDateType::class)
|
->add('date', ChillDateType::class)
|
||||||
->add('category', EntityType::class, [
|
->add('category', EntityType::class, [
|
||||||
'placeholder' => 'Choose a document category',
|
'placeholder' => 'Choose a document category',
|
||||||
'class' => 'ChillDocStoreBundle:DocumentCategory',
|
'class' => DocumentCategory::class,
|
||||||
'query_builder' => static function (EntityRepository $er) {
|
'query_builder' => static function (EntityRepository $er) {
|
||||||
return $er->createQueryBuilder('c')
|
return $er->createQueryBuilder('c')
|
||||||
->where('c.documentClass = :docClass')
|
->where('c.documentClass = :docClass')
|
||||||
|
@ -17,6 +17,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
|||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\CallbackTransformer;
|
use Symfony\Component\Form\CallbackTransformer;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
@ -40,6 +41,13 @@ class StoredObjectType extends AbstractType
|
|||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
|
if (true === $options['has_title']) {
|
||||||
|
$builder
|
||||||
|
->add('title', TextType::class, [
|
||||||
|
'label' => 'Title',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
->add('filename', AsyncUploaderType::class)
|
->add('filename', AsyncUploaderType::class)
|
||||||
->add('type', HiddenType::class)
|
->add('type', HiddenType::class)
|
||||||
@ -70,6 +78,10 @@ class StoredObjectType extends AbstractType
|
|||||||
{
|
{
|
||||||
$resolver
|
$resolver
|
||||||
->setDefault('data_class', StoredObject::class);
|
->setDefault('data_class', StoredObject::class);
|
||||||
|
|
||||||
|
$resolver
|
||||||
|
->setDefault('has_title', false)
|
||||||
|
->setAllowedTypes('has_title', ['bool']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBlockPrefix()
|
public function getBlockPrefix()
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{% block stored_object_widget %}
|
{% block stored_object_widget %}
|
||||||
<div
|
{% if form.title is defined %} {{ form_row(form.title) }} {% endif %}
|
||||||
data-stored-object="data-stored-object"
|
<div
|
||||||
data-label-preparing="{{ ('Preparing'|trans ~ '...')|escape('html_attr') }}"
|
data-stored-object="data-stored-object"
|
||||||
|
data-label-preparing="{{ ('Preparing'|trans ~ '...')|escape('html_attr') }}"
|
||||||
data-label-quiet-button="{{ 'Download existing file'|trans|escape('html_attr') }}"
|
data-label-quiet-button="{{ 'Download existing file'|trans|escape('html_attr') }}"
|
||||||
data-label-ready="{{ 'Ready to show'|trans|escape('html_attr') }}"
|
data-label-ready="{{ 'Ready to show'|trans|escape('html_attr') }}"
|
||||||
data-dict-file-too-big="{{ 'File too big'|trans|escape('html_attr') }}"
|
data-dict-file-too-big="{{ 'File too big'|trans|escape('html_attr') }}"
|
||||||
data-dict-default-message="{{ "Drop your file or click here"|trans|escape('html_attr') }}"
|
data-dict-default-message="{{ "Drop your file or click here"|trans|escape('html_attr') }}"
|
||||||
data-dict-remove-file="{{ 'Remove file in order to upload a new one'|trans|escape('html_attr') }}"
|
data-dict-remove-file="{{ 'Remove file in order to upload a new one'|trans|escape('html_attr') }}"
|
||||||
|
@ -15,12 +15,17 @@ use Base64Url\Base64Url;
|
|||||||
use ChampsLibres\AsyncUploaderBundle\TempUrl\TempUrlGeneratorInterface;
|
use ChampsLibres\AsyncUploaderBundle\TempUrl\TempUrlGeneratorInterface;
|
||||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||||
use Chill\DocStoreBundle\Exception\StoredObjectManagerException;
|
use Chill\DocStoreBundle\Exception\StoredObjectManagerException;
|
||||||
|
use DateTimeImmutable;
|
||||||
|
use DateTimeInterface;
|
||||||
|
use RuntimeException;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
|
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||||
|
use Symfony\Contracts\HttpClient\ResponseInterface;
|
||||||
|
use Throwable;
|
||||||
|
use function array_key_exists;
|
||||||
use const OPENSSL_RAW_DATA;
|
use const OPENSSL_RAW_DATA;
|
||||||
|
|
||||||
final class StoredObjectManager implements StoredObjectManagerInterface
|
final class StoredObjectManager implements StoredObjectManagerInterface
|
||||||
@ -29,6 +34,8 @@ final class StoredObjectManager implements StoredObjectManagerInterface
|
|||||||
|
|
||||||
private HttpClientInterface $client;
|
private HttpClientInterface $client;
|
||||||
|
|
||||||
|
private array $inMemory = [];
|
||||||
|
|
||||||
private TempUrlGeneratorInterface $tempUrlGenerator;
|
private TempUrlGeneratorInterface $tempUrlGenerator;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
@ -39,28 +46,35 @@ final class StoredObjectManager implements StoredObjectManagerInterface
|
|||||||
$this->tempUrlGenerator = $tempUrlGenerator;
|
$this->tempUrlGenerator = $tempUrlGenerator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function read(StoredObject $document): string
|
public function getLastModified(StoredObject $document): DateTimeInterface
|
||||||
{
|
{
|
||||||
try {
|
if ($this->hasCache($document)) {
|
||||||
$response = $this
|
$response = $this->getResponseFromCache($document);
|
||||||
->client
|
} else {
|
||||||
->request(
|
try {
|
||||||
Request::METHOD_GET,
|
$response = $this
|
||||||
$this
|
->client
|
||||||
->tempUrlGenerator
|
->request(
|
||||||
->generate(
|
Request::METHOD_HEAD,
|
||||||
Request::METHOD_GET,
|
$this
|
||||||
$document->getFilename()
|
->tempUrlGenerator
|
||||||
)
|
->generate(
|
||||||
->url
|
Request::METHOD_PUT,
|
||||||
);
|
$document->getFilename()
|
||||||
} catch (Throwable $e) {
|
)
|
||||||
throw StoredObjectManagerException::errorDuringHttpRequest($e);
|
->url
|
||||||
|
);
|
||||||
|
} catch (TransportExceptionInterface $exception) {
|
||||||
|
throw StoredObjectManagerException::errorDuringHttpRequest($exception);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($response->getStatusCode() !== Response::HTTP_OK) {
|
return $this->extractLastModifiedFromResponse($response);
|
||||||
throw StoredObjectManagerException::invalidStatusCode($response->getStatusCode());
|
}
|
||||||
}
|
|
||||||
|
public function read(StoredObject $document): string
|
||||||
|
{
|
||||||
|
$response = $this->getResponseFromCache($document);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$data = $response->getContent();
|
$data = $response->getContent();
|
||||||
@ -90,6 +104,10 @@ final class StoredObjectManager implements StoredObjectManagerInterface
|
|||||||
|
|
||||||
public function write(StoredObject $document, string $clearContent): void
|
public function write(StoredObject $document, string $clearContent): void
|
||||||
{
|
{
|
||||||
|
if ($this->hasCache($document)) {
|
||||||
|
unset($this->inMemory[$document->getUuid()->toString()]);
|
||||||
|
}
|
||||||
|
|
||||||
$encryptedContent = $this->hasKeysAndIv($document)
|
$encryptedContent = $this->hasKeysAndIv($document)
|
||||||
? openssl_encrypt(
|
? openssl_encrypt(
|
||||||
$clearContent,
|
$clearContent,
|
||||||
@ -126,6 +144,63 @@ final class StoredObjectManager implements StoredObjectManagerInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function extractLastModifiedFromResponse(ResponseInterface $response): DateTimeImmutable
|
||||||
|
{
|
||||||
|
$lastModifiedString = (($response->getHeaders()['last-modified'] ?? [])[0] ?? '');
|
||||||
|
|
||||||
|
$date = DateTimeImmutable::createFromFormat(
|
||||||
|
DateTimeImmutable::RFC7231,
|
||||||
|
$lastModifiedString
|
||||||
|
);
|
||||||
|
|
||||||
|
if (false === $date) {
|
||||||
|
throw new RuntimeException('the date from remote storage could not be parsed: '
|
||||||
|
. $lastModifiedString);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function fillCache(StoredObject $document): void
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$response = $this
|
||||||
|
->client
|
||||||
|
->request(
|
||||||
|
Request::METHOD_GET,
|
||||||
|
$this
|
||||||
|
->tempUrlGenerator
|
||||||
|
->generate(
|
||||||
|
Request::METHOD_GET,
|
||||||
|
$document->getFilename()
|
||||||
|
)
|
||||||
|
->url
|
||||||
|
);
|
||||||
|
} catch (Throwable $e) {
|
||||||
|
throw StoredObjectManagerException::errorDuringHttpRequest($e);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($response->getStatusCode() !== Response::HTTP_OK) {
|
||||||
|
throw StoredObjectManagerException::invalidStatusCode($response->getStatusCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->inMemory[$document->getUuid()->toString()] = $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getResponseFromCache(StoredObject $document): ResponseInterface
|
||||||
|
{
|
||||||
|
if (!$this->hasCache($document)) {
|
||||||
|
$this->fillCache($document);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->inMemory[$document->getUuid()->toString()];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function hasCache(StoredObject $document): bool
|
||||||
|
{
|
||||||
|
return array_key_exists($document->getUuid()->toString(), $this->inMemory);
|
||||||
|
}
|
||||||
|
|
||||||
private function hasKeysAndIv(StoredObject $storedObject): bool
|
private function hasKeysAndIv(StoredObject $storedObject): bool
|
||||||
{
|
{
|
||||||
return ([] !== $storedObject->getKeyInfos()) && ([] !== $storedObject->getIv());
|
return ([] !== $storedObject->getKeyInfos()) && ([] !== $storedObject->getIv());
|
||||||
|
@ -12,9 +12,12 @@ declare(strict_types=1);
|
|||||||
namespace Chill\DocStoreBundle\Service;
|
namespace Chill\DocStoreBundle\Service;
|
||||||
|
|
||||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||||
|
use DateTimeInterface;
|
||||||
|
|
||||||
interface StoredObjectManagerInterface
|
interface StoredObjectManagerInterface
|
||||||
{
|
{
|
||||||
|
public function getLastModified(StoredObject $document): DateTimeInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the content of a StoredObject.
|
* Get the content of a StoredObject.
|
||||||
*
|
*
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\Migrations\DocStore;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add title on storedObject.
|
||||||
|
*/
|
||||||
|
final class Version20220525141646 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE chill_doc.stored_object DROP title');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Add title on storedObject';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE chill_doc.stored_object ADD title TEXT NOT NULL DEFAULT \'\' ');
|
||||||
|
}
|
||||||
|
}
|
@ -20,6 +20,7 @@ use Chill\MainBundle\Notification\Exception\NotificationHandlerNotFound;
|
|||||||
use Chill\MainBundle\Notification\NotificationHandlerManager;
|
use Chill\MainBundle\Notification\NotificationHandlerManager;
|
||||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||||
use Chill\MainBundle\Repository\NotificationRepository;
|
use Chill\MainBundle\Repository\NotificationRepository;
|
||||||
|
use Chill\MainBundle\Repository\UserRepository;
|
||||||
use Chill\MainBundle\Security\Authorization\NotificationVoter;
|
use Chill\MainBundle\Security\Authorization\NotificationVoter;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
@ -29,6 +30,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||||
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
@ -55,6 +57,8 @@ class NotificationController extends AbstractController
|
|||||||
|
|
||||||
private TranslatorInterface $translator;
|
private TranslatorInterface $translator;
|
||||||
|
|
||||||
|
private UserRepository $userRepository;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
EntityManagerInterface $em,
|
EntityManagerInterface $em,
|
||||||
LoggerInterface $chillLogger,
|
LoggerInterface $chillLogger,
|
||||||
@ -63,7 +67,8 @@ class NotificationController extends AbstractController
|
|||||||
NotificationRepository $notificationRepository,
|
NotificationRepository $notificationRepository,
|
||||||
NotificationHandlerManager $notificationHandlerManager,
|
NotificationHandlerManager $notificationHandlerManager,
|
||||||
PaginatorFactory $paginatorFactory,
|
PaginatorFactory $paginatorFactory,
|
||||||
TranslatorInterface $translator
|
TranslatorInterface $translator,
|
||||||
|
UserRepository $userRepository
|
||||||
) {
|
) {
|
||||||
$this->em = $em;
|
$this->em = $em;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
@ -73,6 +78,7 @@ class NotificationController extends AbstractController
|
|||||||
$this->notificationHandlerManager = $notificationHandlerManager;
|
$this->notificationHandlerManager = $notificationHandlerManager;
|
||||||
$this->paginatorFactory = $paginatorFactory;
|
$this->paginatorFactory = $paginatorFactory;
|
||||||
$this->translator = $translator;
|
$this->translator = $translator;
|
||||||
|
$this->userRepository = $userRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,6 +106,15 @@ class NotificationController extends AbstractController
|
|||||||
->setRelatedEntityId($request->query->getInt('entityId'))
|
->setRelatedEntityId($request->query->getInt('entityId'))
|
||||||
->setSender($this->security->getUser());
|
->setSender($this->security->getUser());
|
||||||
|
|
||||||
|
if ($request->query->has('tos')) {
|
||||||
|
foreach ($request->query->get('tos') as $toId) {
|
||||||
|
if (null === $to = $this->userRepository->find($toId)) {
|
||||||
|
throw new NotFoundHttpException("user with id {$toId} is not found");
|
||||||
|
}
|
||||||
|
$notification->addAddressee($to);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$handler = $this->notificationHandlerManager->getHandler($notification);
|
$handler = $this->notificationHandlerManager->getHandler($notification);
|
||||||
} catch (NotificationHandlerNotFound $e) {
|
} catch (NotificationHandlerNotFound $e) {
|
||||||
|
@ -23,6 +23,7 @@ use Chill\MainBundle\Repository\UserRepository;
|
|||||||
use Chill\MainBundle\Templating\Listing\FilterOrderHelper;
|
use Chill\MainBundle\Templating\Listing\FilterOrderHelper;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\Form\Form;
|
use Symfony\Component\Form\Form;
|
||||||
use Symfony\Component\Form\FormInterface;
|
use Symfony\Component\Form\FormInterface;
|
||||||
@ -37,6 +38,8 @@ class UserController extends CRUDController
|
|||||||
{
|
{
|
||||||
public const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';
|
public const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';
|
||||||
|
|
||||||
|
protected ParameterBagInterface $parameterBag;
|
||||||
|
|
||||||
private LoggerInterface $logger;
|
private LoggerInterface $logger;
|
||||||
|
|
||||||
private UserPasswordEncoderInterface $passwordEncoder;
|
private UserPasswordEncoderInterface $passwordEncoder;
|
||||||
@ -49,12 +52,14 @@ class UserController extends CRUDController
|
|||||||
LoggerInterface $chillLogger,
|
LoggerInterface $chillLogger,
|
||||||
ValidatorInterface $validator,
|
ValidatorInterface $validator,
|
||||||
UserPasswordEncoderInterface $passwordEncoder,
|
UserPasswordEncoderInterface $passwordEncoder,
|
||||||
UserRepository $userRepository
|
UserRepository $userRepository,
|
||||||
|
ParameterBagInterface $parameterBag
|
||||||
) {
|
) {
|
||||||
$this->logger = $chillLogger;
|
$this->logger = $chillLogger;
|
||||||
$this->userRepository = $userRepository;
|
$this->userRepository = $userRepository;
|
||||||
$this->validator = $validator;
|
$this->validator = $validator;
|
||||||
$this->passwordEncoder = $passwordEncoder;
|
$this->passwordEncoder = $passwordEncoder;
|
||||||
|
$this->parameterBag = $parameterBag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,6 +109,7 @@ class UserController extends CRUDController
|
|||||||
|
|
||||||
return $this->render('@ChillMain/User/edit.html.twig', [
|
return $this->render('@ChillMain/User/edit.html.twig', [
|
||||||
'entity' => $user,
|
'entity' => $user,
|
||||||
|
'access_permissions_group_list' => $this->parameterBag->get('chill_main.access_permissions_group_list'),
|
||||||
'edit_form' => $this->createEditForm($user)->createView(),
|
'edit_form' => $this->createEditForm($user)->createView(),
|
||||||
'add_groupcenter_form' => $this->createAddLinkGroupCenterForm($user, $request)->createView(),
|
'add_groupcenter_form' => $this->createAddLinkGroupCenterForm($user, $request)->createView(),
|
||||||
'delete_groupcenter_form' => array_map(
|
'delete_groupcenter_form' => array_map(
|
||||||
@ -153,6 +159,73 @@ class UserController extends CRUDController
|
|||||||
return $this->redirect($this->generateUrl('chill_crud_admin_user_edit', ['id' => $uid]));
|
return $this->redirect($this->generateUrl('chill_crud_admin_user_edit', ['id' => $uid]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function edit(Request $request, $id): Response
|
||||||
|
{
|
||||||
|
$action = 'edit';
|
||||||
|
$entity = $this->getEntity($action, $id, $request);
|
||||||
|
|
||||||
|
if (null === $entity) {
|
||||||
|
throw $this->createNotFoundException(
|
||||||
|
sprintf(
|
||||||
|
'The %s with id %s is not found',
|
||||||
|
$this->getCrudName(),
|
||||||
|
$id
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = $this->checkACL($action, $entity);
|
||||||
|
|
||||||
|
if ($response instanceof Response) {
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = $this->onPostCheckACL($action, $request, $entity);
|
||||||
|
|
||||||
|
if ($response instanceof Response) {
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
$form = $this->createFormFor($action, $entity);
|
||||||
|
|
||||||
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
$this->onFormValid($action, $entity, $form, $request);
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
|
$this->onPreFlush($action, $entity, $form, $request);
|
||||||
|
$em->flush();
|
||||||
|
$this->onPostFlush($action, $entity, $form, $request);
|
||||||
|
|
||||||
|
$this->addFlash('success', $this->generateFormSuccessMessage($action, $entity));
|
||||||
|
|
||||||
|
$result = $this->onBeforeRedirectAfterSubmission($action, $entity, $form, $request);
|
||||||
|
|
||||||
|
if ($result instanceof Response) {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->redirectToRoute('chill_crud_' . $this->getCrudName() . '_index');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($form->isSubmitted()) {
|
||||||
|
$this->addFlash('error', $this->generateFormErrorMessage($action, $form));
|
||||||
|
}
|
||||||
|
|
||||||
|
$defaultTemplateParameters = [
|
||||||
|
'form' => $form->createView(),
|
||||||
|
'entity' => $entity,
|
||||||
|
'crud_name' => $this->getCrudName(),
|
||||||
|
'access_permissions_group_list' => $this->parameterBag->get('chill_main.access_permissions_group_list'),
|
||||||
|
];
|
||||||
|
|
||||||
|
return $this->render(
|
||||||
|
$this->getTemplateFor($action, $entity, $request),
|
||||||
|
$this->generateTemplateParameter($action, $entity, $request, $defaultTemplateParameters)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a form to edit the user current location.
|
* Displays a form to edit the user current location.
|
||||||
*
|
*
|
||||||
@ -271,6 +344,11 @@ class UserController extends CRUDController
|
|||||||
),
|
),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
} elseif ('index' === $action) {
|
||||||
|
return array_merge(
|
||||||
|
['allow_change_password' => $this->parameterBag->get('chill_main.access_user_change_password')],
|
||||||
|
$defaultTemplateParameters
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// default behaviour
|
// default behaviour
|
||||||
@ -307,7 +385,7 @@ class UserController extends CRUDController
|
|||||||
protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request)
|
protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request)
|
||||||
{
|
{
|
||||||
// for "new", encode the password
|
// for "new", encode the password
|
||||||
if ('new' === $action) {
|
if ('new' === $action && $this->parameterBag->get('chill_main.access_user_change_password')) {
|
||||||
$entity->setPassword($this->passwordEncoder
|
$entity->setPassword($this->passwordEncoder
|
||||||
->encodePassword($entity, $form['plainPassword']->getData()));
|
->encodePassword($entity, $form['plainPassword']->getData()));
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,16 @@ class ChillMainExtension extends Extension implements
|
|||||||
$config['access_global_history']
|
$config['access_global_history']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$container->setParameter(
|
||||||
|
'chill_main.access_user_change_password',
|
||||||
|
$config['access_user_change_password']
|
||||||
|
);
|
||||||
|
|
||||||
|
$container->setParameter(
|
||||||
|
'chill_main.access_permissions_group_list',
|
||||||
|
$config['access_permissions_group_list']
|
||||||
|
);
|
||||||
|
|
||||||
$container->setParameter(
|
$container->setParameter(
|
||||||
'chill_main.routing.resources',
|
'chill_main.routing.resources',
|
||||||
$config['routing']['resources']
|
$config['routing']['resources']
|
||||||
|
@ -116,6 +116,12 @@ class Configuration implements ConfigurationInterface
|
|||||||
->booleanNode('access_global_history')
|
->booleanNode('access_global_history')
|
||||||
->defaultTrue()
|
->defaultTrue()
|
||||||
->end()
|
->end()
|
||||||
|
->booleanNode('access_user_change_password')
|
||||||
|
->defaultTrue()
|
||||||
|
->end()
|
||||||
|
->booleanNode('access_permissions_group_list')
|
||||||
|
->defaultTrue()
|
||||||
|
->end()
|
||||||
->arrayNode('redis')
|
->arrayNode('redis')
|
||||||
->children()
|
->children()
|
||||||
->scalarNode('host')
|
->scalarNode('host')
|
||||||
|
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\MainBundle\Entity\Embeddable;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use function array_key_exists;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Embeddable
|
||||||
|
*/
|
||||||
|
class PrivateCommentEmbeddable
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="json", nullable=false, options={"default": "{}"})
|
||||||
|
*
|
||||||
|
* @var array<int, string>
|
||||||
|
*/
|
||||||
|
private array $comments = [];
|
||||||
|
|
||||||
|
public function getCommentForUser(User $user): string
|
||||||
|
{
|
||||||
|
return $this->comments[$user->getId()] ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getComments(): ?array
|
||||||
|
{
|
||||||
|
return $this->comments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hasCommentForUser(User $user): bool
|
||||||
|
{
|
||||||
|
return array_key_exists($user->getId(), $this->comments)
|
||||||
|
&& '' !== $this->comments[$user->getId()];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function merge(PrivateCommentEmbeddable $newComment): self
|
||||||
|
{
|
||||||
|
$currentComments = null === $this->getComments() ? [] : $this->getComments();
|
||||||
|
|
||||||
|
$mergedComments = $newComment->getComments() + $currentComments;
|
||||||
|
|
||||||
|
$this->setComments($mergedComments);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCommentForUser(User $user, ?string $content): self
|
||||||
|
{
|
||||||
|
$this->comments[$user->getId()] = trim((string) $content);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setComments($comments)
|
||||||
|
{
|
||||||
|
$this->comments = $comments;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -47,6 +47,11 @@ class User implements AdvancedUserInterface
|
|||||||
*/
|
*/
|
||||||
private array $attributes = [];
|
private array $attributes = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToOne(targetEntity=Civility::class)
|
||||||
|
*/
|
||||||
|
private ?Civility $civility = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity=Location::class)
|
* @ORM\ManyToOne(targetEntity=Location::class)
|
||||||
*/
|
*/
|
||||||
@ -184,6 +189,11 @@ class User implements AdvancedUserInterface
|
|||||||
return $this->attributes;
|
return $this->attributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getCivility(): ?Civility
|
||||||
|
{
|
||||||
|
return $this->civility;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCurrentLocation(): ?Location
|
public function getCurrentLocation(): ?Location
|
||||||
{
|
{
|
||||||
return $this->currentLocation;
|
return $this->currentLocation;
|
||||||
@ -363,6 +373,13 @@ class User implements AdvancedUserInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setCivility(?Civility $civility): User
|
||||||
|
{
|
||||||
|
$this->civility = $civility;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setCurrentLocation(?Location $currentLocation): User
|
public function setCurrentLocation(?Location $currentLocation): User
|
||||||
{
|
{
|
||||||
$this->currentLocation = $currentLocation;
|
$this->currentLocation = $currentLocation;
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\MainBundle\Form\DataMapper;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\DataMapperInterface;
|
||||||
|
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||||
|
use Symfony\Component\Security\Core\Security;
|
||||||
|
|
||||||
|
final class PrivateCommentDataMapper extends AbstractType implements DataMapperInterface
|
||||||
|
{
|
||||||
|
private Security $security;
|
||||||
|
|
||||||
|
public function __construct(Security $security)
|
||||||
|
{
|
||||||
|
$this->security = $security;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function mapDataToForms($viewData, $forms)
|
||||||
|
{
|
||||||
|
if (null === $viewData) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$viewData instanceof PrivateCommentEmbeddable) {
|
||||||
|
throw new UnexpectedTypeException($viewData, PrivateCommentEmbeddable::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
$forms = iterator_to_array($forms);
|
||||||
|
|
||||||
|
$forms['comments']->setData($viewData->getCommentForUser($this->security->getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function mapFormsToData($forms, &$viewData)
|
||||||
|
{
|
||||||
|
$forms = iterator_to_array($forms);
|
||||||
|
|
||||||
|
$viewData->setCommentForUser($this->security->getUser(), $forms['comments']->getData());
|
||||||
|
}
|
||||||
|
}
|
62
src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php
Normal file
62
src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\MainBundle\Form\Type;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
|
||||||
|
use Chill\MainBundle\Form\DataMapper\PrivateCommentDataMapper;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Form\FormInterface;
|
||||||
|
use Symfony\Component\Form\FormView;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||||
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
|
|
||||||
|
class PrivateCommentType extends AbstractType
|
||||||
|
{
|
||||||
|
protected PrivateCommentDataMapper $dataMapper;
|
||||||
|
|
||||||
|
protected UserInterface $user;
|
||||||
|
|
||||||
|
public function __construct(TokenStorageInterface $tokenStorage, PrivateCommentDataMapper $dataMapper)
|
||||||
|
{
|
||||||
|
$this->user = $tokenStorage->getToken()->getUser();
|
||||||
|
$this->dataMapper = $dataMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('comments', ChillTextareaType::class, [
|
||||||
|
'disable_editor' => $options['disable_editor'],
|
||||||
|
'label' => false,
|
||||||
|
])
|
||||||
|
->setDataMapper($this->dataMapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||||
|
{
|
||||||
|
$view->vars['hideLabel'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
{
|
||||||
|
$resolver
|
||||||
|
->setDefined('disable_editor')
|
||||||
|
->setAllowedTypes('disable_editor', 'bool')
|
||||||
|
->setDefaults([
|
||||||
|
'data_class' => PrivateCommentEmbeddable::class,
|
||||||
|
'disable_editor' => false,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
@ -43,6 +43,7 @@ class UserCurrentLocationType extends AbstractType
|
|||||||
},
|
},
|
||||||
'placeholder' => 'Pick a location',
|
'placeholder' => 'Pick a location',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
'attr' => ['class' => 'select2'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,9 +15,11 @@ use Chill\MainBundle\Entity\Center;
|
|||||||
use Chill\MainBundle\Entity\Location;
|
use Chill\MainBundle\Entity\Location;
|
||||||
use Chill\MainBundle\Entity\Scope;
|
use Chill\MainBundle\Entity\Scope;
|
||||||
use Chill\MainBundle\Entity\UserJob;
|
use Chill\MainBundle\Entity\UserJob;
|
||||||
|
use Chill\MainBundle\Form\Type\PickCivilityType;
|
||||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
@ -32,11 +34,16 @@ use Symfony\Component\Validator\Constraints\Regex;
|
|||||||
|
|
||||||
class UserType extends AbstractType
|
class UserType extends AbstractType
|
||||||
{
|
{
|
||||||
|
protected ParameterBagInterface $parameterBag;
|
||||||
|
|
||||||
private TranslatableStringHelper $translatableStringHelper;
|
private TranslatableStringHelper $translatableStringHelper;
|
||||||
|
|
||||||
public function __construct(TranslatableStringHelper $translatableStringHelper)
|
public function __construct(
|
||||||
{
|
TranslatableStringHelper $translatableStringHelper,
|
||||||
|
ParameterBagInterface $parameterBag
|
||||||
|
) {
|
||||||
$this->translatableStringHelper = $translatableStringHelper;
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->parameterBag = $parameterBag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
@ -47,6 +54,11 @@ class UserType extends AbstractType
|
|||||||
'required' => true,
|
'required' => true,
|
||||||
])
|
])
|
||||||
->add('label', TextType::class)
|
->add('label', TextType::class)
|
||||||
|
->add('civility', PickCivilityType::class, [
|
||||||
|
'required' => false,
|
||||||
|
'label' => 'Civility',
|
||||||
|
'placeholder' => 'choose civility',
|
||||||
|
])
|
||||||
->add('mainCenter', EntityType::class, [
|
->add('mainCenter', EntityType::class, [
|
||||||
'label' => 'Main center',
|
'label' => 'Main center',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
@ -76,6 +88,12 @@ class UserType extends AbstractType
|
|||||||
'choice_label' => function (UserJob $c) {
|
'choice_label' => function (UserJob $c) {
|
||||||
return $this->translatableStringHelper->localize($c->getLabel());
|
return $this->translatableStringHelper->localize($c->getLabel());
|
||||||
},
|
},
|
||||||
|
'query_builder' => static function (EntityRepository $er) {
|
||||||
|
$qb = $er->createQueryBuilder('uj');
|
||||||
|
$qb->where('uj.active = TRUE');
|
||||||
|
|
||||||
|
return $qb;
|
||||||
|
},
|
||||||
])
|
])
|
||||||
->add('mainLocation', EntityType::class, [
|
->add('mainLocation', EntityType::class, [
|
||||||
'label' => 'Main location',
|
'label' => 'Main location',
|
||||||
@ -94,7 +112,8 @@ class UserType extends AbstractType
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($options['is_creation']) {
|
// @phpstan-ignore-next-line
|
||||||
|
if ($options['is_creation'] && $this->parameterBag->get('chill_main.access_user_change_password')) {
|
||||||
$builder->add('plainPassword', RepeatedType::class, [
|
$builder->add('plainPassword', RepeatedType::class, [
|
||||||
'mapped' => false,
|
'mapped' => false,
|
||||||
'type' => PasswordType::class,
|
'type' => PasswordType::class,
|
||||||
|
@ -109,6 +109,7 @@ class WorkflowStepType extends AbstractType
|
|||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'choices' => $choices,
|
'choices' => $choices,
|
||||||
|
'constraints' => [new NotNull()],
|
||||||
'choice_label' => function (Transition $transition) use ($workflow) {
|
'choice_label' => function (Transition $transition) use ($workflow) {
|
||||||
$meta = $workflow->getMetadataStore()->getTransitionMetadata($transition);
|
$meta = $workflow->getMetadataStore()->getTransitionMetadata($transition);
|
||||||
|
|
||||||
@ -208,24 +209,28 @@ class WorkflowStepType extends AbstractType
|
|||||||
$transition = $form['transition']->getData();
|
$transition = $form['transition']->getData();
|
||||||
$toFinal = true;
|
$toFinal = true;
|
||||||
|
|
||||||
foreach ($transition->getTos() as $to) {
|
if (null === $transition) {
|
||||||
$meta = $workflow->getMetadataStore()->getPlaceMetadata($to);
|
|
||||||
|
|
||||||
if (
|
|
||||||
!array_key_exists('isFinal', $meta) || false === $meta['isFinal']
|
|
||||||
) {
|
|
||||||
$toFinal = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$destUsers = $form['future_dest_users']->getData();
|
|
||||||
$destEmails = $form['future_dest_emails']->getData();
|
|
||||||
|
|
||||||
if (!$toFinal && [] === $destUsers && [] === $destEmails) {
|
|
||||||
$context
|
$context
|
||||||
->buildViolation('workflow.You must add at least one dest user or email')
|
->buildViolation('workflow.You must select a next step, pick another decision if no next steps are available');
|
||||||
->atPath('future_dest_users')
|
} else {
|
||||||
->addViolation();
|
foreach ($transition->getTos() as $to) {
|
||||||
|
$meta = $workflow->getMetadataStore()->getPlaceMetadata($to);
|
||||||
|
|
||||||
|
if (
|
||||||
|
!array_key_exists('isFinal', $meta) || false === $meta['isFinal']
|
||||||
|
) {
|
||||||
|
$toFinal = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$destUsers = $form['future_dest_users']->getData();
|
||||||
|
$destEmails = $form['future_dest_emails']->getData();
|
||||||
|
|
||||||
|
if (!$toFinal && [] === $destUsers && [] === $destEmails) {
|
||||||
|
$context
|
||||||
|
->buildViolation('workflow.You must add at least one dest user or email')
|
||||||
|
->atPath('future_dest_users')
|
||||||
|
->addViolation();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
@ -298,6 +298,10 @@ table.table-bordered {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.private-quote {
|
||||||
|
border-left: 10px solid $pink;
|
||||||
|
}
|
||||||
|
|
||||||
/// meta-data
|
/// meta-data
|
||||||
div.createdBy,
|
div.createdBy,
|
||||||
div.updatedBy,
|
div.updatedBy,
|
||||||
|
@ -121,7 +121,9 @@ export default {
|
|||||||
this.entity.selected.city = value;
|
this.entity.selected.city = value;
|
||||||
this.entity.selected.postcode.name = value.name;
|
this.entity.selected.postcode.name = value.name;
|
||||||
this.entity.selected.postcode.code = value.code;
|
this.entity.selected.postcode.code = value.code;
|
||||||
this.entity.selected.postcode.coordinates = value.center.coordinates;
|
if (value.center) {
|
||||||
|
this.entity.selected.postcode.coordinates = value.center.coordinates;
|
||||||
|
}
|
||||||
this.entity.selected.writeNew.postcode = false;
|
this.entity.selected.writeNew.postcode = false;
|
||||||
this.$emit('getReferenceAddresses', value);
|
this.$emit('getReferenceAddresses', value);
|
||||||
this.focusOnAddress();
|
this.focusOnAddress();
|
||||||
|
@ -15,26 +15,69 @@
|
|||||||
<span v-if="forceRedirect">{{ $t('wait_redirection') }}</span>
|
<span v-if="forceRedirect">{{ $t('wait_redirection') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="showMessageWhenNoAddress" class="mt-5">
|
<div v-if="(!this.context.edit && !this.flag.success && this.context.target.name !== 'household')" class="mt-5">
|
||||||
<p class="chill-no-data-statement">
|
<div class="no-address-yet">
|
||||||
{{ $t('not_yet_address') }}
|
<i class="fa fa-map-marker" aria-hidden="true"></i>
|
||||||
</p>
|
<p class="chill-no-data-statement">
|
||||||
|
{{ $t('not_yet_address') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<action-buttons
|
||||||
|
:options="this.options"
|
||||||
|
:defaultz="this.defaultz"
|
||||||
|
class="add-address-btn">
|
||||||
|
<template v-slot:action>
|
||||||
|
<button @click.prevent="$emit('openEditPane')"
|
||||||
|
class="btn" :class="getClassButton"
|
||||||
|
type="button" name="button" :title="$t(getTextButton)">
|
||||||
|
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
</action-buttons>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="this.context.edit" class="mb-3 row">
|
||||||
|
<div class="col-sm-4"></div>
|
||||||
|
<div class="address-container col-sm-8">
|
||||||
|
<address-render-box :address="address" :isMultiline="false" :useDatePane="useDatePane"></address-render-box>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="this.context.target.name === 'household' || this.context.edit">
|
||||||
|
<action-buttons
|
||||||
|
:options="this.options"
|
||||||
|
:defaultz="this.defaultz">
|
||||||
|
<template v-slot:action>
|
||||||
|
<button @click.prevent="$emit('openEditPane')"
|
||||||
|
class="btn btn-sm" :class="getClassButton"
|
||||||
|
type="button" name="button" :title="$t(getTextButton)">
|
||||||
|
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
</action-buttons>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!this.context.edit">
|
||||||
|
<address-render-box :address="address" :isMultiline="false" :useDatePane="useDatePane"></address-render-box>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<address-render-box :address="address" :useDatePane="useDatePane"></address-render-box>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<action-buttons
|
<div v-if="onlyButton">
|
||||||
:options="this.options"
|
<action-buttons
|
||||||
:defaultz="this.defaultz">
|
:options="this.options"
|
||||||
<template v-slot:action>
|
:defaultz="this.defaultz"
|
||||||
<button @click.prevent="$emit('openEditPane')"
|
class="add-address-btn">
|
||||||
class="btn" :class="getClassButton"
|
<template v-slot:action>
|
||||||
type="button" name="button" :title="$t(getTextButton)">
|
<button @click.prevent="$emit('openEditPane')"
|
||||||
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
class="btn" :class="getClassButton"
|
||||||
</button>
|
type="button" name="button" :title="$t(getTextButton)">
|
||||||
</template>
|
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||||
</action-buttons>
|
</button>
|
||||||
|
</template>
|
||||||
|
</action-buttons>
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -58,6 +101,9 @@ export default {
|
|||||||
'useDatePane'
|
'useDatePane'
|
||||||
],
|
],
|
||||||
emits: ['openEditPane'],
|
emits: ['openEditPane'],
|
||||||
|
mounted() {
|
||||||
|
console.log('context', this.context)
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
address() {
|
address() {
|
||||||
return this.entity.address;
|
return this.entity.address;
|
||||||
@ -91,13 +137,35 @@ export default {
|
|||||||
forceRedirect() {
|
forceRedirect() {
|
||||||
return (!(this.context.backUrl === null || typeof this.context.backUrl === 'undefined'));
|
return (!(this.context.backUrl === null || typeof this.context.backUrl === 'undefined'));
|
||||||
},
|
},
|
||||||
showMessageWhenNoAddress() {
|
// showMessageWhenNoAddress() {
|
||||||
let showMessageWhenNoAddress = this.options.showMessageWhenNoAddress === undefined ? this.defaultz.showMessageWhenNoAddress : this.options.showMessageWhenNoAddress;
|
// let showMessageWhenNoAddress = this.options.showMessageWhenNoAddress === undefined ? this.defaultz.showMessageWhenNoAddress : this.options.showMessageWhenNoAddress;
|
||||||
if (showMessageWhenNoAddress === true || showMessageWhenNoAddress === false) {
|
// if (showMessageWhenNoAddress === true || showMessageWhenNoAddress === false) {
|
||||||
return !this.context.edit && !this.address.id && showMessageWhenNoAddress;
|
// return !this.context.edit && !this.address.id && showMessageWhenNoAddress;
|
||||||
}
|
// }
|
||||||
return !this.context.edit && !this.address.id && this.options.stickyActions;
|
// return !this.context.edit && !this.address.id && this.options.stickyActions;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.address-container {
|
||||||
|
display:flex;
|
||||||
|
justify-content:flex-end;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.no-address-yet {
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
|
||||||
|
padding:1.5rem;
|
||||||
|
margin-bottom:2rem;
|
||||||
|
i {
|
||||||
|
font-size:2rem;
|
||||||
|
margin-bottom:2rem;
|
||||||
|
}
|
||||||
|
.add-address-btn {
|
||||||
|
display: block
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="alert alert-light">{{ $t('my_tasks.description_warning') }}</div>
|
<div class="alert alert-light">{{ $t('my_tasks.description_warning') }}</div>
|
||||||
<span v-if="noResultsAlert" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
<span v-if="noResultsAlert" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
||||||
<tab-table v-else>
|
<tab-table v-else>
|
||||||
@ -11,7 +11,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-slot:tbody>
|
<template v-slot:tbody>
|
||||||
<tr v-for="(t, i) in tasks.alert.results" :key="`task-alert-${i}`">
|
<tr v-for="(t, i) in tasks.alert.results" :key="`task-alert-${i}`">
|
||||||
<td>{{ $d(t.warningDate.datetime, 'short') }}</td>
|
<td v-if="null !== t.warningDate">{{ $d(t.warningDate.datetime, 'short') }}</td>
|
||||||
|
<td v-else></td>
|
||||||
<td>
|
<td>
|
||||||
<span class="outdated">{{ $d(t.endDate.datetime, 'short') }}</span>
|
<span class="outdated">{{ $d(t.endDate.datetime, 'short') }}</span>
|
||||||
</td>
|
</td>
|
||||||
@ -24,7 +25,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
</tab-table>
|
</tab-table>
|
||||||
|
|
||||||
<div class="alert alert-light">{{ $t('my_tasks.description_alert') }}</div>
|
<div class="alert alert-light">{{ $t('my_tasks.description_alert') }}</div>
|
||||||
<span v-if="noResultsWarning" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
<span v-if="noResultsWarning" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
||||||
<tab-table v-else>
|
<tab-table v-else>
|
||||||
@ -49,7 +50,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
</tab-table>
|
</tab-table>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -9,7 +9,11 @@
|
|||||||
#}
|
#}
|
||||||
{{ opening_box|raw }}
|
{{ opening_box|raw }}
|
||||||
{%- if options['limit_lines'] is not null -%}
|
{%- if options['limit_lines'] is not null -%}
|
||||||
{% set content = comment.comment|split('\n')|slice(0, options['limit_lines'])|join('\n') %}
|
{% if comment.comment|split('\n')|length > options['limit_lines'] %}
|
||||||
|
{% set content = comment.comment|split('\n')|slice(0, options['limit_lines'])|merge(['(more...)'|trans])|join('\n') %}
|
||||||
|
{% else %}
|
||||||
|
{% set content = comment.comment %}
|
||||||
|
{% endif %}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{% set content = comment.comment %}
|
{% set content = comment.comment %}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
@ -198,6 +198,23 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block private_comment_row %}
|
||||||
|
{{ form_label(form) }}
|
||||||
|
{{ form_row(form) }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block private_comment_widget %}
|
||||||
|
{% for entry in form %}
|
||||||
|
{{ form_widget(entry) }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block comment_row %}
|
||||||
|
{{ form_label(form) }}
|
||||||
|
{{ form_row(form) }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block comment_widget %}
|
{% block comment_widget %}
|
||||||
{% for entry in form %}
|
{% for entry in form %}
|
||||||
{{ form_widget(entry) }}
|
{{ form_widget(entry) }}
|
||||||
|
@ -54,6 +54,8 @@
|
|||||||
} %}
|
} %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{ chill_pagination(paginator) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -3,54 +3,56 @@
|
|||||||
{% block admin_content -%}
|
{% block admin_content -%}
|
||||||
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
||||||
{% block crud_content_after_form %}
|
{% block crud_content_after_form %}
|
||||||
<h2>{{ 'Permissions granted'|trans }}</h2>
|
{% if access_permissions_group_list %}
|
||||||
|
<h2>{{ 'Permissions granted'|trans }}</h2>
|
||||||
|
|
||||||
{% if entity.groupcenters|length > 0 %}
|
{% if entity.groupcenters|length > 0 %}
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
|
||||||
<th>{{ 'Permission group'|trans }}</th>
|
|
||||||
<th>{{ 'Center'|trans }}</th>
|
|
||||||
<th> </th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for groupcenter in entity.groupcenters %}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<th>{{ 'Permission group'|trans }}</th>
|
||||||
<span class="user_group permissionsgroup">
|
<th>{{ 'Center'|trans }}</th>
|
||||||
{{ groupcenter.permissionsgroup.name }}
|
<th> </th>
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span class="user_group center">
|
|
||||||
{{ groupcenter.center.name }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ form_start(delete_groupcenter_form[groupcenter.id]) }}
|
|
||||||
{{ form_row(delete_groupcenter_form[groupcenter.id].submit, { 'attr': { 'class': 'btn btn-chill-red' } } ) }}
|
|
||||||
{{ form_rest(delete_groupcenter_form[groupcenter.id]) }}
|
|
||||||
{{ form_end(delete_groupcenter_form[groupcenter.id]) }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
{% for groupcenter in entity.groupcenters %}
|
||||||
{% else %}
|
<tr>
|
||||||
<p>{{ 'Any permissions granted to this user'|trans }}.</p>
|
<td>
|
||||||
|
<span class="user_group permissionsgroup">
|
||||||
|
{{ groupcenter.permissionsgroup.name }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span class="user_group center">
|
||||||
|
{{ groupcenter.center.name }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ form_start(delete_groupcenter_form[groupcenter.id]) }}
|
||||||
|
{{ form_row(delete_groupcenter_form[groupcenter.id].submit, { 'attr': { 'class': 'btn btn-chill-red' } } ) }}
|
||||||
|
{{ form_rest(delete_groupcenter_form[groupcenter.id]) }}
|
||||||
|
{{ form_end(delete_groupcenter_form[groupcenter.id]) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<p>{{ 'Any permissions granted to this user'|trans }}.</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<h3>{{ 'Grant new permissions'|trans }}</h3>
|
||||||
|
|
||||||
|
{{ form_start(add_groupcenter_form) }}
|
||||||
|
{{ form_row(add_groupcenter_form.composed_groupcenter.center) }}
|
||||||
|
{{ form_row(add_groupcenter_form.composed_groupcenter.permissionsgroup) }}
|
||||||
|
{{ form_row(add_groupcenter_form.submit, { 'attr' : { 'class': 'btn btn-chill-green' } } ) }}
|
||||||
|
|
||||||
|
{{ form_end(add_groupcenter_form) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<h3>{{ 'Grant new permissions'|trans }}</h3>
|
|
||||||
|
|
||||||
{{ form_start(add_groupcenter_form) }}
|
|
||||||
{{ form_row(add_groupcenter_form.composed_groupcenter.center) }}
|
|
||||||
{{ form_row(add_groupcenter_form.composed_groupcenter.permissionsgroup) }}
|
|
||||||
{{ form_row(add_groupcenter_form.submit, { 'attr' : { 'class': 'btn btn-chill-green' } } ) }}
|
|
||||||
|
|
||||||
{{ form_end(add_groupcenter_form) }}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||||
{% endembed %}
|
{% endembed %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -11,6 +11,11 @@
|
|||||||
<div class="item-bloc">
|
<div class="item-bloc">
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
|
{% if entity.civility is not null %}
|
||||||
|
{% if entity.civility.name|length > 0 %}
|
||||||
|
{{ entity.civility.name|first }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{{ entity.label }}
|
{{ entity.label }}
|
||||||
{% if entity.isEnabled %}
|
{% if entity.isEnabled %}
|
||||||
<i class="fa fa-check chill-green"></i>
|
<i class="fa fa-check chill-green"></i>
|
||||||
@ -45,9 +50,13 @@
|
|||||||
<li>
|
<li>
|
||||||
<a class="btn btn-edit" href="{{ path('chill_crud_admin_user_edit', { 'id': entity.id }) }}"></a>
|
<a class="btn btn-edit" href="{{ path('chill_crud_admin_user_edit', { 'id': entity.id }) }}"></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
{% if allow_change_password is same as(true) %}
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-chill-red" href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}" title="{{ 'Edit password'|trans|e('html_attr') }}"><i class="fa fa-ellipsis-h"></i></a>
|
<a class="btn btn-chill-red" href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}" title="{{ 'Edit password'|trans|e('html_attr') }}"><i class="fa fa-ellipsis-h"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
|
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-chill-blue" href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}" title="{{ "Impersonate"|trans|e('html_attr') }}"><i class="fa fa-user-secret"></i></a>
|
<a class="btn btn-chill-blue" href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}" title="{{ "Impersonate"|trans|e('html_attr') }}"><i class="fa fa-user-secret"></i></a>
|
||||||
|
@ -115,5 +115,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{{ chill_pagination(paginator) }}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|
||||||
<title>{{ installation.name }} - {% block title %}{{ 'Homepage'|trans }}{% endblock %}</title>
|
<title>{{ installation.name }} - {% block title %}{{ 'Homepage'|trans }}{% endblock %}</title>
|
||||||
|
{% block head_custom %}{% endblock %}
|
||||||
<link rel="shortcut icon" href="{{ asset('build/images/favicon.ico') }}" type="image/x-icon">
|
<link rel="shortcut icon" href="{{ asset('build/images/favicon.ico') }}" type="image/x-icon">
|
||||||
|
|
||||||
{{ encore_entry_link_tags('mod_bootstrap') }}
|
{{ encore_entry_link_tags('mod_bootstrap') }}
|
||||||
|
@ -13,6 +13,7 @@ namespace Chill\MainBundle\Routing\MenuBuilder;
|
|||||||
|
|
||||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||||
use Knp\Menu\MenuItem;
|
use Knp\Menu\MenuItem;
|
||||||
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
||||||
|
|
||||||
class AdminUserMenuBuilder implements LocalMenuBuilderInterface
|
class AdminUserMenuBuilder implements LocalMenuBuilderInterface
|
||||||
@ -22,9 +23,14 @@ class AdminUserMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
*/
|
*/
|
||||||
protected $authorizationChecker;
|
protected $authorizationChecker;
|
||||||
|
|
||||||
public function __construct(AuthorizationCheckerInterface $authorizationChecker)
|
protected ParameterBagInterface $parameterBag;
|
||||||
{
|
|
||||||
|
public function __construct(
|
||||||
|
AuthorizationCheckerInterface $authorizationChecker,
|
||||||
|
ParameterBagInterface $parameterBag
|
||||||
|
) {
|
||||||
$this->authorizationChecker = $authorizationChecker;
|
$this->authorizationChecker = $authorizationChecker;
|
||||||
|
$this->parameterBag = $parameterBag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
@ -51,9 +57,11 @@ class AdminUserMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
'route' => 'admin_scope',
|
'route' => 'admin_scope',
|
||||||
])->setExtras(['order' => 1020]);
|
])->setExtras(['order' => 1020]);
|
||||||
|
|
||||||
$menu->addChild('Permissions group list', [
|
if ($this->parameterBag->get('chill_main.access_permissions_group_list')) {
|
||||||
'route' => 'admin_permissionsgroup',
|
$menu->addChild('Permissions group list', [
|
||||||
])->setExtras(['order' => 1030]);
|
'route' => 'admin_permissionsgroup',
|
||||||
|
])->setExtras(['order' => 1030]);
|
||||||
|
}
|
||||||
|
|
||||||
$menu->addChild('crud.admin_user.index.title', [
|
$menu->addChild('crud.admin_user.index.title', [
|
||||||
'route' => 'chill_crud_admin_user_index',
|
'route' => 'chill_crud_admin_user_index',
|
||||||
|
@ -15,13 +15,19 @@ use Chill\MainBundle\Entity\User;
|
|||||||
use Chill\MainBundle\Notification\Counter\NotificationByUserCounter;
|
use Chill\MainBundle\Notification\Counter\NotificationByUserCounter;
|
||||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||||
use Chill\MainBundle\Workflow\Counter\WorkflowByUserCounter;
|
use Chill\MainBundle\Workflow\Counter\WorkflowByUserCounter;
|
||||||
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class UserMenuBuilder implements LocalMenuBuilderInterface
|
class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
|
protected ParameterBagInterface $parameterBag;
|
||||||
|
|
||||||
private NotificationByUserCounter $notificationByUserCounter;
|
private NotificationByUserCounter $notificationByUserCounter;
|
||||||
|
|
||||||
|
private RequestStack $requestStack;
|
||||||
|
|
||||||
private Security $security;
|
private Security $security;
|
||||||
|
|
||||||
private TranslatorInterface $translator;
|
private TranslatorInterface $translator;
|
||||||
@ -32,12 +38,16 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
NotificationByUserCounter $notificationByUserCounter,
|
NotificationByUserCounter $notificationByUserCounter,
|
||||||
WorkflowByUserCounter $workflowByUserCounter,
|
WorkflowByUserCounter $workflowByUserCounter,
|
||||||
Security $security,
|
Security $security,
|
||||||
TranslatorInterface $translator
|
TranslatorInterface $translator,
|
||||||
|
ParameterBagInterface $parameterBag,
|
||||||
|
RequestStack $requestStack
|
||||||
) {
|
) {
|
||||||
$this->notificationByUserCounter = $notificationByUserCounter;
|
$this->notificationByUserCounter = $notificationByUserCounter;
|
||||||
$this->workflowByUserCounter = $workflowByUserCounter;
|
$this->workflowByUserCounter = $workflowByUserCounter;
|
||||||
$this->security = $security;
|
$this->security = $security;
|
||||||
$this->translator = $translator;
|
$this->translator = $translator;
|
||||||
|
$this->parameterBag = $parameterBag;
|
||||||
|
$this->requestStack = $requestStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, \Knp\Menu\MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, \Knp\Menu\MenuItem $menu, array $parameters)
|
||||||
@ -54,7 +64,12 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
$menu
|
$menu
|
||||||
->addChild(
|
->addChild(
|
||||||
$locationTextMenu,
|
$locationTextMenu,
|
||||||
['route' => 'chill_main_user_currentlocation_edit']
|
[
|
||||||
|
'route' => 'chill_main_user_currentlocation_edit',
|
||||||
|
'routeParameters' => [
|
||||||
|
'returnPath' => $this->requestStack->getCurrentRequest()->getRequestUri(),
|
||||||
|
],
|
||||||
|
]
|
||||||
)
|
)
|
||||||
->setExtras([
|
->setExtras([
|
||||||
'order' => -9999999,
|
'order' => -9999999,
|
||||||
@ -85,14 +100,16 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
'order' => 700,
|
'order' => 700,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$menu
|
if ($this->parameterBag->get('chill_main.access_user_change_password')) {
|
||||||
->addChild(
|
$menu
|
||||||
'Change password',
|
->addChild(
|
||||||
['route' => 'change_my_password']
|
'Change password',
|
||||||
)
|
['route' => 'change_my_password']
|
||||||
->setExtras([
|
)
|
||||||
'order' => 99999999998,
|
->setExtras([
|
||||||
]);
|
'order' => 99999999998,
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$menu
|
$menu
|
||||||
|
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\MainBundle\Serializer\Normalizer;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
|
||||||
|
use Symfony\Component\Security\Core\Security;
|
||||||
|
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||||
|
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||||
|
|
||||||
|
class PrivateCommentEmbeddableNormalizer implements NormalizerInterface, DenormalizerInterface
|
||||||
|
{
|
||||||
|
private Security $security;
|
||||||
|
|
||||||
|
public function __construct(Security $security)
|
||||||
|
{
|
||||||
|
$this->security = $security;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function denormalize($data, string $type, ?string $format = null, array $context = []): PrivateCommentEmbeddable
|
||||||
|
{
|
||||||
|
$comment = new PrivateCommentEmbeddable();
|
||||||
|
|
||||||
|
if (null === $data) {
|
||||||
|
return $comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
$comment->setCommentForUser($this->security->getUser(), $data);
|
||||||
|
|
||||||
|
return $comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function normalize($object, $format = null, array $context = []): string
|
||||||
|
{
|
||||||
|
return $object->getCommentForUser($this->security->getUser());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function supportsDenormalization($data, string $type, ?string $format = null): bool
|
||||||
|
{
|
||||||
|
return PrivateCommentEmbeddable::class === $type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function supportsNormalization($data, ?string $format = null): bool
|
||||||
|
{
|
||||||
|
return $data instanceof PrivateCommentEmbeddable;
|
||||||
|
}
|
||||||
|
}
|
@ -12,6 +12,7 @@ declare(strict_types=1);
|
|||||||
namespace Chill\MainBundle\Serializer\Normalizer;
|
namespace Chill\MainBundle\Serializer\Normalizer;
|
||||||
|
|
||||||
use Chill\MainBundle\Entity\Center;
|
use Chill\MainBundle\Entity\Center;
|
||||||
|
use Chill\MainBundle\Entity\Civility;
|
||||||
use Chill\MainBundle\Entity\Location;
|
use Chill\MainBundle\Entity\Location;
|
||||||
use Chill\MainBundle\Entity\Scope;
|
use Chill\MainBundle\Entity\Scope;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
@ -41,9 +42,9 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
|||||||
$this->userRender = $userRender;
|
$this->userRender = $userRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function normalize($user, $format = null, array $context = [])
|
public function normalize($object, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
/** @var User $user */
|
/** @var User $object */
|
||||||
$userJobContext = array_merge(
|
$userJobContext = array_merge(
|
||||||
$context,
|
$context,
|
||||||
['docgen:expects' => UserJob::class, 'groups' => 'docgen:read']
|
['docgen:expects' => UserJob::class, 'groups' => 'docgen:read']
|
||||||
@ -60,9 +61,14 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
|||||||
$context,
|
$context,
|
||||||
['docgen:expects' => Location::class, 'groups' => 'docgen:read']
|
['docgen:expects' => Location::class, 'groups' => 'docgen:read']
|
||||||
);
|
);
|
||||||
|
$civilityContext = array_merge(
|
||||||
|
$context,
|
||||||
|
['docgen:expects' => Civility::class, 'groups' => 'docgen:read']
|
||||||
|
);
|
||||||
|
|
||||||
if (null === $user && 'docgen' === $format) {
|
if (null === $object && 'docgen' === $format) {
|
||||||
return array_merge(self::NULL_USER, [
|
return array_merge(self::NULL_USER, [
|
||||||
|
'civility' => $this->normalizer->normalize(null, $format, $civilityContext),
|
||||||
'user_job' => $this->normalizer->normalize(null, $format, $userJobContext),
|
'user_job' => $this->normalizer->normalize(null, $format, $userJobContext),
|
||||||
'main_center' => $this->normalizer->normalize(null, $format, $centerContext),
|
'main_center' => $this->normalizer->normalize(null, $format, $centerContext),
|
||||||
'main_scope' => $this->normalizer->normalize(null, $format, $scopeContext),
|
'main_scope' => $this->normalizer->normalize(null, $format, $scopeContext),
|
||||||
@ -73,19 +79,20 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
|||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'type' => 'user',
|
'type' => 'user',
|
||||||
'id' => $user->getId(),
|
'id' => $object->getId(),
|
||||||
'username' => $user->getUsername(),
|
'username' => $object->getUsername(),
|
||||||
'text' => $this->userRender->renderString($user, []),
|
'text' => $this->userRender->renderString($object, []),
|
||||||
'label' => $user->getLabel(),
|
'label' => $object->getLabel(),
|
||||||
'email' => (string) $user->getEmail(),
|
'email' => (string) $object->getEmail(),
|
||||||
'user_job' => $this->normalizer->normalize($user->getUserJob(), $format, $userJobContext),
|
'user_job' => $this->normalizer->normalize($object->getUserJob(), $format, $userJobContext),
|
||||||
'main_center' => $this->normalizer->normalize($user->getMainCenter(), $format, $centerContext),
|
'main_center' => $this->normalizer->normalize($object->getMainCenter(), $format, $centerContext),
|
||||||
'main_scope' => $this->normalizer->normalize($user->getMainScope(), $format, $scopeContext),
|
'main_scope' => $this->normalizer->normalize($object->getMainScope(), $format, $scopeContext),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ('docgen' === $format) {
|
if ('docgen' === $format) {
|
||||||
$data['current_location'] = $this->normalizer->normalize($user->getCurrentLocation(), $format, $locationContext);
|
$data['civility'] = $this->normalizer->normalize($object->getCivility(), $format, $civilityContext);
|
||||||
$data['main_location'] = $this->normalizer->normalize($user->getMainLocation(), $format, $locationContext);
|
$data['current_location'] = $this->normalizer->normalize($object->getCurrentLocation(), $format, $locationContext);
|
||||||
|
$data['main_location'] = $this->normalizer->normalize($object->getMainLocation(), $format, $locationContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
@ -143,3 +143,7 @@ services:
|
|||||||
Chill\MainBundle\Form\Type\LocationFormType: ~
|
Chill\MainBundle\Form\Type\LocationFormType: ~
|
||||||
|
|
||||||
Chill\MainBundle\Form\WorkflowStepType: ~
|
Chill\MainBundle\Form\WorkflowStepType: ~
|
||||||
|
|
||||||
|
Chill\MainBundle\Form\DataMapper\PrivateCommentDataMapper:
|
||||||
|
autowire: true
|
||||||
|
autoconfigure: true
|
||||||
|
@ -10,4 +10,9 @@ services:
|
|||||||
Chill\MainBundle\Serializer\Normalizer\DoctrineExistingEntityNormalizer:
|
Chill\MainBundle\Serializer\Normalizer\DoctrineExistingEntityNormalizer:
|
||||||
tags:
|
tags:
|
||||||
- { name: 'serializer.normalizer', priority: 8 }
|
- { name: 'serializer.normalizer', priority: 8 }
|
||||||
|
Chill\MainBundle\Serializer\Normalizer\PrivateCommentEmbeddableNormalizer:
|
||||||
|
autowire: true
|
||||||
|
autoconfigure: true
|
||||||
|
tags:
|
||||||
|
- { name: 'serializer.normalizer', priority: 64 }
|
||||||
|
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\Migrations\Main;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
final class Version20220513151853 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'set default on attributes';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('update users set attributes = \'[]\'::json where attributes IS NULL');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\Migrations\Main;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add civility to User.
|
||||||
|
*/
|
||||||
|
final class Version20220516085659 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE users DROP CONSTRAINT FK_1483A5E923D6A298');
|
||||||
|
$this->addSql('DROP INDEX IDX_1483A5E923D6A298');
|
||||||
|
$this->addSql('ALTER TABLE users DROP civility_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Add civility to User';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE users ADD civility_id INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E923D6A298 FOREIGN KEY (civility_id) REFERENCES chill_main_civility (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('CREATE INDEX IDX_1483A5E923D6A298 ON users (civility_id)');
|
||||||
|
}
|
||||||
|
}
|
@ -62,9 +62,11 @@ Comment: Commentaire
|
|||||||
Pinned comment: Commentaire épinglé
|
Pinned comment: Commentaire épinglé
|
||||||
Any comment: Aucun commentaire
|
Any comment: Aucun commentaire
|
||||||
Read more: Lire la suite
|
Read more: Lire la suite
|
||||||
|
(more...): (suite...)
|
||||||
|
|
||||||
# comment embeddable
|
# comment embeddable
|
||||||
No comment associated: Aucun commentaire
|
No comment associated: Aucun commentaire
|
||||||
|
private comment: Notes privées
|
||||||
|
|
||||||
#pagination
|
#pagination
|
||||||
Previous: Précédent
|
Previous: Précédent
|
||||||
@ -461,6 +463,7 @@ workflow:
|
|||||||
Previous transitionned: Anciens workflows
|
Previous transitionned: Anciens workflows
|
||||||
Previous workflow transitionned help: Workflows où vous avez exécuté une action.
|
Previous workflow transitionned help: Workflows où vous avez exécuté une action.
|
||||||
For: Pour
|
For: Pour
|
||||||
|
You must select a next step, pick another decision if no next steps are available: Il faut une prochaine étape. Choissisez une autre décision si nécessaire.
|
||||||
|
|
||||||
|
|
||||||
Subscribe final: Recevoir une notification à l'étape finale
|
Subscribe final: Recevoir une notification à l'étape finale
|
||||||
|
@ -1,9 +1,459 @@
|
|||||||
Search: Zoek
|
"This program is free software: you can redistribute it and/or modify it under the terms of the <strong>GNU Affero General Public License</strong>": "Ce programme est un logiciel libre: vous pouvez le redistribuer et/ou le modifier selon les termes de la licence <strong>GNU Affero GPL</strong>"
|
||||||
'Search persons, ...': 'Zoek persoons, ...'
|
User manual: Gebruikershandleiding
|
||||||
Search a person: Zoek een persoon
|
Search: Zoeken
|
||||||
Login: Log in
|
"Search persons, ...": "Zoek personen, ..."
|
||||||
Logout: Log out
|
Person name: Naam / voornaam persoon
|
||||||
|
Login: Inloggen
|
||||||
|
Logout: Uitloggen
|
||||||
|
Bad credentials.: Een verkeerd wachtwoord of gebruikersnaam werd opgegeven.
|
||||||
|
Invalid CSRF token.: Uw sessie is verlopen.
|
||||||
Username: Gebruikersnaam
|
Username: Gebruikersnaam
|
||||||
Password: Wachtworrd
|
username: gebruikersnaam
|
||||||
Login to %installation_name%: Log in bij %installation_name%
|
Password: Wachtwoord
|
||||||
Welcome to %installation_name%: Welkom bij %installation_name%
|
Welcome to %installation_name%: Welkom bij %installation_name%
|
||||||
|
Login to %installation_name%: Inloggen op %installation_name%
|
||||||
|
Enabled: Ingeschakeld
|
||||||
|
enabled: ingeschakeld
|
||||||
|
disabled: uitgeschakeld
|
||||||
|
Disabled: Uitgeschakeld
|
||||||
|
Id: Id
|
||||||
|
Homepage: Hoofdpagina
|
||||||
|
Welcome: Welkom
|
||||||
|
Export Menu: Export
|
||||||
|
Admin Menu: Admin menu
|
||||||
|
Details: Details
|
||||||
|
yes: ja
|
||||||
|
no: nee
|
||||||
|
valid: geldig
|
||||||
|
Valid: Geldig
|
||||||
|
Not valid: Ongeldig
|
||||||
|
not valid: ongeldig
|
||||||
|
Confirm: Bevestigen
|
||||||
|
Cancel: Annuleren
|
||||||
|
Save: Opslaan
|
||||||
|
This form contains errors: Dit formulier bevat fouten
|
||||||
|
Choose an user: Kies een gebruiker
|
||||||
|
"You are going to leave a page with unsubmitted data. Are you sure you want to leave ?": "U verlaat een pagina waarvan de gegevens niet werden opgeslagen. Bent u zeker deze pagina te willen verlaten?"
|
||||||
|
No value: Geen informatie
|
||||||
|
Last updated by: Laatste update door
|
||||||
|
on: "op "
|
||||||
|
Last updated on: Laatste update op
|
||||||
|
by_user: "door "
|
||||||
|
|
||||||
|
Edit: Bewerken
|
||||||
|
Update: Updaten
|
||||||
|
Back to the list: Terug naar overzicht
|
||||||
|
|
||||||
|
#interval
|
||||||
|
Years: Jaren
|
||||||
|
|
||||||
|
# misc date
|
||||||
|
Since %date%: Sinds %date%
|
||||||
|
since %date%: sinds %date%
|
||||||
|
Until %date%: Tot %date%
|
||||||
|
until %date%: tot %date%
|
||||||
|
Since: Sinds
|
||||||
|
Until: Tot
|
||||||
|
#elements used in software
|
||||||
|
centers: centra
|
||||||
|
Centers: Centra
|
||||||
|
comment: opmerkingen
|
||||||
|
Comment: Opmerkingen
|
||||||
|
Pinned comment: Gepinde opmerking
|
||||||
|
Any comment: Geen opmerkingen
|
||||||
|
Read more: Meer lezen
|
||||||
|
|
||||||
|
# comment embeddable
|
||||||
|
No comment associated: Geen opmerkingen
|
||||||
|
|
||||||
|
#pagination
|
||||||
|
Previous: Vorige
|
||||||
|
Next: Volgende
|
||||||
|
|
||||||
|
#addresses
|
||||||
|
Street address1: Adres regel 1
|
||||||
|
Street address2: Adres regel 2
|
||||||
|
Postal code: Postcode
|
||||||
|
Valid from: Geldig vanaf
|
||||||
|
Choose a postal code: Kies een postcode
|
||||||
|
address:
|
||||||
|
address_homeless: Betreft dit een domicilie adres ?
|
||||||
|
real address: Domicilie adres
|
||||||
|
consider homeless: Dit adres is onvolledig
|
||||||
|
address more:
|
||||||
|
floor: verd.
|
||||||
|
corridor: gang
|
||||||
|
steps: trap
|
||||||
|
flat: appart.
|
||||||
|
buildingName: residentie
|
||||||
|
extra: ""
|
||||||
|
distribution: cedex
|
||||||
|
Create a new address: Maak een nieuw adres aan
|
||||||
|
Create an address: Maak een adres aan
|
||||||
|
Update address: Bewerk het adres
|
||||||
|
City or postal code: Stad of postcode
|
||||||
|
|
||||||
|
# contact
|
||||||
|
Part of the phonenumber: Deel van het telefoonnummer
|
||||||
|
|
||||||
|
#serach
|
||||||
|
Your search is empty. Please provide search terms.: De zoekopdracht is leeg. Gelieve een zoekterm op te geven.
|
||||||
|
The domain %domain% is unknow. Please check your search.: Het zoekgebied "%domain%" is ongekend. Gelieve uw zoekopdracht te verifiëren.
|
||||||
|
Invalid terms: Ongeldige zoekopdracht
|
||||||
|
You should not have more than one domain.: Gelieve slechts één zoekgebied op te geven.
|
||||||
|
#used for page title
|
||||||
|
Search %pattern%: Zoek "%pattern%"
|
||||||
|
Results %start%-%end% of %total%: Resultaten %start%-%end% van %total%
|
||||||
|
See all results: Alle resultaten zien
|
||||||
|
Advanced search: Geavanceerde zoekopdracht
|
||||||
|
results: resultaten
|
||||||
|
|
||||||
|
# timeline
|
||||||
|
Global timeline: Globale tijdslijn
|
||||||
|
|
||||||
|
#admin
|
||||||
|
Create: Aanmaken
|
||||||
|
show: bekijken
|
||||||
|
Show: Bekijken
|
||||||
|
edit: bewerken
|
||||||
|
Main admin menu: Hoofdmenu admin
|
||||||
|
Actions: Acties
|
||||||
|
Users and permissions: Gebruikers en rechten
|
||||||
|
Location and location type: Vestigingen en vestiging types
|
||||||
|
|
||||||
|
#permissions
|
||||||
|
Permissions Menu: Beheer rechten
|
||||||
|
Permissions management of your chill installation: Beheer rechten voor deze Chill installatie.
|
||||||
|
|
||||||
|
#location
|
||||||
|
Location Menu: Vestigingen en vestiging types
|
||||||
|
Management of location: Beheer vestigingen en vestiging types
|
||||||
|
|
||||||
|
#admin section
|
||||||
|
"Administration interface": Admin paneel
|
||||||
|
Welcome to the admin section !: >
|
||||||
|
Welkom op het admin paneel !
|
||||||
|
|
||||||
|
#admin section for center's administration
|
||||||
|
Create a new center: Maak een nieuw centrum aan
|
||||||
|
Center list: Overzicht centra
|
||||||
|
Center edit: Bewerk een centrum
|
||||||
|
Center creation: Aanmaak centrum
|
||||||
|
New center: Nieuw centrum
|
||||||
|
Center: Centrum
|
||||||
|
|
||||||
|
#admin section for permissions group
|
||||||
|
Permissions group list: Groepsrechten
|
||||||
|
Create a new permissions group: Maak een nieuw groepsrecht aan
|
||||||
|
Permission group "%name%": Groepsrecht "%name%"
|
||||||
|
Grant those permissions: Rechten toekennen
|
||||||
|
Which implies: Wat impliceert
|
||||||
|
Permission group: Groepsrecht
|
||||||
|
Permissionsgroup: Groepsrecht
|
||||||
|
New permission group: Nieuw groepsrecht
|
||||||
|
PermissionsGroup "%name%" edit: Bewerk groepsrecht '%name%'
|
||||||
|
Role: Rol
|
||||||
|
Choose amongst roles: Kies een rol
|
||||||
|
Add permission: Rechten toevoegen
|
||||||
|
This group does not provide any permission: Deze groep kent geen rechten toe.
|
||||||
|
The role '%role%' has been removed: De rol "%role%" werd verwijdert uit dit groepsrecht.
|
||||||
|
The role '%role%' on circle '%scope%' has been removed: De rol "%role%" binnen de cirkel "%scope%" werd verwijdert uit dit groepsrecht.
|
||||||
|
|
||||||
|
#admin section for users
|
||||||
|
User edit: Gebruiker bewerken
|
||||||
|
User'status: Gebruikersstatuut
|
||||||
|
Disabled, the user is not allowed to login: Uitgeschakeld, de gebruiker krijgt geen toestemming om in te loggen.
|
||||||
|
Enabled, the user is active: Ingeschakeld, de gebruiker kan zich inloggen.
|
||||||
|
Edit password: Wachtwoord aanpassen
|
||||||
|
Repeat the password: Wachtwoord herhalen
|
||||||
|
Permissions granted: Rechten toegekend
|
||||||
|
Any permissions granted to this user: Geen enkele rechten werden toegekend aan deze gebruiker
|
||||||
|
Grant new permissions: Rechten toevoegen
|
||||||
|
Add a new groupCenter: Rechten toevoegen
|
||||||
|
The permissions have been successfully added to the user: De rechten werden toegekend aan de gebruiker
|
||||||
|
The permissions where removed.: De rechten werden verwijdert voor dze gebruiker
|
||||||
|
Center & groups: Centra en groepen
|
||||||
|
User %username%: Gebruiker %username%
|
||||||
|
Add a new user: Nieuwe gebruiker toevoegen
|
||||||
|
The permissions have been added: De rechten werden toegevoegd
|
||||||
|
Edit password for %username%: Wachtwoord voor %username% aanpassen
|
||||||
|
Change password: Wachtwoord aanpassen
|
||||||
|
Back to the user edition: Terugkeren naar bewerkingsformulier
|
||||||
|
Password successfully updated!: Wachtwoord opgeslagen
|
||||||
|
Flags: Vlaggen
|
||||||
|
|
||||||
|
# admin section for users jobs
|
||||||
|
User jobs: Beroepen
|
||||||
|
|
||||||
|
# user page for current location
|
||||||
|
Current location: Huidige vestiging
|
||||||
|
Edit my current location: Mijn huidige vestiging bewerken
|
||||||
|
Change current location: CMijn huidige vestiging vernanderen
|
||||||
|
Set a location: Een vestiging instellen
|
||||||
|
Current location successfully updated: Huidige vestiging werd opgeslagen
|
||||||
|
Pick a location: Kies een vestiging.
|
||||||
|
|
||||||
|
#admin section for circles (old: scopes)
|
||||||
|
List circles: Cirkels
|
||||||
|
New circle: Nieuwe cirkel
|
||||||
|
Circle: Cirkel
|
||||||
|
Circle edit: Cirkel bewerken
|
||||||
|
Circle creation: Cirkel aanmaken
|
||||||
|
Create a new circle: Nieuwe cirkel aanmaken
|
||||||
|
|
||||||
|
#admin section for location
|
||||||
|
Location: Vestigingen
|
||||||
|
Location type list: Vestiging types
|
||||||
|
Create a new location type: Nieuwe type vestiging aanmaken
|
||||||
|
Available for users: Beschikbaar voor gebruikers
|
||||||
|
Editable by users: Bewerkbaar door gebruikers
|
||||||
|
Address required: Adres vereist?
|
||||||
|
Contact data: Contactgegevens?
|
||||||
|
optional: optioneel
|
||||||
|
required: vereist
|
||||||
|
never: nooit
|
||||||
|
Create a new location: Nieuwe vestiging aanmaken
|
||||||
|
Location list: Overzicht vestigingen
|
||||||
|
Location type: Type vestiging
|
||||||
|
Phonenumber1: Telefoonnummer 1
|
||||||
|
Phonenumber2: Telefoonnummer 2
|
||||||
|
Configure location and location type: Configureer vestigingen en types vestiging
|
||||||
|
Default for: Standaard vestiging
|
||||||
|
none: geen
|
||||||
|
person: gebruiker
|
||||||
|
thirdparty: externe partner
|
||||||
|
|
||||||
|
# circles / scopes
|
||||||
|
Choose the circle: Kies een cirkel
|
||||||
|
Scopes: Diensten
|
||||||
|
|
||||||
|
#export
|
||||||
|
|
||||||
|
# export creation step 0 : list of exports
|
||||||
|
Exports list: Overzicht rapporten
|
||||||
|
Create an export: Maak een rapport aan
|
||||||
|
#export creation step 'center' : pick a center
|
||||||
|
Pick centers: Kies centra
|
||||||
|
Pick a center: Kies een centrum
|
||||||
|
The export will contains only data from the picked centers.: het rapport zal enkel data bevatten voor het geselecteerde centrum.
|
||||||
|
This will eventually restrict your possibilities in filtering the data.: De filterkeuzes zullen worden aangepast aan de rechten tot raadpleging van de geselecteerde centra.
|
||||||
|
Go to export options: Ga naar de rapport opties
|
||||||
|
Pick aggregated centers: Hergroepering centra
|
||||||
|
# export creation step 'export' : choose aggregators, filtering and formatter
|
||||||
|
Formatter: Formateren
|
||||||
|
Choose the formatter: Kies het gewenste formaat voor dit rapport.
|
||||||
|
Export parameters: Rapport parameters
|
||||||
|
Filters: Filters
|
||||||
|
Aggregators: Aggregaten
|
||||||
|
Go to formatter options: Naar de formateeropties
|
||||||
|
Choose a format: Kies een formaat
|
||||||
|
#export creation step 'formatter' : choose formatter option
|
||||||
|
Generate the report: Rapport genereren
|
||||||
|
No options availables. Your report is fully configured.: Geen beschikbare opties. Dit rapport werd volledig geconfigureerd.
|
||||||
|
Ungrouped exports: Overige expor
|
||||||
|
|
||||||
|
#export download
|
||||||
|
Download export: Téléchargement du rapport
|
||||||
|
Waiting for your report: En attente de votre rapport
|
||||||
|
Download your report: Télécharger votre rapport
|
||||||
|
Problem during download: Problème durant le téléchargement
|
||||||
|
# sans valeur
|
||||||
|
without data: sans valeur
|
||||||
|
|
||||||
|
#CSV List Formatter
|
||||||
|
Add a number on first column: La première colonne est un numéro
|
||||||
|
Number: Numéro
|
||||||
|
# the label which appears in the UI
|
||||||
|
CSV vertical list: Liste verticale au format CSV
|
||||||
|
CSV horizontal list: Liste horizontale au format CSV
|
||||||
|
Spreadsheet list formatter (.xlsx, .ods): Liste au format tableur (.xlsx, .ods)
|
||||||
|
Order: Ordre
|
||||||
|
Position: Position
|
||||||
|
row: ligne
|
||||||
|
column: colonne
|
||||||
|
Comma separated values (CSV): Valeurs séparées par des virgules (CSV - tableur)
|
||||||
|
|
||||||
|
# spreadsheet formatter
|
||||||
|
Choose the format: Choisir le format
|
||||||
|
|
||||||
|
# select2
|
||||||
|
"select2.no_results": Aucun résultat
|
||||||
|
"select2.error_loading": Erreur de chargement des résultats
|
||||||
|
"select2.searching": Recherche en cours...
|
||||||
|
|
||||||
|
# change password
|
||||||
|
Change my password: Modification du mot de passe
|
||||||
|
Your actual password: Mot de passe actuel
|
||||||
|
|
||||||
|
# recover password
|
||||||
|
Forgot your password ?: Mot de passe oublié ?
|
||||||
|
Recover password: Remplacement du mot de passe
|
||||||
|
Username or email: Nom d'utilisateur ou email
|
||||||
|
Request recover: Demande de remplacement
|
||||||
|
Check your email: Vérifiez votre courriel
|
||||||
|
An email has been sent to your address. Click on the link inside this email to confirm that you are the owner of this account.: Un courriel a été envoyé à votre adresse. Cliquez sur le lien de cet email pour confirmer que vous êtes bien le propriétaire de ce compte.
|
||||||
|
You requested to recover your password: Vous avez demandé à renouveler votre mot de passe.
|
||||||
|
Click on the link below to recover your password: Cliquez sur le lien ci-dessous pour re-générer votre mot de passe
|
||||||
|
Regards,: Cordialement,
|
||||||
|
Your administrator: Votre administrateur
|
||||||
|
Recover your password: Regénération du mot de passe
|
||||||
|
New password set: Le nouveau mot de passe est enregistré
|
||||||
|
Your password has been set.: Votre mot de passe a été changé.
|
||||||
|
Log in with your new password: Connectez-vous avec votre nouveau mot de passe
|
||||||
|
|
||||||
|
# impersonate
|
||||||
|
Exit impersonation: Retour Administrateur
|
||||||
|
Impersonate: Incarner l'utilisateur
|
||||||
|
Impersonate mode: Mode fantôme
|
||||||
|
|
||||||
|
crud:
|
||||||
|
# general items
|
||||||
|
new:
|
||||||
|
button_action_form: Créer
|
||||||
|
link_edit: Modifier
|
||||||
|
save_and_close: Créer & fermer
|
||||||
|
save_and_show: Créer & voir
|
||||||
|
save_and_new: Créer & nouveau
|
||||||
|
success: Les données ont été créées
|
||||||
|
edit:
|
||||||
|
button_action_form: Enregistrer
|
||||||
|
back_to_view: Voir
|
||||||
|
save_and_close: Enregistrer & fermer
|
||||||
|
save_and_show: Enregistrer & voir
|
||||||
|
success: Les données ont été modifiées
|
||||||
|
delete:
|
||||||
|
success: Les données ont été supprimées
|
||||||
|
link_to_form: Supprimer
|
||||||
|
default:
|
||||||
|
success: Les données ont été enregistrées
|
||||||
|
view:
|
||||||
|
link_duplicate: Dupliquer
|
||||||
|
admin_user:
|
||||||
|
index:
|
||||||
|
title: Utilisateurs
|
||||||
|
add_new: Créer
|
||||||
|
admin_user_job:
|
||||||
|
index:
|
||||||
|
title: Métiers
|
||||||
|
add_new: Créer
|
||||||
|
title_new: Nouveau métier
|
||||||
|
title_edit: Modifier un métier
|
||||||
|
main_location_type:
|
||||||
|
title_new: Nouveau type de localisation
|
||||||
|
title_edit: Modifier un type de localisation
|
||||||
|
main_location:
|
||||||
|
title_new: Nouvelle localisation
|
||||||
|
title_edit: Modifier une localisation
|
||||||
|
|
||||||
|
No entities: Aucun élément
|
||||||
|
|
||||||
|
CHILL_FOO_SEE: Voir un élément
|
||||||
|
CHILL_FOO_EDIT: Modifier un élément
|
||||||
|
|
||||||
|
#Show templates
|
||||||
|
Date: Date
|
||||||
|
By: Par
|
||||||
|
For: Pour
|
||||||
|
Created for: Créé pour
|
||||||
|
Created by: Créé par
|
||||||
|
Created on: Créé le
|
||||||
|
|
||||||
|
|
||||||
|
# Workflows 💊
|
||||||
|
Workflow: Workflow — chemin de décision
|
||||||
|
Workflow n°%id%: 'Workflow (n°%id%)'
|
||||||
|
workflow_: Workflow
|
||||||
|
target: ' (cible)'
|
||||||
|
Decision: Décision
|
||||||
|
Join a comment: Laisser un commentaire
|
||||||
|
Follow workflow: Suivre la décision
|
||||||
|
Workflow history: Historique de la décision
|
||||||
|
|
||||||
|
workflow:
|
||||||
|
Created by: Créé par
|
||||||
|
My decision: Ma décision
|
||||||
|
Next step: Prochaine étape
|
||||||
|
dest for next steps: Utilisateurs qui valideront la prochaine étape
|
||||||
|
Freeze: Geler
|
||||||
|
Freezed: Gelé
|
||||||
|
freezed document: Le document est gelé
|
||||||
|
The associated element will be freezed: L'élément associé sera gelé et ne pourra plus être modifié après cette décision.
|
||||||
|
Finalize: Étape finale
|
||||||
|
The workflow will be finalized: Le suivi est clôturé lors de cette décision.
|
||||||
|
No transitions: Aucune transition
|
||||||
|
Comment added: Commentaire ajouté
|
||||||
|
This workflow is finalized: Ce suivi est finalisé.
|
||||||
|
You are not allowed to apply a transition on this workflow: Vous n'êtes pas autorisé à appliquer une décision pour ce suivi
|
||||||
|
Only those users are allowed: Seuls ces utilisateurs sont autorisés
|
||||||
|
My workflows: Mes workflows
|
||||||
|
No workflow: Aucun workflow
|
||||||
|
Evaluation (n°%eval%): "Évaluation (n°%eval%)"
|
||||||
|
Document (n°%doc%): "Document (n°%doc%)"
|
||||||
|
Work (n°%w%): "Action d'accompagnement (n°%w%)"
|
||||||
|
subscribed: Workflows suivis
|
||||||
|
dest: Workflows en attente d'action
|
||||||
|
you subscribed to all steps: Vous recevrez une notification à chaque étape
|
||||||
|
you subscribed to final step: Vous recevrez une notification à l'étape finale
|
||||||
|
Current step: Étape actuelle
|
||||||
|
Comment on last change: Commentaire à la transition précédente
|
||||||
|
Users allowed to apply transition: Utilisateurs pouvant valider cette étape
|
||||||
|
Workflow deleted with success: Le workflow a été supprimé
|
||||||
|
Delete workflow ?: Supprimer le workflow ?
|
||||||
|
Are you sure you want to delete this workflow ?: Êtes-vous sûr·e de vouloir supprimer ce workflow ?
|
||||||
|
Delete workflow: Supprimer le workflow
|
||||||
|
Steps is not waiting for transition. Maybe someone apply the transition before you ?: L'étape que vous cherchez a déjà été modifiée par un autre utilisateur. Peut-être quelqu'un a-t-il modifié cette étape avant vous ?
|
||||||
|
You get access to this step: Vous avez acquis les droits pour appliquer une transition sur ce workflow.
|
||||||
|
Those users are also granted to apply a transition by using an access key: Ces utilisateurs peuvent également valider cette étape, grâce à un lien d'accès
|
||||||
|
dest by email: Liens d'autorisation par email
|
||||||
|
dest by email help: Les adresses email mentionnées ici recevront un lien d'accès. Ce lien d'accès permettra à l'utilisateur de valider cette étape.
|
||||||
|
Add an email: Ajouter une adresse email
|
||||||
|
Remove an email: Enlever cette adresse email
|
||||||
|
Any email: Aucune adresse email
|
||||||
|
Previous dest without reaction: Workflows clotûrés après action d'un autre utilisateur
|
||||||
|
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
|
||||||
|
Subscribe all steps: Recevoir une notification à chaque étape
|
||||||
|
|
||||||
|
notification:
|
||||||
|
Notification: Notification
|
||||||
|
Notifications: Notifications
|
||||||
|
My own notifications: Mes notifications
|
||||||
|
Notify: Envoyer une notification
|
||||||
|
Send: Envoyer
|
||||||
|
Edit notification: Modifier une notification
|
||||||
|
Notification created: Notification envoyée
|
||||||
|
Notification updated: La notification a été mise à jour
|
||||||
|
Any notification received: Aucune notification reçue
|
||||||
|
Any notification sent: Aucune notification envoyée
|
||||||
|
Notifications received: Notifications reçues
|
||||||
|
Notifications sent: Notifications envoyées
|
||||||
|
comment_appended: Commentaire ajouté
|
||||||
|
append_comment: Ajouter un commentaire
|
||||||
|
comment_updated: Commentaire mis à jour
|
||||||
|
comments_list: Fil de commentaires
|
||||||
|
show notification from %sender%: Voir la notification de %sender%
|
||||||
|
is_unread: Non-lue
|
||||||
|
is_system: notification automatique
|
||||||
|
list: Notifications
|
||||||
|
Sent: Envoyé
|
||||||
|
to: À
|
||||||
|
sent_to: Destinataire(s)
|
||||||
|
from: De
|
||||||
|
received_from: Expéditeur
|
||||||
|
you were notified by %sender%: Vous avez été notifié par %sender%
|
||||||
|
you were notified by system: Vous avez été notifié automatiquement
|
||||||
|
subject: Objet
|
||||||
|
see_comments_thread: Voir le fil de commentaires associé
|
||||||
|
object_prefix: "[CHILL] notification - "
|
||||||
|
dest by email: Lien d'accès par email
|
||||||
|
Any email: Aucun email
|
||||||
|
Add an email: Ajouter un email
|
||||||
|
dest by email help: Les adresses email mentionnées ici recevront un lien d'accès. Un compte utilisateur sera toujours nécessaire.
|
||||||
|
Remove an email: Supprimer l'adresse email
|
||||||
|
Email with access link: Adresse email ayant reçu un lien d'accès
|
||||||
|
|
||||||
|
@ -0,0 +1,167 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\PersonBundle\Controller;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\Location;
|
||||||
|
use Chill\MainBundle\Entity\Scope;
|
||||||
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\MainBundle\Entity\UserJob;
|
||||||
|
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||||
|
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||||
|
use Chill\PersonBundle\Repository\AccompanyingPeriodACLAwareRepositoryInterface;
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||||
|
use Symfony\Component\Form\FormFactoryInterface;
|
||||||
|
use Symfony\Component\Form\FormInterface;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||||
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
use Symfony\Component\Security\Core\Security;
|
||||||
|
use Symfony\Component\Templating\EngineInterface;
|
||||||
|
|
||||||
|
class AccompanyingPeriodRegulationListController
|
||||||
|
{
|
||||||
|
private AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository;
|
||||||
|
|
||||||
|
private EngineInterface $engine;
|
||||||
|
|
||||||
|
private FormFactoryInterface $formFactory;
|
||||||
|
|
||||||
|
private PaginatorFactory $paginatorFactory;
|
||||||
|
|
||||||
|
private Security $security;
|
||||||
|
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, EngineInterface $engine, FormFactoryInterface $formFactory, PaginatorFactory $paginatorFactory, Security $security, TranslatableStringHelperInterface $translatableStringHelper)
|
||||||
|
{
|
||||||
|
$this->accompanyingPeriodACLAwareRepository = $accompanyingPeriodACLAwareRepository;
|
||||||
|
$this->engine = $engine;
|
||||||
|
$this->formFactory = $formFactory;
|
||||||
|
$this->paginatorFactory = $paginatorFactory;
|
||||||
|
$this->security = $security;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Route("/{_locale}/person/periods/undispatched", name="chill_person_course_list_regulation")
|
||||||
|
*/
|
||||||
|
public function listRegul(Request $request): Response
|
||||||
|
{
|
||||||
|
if (!$this->security->isGranted('ROLE_USER') || !$this->security->getUser() instanceof User) {
|
||||||
|
throw new AccessDeniedHttpException();
|
||||||
|
}
|
||||||
|
|
||||||
|
$form = $this->buildFilterForm();
|
||||||
|
|
||||||
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
$total = $this->accompanyingPeriodACLAwareRepository->countByUnDispatched(
|
||||||
|
$form['jobs']->getData(),
|
||||||
|
$form['services']->getData(),
|
||||||
|
$form['locations']->getData(),
|
||||||
|
);
|
||||||
|
$paginator = $this->paginatorFactory->create($total);
|
||||||
|
$periods = $this->accompanyingPeriodACLAwareRepository
|
||||||
|
->findByUnDispatched(
|
||||||
|
$form['jobs']->getData(),
|
||||||
|
$form['services']->getData(),
|
||||||
|
$form['locations']->getData(),
|
||||||
|
$paginator->getItemsPerPage(),
|
||||||
|
$paginator->getCurrentPageFirstItemNumber()
|
||||||
|
);
|
||||||
|
|
||||||
|
return new Response(
|
||||||
|
$this->engine->render('@ChillPerson/AccompanyingCourse/dispatch_list.html.twig', [
|
||||||
|
'paginator' => $paginator,
|
||||||
|
'periods' => $periods,
|
||||||
|
'form' => $form->createView(),
|
||||||
|
])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function buildFilterForm(): FormInterface
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'services' => [],
|
||||||
|
'jobs' => [],
|
||||||
|
'locations' => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
$builder = $this->formFactory->createBuilder(FormType::class, $data, [
|
||||||
|
'method' => 'get', 'csrf_protection' => false, ]);
|
||||||
|
|
||||||
|
$builder
|
||||||
|
->add('services', EntityType::class, [
|
||||||
|
'class' => Scope::class,
|
||||||
|
'query_builder' => static function (EntityRepository $er) {
|
||||||
|
return $er->createQueryBuilder('s');
|
||||||
|
},
|
||||||
|
'choice_label' => function (Scope $s) {
|
||||||
|
return $this->translatableStringHelper->localize($s->getName());
|
||||||
|
},
|
||||||
|
'multiple' => true,
|
||||||
|
'label' => 'Service',
|
||||||
|
'required' => false,
|
||||||
|
])
|
||||||
|
->add('jobs', EntityType::class, [
|
||||||
|
'class' => UserJob::class,
|
||||||
|
'query_builder' => static function (EntityRepository $er) {
|
||||||
|
$qb = $er->createQueryBuilder('j');
|
||||||
|
$qb->andWhere($qb->expr()->eq('j.active', "'TRUE'"));
|
||||||
|
|
||||||
|
return $qb;
|
||||||
|
},
|
||||||
|
'choice_label' => function (UserJob $j) {
|
||||||
|
return $this->translatableStringHelper->localize($j->getLabel());
|
||||||
|
},
|
||||||
|
'multiple' => true,
|
||||||
|
'label' => 'Métier',
|
||||||
|
'required' => false,
|
||||||
|
])
|
||||||
|
->add('locations', EntityType::class, [
|
||||||
|
'class' => Location::class,
|
||||||
|
'query_builder' => static function (EntityRepository $er) {
|
||||||
|
$qb = $er->createQueryBuilder('l');
|
||||||
|
$qb
|
||||||
|
->join('l.locationType', 't')
|
||||||
|
->where(
|
||||||
|
$qb->expr()->andX(
|
||||||
|
$qb->expr()->eq('t.availableForUsers', "'TRUE'"),
|
||||||
|
$qb->expr()->eq('t.active', "'TRUE'"),
|
||||||
|
$qb->expr()->eq('l.active', "'TRUE'"),
|
||||||
|
$qb->expr()->eq('l.availableForUsers', "'TRUE'")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return $qb;
|
||||||
|
},
|
||||||
|
'choice_label' => static function (Location $l) {
|
||||||
|
return $l->getName();
|
||||||
|
},
|
||||||
|
'multiple' => true,
|
||||||
|
'group_by' => function (Location $l) {
|
||||||
|
if (null === $type = $l->getLocationType()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->translatableStringHelper->localize($type->getTitle());
|
||||||
|
},
|
||||||
|
'label' => 'Localisation administrative',
|
||||||
|
'required' => false,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $builder->getForm();
|
||||||
|
}
|
||||||
|
}
|
@ -692,6 +692,10 @@ class AccompanyingPeriod implements
|
|||||||
return [[self::STEP_DRAFT, self::STEP_CONFIRMED]];
|
return [[self::STEP_DRAFT, self::STEP_CONFIRMED]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->getStep() === self::STEP_CLOSED) {
|
||||||
|
return [[self::STEP_DRAFT, self::STEP_CONFIRMED, self::STEP_CLOSED]];
|
||||||
|
}
|
||||||
|
|
||||||
throw new LogicException('no validation group permitted with this step: ' . $this->getStep());
|
throw new LogicException('no validation group permitted with this step: ' . $this->getStep());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -978,6 +982,11 @@ class AccompanyingPeriod implements
|
|||||||
return null !== $this->userPrevious;
|
return null !== $this->userPrevious;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasUser(): bool
|
||||||
|
{
|
||||||
|
return null !== $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
public function isChangedUser(): bool
|
public function isChangedUser(): bool
|
||||||
{
|
{
|
||||||
return $this->userIsChanged && $this->user !== $this->userPrevious;
|
return $this->userIsChanged && $this->user !== $this->userPrevious;
|
||||||
|
@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Entity\AccompanyingPeriod;
|
|||||||
|
|
||||||
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
||||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
||||||
|
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodLinkedWithSocialIssuesEntityInterface;
|
use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodLinkedWithSocialIssuesEntityInterface;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
@ -143,6 +144,12 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
|||||||
*/
|
*/
|
||||||
private Collection $persons;
|
private Collection $persons;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable", columnPrefix="privateComment_")
|
||||||
|
* @Serializer\Groups({"read", "accompanying_period_work:edit"})
|
||||||
|
*/
|
||||||
|
private PrivateCommentEmbeddable $privateComment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToMany(targetEntity=User::class)
|
* @ORM\ManyToMany(targetEntity=User::class)
|
||||||
* @ORM\JoinTable(name="chill_person_accompanying_period_work_referrer")
|
* @ORM\JoinTable(name="chill_person_accompanying_period_work_referrer")
|
||||||
@ -202,6 +209,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->goals = new ArrayCollection();
|
$this->goals = new ArrayCollection();
|
||||||
|
$this->privateComment = new PrivateCommentEmbeddable();
|
||||||
$this->results = new ArrayCollection();
|
$this->results = new ArrayCollection();
|
||||||
$this->thirdParties = new ArrayCollection();
|
$this->thirdParties = new ArrayCollection();
|
||||||
$this->persons = new ArrayCollection();
|
$this->persons = new ArrayCollection();
|
||||||
@ -328,6 +336,11 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
|||||||
return $this->persons;
|
return $this->persons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPrivateComment(): PrivateCommentEmbeddable
|
||||||
|
{
|
||||||
|
return $this->privateComment;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Collection|User[]
|
* @return Collection|User[]
|
||||||
*/
|
*/
|
||||||
@ -505,6 +518,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setPrivateComment(PrivateCommentEmbeddable $privateComment): self
|
||||||
|
{
|
||||||
|
$this->privateComment->merge($privateComment);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setSocialAction(?SocialAction $socialAction): self
|
public function setSocialAction(?SocialAction $socialAction): self
|
||||||
{
|
{
|
||||||
$this->socialAction = $socialAction;
|
$this->socialAction = $socialAction;
|
||||||
|
@ -14,7 +14,6 @@ namespace Chill\PersonBundle\Entity\AccompanyingPeriod;
|
|||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||||
use Symfony\Component\Serializer\Annotation\Groups;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity
|
||||||
@ -31,20 +30,20 @@ class Origin
|
|||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\GeneratedValue
|
* @ORM\GeneratedValue
|
||||||
* @ORM\Column(type="integer")
|
* @ORM\Column(type="integer")
|
||||||
* @Groups({"read", "docgen:read"})
|
* @Serializer\Groups({"read", "docgen:read"})
|
||||||
*/
|
*/
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="json")
|
* @ORM\Column(type="json")
|
||||||
* @Groups({"read", "docgen:read"})
|
* @Serializer\Groups({"read", "docgen:read"})
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||||
*/
|
*/
|
||||||
private array $label = [];
|
private array $label = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="date_immutable", nullable=true)
|
* @ORM\Column(type="date_immutable", nullable=true)
|
||||||
* @Groups({"read"})
|
* @Serializer\Groups({"read"})
|
||||||
*/
|
*/
|
||||||
private ?DateTimeImmutable $noActiveAfter = null;
|
private ?DateTimeImmutable $noActiveAfter = null;
|
||||||
|
|
||||||
|
@ -46,10 +46,8 @@ class SocialAction
|
|||||||
private $desactivationDate;
|
private $desactivationDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToMany(
|
* @ORM\ManyToMany(targetEntity=Evaluation::class, inversedBy="socialActions")
|
||||||
* targetEntity=Evaluation::class,
|
* @ORM\JoinTable(name="chill_person_social_work_evaluation_action")
|
||||||
* mappedBy="socialActions"
|
|
||||||
* )
|
|
||||||
*/
|
*/
|
||||||
private Collection $evaluations;
|
private Collection $evaluations;
|
||||||
|
|
||||||
@ -110,6 +108,15 @@ class SocialAction
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addEvaluation(Evaluation $evaluation): self
|
||||||
|
{
|
||||||
|
if (!$this->evaluations->contains($evaluation)) {
|
||||||
|
$this->evaluations[] = $evaluation;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function addGoal(Goal $goal): self
|
public function addGoal(Goal $goal): self
|
||||||
{
|
{
|
||||||
if (!$this->goals->contains($goal)) {
|
if (!$this->goals->contains($goal)) {
|
||||||
@ -300,6 +307,13 @@ class SocialAction
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function removeEvaluation(Evaluation $evaluation): self
|
||||||
|
{
|
||||||
|
$this->evaluations->removeElement($evaluation);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function removeGoal(Goal $goal): self
|
public function removeGoal(Goal $goal): self
|
||||||
{
|
{
|
||||||
$this->goals->removeElement($goal);
|
$this->goals->removeElement($goal);
|
||||||
|
@ -11,7 +11,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Chill\PersonBundle\EventListener;
|
namespace Chill\PersonBundle\EventListener;
|
||||||
|
|
||||||
use Chill\MainBundle\Entity\User;
|
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
|
|
||||||
@ -26,8 +25,10 @@ class AccompanyingPeriodWorkEventListener
|
|||||||
|
|
||||||
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
|
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
|
||||||
{
|
{
|
||||||
if ($this->security->getUser() instanceof User) {
|
$referrer = $work->getAccompanyingPeriod()->getUser();
|
||||||
$work->addReferrer($this->security->getUser());
|
|
||||||
|
if (null !== $referrer) {
|
||||||
|
$work->addReferrer($referrer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@ use Chill\MainBundle\Form\Type\TranslatableStringFormType;
|
|||||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
use Chill\PersonBundle\Entity\SocialWork\Goal;
|
use Chill\PersonBundle\Entity\SocialWork\Goal;
|
||||||
use Chill\PersonBundle\Entity\SocialWork\Result;
|
use Chill\PersonBundle\Entity\SocialWork\Result;
|
||||||
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
@ -43,16 +42,6 @@ class GoalType extends AbstractType
|
|||||||
->add('title', TranslatableStringFormType::class, [
|
->add('title', TranslatableStringFormType::class, [
|
||||||
'label' => 'Nom',
|
'label' => 'Nom',
|
||||||
])
|
])
|
||||||
|
|
||||||
->add('socialActions', EntityType::class, [
|
|
||||||
'class' => SocialAction::class,
|
|
||||||
'required' => false,
|
|
||||||
'multiple' => true,
|
|
||||||
'choice_label' => function (SocialAction $issue) {
|
|
||||||
return $this->translatableStringHelper->localize($issue->getTitle());
|
|
||||||
},
|
|
||||||
])
|
|
||||||
|
|
||||||
->add('results', EntityType::class, [
|
->add('results', EntityType::class, [
|
||||||
'class' => Result::class,
|
'class' => Result::class,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
@ -60,8 +49,8 @@ class GoalType extends AbstractType
|
|||||||
'choice_label' => function (Result $r) {
|
'choice_label' => function (Result $r) {
|
||||||
return $this->translatableStringHelper->localize($r->getTitle());
|
return $this->translatableStringHelper->localize($r->getTitle());
|
||||||
},
|
},
|
||||||
|
'attr' => ['class' => 'select2 '],
|
||||||
])
|
])
|
||||||
|
|
||||||
->add('desactivationDate', ChillDateType::class, [
|
->add('desactivationDate', ChillDateType::class, [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'label' => 'goal.desactivationDate',
|
'label' => 'goal.desactivationDate',
|
||||||
|
@ -11,12 +11,13 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Chill\PersonBundle\Menu;
|
namespace Chill\PersonBundle\Menu;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\User;
|
||||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||||
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
||||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||||
use Knp\Menu\MenuItem;
|
use Knp\Menu\MenuItem;
|
||||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
use Symfony\Component\Security\Core\Security;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,20 +25,20 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
class SectionMenuBuilder implements LocalMenuBuilderInterface
|
class SectionMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
protected AuthorizationCheckerInterface $authorizationChecker;
|
|
||||||
|
|
||||||
protected ParameterBagInterface $parameterBag;
|
protected ParameterBagInterface $parameterBag;
|
||||||
|
|
||||||
protected TranslatorInterface $translator;
|
protected TranslatorInterface $translator;
|
||||||
|
|
||||||
|
private Security $security;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SectionMenuBuilder constructor.
|
* SectionMenuBuilder constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct(AuthorizationCheckerInterface $authorizationChecker, TranslatorInterface $translator, ParameterBagInterface $parameterBag)
|
public function __construct(ParameterBagInterface $parameterBag, Security $security, TranslatorInterface $translator)
|
||||||
{
|
{
|
||||||
$this->authorizationChecker = $authorizationChecker;
|
|
||||||
$this->translator = $translator;
|
|
||||||
$this->parameterBag = $parameterBag;
|
$this->parameterBag = $parameterBag;
|
||||||
|
$this->security = $security;
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +46,7 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
{
|
{
|
||||||
if ($this->authorizationChecker->isGranted(PersonVoter::CREATE) && $this->parameterBag->get('chill_person.create_person_allowed')) {
|
if ($this->security->isGranted(PersonVoter::CREATE) && $this->parameterBag->get('chill_person.create_person_allowed')) {
|
||||||
$menu->addChild($this->translator->trans('Add a person'), [
|
$menu->addChild($this->translator->trans('Add a person'), [
|
||||||
'route' => 'chill_person_new',
|
'route' => 'chill_person_new',
|
||||||
])
|
])
|
||||||
@ -65,7 +66,7 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->authorizationChecker->isGranted(AccompanyingPeriodVoter::REASSIGN_BULK, null)) {
|
if ($this->security->isGranted(AccompanyingPeriodVoter::REASSIGN_BULK, null)) {
|
||||||
$menu->addChild($this->translator->trans('reassign.Bulk reassign'), [
|
$menu->addChild($this->translator->trans('reassign.Bulk reassign'), [
|
||||||
'route' => 'chill_course_list_reassign',
|
'route' => 'chill_course_list_reassign',
|
||||||
])
|
])
|
||||||
@ -74,6 +75,16 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
'icons' => [],
|
'icons' => [],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->security->getUser() instanceof User && $this->security->isGranted('ROLE_USER')) {
|
||||||
|
$menu
|
||||||
|
->addChild('Régulation', [
|
||||||
|
'route' => 'chill_person_course_list_regulation',
|
||||||
|
])
|
||||||
|
->setExtras([
|
||||||
|
'order' => 150,
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getMenuIds(): array
|
public static function getMenuIds(): array
|
||||||
|
@ -11,13 +11,19 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Chill\PersonBundle\Repository;
|
namespace Chill\PersonBundle\Repository;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\Location;
|
||||||
|
use Chill\MainBundle\Entity\Scope;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\MainBundle\Entity\UserJob;
|
||||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||||
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface;
|
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
|
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
|
||||||
|
use Doctrine\ORM\QueryBuilder;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
use function count;
|
use function count;
|
||||||
|
|
||||||
@ -62,6 +68,15 @@ final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodAC
|
|||||||
return $qb;
|
return $qb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function countByUnDispatched(array $jobs, array $services, array $administrativeLocations): int
|
||||||
|
{
|
||||||
|
$qb = $this->addACLByUnDispatched($this->buildQueryUnDispatched($jobs, $services, $administrativeLocations));
|
||||||
|
|
||||||
|
$qb->select('COUNT(ap)');
|
||||||
|
|
||||||
|
return $qb->getQuery()->getSingleScalarResult();
|
||||||
|
}
|
||||||
|
|
||||||
public function countByUserOpenedAccompanyingPeriod(?User $user): int
|
public function countByUserOpenedAccompanyingPeriod(?User $user): int
|
||||||
{
|
{
|
||||||
if (null === $user) {
|
if (null === $user) {
|
||||||
@ -126,6 +141,23 @@ final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodAC
|
|||||||
return $qb->getQuery()->getResult();
|
return $qb->getQuery()->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function findByUnDispatched(array $jobs, array $services, array $administrativeLocations, ?int $limit = null, ?int $offset = null): array
|
||||||
|
{
|
||||||
|
$qb = $this->addACLByUnDispatched($this->buildQueryUnDispatched($jobs, $services, $administrativeLocations));
|
||||||
|
|
||||||
|
$qb->select('ap');
|
||||||
|
|
||||||
|
if (null !== $limit) {
|
||||||
|
$qb->setMaxResults($limit);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null !== $offset) {
|
||||||
|
$qb->setFirstResult($offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $qb->getQuery()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array|AccompanyingPeriod[]
|
* @return array|AccompanyingPeriod[]
|
||||||
*/
|
*/
|
||||||
@ -146,4 +178,88 @@ final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodAC
|
|||||||
|
|
||||||
return $qb->getQuery()->getResult();
|
return $qb->getQuery()->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function addACLByUnDispatched(QueryBuilder $qb): QueryBuilder
|
||||||
|
{
|
||||||
|
$centers = $this->authorizationHelper->getReachableCenters(
|
||||||
|
$this->security->getUser(),
|
||||||
|
AccompanyingPeriodVoter::SEE
|
||||||
|
);
|
||||||
|
|
||||||
|
$orX = $qb->expr()->orX();
|
||||||
|
|
||||||
|
if (0 === count($centers)) {
|
||||||
|
return $qb->andWhere("'FALSE' = 'TRUE'");
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($centers as $key => $center) {
|
||||||
|
$scopes = $this->authorizationHelper
|
||||||
|
->getReachableCircles(
|
||||||
|
$this->security->getUser(),
|
||||||
|
AccompanyingPeriodVoter::SEE,
|
||||||
|
$center
|
||||||
|
);
|
||||||
|
|
||||||
|
$and = $qb->expr()->andX(
|
||||||
|
$qb->expr()->exists('SELECT part FROM ' . AccompanyingPeriodParticipation::class . ' part ' .
|
||||||
|
"JOIN part.person p WHERE part.accompanyingPeriod = ap.id AND p.center = :center_{$key}")
|
||||||
|
);
|
||||||
|
$qb->setParameter('center_' . $key, $center);
|
||||||
|
$orScope = $qb->expr()->orX();
|
||||||
|
|
||||||
|
foreach ($scopes as $skey => $scope) {
|
||||||
|
$orScope->add(
|
||||||
|
$qb->expr()->isMemberOf(':scope_' . $key . '_' . $skey, 'ap.scopes')
|
||||||
|
);
|
||||||
|
$qb->setParameter('scope_' . $key . '_' . $skey, $scope);
|
||||||
|
}
|
||||||
|
|
||||||
|
$and->add($orScope);
|
||||||
|
$orX->add($and);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $qb->andWhere($orX);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array|UserJob[] $jobs
|
||||||
|
* @param array|Scope[] $services
|
||||||
|
* @param array|Location[] $locations
|
||||||
|
*/
|
||||||
|
private function buildQueryUnDispatched(array $jobs, array $services, array $locations): QueryBuilder
|
||||||
|
{
|
||||||
|
$qb = $this->accompanyingPeriodRepository->createQueryBuilder('ap');
|
||||||
|
|
||||||
|
$qb->where(
|
||||||
|
$qb->expr()->andX(
|
||||||
|
$qb->expr()->isNull('ap.user'),
|
||||||
|
$qb->expr()->neq('ap.step', ':draft'),
|
||||||
|
$qb->expr()->neq('ap.step', ':closed')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
->setParameter('draft', AccompanyingPeriod::STEP_DRAFT)
|
||||||
|
->setParameter('closed', AccompanyingPeriod::STEP_CLOSED);
|
||||||
|
|
||||||
|
if (0 < count($jobs)) {
|
||||||
|
$qb->andWhere($qb->expr()->in('ap.job', ':jobs'))
|
||||||
|
->setParameter('jobs', $jobs);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 < count($locations)) {
|
||||||
|
$qb->andWhere($qb->expr()->in('ap.administrativeLocation', ':locations'))
|
||||||
|
->setParameter('locations', $locations);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 < count($services)) {
|
||||||
|
$or = $qb->expr()->orX();
|
||||||
|
|
||||||
|
foreach ($services as $key => $service) {
|
||||||
|
$or->add($qb->expr()->isMemberOf('ap.scopes', ':scope_' . $key));
|
||||||
|
$qb->setParameter('scope_' . $key, $service);
|
||||||
|
}
|
||||||
|
$qb->andWhere($or);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $qb;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,20 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Chill\PersonBundle\Repository;
|
namespace Chill\PersonBundle\Repository;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\Scope;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\MainBundle\Entity\UserJob;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
|
|
||||||
interface AccompanyingPeriodACLAwareRepositoryInterface
|
interface AccompanyingPeriodACLAwareRepositoryInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param array|UserJob[] $jobs
|
||||||
|
* @param array|Scope[] $services
|
||||||
|
*/
|
||||||
|
public function countByUnDispatched(array $jobs, array $services, array $administrativeLocations): int;
|
||||||
|
|
||||||
public function countByUserOpenedAccompanyingPeriod(?User $user): int;
|
public function countByUserOpenedAccompanyingPeriod(?User $user): int;
|
||||||
|
|
||||||
public function findByPerson(
|
public function findByPerson(
|
||||||
@ -26,5 +35,13 @@ interface AccompanyingPeriodACLAwareRepositoryInterface
|
|||||||
?int $offset = null
|
?int $offset = null
|
||||||
): array;
|
): array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array|UserJob[] $jobs if empty, does not take this argument into account
|
||||||
|
* @param array|Scope[] $services if empty, does not take this argument into account
|
||||||
|
*
|
||||||
|
* @return array|AccompanyingPeriod[]
|
||||||
|
*/
|
||||||
|
public function findByUnDispatched(array $jobs, array $services, array $administrativeLocations, ?int $limit = null, ?int $offset = null): array;
|
||||||
|
|
||||||
public function findByUserOpenedAccompanyingPeriod(?User $user, array $orderBy = [], int $limit = 0, int $offset = 50): array;
|
public function findByUserOpenedAccompanyingPeriod(?User $user, array $orderBy = [], int $limit = 0, int $offset = 50): array;
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,6 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
|||||||
state.accompanyingCourse.administrativeLocation = value;
|
state.accompanyingCourse.administrativeLocation = value;
|
||||||
},
|
},
|
||||||
updateReferrer(state, value) {
|
updateReferrer(state, value) {
|
||||||
//console.log('value', value);
|
|
||||||
state.accompanyingCourse.user = value;
|
state.accompanyingCourse.user = value;
|
||||||
},
|
},
|
||||||
updateJob(state, value) {
|
updateJob(state, value) {
|
||||||
@ -775,9 +774,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
|||||||
throw error;
|
throw error;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
updateReferrer({ commit }, payload) {
|
updateReferrer({ commit, state }, payload) {
|
||||||
console.log('update referrer', payload);
|
|
||||||
console.log('payload !== null', payload !== null);
|
|
||||||
const url = `/api/1.0/person/accompanying-course/${id}.json`;
|
const url = `/api/1.0/person/accompanying-course/${id}.json`;
|
||||||
let body = { type: "accompanying_period", user: null };
|
let body = { type: "accompanying_period", user: null };
|
||||||
|
|
||||||
@ -788,7 +785,10 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
|||||||
return makeFetch('PATCH', url, body)
|
return makeFetch('PATCH', url, body)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
commit('updateReferrer', response.user);
|
commit('updateReferrer', response.user);
|
||||||
commit('setFilteredReferrersSuggested');
|
if (null !== payload.user_job && payload.user_job !== state.accompanyingCourse.job) {
|
||||||
|
this.dispatch('updateJob', payload.user_job);
|
||||||
|
}
|
||||||
|
// commit('setFilteredReferrersSuggested'); // this mutation doesn't exist?
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
commit('catchError', error);
|
commit('catchError', error);
|
||||||
@ -799,6 +799,8 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
|||||||
const url = `/api/1.0/person/accompanying-course/${id}.json`;
|
const url = `/api/1.0/person/accompanying-course/${id}.json`;
|
||||||
let body = { type: "accompanying_period", job: null };
|
let body = { type: "accompanying_period", job: null };
|
||||||
|
|
||||||
|
console.log('update job', payload);
|
||||||
|
|
||||||
if (payload !== null) {
|
if (payload !== null) {
|
||||||
body = { type: "accompanying_period", job: { id: payload.id, type: payload.type } };
|
body = { type: "accompanying_period", job: { id: payload.id, type: payload.type } };
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,15 @@
|
|||||||
<input v-model="endDate" type="date" class="form-control" />
|
<input v-model="endDate" type="date" class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="privateComment" class="action-row">
|
||||||
|
<label class="col-form-label">{{ $t('private_comment') }}</label>
|
||||||
|
<ckeditor
|
||||||
|
v-model="privateComment"
|
||||||
|
:editor="editor"
|
||||||
|
tag-name="textarea"
|
||||||
|
></ckeditor>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="comment" class="action-row">
|
<div id="comment" class="action-row">
|
||||||
<label class="col-form-label">{{ $t('comments') }}</label>
|
<label class="col-form-label">{{ $t('comments') }}</label>
|
||||||
<ckeditor
|
<ckeditor
|
||||||
@ -33,6 +42,7 @@
|
|||||||
></ckeditor>
|
></ckeditor>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="objectives" class="action-row">
|
<div id="objectives" class="action-row">
|
||||||
<div aria="hidden" class="title">
|
<div aria="hidden" class="title">
|
||||||
<div><h3>{{ $t('goals_title') }}</h3></div>
|
<div><h3>{{ $t('goals_title') }}</h3></div>
|
||||||
@ -141,12 +151,12 @@
|
|||||||
|
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<li v-for="p in personsReachables" :key="p.id">
|
<li v-for="p in personsReachables" :key="p.id">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input v-model="personsPicked" :value="p.id" type="checkbox" class="me-2 form-check-input" :id="'person_check'+p.id">
|
<input v-model="personsPicked" :value="p.id" type="checkbox" class="me-2 form-check-input" :id="'person_check'+p.id">
|
||||||
<label :for="'person_check'+p.id" class="form-check-label">
|
<label :for="'person_check'+p.id" class="form-check-label">
|
||||||
<person-text :person="p"></person-text>
|
<person-text :person="p"></person-text>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -274,18 +284,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
<li>
|
<li>
|
||||||
<list-workflow-modal
|
<list-workflow-modal
|
||||||
:workflows="this.work.workflows"
|
:workflows="this.work.workflows"
|
||||||
:allowCreate="true"
|
:allowCreate="true"
|
||||||
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork"
|
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork"
|
||||||
:relatedEntityId="this.work.id"
|
:relatedEntityId="this.work.id"
|
||||||
:workflowsAvailables="this.work.workflows_availables"
|
:workflowsAvailables="this.work.workflows_availables"
|
||||||
:preventDefaultMoveToGenerate="true"
|
:preventDefaultMoveToGenerate="true"
|
||||||
@go-to-generate-workflow="goToGenerateWorkflow"
|
@go-to-generate-workflow="goToGenerateWorkflow"
|
||||||
></list-workflow-modal>
|
></list-workflow-modal>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li v-if="!isPosting">
|
<li v-if="!isPosting">
|
||||||
<button class="btn btn-save" @click="submit">
|
<button class="btn btn-save" @click="submit">
|
||||||
@ -355,7 +365,8 @@ const i18n = {
|
|||||||
referrers: "Agents traitants",
|
referrers: "Agents traitants",
|
||||||
no_referrers: "Aucun agent traitant",
|
no_referrers: "Aucun agent traitant",
|
||||||
choose_referrers: "Choisir des agents traitants",
|
choose_referrers: "Choisir des agents traitants",
|
||||||
remove_referrer: "Enlever l'agent"
|
remove_referrer: "Enlever l'agent",
|
||||||
|
private_comment: "Commentaire privé"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -417,8 +428,8 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
'work',
|
'work',
|
||||||
'resultsForAction',
|
'resultsForAction',
|
||||||
'evaluationsForAction',
|
'evaluationsForAction',
|
||||||
@ -461,6 +472,14 @@ export default {
|
|||||||
this.$store.commit('setNote', v);
|
this.$store.commit('setNote', v);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
privateComment: {
|
||||||
|
get() {
|
||||||
|
return this.$store.state.privateComment;
|
||||||
|
},
|
||||||
|
set(v) {
|
||||||
|
this.$store.commit('setPrivateComment', v);
|
||||||
|
}
|
||||||
|
},
|
||||||
availableForCheckGoal() {
|
availableForCheckGoal() {
|
||||||
let pickedIds = this.$store.state.goalsPicked.map(g => g.goal.id);
|
let pickedIds = this.$store.state.goalsPicked.map(g => g.goal.id);
|
||||||
|
|
||||||
@ -573,6 +592,7 @@ div#workEditor {
|
|||||||
"title title"
|
"title title"
|
||||||
"startDate endDate"
|
"startDate endDate"
|
||||||
"comment comment"
|
"comment comment"
|
||||||
|
"privateComment privateComment"
|
||||||
"objectives objectives"
|
"objectives objectives"
|
||||||
"evaluations evaluations"
|
"evaluations evaluations"
|
||||||
"persons persons"
|
"persons persons"
|
||||||
@ -589,6 +609,8 @@ div#workEditor {
|
|||||||
grid-area: endDate; }
|
grid-area: endDate; }
|
||||||
#comment {
|
#comment {
|
||||||
grid-area: comment; }
|
grid-area: comment; }
|
||||||
|
#privateComment {
|
||||||
|
grid-area: privateComment; }
|
||||||
#objectives {
|
#objectives {
|
||||||
grid-area: objectives; }
|
grid-area: objectives; }
|
||||||
#evaluations {
|
#evaluations {
|
||||||
|
@ -17,6 +17,7 @@ const store = createStore({
|
|||||||
endDate: window.accompanyingCourseWork.endDate !== null ?
|
endDate: window.accompanyingCourseWork.endDate !== null ?
|
||||||
dateToISO(new Date(window.accompanyingCourseWork.endDate.datetime)) : null,
|
dateToISO(new Date(window.accompanyingCourseWork.endDate.datetime)) : null,
|
||||||
note: window.accompanyingCourseWork.note,
|
note: window.accompanyingCourseWork.note,
|
||||||
|
privateComment: window.accompanyingCourseWork.privateComment,
|
||||||
goalsPicked: window.accompanyingCourseWork.goals,
|
goalsPicked: window.accompanyingCourseWork.goals,
|
||||||
goalsForAction: [],
|
goalsForAction: [],
|
||||||
resultsPicked: window.accompanyingCourseWork.results,
|
resultsPicked: window.accompanyingCourseWork.results,
|
||||||
@ -79,6 +80,7 @@ const store = createStore({
|
|||||||
datetime: datetimeToISO(ISOToDate(state.endDate))
|
datetime: datetimeToISO(ISOToDate(state.endDate))
|
||||||
},
|
},
|
||||||
note: state.note,
|
note: state.note,
|
||||||
|
privateComment: state.privateComment,
|
||||||
persons: state.personsPicked.map(p => ({id: p.id, type: p.type})),
|
persons: state.personsPicked.map(p => ({id: p.id, type: p.type})),
|
||||||
handlingThierParty: state.handlingThirdParty === null ? null : {
|
handlingThierParty: state.handlingThirdParty === null ? null : {
|
||||||
id: state.handlingThirdParty.id,
|
id: state.handlingThirdParty.id,
|
||||||
@ -230,6 +232,14 @@ const store = createStore({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let doc = evaluation.documents.find(d => d.key === payload.oldDocument.key);
|
||||||
|
|
||||||
|
if (typeof doc === 'undefined') {
|
||||||
|
console.error('doc not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
doc.storedObject = payload.document.storedObject;
|
||||||
|
return;
|
||||||
let newDocument = Object.assign(
|
let newDocument = Object.assign(
|
||||||
payload.document, {
|
payload.document, {
|
||||||
key: evaluation.documents.length + 1,
|
key: evaluation.documents.length + 1,
|
||||||
@ -297,6 +307,9 @@ const store = createStore({
|
|||||||
setNote(state, note) {
|
setNote(state, note) {
|
||||||
state.note = note;
|
state.note = note;
|
||||||
},
|
},
|
||||||
|
setPrivateComment(state, privateComment) {
|
||||||
|
state.privateComment = privateComment;
|
||||||
|
},
|
||||||
setHandlingThirdParty(state, thirdParty) {
|
setHandlingThirdParty(state, thirdParty) {
|
||||||
state.handlingThirdParty = thirdParty;
|
state.handlingThirdParty = thirdParty;
|
||||||
},
|
},
|
||||||
@ -454,6 +467,8 @@ const store = createStore({
|
|||||||
;
|
;
|
||||||
commit('setIsPosting', true);
|
commit('setIsPosting', true);
|
||||||
|
|
||||||
|
console.log('payload', payload);
|
||||||
|
|
||||||
return makeFetch('PUT', url, payload)
|
return makeFetch('PUT', url, payload)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (typeof(callback) !== 'undefined') {
|
if (typeof(callback) !== 'undefined') {
|
||||||
|
@ -305,7 +305,8 @@ export default {
|
|||||||
if (this.listenPersonFlag === 'normal') {
|
if (this.listenPersonFlag === 'normal') {
|
||||||
if (person.folded === true) {
|
if (person.folded === true) {
|
||||||
//console.log(' @@> expand mode event')
|
//console.log(' @@> expand mode event')
|
||||||
this.$store.commit('unfoldPerson', person)
|
this.$store.commit('unfoldPerson', person);
|
||||||
|
this.$store.dispatch('fetchInfoForPerson', person);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//console.log(' @@> create link mode event')
|
//console.log(' @@> create link mode event')
|
||||||
|
@ -252,7 +252,6 @@ const store = createStore({
|
|||||||
if (!person.folded) {
|
if (!person.folded) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//console.log('unfoldPerson', person)
|
|
||||||
person.label = person._label
|
person.label = person._label
|
||||||
delete person._label
|
delete person._label
|
||||||
delete person.title
|
delete person.title
|
||||||
|
@ -333,10 +333,10 @@ export default {
|
|||||||
addQueryItem(field, queryItem) {
|
addQueryItem(field, queryItem) {
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case 'lastName':
|
case 'lastName':
|
||||||
this.person.lastName = queryItem;
|
this.person.lastName = this.person.lastName ? this.person.lastName += ` ${queryItem}` : queryItem;
|
||||||
break;
|
break;
|
||||||
case 'firstName':
|
case 'firstName':
|
||||||
this.person.firstName = queryItem;
|
this.person.firstName = this.person.firstName ? this.person.firstName += ` ${queryItem}` : queryItem;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -45,7 +45,7 @@ const personMessages = {
|
|||||||
},
|
},
|
||||||
address: {
|
address: {
|
||||||
create_address: "Ajouter une adresse",
|
create_address: "Ajouter une adresse",
|
||||||
show_address_form: "Créer un ménage et ajouter une adresse",
|
show_address_form: "Ajouter une adresse pour un usager non suivi et seul dans un ménage",
|
||||||
warning: "Un nouveau ménage va être créé. L'usager sera membre de ce ménage."
|
warning: "Un nouveau ménage va être créé. L'usager sera membre de ce ménage."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -0,0 +1,88 @@
|
|||||||
|
{% extends 'ChillMainBundle::layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block title "Liste de parcours à répartir" %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ encore_entry_script_tags('mod_set_referrer') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block css %}
|
||||||
|
{{ encore_entry_link_tags('mod_set_referrer') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% macro period_meta(period) %}
|
||||||
|
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', period) %}
|
||||||
|
<div class="item-col item-meta">
|
||||||
|
{% set job_id = null %}
|
||||||
|
{% if period.job is defined %}
|
||||||
|
{% set job_id = period.job.id %}
|
||||||
|
{% endif %}
|
||||||
|
<span
|
||||||
|
data-set-referrer-app="data-set-referrer-app"
|
||||||
|
data-set-referrer-accompanying-period-id="{{ period.id }}"
|
||||||
|
data-set-referrer-job-id="{{ job_id }}"
|
||||||
|
></span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro period_actions(period) %}
|
||||||
|
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ chill_path_add_return_path('chill_person_accompanying_course_index', {'accompanying_period_id': period.id}) }}" class="btn btn-show"></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% import _self as m %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="col-10">
|
||||||
|
<h1>{{ block('title') }}</h1>
|
||||||
|
|
||||||
|
{{ form_start(form) }}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
{{ form_label(form.locations ) }}
|
||||||
|
{{ form_widget(form.locations, {'attr': {'class': 'select2'}}) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
{{ form_label(form.jobs) }}
|
||||||
|
{{ form_widget(form.jobs, {'attr': {'class': 'select2'}}) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
{{ form_label(form.services) }}
|
||||||
|
{{ form_widget(form.services, {'attr': {'class': 'select2'}}) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li>
|
||||||
|
<button type="submit" class="btn btn-save change-icon">
|
||||||
|
<i class="fa fa-filter"></i> Filtrer
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{ form_end(form) }}
|
||||||
|
|
||||||
|
|
||||||
|
{% if periods|length == 0 %}
|
||||||
|
<p class="chill-no-data-statement">Aucun parcours à désigner, ou droits insuffisants pour les afficher</p>
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
<p><span class="badge rounded-pill bg-primary">{{ paginator.totalItems }}</span> parcours à attribuer (calculé ce jour à {{ null|format_time('medium') }})</p>
|
||||||
|
|
||||||
|
<div class="flex-table">
|
||||||
|
{% for period in periods %}
|
||||||
|
{% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {'period': period,
|
||||||
|
'recordAction': m.period_actions(period), 'itemMeta': m.period_meta(period) } %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ chill_pagination(paginator) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -30,6 +30,19 @@
|
|||||||
<div class="accompanyingcourse-resume">
|
<div class="accompanyingcourse-resume">
|
||||||
<div id="dashboards" class="row g-3" data-masonry='{"percentPosition": true }'>
|
<div id="dashboards" class="row g-3" data-masonry='{"percentPosition": true }'>
|
||||||
|
|
||||||
|
{% if 'CLOSED' == accompanyingCourse.step %}
|
||||||
|
<div class="mbloc col col-sm-6 col-lg-4">
|
||||||
|
<div class="warnings">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<h2>{{ 'This course is closed'|trans }}</h2>
|
||||||
|
<p>
|
||||||
|
{{ 'Closing motive'|trans }} : {{ accompanyingCourse.closingMotive.name|localize_translatable_string }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if 'DRAFT' == accompanyingCourse.step %}
|
{% if 'DRAFT' == accompanyingCourse.step %}
|
||||||
<div class="mbloc col col-sm-6 col-lg-4">
|
<div class="mbloc col col-sm-6 col-lg-4">
|
||||||
<div class="warnings">
|
<div class="warnings">
|
||||||
@ -197,10 +210,28 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="d-grid gap-2">
|
<div class="d-grid gap-2 {% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}btn-group{% endif %}" {% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}role="group"{% endif %}>
|
||||||
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod', 'entityId': accompanyingCourse.id}) }}">
|
{% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}
|
||||||
|
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
{{ 'notification.Notify'|trans }}
|
{{ 'notification.Notify'|trans }}
|
||||||
</a>
|
</button>
|
||||||
|
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod', 'entityId': accompanyingCourse.id, 'tos': [accompanyingCourse.user.id]}) }}">
|
||||||
|
{{ 'notification.Notify referrer'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod', 'entityId': accompanyingCourse.id}) }}">
|
||||||
|
{{ 'notification.Notify any'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod', 'entityId': accompanyingCourse.id}) }}">
|
||||||
|
{{ 'notification.Notify'|trans }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
|
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
|
||||||
|
|
||||||
|
{% block head_custom %}
|
||||||
|
<link rel="preload" href="{{ preload(path('chill_api_single_accompanying_course__entity', {'id': accompanyingCourse.id, '_format': 'json' }), {as: 'fetch'}) }}" as="fetch" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block top_banner %}
|
{% block top_banner %}
|
||||||
{{ include('@ChillPerson/AccompanyingCourse/banner.html.twig', { title: block('title') }) }}
|
{{ include('@ChillPerson/AccompanyingCourse/banner.html.twig', { title: block('title') }) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -17,7 +21,7 @@
|
|||||||
'layout': '@ChillPerson/menu.html.twig',
|
'layout': '@ChillPerson/menu.html.twig',
|
||||||
'args' : { 'accompanyingCourse': accompanyingCourse }
|
'args' : { 'accompanyingCourse': accompanyingCourse }
|
||||||
}) }}
|
}) }}
|
||||||
|
|
||||||
{% block block_post_menu %}
|
{% block block_post_menu %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -149,6 +149,19 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if acp.step == 'CLOSED' and acp.closingMotive is not null %}
|
||||||
|
<div class="wl-row">
|
||||||
|
<div class="wl-col title">
|
||||||
|
<h3 class="closingMotive">{{ 'Closing motive'|trans }}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="wl-col list">
|
||||||
|
<div>
|
||||||
|
{{ acp.closingMotive.name|localize_translatable_string }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<ul class="record_actions record_actions_column">
|
<ul class="record_actions record_actions_column">
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': acp.id }) }}"
|
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': acp.id }) }}"
|
||||||
@ -256,7 +269,7 @@
|
|||||||
aria-labelledby="heading_{{ person.id }}"
|
aria-labelledby="heading_{{ person.id }}"
|
||||||
data-bs-parent="#nonCurrent">
|
data-bs-parent="#nonCurrent">
|
||||||
{% for acp in acpsClosed %}
|
{% for acp in acpsClosed %}
|
||||||
{{ _self.accompanying_period(acp, person) }}
|
{{ _self.accompanying_period(acp, person) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
{% block table_entities_thead_tr %}
|
{% block table_entities_thead_tr %}
|
||||||
<th>{{ 'Id'|trans }}</th>
|
<th>{{ 'Id'|trans }}</th>
|
||||||
<th>{{ 'Title'|trans }}</th>
|
<th>{{ 'Title'|trans }}</th>
|
||||||
<th>{{ 'Social actions'|trans }}</th>
|
|
||||||
<th>{{ 'goal.results'|trans }}</th>
|
<th>{{ 'goal.results'|trans }}</th>
|
||||||
<th>{{ 'goal.desactivationDate'|trans }}</th>
|
<th>{{ 'goal.desactivationDate'|trans }}</th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
@ -17,11 +16,6 @@
|
|||||||
<td>{{ entity.id }}</td>
|
<td>{{ entity.id }}</td>
|
||||||
<td>{{ entity.title|localize_translatable_string }}</td>
|
<td>{{ entity.title|localize_translatable_string }}</td>
|
||||||
<td>
|
<td>
|
||||||
{% for sa in entity.socialActions %}
|
|
||||||
{{ sa.title|localize_translatable_string }}{% if not loop.last %},{% else %}.{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% for sa in entity.results %}
|
{% for sa in entity.results %}
|
||||||
{{ sa.title|localize_translatable_string }}{% if not loop.last %},{% else %}.{% endif %}
|
{{ sa.title|localize_translatable_string }}{% if not loop.last %},{% else %}.{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -8,9 +8,20 @@
|
|||||||
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
||||||
|
|
||||||
{% block crud_content_form_rows %}
|
{% block crud_content_form_rows %}
|
||||||
|
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label class="col-form-label col-sm-4 required" for="social_action_ordering">{{ 'Parent'|trans }}</label>
|
||||||
|
<div class="col-sm-8">{{ entity.parent|chill_entity_render_box }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label class="col-form-label col-sm-4 required" for="social_action_ordering">{{ 'Social issue'|trans }}</label>
|
||||||
|
<div class="col-sm-8">{{ entity.issue|chill_entity_render_box }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% for f in form %}
|
{% for f in form %}
|
||||||
{% if f.vars.name == 'parent' or f.vars.name == 'issue' %}
|
{% if f.vars.name == 'parent' or f.vars.name == 'issue' %}
|
||||||
{{ form_row(f, { 'attr':{'disabled':'disabled'}}) }}
|
{{ form_widget(f, { 'attr':{'hidden':'hidden'}}) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ form_row(f) }}
|
{{ form_row(f) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -82,14 +82,14 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
|
|||||||
'label' => 'Last name',
|
'label' => 'Last name',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
])
|
])
|
||||||
->add('birthdate-after', ChillDateType::class, [
|
|
||||||
'label' => 'Birthdate after',
|
|
||||||
'required' => false,
|
|
||||||
])
|
|
||||||
->add('birthdate', ChillDateType::class, [
|
->add('birthdate', ChillDateType::class, [
|
||||||
'label' => 'Birthdate',
|
'label' => 'Birthdate',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
])
|
])
|
||||||
|
->add('birthdate-after', ChillDateType::class, [
|
||||||
|
'label' => 'Birthdate after',
|
||||||
|
'required' => false,
|
||||||
|
])
|
||||||
->add('birthdate-before', ChillDateType::class, [
|
->add('birthdate-before', ChillDateType::class, [
|
||||||
'label' => 'Birthdate before',
|
'label' => 'Birthdate before',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
@ -44,6 +44,7 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
|
|||||||
private const PERIOD_NULL = [
|
private const PERIOD_NULL = [
|
||||||
'id',
|
'id',
|
||||||
'closingDate' => DateTime::class,
|
'closingDate' => DateTime::class,
|
||||||
|
'closingMotive' => AccompanyingPeriod\ClosingMotive::class,
|
||||||
'confidential',
|
'confidential',
|
||||||
'confidentialText',
|
'confidentialText',
|
||||||
'createdAt' => DateTime::class,
|
'createdAt' => DateTime::class,
|
||||||
@ -121,6 +122,7 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
|
|||||||
'type' => 'accompanying_period',
|
'type' => 'accompanying_period',
|
||||||
'isNull' => false,
|
'isNull' => false,
|
||||||
'closingDate' => $this->normalizer->normalize($period->getClosingDate(), $format, $dateContext),
|
'closingDate' => $this->normalizer->normalize($period->getClosingDate(), $format, $dateContext),
|
||||||
|
'closingMotive' => $this->normalizer->normalize($period->getClosingMotive(), $format, array_merge($context, ['docgen:expects' => AccompanyingPeriod\ClosingMotive::class])),
|
||||||
'confidential' => $period->isConfidential(),
|
'confidential' => $period->isConfidential(),
|
||||||
'createdAt' => $this->normalizer->normalize($period->getCreatedAt(), $format, $dateContext),
|
'createdAt' => $this->normalizer->normalize($period->getCreatedAt(), $format, $dateContext),
|
||||||
'createdBy' => $this->normalizer->normalize($period->getCreatedBy(), $format, $userContext),
|
'createdBy' => $this->normalizer->normalize($period->getCreatedBy(), $format, $userContext),
|
||||||
|
@ -35,6 +35,6 @@ final class AccompanyingPeriodOriginNormalizer implements NormalizerInterface
|
|||||||
|
|
||||||
public function supportsNormalization($data, $format = null): bool
|
public function supportsNormalization($data, $format = null): bool
|
||||||
{
|
{
|
||||||
return $data instanceof Origin;
|
return $data instanceof Origin && 'json' === $format;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,6 @@ namespace Chill\PersonBundle\Serializer\Normalizer;
|
|||||||
|
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument;
|
||||||
use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkRepository;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||||
use Symfony\Component\Serializer\Normalizer\ContextAwareDenormalizerInterface;
|
use Symfony\Component\Serializer\Normalizer\ContextAwareDenormalizerInterface;
|
||||||
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
|
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
|
||||||
@ -35,18 +33,6 @@ class AccompanyingPeriodWorkEvaluationDenormalizer implements ContextAwareDenorm
|
|||||||
|
|
||||||
use ObjectToPopulateTrait;
|
use ObjectToPopulateTrait;
|
||||||
|
|
||||||
private EntityManagerInterface $em;
|
|
||||||
|
|
||||||
private AccompanyingPeriodWorkRepository $workRepository;
|
|
||||||
|
|
||||||
public function __construct(
|
|
||||||
AccompanyingPeriodWorkRepository $workRepository,
|
|
||||||
EntityManagerInterface $em
|
|
||||||
) {
|
|
||||||
$this->workRepository = $workRepository;
|
|
||||||
$this->em = $em;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function denormalize($data, $type, $format = null, array $context = [])
|
public function denormalize($data, $type, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
$evaluation = $this->denormalizer->denormalize($data, $type, $format, array_merge(
|
$evaluation = $this->denormalizer->denormalize($data, $type, $format, array_merge(
|
||||||
|
@ -17,6 +17,7 @@ use Chill\DocGeneratorBundle\Context\Exception\UnexpectedTypeException;
|
|||||||
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
||||||
use Chill\DocGeneratorBundle\Service\Context\BaseContextData;
|
use Chill\DocGeneratorBundle\Service\Context\BaseContextData;
|
||||||
use Chill\DocStoreBundle\Entity\AccompanyingCourseDocument;
|
use Chill\DocStoreBundle\Entity\AccompanyingCourseDocument;
|
||||||
|
use Chill\DocStoreBundle\Entity\DocumentCategory;
|
||||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||||
use Chill\DocStoreBundle\Repository\DocumentCategoryRepository;
|
use Chill\DocStoreBundle\Repository\DocumentCategoryRepository;
|
||||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||||
@ -132,7 +133,7 @@ class AccompanyingPeriodContext implements
|
|||||||
])
|
])
|
||||||
->add('category', EntityType::class, [
|
->add('category', EntityType::class, [
|
||||||
'placeholder' => 'Choose a document category',
|
'placeholder' => 'Choose a document category',
|
||||||
'class' => 'ChillDocStoreBundle:DocumentCategory',
|
'class' => DocumentCategory::class,
|
||||||
'query_builder' => static function (EntityRepository $er) {
|
'query_builder' => static function (EntityRepository $er) {
|
||||||
return $er->createQueryBuilder('c')
|
return $er->createQueryBuilder('c')
|
||||||
->where('c.documentClass = :docClass')
|
->where('c.documentClass = :docClass')
|
||||||
|
@ -15,6 +15,7 @@ use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithAdminFormInterface;
|
|||||||
use Chill\DocGeneratorBundle\Context\Exception\UnexpectedTypeException;
|
use Chill\DocGeneratorBundle\Context\Exception\UnexpectedTypeException;
|
||||||
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
||||||
use Chill\DocGeneratorBundle\Service\Context\BaseContextData;
|
use Chill\DocGeneratorBundle\Service\Context\BaseContextData;
|
||||||
|
use Chill\DocStoreBundle\Entity\DocumentCategory;
|
||||||
use Chill\DocStoreBundle\Entity\PersonDocument;
|
use Chill\DocStoreBundle\Entity\PersonDocument;
|
||||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||||
use Chill\DocStoreBundle\Repository\DocumentCategoryRepository;
|
use Chill\DocStoreBundle\Repository\DocumentCategoryRepository;
|
||||||
@ -92,7 +93,7 @@ class PersonContext implements DocGeneratorContextWithAdminFormInterface
|
|||||||
$builder
|
$builder
|
||||||
->add('category', EntityType::class, [
|
->add('category', EntityType::class, [
|
||||||
'placeholder' => 'Choose a document category',
|
'placeholder' => 'Choose a document category',
|
||||||
'class' => 'ChillDocStoreBundle:DocumentCategory',
|
'class' => DocumentCategory::class,
|
||||||
'query_builder' => static function (EntityRepository $er) {
|
'query_builder' => static function (EntityRepository $er) {
|
||||||
return $er->createQueryBuilder('c')
|
return $er->createQueryBuilder('c')
|
||||||
->where('c.documentClass = :docClass')
|
->where('c.documentClass = :docClass')
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user