mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
dynamic picker aside activity
This commit is contained in:
parent
616d01a6c9
commit
792eafce72
@ -17,6 +17,8 @@ and this project adheres to
|
|||||||
* [main] Add confidential option for address, in edit and view (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/165)
|
* [main] Add confidential option for address, in edit and view (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/165)
|
||||||
* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377)
|
* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377)
|
||||||
* [person] Add residential address entity, form and list for each person
|
* [person] Add residential address entity, form and list for each person
|
||||||
|
* [aside_activity]: dynamicUserPickerType used (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/399)
|
||||||
|
|
||||||
## Test releases
|
## Test releases
|
||||||
|
|
||||||
### test release 2021-01-26
|
### test release 2021-01-26
|
||||||
@ -28,7 +30,6 @@ and this project adheres to
|
|||||||
* dispatching list
|
* dispatching list
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### test release 2022-01-24
|
### test release 2022-01-24
|
||||||
|
|
||||||
* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377)
|
* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377)
|
||||||
|
@ -32,6 +32,8 @@ final class AsideActivityController extends CRUDController
|
|||||||
{
|
{
|
||||||
$asideActivity = new AsideActivity();
|
$asideActivity = new AsideActivity();
|
||||||
|
|
||||||
|
$asideActivity->setAgent($this->getUser());
|
||||||
|
|
||||||
$duration = $request->query->get('duration', '300');
|
$duration = $request->query->get('duration', '300');
|
||||||
$duration = DateTime::createFromFormat('U', $duration);
|
$duration = DateTime::createFromFormat('U', $duration);
|
||||||
$asideActivity->setDuration($duration);
|
$asideActivity->setDuration($duration);
|
||||||
|
@ -14,9 +14,9 @@ namespace Chill\AsideActivityBundle\Form;
|
|||||||
use Chill\AsideActivityBundle\Entity\AsideActivity;
|
use Chill\AsideActivityBundle\Entity\AsideActivity;
|
||||||
use Chill\AsideActivityBundle\Entity\AsideActivityCategory;
|
use Chill\AsideActivityBundle\Entity\AsideActivityCategory;
|
||||||
use Chill\AsideActivityBundle\Templating\Entity\CategoryRender;
|
use Chill\AsideActivityBundle\Templating\Entity\CategoryRender;
|
||||||
use Chill\MainBundle\Entity\User;
|
|
||||||
use Chill\MainBundle\Form\Type\ChillDateType;
|
use Chill\MainBundle\Form\Type\ChillDateType;
|
||||||
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
||||||
|
use Chill\MainBundle\Form\Type\PickUserDynamicType;
|
||||||
use DateInterval;
|
use DateInterval;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
@ -68,22 +68,10 @@ final class AsideActivityFormType extends AbstractType
|
|||||||
];
|
];
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
->add(
|
->add('agent', PickUserDynamicType::class, [
|
||||||
'agent',
|
'label' => 'For agent',
|
||||||
EntityType::class,
|
'required' => true,
|
||||||
[
|
])
|
||||||
'label' => 'For agent',
|
|
||||||
'required' => true,
|
|
||||||
'class' => User::class,
|
|
||||||
'data' => $this->storage->getToken()->getUser(),
|
|
||||||
'query_builder' => static function (EntityRepository $er) {
|
|
||||||
return $er->createQueryBuilder('u')->where('u.enabled = true');
|
|
||||||
},
|
|
||||||
'attr' => ['class' => 'select2 '],
|
|
||||||
'placeholder' => 'Choose the agent for whom this activity is created',
|
|
||||||
'choice_label' => 'username',
|
|
||||||
]
|
|
||||||
)
|
|
||||||
->add(
|
->add(
|
||||||
'date',
|
'date',
|
||||||
ChillDateType::class,
|
ChillDateType::class,
|
||||||
|
@ -1,5 +1,15 @@
|
|||||||
{% extends '@ChillMain/Admin/layout.html.twig' %}
|
{% extends '@ChillMain/Admin/layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ parent() }}
|
||||||
|
{{ encore_entry_script_tags('mod_pickentity_type') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block css %}
|
||||||
|
{{ parent() }}
|
||||||
|
{{ encore_entry_link_tags('mod_pickentity_type') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
|
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -8,4 +18,5 @@
|
|||||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||||
{% endembed %}
|
{% endembed %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user