mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-11-04 11:18:25 +00:00 
			
		
		
		
	Compare commits
	
		
			38 Commits
		
	
	
		
			deploy/qui
			...
			deploy/qui
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 96d302ccf7 | |||
| 
						 | 
					0b5daa6c33 | ||
| 662e5f967c | |||
| 802125edc6 | |||
| 028c3e0c31 | |||
| e4adafafc8 | |||
| 54316d148c | |||
| 3c5a2a65df | |||
| 741ef7b40d | |||
| e7384343b2 | |||
| 1e2a920200 | |||
| b5a78fa341 | |||
| d9c1f52894 | |||
| 
						 | 
					f05f7415bd | ||
| 
						 | 
					5553c7314c | ||
| 7dc70baf57 | |||
| 
						 | 
					34af401a98 | ||
| 5bae8dc5bf | |||
| 6e277e99ae | |||
| 2688c0f0ce | |||
| 
						 | 
					0135f5184e | ||
| fd698419e8 | |||
| 4a864a0b14 | |||
| 55dc0d3f9f | |||
| 85835c8b0d | |||
| 
						 | 
					ab1edee9fb | ||
| 6154e0912b | |||
| 0388428c6f | |||
| 7ac55275c2 | |||
| 1119e20a49 | |||
| ea2870eef8 | |||
| 
						 | 
					93a44d8303 | ||
| 
						 | 
					8109415e05 | ||
| 
						 | 
					514fe6163a | ||
| 
						 | 
					4cf3cc8353 | ||
| a43e6c12a0 | |||
| abe012de60 | |||
| aaa9a1ec7b | 
@@ -72,6 +72,7 @@ class ActivityController extends AbstractController
 | 
			
		||||
    {
 | 
			
		||||
        $em = $this->getDoctrine()->getManager();
 | 
			
		||||
        $view = null;
 | 
			
		||||
        // TODO: add pagination
 | 
			
		||||
 | 
			
		||||
        [$person, $accompanyingPeriod] = $this->getEntity($request);
 | 
			
		||||
 | 
			
		||||
@@ -80,10 +81,9 @@ class ActivityController extends AbstractController
 | 
			
		||||
                ->getReachableCircles($this->getUser(), new Role('CHILL_ACTIVITY_SEE'),
 | 
			
		||||
                    $person->getCenter());
 | 
			
		||||
 | 
			
		||||
            $activities = $em->getRepository('ChillActivityBundle:Activity')->findBy(
 | 
			
		||||
                ['person' => $person, 'scope' => $reachableScopes],
 | 
			
		||||
                ['date' => 'DESC'],
 | 
			
		||||
            );
 | 
			
		||||
            $activities = $em->getRepository(Activity::class)
 | 
			
		||||
                ->findByPersonImplied($person, $reachableScopes)
 | 
			
		||||
                ;
 | 
			
		||||
 | 
			
		||||
            $event = new PrivacyEvent($person, array(
 | 
			
		||||
                'element_class' => Activity::class,
 | 
			
		||||
 
 | 
			
		||||
@@ -224,7 +224,8 @@ class ActivityType extends AbstractType
 | 
			
		||||
 | 
			
		||||
        if ($activityType->isVisible('comment')) {
 | 
			
		||||
            $builder->add('comment', CommentType::class, [
 | 
			
		||||
                'label' => $activityType->getLabel('comment'),
 | 
			
		||||
                'label' => empty($activityType->getLabel('comment')) 
 | 
			
		||||
                    ? 'activity.comment' : $activityType->getLabel('comment'),
 | 
			
		||||
                'required' => $activityType->isRequired('comment'),
 | 
			
		||||
            ]);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,88 +0,0 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
 * 
 | 
			
		||||
 */
 | 
			
		||||
namespace Chill\ActivityBundle\Menu;
 | 
			
		||||
 | 
			
		||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
 | 
			
		||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
 | 
			
		||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
 | 
			
		||||
use Symfony\Component\Translation\TranslatorInterface;
 | 
			
		||||
use Knp\Menu\MenuItem;
 | 
			
		||||
use Symfony\Component\Security\Core\Role\Role;
 | 
			
		||||
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 *
 | 
			
		||||
 * @author Julien Fastré <julien.fastre@champs-libres.coop>
 | 
			
		||||
 */
 | 
			
		||||
class MenuBuilder implements LocalMenuBuilderInterface
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * @var TokenStorageInterface
 | 
			
		||||
     */
 | 
			
		||||
    protected $tokenStorage;
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * @var TranslatorInterface
 | 
			
		||||
     */
 | 
			
		||||
    protected $translator;
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * @var AuthorizationHelper
 | 
			
		||||
     */
 | 
			
		||||
    protected $authorizationHelper;
 | 
			
		||||
    
 | 
			
		||||
    public function __construct(
 | 
			
		||||
        TokenStorageInterface $tokenStorage, 
 | 
			
		||||
        TranslatorInterface $translator, 
 | 
			
		||||
        AuthorizationHelper $authorizationHelper
 | 
			
		||||
    ) {
 | 
			
		||||
        $this->tokenStorage = $tokenStorage;
 | 
			
		||||
        $this->translator = $translator;
 | 
			
		||||
        $this->authorizationHelper = $authorizationHelper;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    public function buildMenu($menuId, MenuItem $menu, array $parameters)
 | 
			
		||||
    {
 | 
			
		||||
        /* @var $person \Chill\PersonBundle\Entity\Person */
 | 
			
		||||
        $person  = $parameters['person'];
 | 
			
		||||
        $user    = $this->tokenStorage->getToken()->getUser();
 | 
			
		||||
        $roleSee = new Role(ActivityVoter::SEE);
 | 
			
		||||
        $roleAdd = new Role(ActivityVoter::CREATE);
 | 
			
		||||
        
 | 
			
		||||
        if ($this->authorizationHelper->userHasAccess($user, $person, $roleSee)) {
 | 
			
		||||
            $menu->addChild($this->translator->trans('Activity list'), [
 | 
			
		||||
                    'route' => 'chill_activity_activity_list',
 | 
			
		||||
                    'routeParameters' => [
 | 
			
		||||
                        'person_id' => $person->getId()
 | 
			
		||||
                    ]
 | 
			
		||||
                ])
 | 
			
		||||
                ->setExtras([
 | 
			
		||||
                    'order' => 201
 | 
			
		||||
                ]);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        if ($this->authorizationHelper->userHasAccess($user, $person, $roleAdd)) {
 | 
			
		||||
            $menu->addChild($this->translator->trans('Add a new activity'), [
 | 
			
		||||
                    'route' => 'chill_activity_activity_new',
 | 
			
		||||
                    'routeParameters' => [
 | 
			
		||||
                        'person_id' => $person->getId()
 | 
			
		||||
                    ]
 | 
			
		||||
                ])
 | 
			
		||||
                ->setExtras([
 | 
			
		||||
                    'order' => 200
 | 
			
		||||
                ]);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static function getMenuIds(): array
 | 
			
		||||
    {
 | 
			
		||||
        return [ 'person' ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -15,8 +15,7 @@
 | 
			
		||||
 * You should have received a copy of the GNU Affero General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
namespace Chill\ActivityBundle\Menu;
 | 
			
		||||
 | 
			
		||||
namespace Chill\ActivityBundle\Menu; 
 | 
			
		||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
 | 
			
		||||
use Knp\Menu\MenuItem;
 | 
			
		||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
 | 
			
		||||
@@ -55,26 +54,15 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
 | 
			
		||||
    {
 | 
			
		||||
        /* @var $person \Chill\PersonBundle\Entity\Person */
 | 
			
		||||
        $person = $parameters['person'];
 | 
			
		||||
 | 
			
		||||
        if (false) {
 | 
			
		||||
            if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {
 | 
			
		||||
                $menu->addChild(
 | 
			
		||||
                    $this->translator->trans('Activity list'), [
 | 
			
		||||
                        'route' => 'chill_activity_activity_list',
 | 
			
		||||
                        'routeParameters' => [ 'person_id' => $person->getId() ],
 | 
			
		||||
                    ])
 | 
			
		||||
                    ->setExtra('order', 201)
 | 
			
		||||
                    ;
 | 
			
		||||
            }
 | 
			
		||||
            if ($this->authorizationChecker->isGranted(ActivityVoter::CREATE, $person)) {
 | 
			
		||||
                $menu->addChild(
 | 
			
		||||
                    $this->translator->trans('Add a new activity'), [
 | 
			
		||||
                        'route' => 'chill_activity_activity_new',
 | 
			
		||||
                        'routeParameters' => [ 'person_id' => $person->getId() ],
 | 
			
		||||
                    ])
 | 
			
		||||
                    ->setExtra('order', 200)
 | 
			
		||||
                    ;
 | 
			
		||||
            }
 | 
			
		||||
        
 | 
			
		||||
        if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {
 | 
			
		||||
            $menu->addChild(
 | 
			
		||||
                $this->translator->trans('Activity list'), [
 | 
			
		||||
                    'route' => 'chill_activity_activity_list',
 | 
			
		||||
                    'routeParameters' => [ 'person_id' => $person->getId() ],
 | 
			
		||||
                ])
 | 
			
		||||
                ->setExtra('order', 201)
 | 
			
		||||
                ;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -38,5 +38,30 @@ class ActivityRepository extends ServiceEntityRepository
 | 
			
		||||
    {
 | 
			
		||||
        parent::__construct($registry, Activity::class);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    public function findByPersonImplied($person, array $scopes, $orderBy = [ 'date' => 'DESC'], $limit = 100, $offset = 0)
 | 
			
		||||
    {
 | 
			
		||||
        $qb = $this->createQueryBuilder('a');
 | 
			
		||||
        $qb->select('a');
 | 
			
		||||
 | 
			
		||||
        $qb
 | 
			
		||||
            // TODO add acl
 | 
			
		||||
            //->where($qb->expr()->in('a.scope', ':scopes'))
 | 
			
		||||
            //->setParameter('scopes', $scopes)
 | 
			
		||||
            ->andWhere(
 | 
			
		||||
                $qb->expr()->orX(
 | 
			
		||||
                    $qb->expr()->eq('a.person', ':person'),
 | 
			
		||||
                    ':person MEMBER OF a.persons'
 | 
			
		||||
                )
 | 
			
		||||
            )
 | 
			
		||||
            ->setParameter('person', $person)
 | 
			
		||||
            ;
 | 
			
		||||
 | 
			
		||||
        foreach ($orderBy as $k => $dir) {
 | 
			
		||||
            $qb->addOrderBy('a.'.$k, $dir);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $qb->getQuery()
 | 
			
		||||
            ->getResult();
 | 
			
		||||
    }    
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -99,7 +99,7 @@
 | 
			
		||||
            </a>
 | 
			
		||||
        </li>
 | 
			
		||||
        <li>
 | 
			
		||||
            <button class="sc-button bt-update" type="submit">{{ 'Save activity'|trans }}</button>
 | 
			
		||||
            <button class="sc-button bt-update" type="submit">{{ 'Save'|trans }}</button>
 | 
			
		||||
        </li>
 | 
			
		||||
    </ul>
 | 
			
		||||
{{ form_end(edit_form) }}
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,7 @@
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block js %}
 | 
			
		||||
    {{ parent() }}
 | 
			
		||||
    {{ encore_entry_link_tags('async_upload') }}
 | 
			
		||||
    <script type="text/javascript">
 | 
			
		||||
        window.addEventListener('DOMContentLoaded', function (e) {
 | 
			
		||||
@@ -22,6 +23,7 @@
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block css %}
 | 
			
		||||
    {{ parent() }}
 | 
			
		||||
    {{ encore_entry_link_tags('async_upload') }}
 | 
			
		||||
    {{ encore_entry_link_tags('vue_activity') }}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@
 | 
			
		||||
    </p>
 | 
			
		||||
{% else %}
 | 
			
		||||
 | 
			
		||||
<div class="flex-table list-records {{ context }}">
 | 
			
		||||
<div class="flex-table list-records context-{{ context }}">
 | 
			
		||||
    <!--
 | 
			
		||||
    <thead>
 | 
			
		||||
        <tr>
 | 
			
		||||
@@ -54,6 +54,20 @@
 | 
			
		||||
                        </p>
 | 
			
		||||
                        {% endif %}
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    {% if context == 'person' and activity.accompanyingPeriod is not empty %}
 | 
			
		||||
                      <div class="accompanyingPeriodLink" style="margin-top: 1rem">
 | 
			
		||||
                        <a 
 | 
			
		||||
                           href="{{ chill_path_add_return_path(
 | 
			
		||||
                            "chill_person_accompanying_course_index",
 | 
			
		||||
                            { 'accompanying_period_id': activity.accompanyingPeriod.id }
 | 
			
		||||
                            ) }}"
 | 
			
		||||
                           >
 | 
			
		||||
                          <i class="fa fa-random"></i>
 | 
			
		||||
                          {{ activity.accompanyingPeriod.id }}
 | 
			
		||||
                        </a>
 | 
			
		||||
                      </div>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
@@ -147,13 +161,14 @@
 | 
			
		||||
            </div>
 | 
			
		||||
            
 | 
			
		||||
            {%  
 | 
			
		||||
                if activity.comment.comment is not empty 
 | 
			
		||||
                if activity.comment.comment is not empty
 | 
			
		||||
                or activity.persons|length > 0
 | 
			
		||||
                or activity.thirdParties|length > 0
 | 
			
		||||
                or activity.users|length > 0 
 | 
			
		||||
            %}
 | 
			
		||||
            <div class="item-row details">
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
 | 
			
		||||
                    {% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'row', 'entity': activity } %}
 | 
			
		||||
                </div>
 | 
			
		||||
                
 | 
			
		||||
@@ -170,10 +185,13 @@
 | 
			
		||||
</div>
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
<ul class="record_actions">
 | 
			
		||||
    <li>
 | 
			
		||||
        <a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="sc-button bt-create">
 | 
			
		||||
            {{ 'Add a new activity' | trans }}
 | 
			
		||||
        </a>
 | 
			
		||||
    </li>
 | 
			
		||||
</ul>
 | 
			
		||||
{% if context != 'person' %}
 | 
			
		||||
{# TODO set this condition in configuration #}
 | 
			
		||||
  <ul class="record_actions">
 | 
			
		||||
      <li>
 | 
			
		||||
          <a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="sc-button bt-create">
 | 
			
		||||
              {{ 'Add a new activity' | trans }}
 | 
			
		||||
          </a>
 | 
			
		||||
      </li>
 | 
			
		||||
  </ul>
 | 
			
		||||
{% endif %}
 | 
			
		||||
 
 | 
			
		||||
@@ -98,7 +98,7 @@
 | 
			
		||||
  </li>
 | 
			
		||||
  <li>
 | 
			
		||||
    <button class="sc-button bt-create" type="submit">
 | 
			
		||||
      {{ 'Add a new activity'|trans }}
 | 
			
		||||
      {{ 'Create'|trans }}
 | 
			
		||||
    </button>
 | 
			
		||||
  </li>
 | 
			
		||||
</ul>
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,7 @@
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block js %}
 | 
			
		||||
    {{ parent() }}
 | 
			
		||||
    {{ encore_entry_script_tags('async_upload') }}
 | 
			
		||||
    <script type="text/javascript">
 | 
			
		||||
        window.addEventListener('DOMContentLoaded', function (e) {
 | 
			
		||||
@@ -22,6 +23,7 @@
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block css %}
 | 
			
		||||
    {{ parent() }}
 | 
			
		||||
    <link rel="stylesheet" href="{{ asset('build/async_upload.css') }}"/>
 | 
			
		||||
    {{ encore_entry_link_tags('vue_activity') }}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
@@ -117,7 +117,7 @@
 | 
			
		||||
    </li>
 | 
			
		||||
    <li>
 | 
			
		||||
    <a class="sc-button bt-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}">
 | 
			
		||||
        {{ 'Edit the activity'|trans }}
 | 
			
		||||
        {{ 'Edit'|trans }}
 | 
			
		||||
    </a>
 | 
			
		||||
    </li>
 | 
			
		||||
    {# TODO
 | 
			
		||||
 
 | 
			
		||||
@@ -74,6 +74,7 @@ Users concerned: T(M)S
 | 
			
		||||
activity:
 | 
			
		||||
    Insert a document: Insérer un document
 | 
			
		||||
    Remove a document: Supprimer le document
 | 
			
		||||
    comment: Commentaire
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#timeline
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										27
									
								
								src/Bundle/ChillMainBundle/Controller/UserApiController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/Bundle/ChillMainBundle/Controller/UserApiController.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Chill\MainBundle\Controller;
 | 
			
		||||
 | 
			
		||||
use Chill\MainBundle\CRUD\Controller\ApiController;
 | 
			
		||||
use Symfony\Component\HttpFoundation\Request;
 | 
			
		||||
use Symfony\Component\HttpFoundation\JsonResponse;
 | 
			
		||||
use Symfony\Component\Routing\Annotation\Route;
 | 
			
		||||
 | 
			
		||||
class UserApiController extends ApiController
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * @Route(
 | 
			
		||||
     *      "/api/1.0/main/whoami.{_format}",
 | 
			
		||||
     *      name="chill_main_user_whoami",
 | 
			
		||||
     *      requirements={
 | 
			
		||||
     *          "_format": "json"
 | 
			
		||||
     *          }
 | 
			
		||||
     *      )
 | 
			
		||||
     */
 | 
			
		||||
    public function whoami($_format): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
        return $this->json($this->getUser(), JsonResponse::HTTP_OK, [],
 | 
			
		||||
            [ "groups" => [ "read" ] ]);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
@@ -347,7 +347,28 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
 | 
			
		||||
                            ]
 | 
			
		||||
                        ],
 | 
			
		||||
                    ]
 | 
			
		||||
                ]
 | 
			
		||||
                ],
 | 
			
		||||
                [
 | 
			
		||||
                    'class' => \Chill\MainBundle\Entity\User::class,
 | 
			
		||||
                    'controller' => \Chill\MainBundle\Controller\UserApiController::class,
 | 
			
		||||
                    'name' => 'user',
 | 
			
		||||
                    'base_path' => '/api/1.0/main/user',
 | 
			
		||||
                    'base_role' => 'ROLE_USER',
 | 
			
		||||
                    'actions' => [
 | 
			
		||||
                        '_index' => [
 | 
			
		||||
                            'methods' => [
 | 
			
		||||
                                Request::METHOD_GET => true,
 | 
			
		||||
                                Request::METHOD_HEAD => true
 | 
			
		||||
                            ],
 | 
			
		||||
                        ],
 | 
			
		||||
                        '_entity' => [
 | 
			
		||||
                            'methods' => [
 | 
			
		||||
                                Request::METHOD_GET => true,
 | 
			
		||||
                                Request::METHOD_HEAD => true,
 | 
			
		||||
                            ]
 | 
			
		||||
                        ],
 | 
			
		||||
                    ]
 | 
			
		||||
                ],
 | 
			
		||||
            ]
 | 
			
		||||
        ]);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -45,7 +45,8 @@ class CommentType extends AbstractType
 | 
			
		||||
    {
 | 
			
		||||
        $builder
 | 
			
		||||
            ->add('comment', ChillTextareaType::class, [
 | 
			
		||||
                'disable_editor' => $options['disable_editor']
 | 
			
		||||
                'disable_editor' => $options['disable_editor'],
 | 
			
		||||
                'label' => $options['label'],
 | 
			
		||||
            ])
 | 
			
		||||
        ;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,7 @@ $table-body-td-text-align: left;
 | 
			
		||||
// Tabs
 | 
			
		||||
$tabs-nav-margin-bottom: 0.2em;
 | 
			
		||||
$tabs-nav-bg-color: $yellow;
 | 
			
		||||
$tabs-nav-bg-color-light: lighten($yellow, 10%);
 | 
			
		||||
$tabs-nav-text-color: $blue;
 | 
			
		||||
$tabs-new-border: none;
 | 
			
		||||
$tabs-nav-hover-border: none;
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,13 @@ $global-bg-color: $yellow;
 | 
			
		||||
         color: $tabs-nav-title-text-color;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      > a  {
 | 
			
		||||
      &.sub-menu {
 | 
			
		||||
         padding-left: 20px;
 | 
			
		||||
         > a {
 | 
			
		||||
            background-color: $tabs-nav-bg-color-light;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      > a {
 | 
			
		||||
         display: block;
 | 
			
		||||
         width: auto;
 | 
			
		||||
         padding: $tabs-nav-padding;
 | 
			
		||||
@@ -38,11 +44,11 @@ $global-bg-color: $yellow;
 | 
			
		||||
         @include border-top-radius($base-border-radius);
 | 
			
		||||
         @include border-bottom-radius($base-border-radius);
 | 
			
		||||
 | 
			
		||||
         &:hover, &:active {  
 | 
			
		||||
         &:hover, &:active {
 | 
			
		||||
            border: $tabs-nav-hover-border;
 | 
			
		||||
            color: $tabs-nav-hover-text-color;
 | 
			
		||||
            text-decoration: none;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -46,6 +46,7 @@
 | 
			
		||||
 | 
			
		||||
                     <city-selection
 | 
			
		||||
                        v-bind:address="address"
 | 
			
		||||
                        v-bind:focusOnAddress="focusOnAddress"
 | 
			
		||||
                        v-bind:getReferenceAddresses="getReferenceAddresses">
 | 
			
		||||
                     </city-selection>
 | 
			
		||||
 | 
			
		||||
@@ -173,6 +174,14 @@ export default {
 | 
			
		||||
         //   this.$refs.search.focus(); // positionner le curseur à l'ouverture de la modale
 | 
			
		||||
         //})
 | 
			
		||||
      },
 | 
			
		||||
      focusOnCity() {
 | 
			
		||||
          const citySelector = document.getElementById('citySelector');
 | 
			
		||||
          citySelector.focus();
 | 
			
		||||
      },
 | 
			
		||||
      focusOnAddress() {
 | 
			
		||||
          const addressSelector = document.getElementById('addressSelector');
 | 
			
		||||
          addressSelector.focus();
 | 
			
		||||
      },
 | 
			
		||||
      getCountries() {
 | 
			
		||||
         console.log('getCountries');
 | 
			
		||||
         this.loading = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
   <div class="container">
 | 
			
		||||
      <VueMultiselect
 | 
			
		||||
         id="addressSelector"
 | 
			
		||||
         v-model="value"
 | 
			
		||||
         @select="selectAddress"
 | 
			
		||||
         name="field"
 | 
			
		||||
@@ -70,7 +71,7 @@ export default {
 | 
			
		||||
   },
 | 
			
		||||
   methods: {
 | 
			
		||||
      transName(value) {
 | 
			
		||||
         return value.streetNumber === undefined ? value.street : `${value.street}, ${value.streetNumber}`
 | 
			
		||||
         return value.streetNumber === undefined ? value.street : `${value.streetNumber}, ${value.street}`
 | 
			
		||||
      },
 | 
			
		||||
      selectAddress(value) {
 | 
			
		||||
         this.address.selected.address = value;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
   <div class="container">
 | 
			
		||||
      <VueMultiselect
 | 
			
		||||
         id="citySelector"
 | 
			
		||||
         v-model="value"
 | 
			
		||||
         @select="selectCity"
 | 
			
		||||
         name="field"
 | 
			
		||||
@@ -35,7 +36,7 @@ import VueMultiselect from 'vue-multiselect';
 | 
			
		||||
export default {
 | 
			
		||||
   name: 'CitySelection',
 | 
			
		||||
   components: { VueMultiselect },
 | 
			
		||||
   props: ['address', 'getReferenceAddresses'],
 | 
			
		||||
   props: ['address', 'getReferenceAddresses', 'focusOnAddress'],
 | 
			
		||||
   data() {
 | 
			
		||||
      return {
 | 
			
		||||
         value: null
 | 
			
		||||
@@ -74,6 +75,7 @@ export default {
 | 
			
		||||
         this.address.newPostalCode.name = value.name;
 | 
			
		||||
         this.address.newPostalCode.code = value.code;
 | 
			
		||||
         this.getReferenceAddresses(value);
 | 
			
		||||
         this.focusOnAddress();
 | 
			
		||||
      },
 | 
			
		||||
      addPostalCode() {
 | 
			
		||||
         this.address.writeNewPostalCode = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,6 @@ export default {
 | 
			
		||||
         return name.fr //TODO multilang
 | 
			
		||||
      },
 | 
			
		||||
      selectCountry(value) {
 | 
			
		||||
         console.log(value);
 | 
			
		||||
         this.address.selected.country = value;
 | 
			
		||||
         this.getCities(value);
 | 
			
		||||
      },
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ class AddressNormalizer implements NormalizerAwareInterface, NormalizerInterface
 | 
			
		||||
    public function normalize($address, string $format = null, array $context = [])
 | 
			
		||||
    {
 | 
			
		||||
        $data['address_id'] = $address->getId();
 | 
			
		||||
        $data['text'] = $address->isNoAddress() ? '' : $address->getStreet().', '.$address->getStreetNumber();
 | 
			
		||||
        $data['text'] = $address->isNoAddress() ? '' : $address->getStreetNumber().', '.$address->getStreet();
 | 
			
		||||
        $data['street'] = $address->getStreet();
 | 
			
		||||
        $data['streetNumber'] = $address->getStreetNumber();
 | 
			
		||||
        $data['postcode']['name'] = $address->getPostCode()->getName();
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,49 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Chill\MainBundle\Tests\Controller;
 | 
			
		||||
 | 
			
		||||
use Chill\MainBundle\Test\PrepareClientTrait;
 | 
			
		||||
use Symfony\Component\HttpFoundation\Request;
 | 
			
		||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
 | 
			
		||||
 | 
			
		||||
class UserApiControllerTest extends WebTestCase
 | 
			
		||||
{
 | 
			
		||||
    use PrepareClientTrait;
 | 
			
		||||
 | 
			
		||||
    public function testIndex()
 | 
			
		||||
    {
 | 
			
		||||
        $client = $this->getClientAuthenticated();
 | 
			
		||||
 | 
			
		||||
        $client->request(Request::METHOD_GET, '/api/1.0/main/user.json');
 | 
			
		||||
 | 
			
		||||
        $this->assertResponseIsSuccessful();
 | 
			
		||||
 | 
			
		||||
        $data = \json_decode($client->getResponse()->getContent(), true);
 | 
			
		||||
        $this->assertTrue(\array_key_exists('count', $data));
 | 
			
		||||
        $this->assertGreaterThan(0, $data['count']);
 | 
			
		||||
        $this->assertTrue(\array_key_exists('results', $data));
 | 
			
		||||
 | 
			
		||||
        return $data['results'][0];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @depends testIndex
 | 
			
		||||
     */
 | 
			
		||||
    public function testEntity($existingUser)
 | 
			
		||||
    {
 | 
			
		||||
        $client = $this->getClientAuthenticated();
 | 
			
		||||
 | 
			
		||||
        $client->request(Request::METHOD_GET, '/api/1.0/main/user/'.$existingUser['id'].'.json');
 | 
			
		||||
 | 
			
		||||
        $this->assertResponseIsSuccessful();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testWhoami()
 | 
			
		||||
    {
 | 
			
		||||
        $client = $this->getClientAuthenticated();
 | 
			
		||||
 | 
			
		||||
        $client->request(Request::METHOD_GET, '/api/1.0/main/whoami.json');
 | 
			
		||||
 | 
			
		||||
        $this->assertResponseIsSuccessful();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -10,6 +10,19 @@ servers:
 | 
			
		||||
 | 
			
		||||
components:
 | 
			
		||||
  schemas:
 | 
			
		||||
    User:
 | 
			
		||||
      type: object
 | 
			
		||||
      properties:
 | 
			
		||||
        id:
 | 
			
		||||
          type: integer
 | 
			
		||||
        type:
 | 
			
		||||
          type: string
 | 
			
		||||
          enum:
 | 
			
		||||
            - user
 | 
			
		||||
        username:
 | 
			
		||||
          type: string
 | 
			
		||||
        text:
 | 
			
		||||
          type: string
 | 
			
		||||
    Center:
 | 
			
		||||
      type: object
 | 
			
		||||
      properties:
 | 
			
		||||
@@ -425,3 +438,46 @@ paths:
 | 
			
		||||
          description: "not found"
 | 
			
		||||
        401:
 | 
			
		||||
          description: "Unauthorized"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  /1.0/main/user.json:
 | 
			
		||||
    get:
 | 
			
		||||
      tags:
 | 
			
		||||
        - user
 | 
			
		||||
      summary: Return a list of all user
 | 
			
		||||
      responses:
 | 
			
		||||
        200:
 | 
			
		||||
          description: "ok"
 | 
			
		||||
  /1.0/main/whoami.json:
 | 
			
		||||
    get:
 | 
			
		||||
      tags:
 | 
			
		||||
        - user
 | 
			
		||||
      summary: Return the currently authenticated user
 | 
			
		||||
      responses:
 | 
			
		||||
        200:
 | 
			
		||||
          description: "ok"
 | 
			
		||||
  /1.0/main/user/{id}.json:
 | 
			
		||||
    get:
 | 
			
		||||
      tags:
 | 
			
		||||
        - user
 | 
			
		||||
      summary: Return a user by id
 | 
			
		||||
      parameters:
 | 
			
		||||
        - name: id
 | 
			
		||||
          in: path
 | 
			
		||||
          required: true
 | 
			
		||||
          description: The user id
 | 
			
		||||
          schema:
 | 
			
		||||
            type: integer
 | 
			
		||||
            format: integer
 | 
			
		||||
            minimum: 1
 | 
			
		||||
      responses:
 | 
			
		||||
        200:
 | 
			
		||||
          description: "ok"
 | 
			
		||||
          content:
 | 
			
		||||
            application/json:
 | 
			
		||||
              schema:
 | 
			
		||||
                $ref: '#/components/schemas/User'
 | 
			
		||||
        404:
 | 
			
		||||
          description: "not found"
 | 
			
		||||
        401:
 | 
			
		||||
          description: "Unauthorized"
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ class HouseholdController extends AbstractController
 | 
			
		||||
        $this->translator = $translator;
 | 
			
		||||
        $this->positionRepository = $positionRepository;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @Route(
 | 
			
		||||
     *      "/{household_id}/summary",
 | 
			
		||||
@@ -47,7 +47,7 @@ class HouseholdController extends AbstractController
 | 
			
		||||
            ->findByActiveOrdered()
 | 
			
		||||
            ;
 | 
			
		||||
 | 
			
		||||
        // little performance improvement: 
 | 
			
		||||
        // little performance improvement:
 | 
			
		||||
        // initialize members collection, which will avoid
 | 
			
		||||
        // some queries
 | 
			
		||||
        $household->getMembers()->initialize();
 | 
			
		||||
@@ -67,6 +67,31 @@ class HouseholdController extends AbstractController
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @Route(
 | 
			
		||||
     *      "/{household_id}/accompanying-period",
 | 
			
		||||
     *      name="chill_person_household_accompanying_period",
 | 
			
		||||
     *      methods={"GET", "HEAD"}
 | 
			
		||||
     *  )
 | 
			
		||||
     *  @ParamConverter("household", options={"id" = "household_id"})
 | 
			
		||||
     */
 | 
			
		||||
    public function accompanyingPeriod(Request $request, Household $household)
 | 
			
		||||
    {
 | 
			
		||||
        // TODO ACL
 | 
			
		||||
 | 
			
		||||
        $members = $household->getMembers();
 | 
			
		||||
        foreach($members as $m) {
 | 
			
		||||
            $accompanyingPeriods = $m->getPerson()->getAccompanyingPeriods();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $this->render('@ChillPerson/Household/accompanying_period.html.twig',
 | 
			
		||||
            [
 | 
			
		||||
                'household' => $household,
 | 
			
		||||
                'accompanying_periods' => $accompanyingPeriods
 | 
			
		||||
            ]
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @Route(
 | 
			
		||||
     *      "/{household_id}/addresses",
 | 
			
		||||
 
 | 
			
		||||
@@ -9,22 +9,22 @@ use Symfony\Contracts\Translation\TranslatorInterface;
 | 
			
		||||
 | 
			
		||||
class HouseholdMenuBuilder implements LocalMenuBuilderInterface
 | 
			
		||||
{
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @var TranslatorInterface
 | 
			
		||||
     */
 | 
			
		||||
    protected $translator;
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    public function __construct(TranslatorInterface $translator)
 | 
			
		||||
    {
 | 
			
		||||
        $this->translator = $translator;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    public static function getMenuIds(): array
 | 
			
		||||
    {
 | 
			
		||||
        return [ 'household' ];
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    public function buildMenu($menuId, MenuItem $menu, array $parameters): void
 | 
			
		||||
    {
 | 
			
		||||
        $household = $parameters['household'];
 | 
			
		||||
@@ -35,15 +35,22 @@ class HouseholdMenuBuilder implements LocalMenuBuilderInterface
 | 
			
		||||
                'household_id' => $household->getId()
 | 
			
		||||
        ]])
 | 
			
		||||
        ->setExtras(['order' => 10]);
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        $menu->addChild($this->translator->trans('household.Accompanying period'), [
 | 
			
		||||
            'route' => 'chill_person_household_accompanying_period',
 | 
			
		||||
            'routeParameters' => [
 | 
			
		||||
                'household_id' => $household->getId()
 | 
			
		||||
        ]])
 | 
			
		||||
        ->setExtras(['order' => 20]);
 | 
			
		||||
 | 
			
		||||
        $menu->addChild($this->translator->trans('household.Addresses'), [
 | 
			
		||||
            'route' => 'chill_person_household_addresses',
 | 
			
		||||
            'routeParameters' => [
 | 
			
		||||
                'household_id' => $household->getId()
 | 
			
		||||
        ]])
 | 
			
		||||
        ->setExtras(['order' => 30]);
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,4 @@
 | 
			
		||||
require('./sass/chillperson.scss');
 | 
			
		||||
require('./sass/person_with_period.scss');
 | 
			
		||||
require('./sass/household_banner.scss');
 | 
			
		||||
require('./sass/accompanying_period_work.scss');
 | 
			
		||||
 
 | 
			
		||||
@@ -46,6 +46,15 @@
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &.short {
 | 
			
		||||
    .item {
 | 
			
		||||
      padding-bottom: 0;
 | 
			
		||||
      ul.record_actions {
 | 
			
		||||
        margin-bottom: 0;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .updatedBy {
 | 
			
		||||
    margin-top: 1rem;
 | 
			
		||||
    text-align: right;
 | 
			
		||||
@@ -94,3 +103,4 @@ ul.timeline {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,6 @@
 | 
			
		||||
 | 
			
		||||
.chill-entity__social-action {
 | 
			
		||||
  .badge-primary {
 | 
			
		||||
    background-color: var(--chill-green);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -18,9 +18,6 @@
 | 
			
		||||
         
 | 
			
		||||
         <dl class="content-bloc" v-if="accompanyingCourse.requestor.type === 'person'">
 | 
			
		||||
            
 | 
			
		||||
            <dt>{{ $t('requestor.birthdate') }}</dt>   
 | 
			
		||||
            <dd>{{ $d(accompanyingCourse.requestor.birthdate.datetime, 'short') }}</dd>
 | 
			
		||||
            
 | 
			
		||||
            <dt>{{ $t('requestor.center') }}</dt>   
 | 
			
		||||
            <dd>{{ accompanyingCourse.requestor.center.name }}</dd>
 | 
			
		||||
            
 | 
			
		||||
@@ -118,7 +115,12 @@ export default {
 | 
			
		||||
         get() {
 | 
			
		||||
            return this.$store.state.accompanyingCourse.requestorAnonymous;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      },
 | 
			
		||||
      hasRequestorPersonBirthdate() {
 | 
			
		||||
        console.log('hasRequestorBirthdate');
 | 
			
		||||
        console.log(this.$store.state.accompanyingCourse.requestor);
 | 
			
		||||
        return this.$store.state.accompanyingCourse.requestor.birthdate !== null;
 | 
			
		||||
      },
 | 
			
		||||
   },
 | 
			
		||||
   methods: {
 | 
			
		||||
      removeRequestor() {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,11 +9,11 @@
 | 
			
		||||
      </span>
 | 
			
		||||
      {{ resource.resource.text }}
 | 
			
		||||
   </td>
 | 
			
		||||
      
 | 
			
		||||
 | 
			
		||||
   <td v-if="resource.resource.type === 'person'">
 | 
			
		||||
      {{ $tc('person.born') }}{{ $d(resource.resource.birthdate.datetime, 'short') }}
 | 
			
		||||
   </td>
 | 
			
		||||
   <td v-else-if="resource.resource.type === 'thirdparty'">
 | 
			
		||||
      
 | 
			
		||||
   </td>   
 | 
			
		||||
   <td v-if="resource.resource.type === 'thirdparty'">
 | 
			
		||||
      {{ resource.resource.address.text }}<br>
 | 
			
		||||
      {{ resource.resource.address.postcode.name }}
 | 
			
		||||
   </td>
 | 
			
		||||
 
 | 
			
		||||
@@ -118,11 +118,12 @@ export default {
 | 
			
		||||
         modal.showModal = false;
 | 
			
		||||
      },
 | 
			
		||||
      addToHousehold() {
 | 
			
		||||
        this.$store.dispatch('addDateToAddressAndAddressToHousehold', {
 | 
			
		||||
           householdId: this.householdId,
 | 
			
		||||
           addressId: this.$store.state.newAddress.address_id,
 | 
			
		||||
           body: { validFrom: {datetime: `${this.validFrom}T00:00:00+0100`}}
 | 
			
		||||
        })
 | 
			
		||||
         this.$store.dispatch('addDateToAddressAndAddressToHousehold', {
 | 
			
		||||
            householdId: this.householdId,
 | 
			
		||||
            addressId: this.$store.state.newAddress.address_id,
 | 
			
		||||
            body: { validFrom: {datetime: `${this.validFrom}T00:00:00+0100`}},
 | 
			
		||||
            backUrl: this.backUrl
 | 
			
		||||
         })
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ const appMessages = {
 | 
			
		||||
   fr: {
 | 
			
		||||
      select_a_existing_address: 'Sélectionner une adresse existante',
 | 
			
		||||
      create_a_new_address: 'Créer une nouvelle adresse',
 | 
			
		||||
      add_an_address_to_household: 'Déménager le ménage',
 | 
			
		||||
      add_an_address_to_household: 'Enregistrer',
 | 
			
		||||
      validFrom: 'Date du déménagement',
 | 
			
		||||
      move_date: 'Date du déménagement',
 | 
			
		||||
      back_to_the_list: 'Retour à la liste',
 | 
			
		||||
 
 | 
			
		||||
@@ -88,6 +88,7 @@ const store = createStore({
 | 
			
		||||
                     commit('addAddressToHousehold', household);
 | 
			
		||||
                     commit('setSuccess', true);
 | 
			
		||||
                     commit('setLoading', false);
 | 
			
		||||
                     window.location.assign(payload.backUrl);
 | 
			
		||||
                     resolve();
 | 
			
		||||
               }))
 | 
			
		||||
               .catch((error) => {
 | 
			
		||||
 
 | 
			
		||||
@@ -122,6 +122,7 @@ export default {
 | 
			
		||||
      return this.$store.state.allowHouseholdCreate;
 | 
			
		||||
    },
 | 
			
		||||
    allowHouseholdSearch() {
 | 
			
		||||
      return false;
 | 
			
		||||
      return this.$store.state.allowHouseholdSearch;
 | 
			
		||||
    },
 | 
			
		||||
    allowLeaveWithoutHousehold() {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,8 +4,12 @@
 | 
			
		||||
      <span class="name">
 | 
			
		||||
         {{ item.result.text }}
 | 
			
		||||
      </span>
 | 
			
		||||
      <span class="birthday">
 | 
			
		||||
      <span class="birthday" v-if="hasBirthdate">
 | 
			
		||||
         {{ $d(item.result.birthdate.datetime, 'short') }}
 | 
			
		||||
       </span>
 | 
			
		||||
      <span class="location" v-if="hasAddress">
 | 
			
		||||
         {{ item.result.current_household_address.text }} - 
 | 
			
		||||
         {{ item.result.current_household_address.postcode.name }}
 | 
			
		||||
      </span>
 | 
			
		||||
      
 | 
			
		||||
   </div>
 | 
			
		||||
@@ -29,8 +33,16 @@ import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue';
 | 
			
		||||
export default {
 | 
			
		||||
   name: 'SuggestionPerson',
 | 
			
		||||
   components: {
 | 
			
		||||
      OnTheFly
 | 
			
		||||
     OnTheFly,
 | 
			
		||||
   },
 | 
			
		||||
   props: ['item']
 | 
			
		||||
   props: ['item'],
 | 
			
		||||
   computed: {
 | 
			
		||||
     hasBirthdate() {
 | 
			
		||||
       return this.item.result.birthdate !== null;
 | 
			
		||||
     },
 | 
			
		||||
     hasAddress() {
 | 
			
		||||
       return this.item.result.current_household_address !== null;
 | 
			
		||||
     }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
@@ -94,7 +94,7 @@
 | 
			
		||||
                            <li>
 | 
			
		||||
                                <i class="fa fa-li fa-map-marker"></i>
 | 
			
		||||
                                {%- if p.person.lastAddress is not empty -%}
 | 
			
		||||
                                    {{ p.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
 | 
			
		||||
                                    {{ p.person.currentHouseholdAddress|chill_entity_render_box({'with_valid_from': false}) }}
 | 
			
		||||
                                {%- else -%}
 | 
			
		||||
                                    <span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
 | 
			
		||||
                                {%- endif -%}
 | 
			
		||||
@@ -113,7 +113,7 @@
 | 
			
		||||
                                    ) }}"
 | 
			
		||||
                                  class="sc-button">
 | 
			
		||||
                                  <i class="fa fa-home"></i>
 | 
			
		||||
                                  {{ 'household.Household file'|trans }}
 | 
			
		||||
                                  n° {{ p.person.getCurrentHousehold.id }}
 | 
			
		||||
                                </a>
 | 
			
		||||
                            </li>
 | 
			
		||||
                            {% endif %}
 | 
			
		||||
@@ -125,189 +125,222 @@
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <h2>{{ 'Requestor'|trans }}</h2>
 | 
			
		||||
 | 
			
		||||
    {% if accompanyingCourse.requestor == null %}
 | 
			
		||||
      <p>{{ 'Any requestor to this accompanying course'|trans }}</p>
 | 
			
		||||
    {% elseif accompanyingCourse.requestorPerson is not empty %}
 | 
			
		||||
      {% set r = accompanyingCourse.requestorPerson %}
 | 
			
		||||
      <div class="item-row">
 | 
			
		||||
          <div class="item-col">
 | 
			
		||||
              <h3>
 | 
			
		||||
                  {{ r.firstname ~ ' ' ~ r.lastname }}
 | 
			
		||||
                  <span class="badge badge-pill badge-secondary">{{ 'Usager' }}</span>
 | 
			
		||||
              </h3>
 | 
			
		||||
              <p>
 | 
			
		||||
                  {% set born = (r.gender == 'woman') ? 'née': 'né' %}
 | 
			
		||||
                  {% set gender = (r.gender == 'woman') ? 'fa-venus' :
 | 
			
		||||
                      (r.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
 | 
			
		||||
                  {% set genderTitle = (r.gender == 'woman') ? 'femme' :
 | 
			
		||||
                      (r.gender == 'homme') ? 'fa-mars' : 'neutre' %}
 | 
			
		||||
                  <i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.birthdate|format_date('short') }}
 | 
			
		||||
              </p>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="item-col">
 | 
			
		||||
              <ul class="list-content fa-ul">
 | 
			
		||||
                  <li>
 | 
			
		||||
                      {% if r.mobilenumber %}
 | 
			
		||||
                          <i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.mobilenumber }}">{{ r.mobilenumber }}</a>
 | 
			
		||||
                      {% else %}
 | 
			
		||||
                          <i class="fa fa-li fa-phone"></i>
 | 
			
		||||
                          {% if r.phonenumber %}
 | 
			
		||||
                              <a href="{{ 'tel:' ~ r.phonenumber }}">{{ r.phonenumber }}</a>
 | 
			
		||||
                          {% else %}
 | 
			
		||||
                              <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
 | 
			
		||||
                          {% endif %}
 | 
			
		||||
                      {% endif %}
 | 
			
		||||
                  </li>
 | 
			
		||||
                  <li>
 | 
			
		||||
                      <i class="fa fa-li fa-map-marker"></i>
 | 
			
		||||
                      {%- if r.lastAddress is not empty -%}
 | 
			
		||||
                          {{ r.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
 | 
			
		||||
                      {%- else -%}
 | 
			
		||||
                          <span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
 | 
			
		||||
                      {%- endif -%}
 | 
			
		||||
                  </li>
 | 
			
		||||
              </ul>
 | 
			
		||||
              <ul class="record_actions">
 | 
			
		||||
                  <li>
 | 
			
		||||
                      <a href="{{ path('chill_person_view', { person_id: r.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
 | 
			
		||||
                  </li>
 | 
			
		||||
              </ul>
 | 
			
		||||
          </div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
  {% elseif accompanyingCourse.requestorThirdParty is not empty %}
 | 
			
		||||
    {% set r = accompanyingCourse.requestorThirdParty %}
 | 
			
		||||
      <div class="item-row">
 | 
			
		||||
          <div class="item-col">
 | 
			
		||||
              <h3>
 | 
			
		||||
                  {{ r.name }}
 | 
			
		||||
                  <span class="badge badge-pill badge-secondary">{{ 'Tiers' }}</span>
 | 
			
		||||
              </h3>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="item-col">
 | 
			
		||||
              <ul class="list-content fa-ul">
 | 
			
		||||
                  <li><i class="fa fa-li fa-envelope-o"></i>
 | 
			
		||||
                      <a href="{{ 'mailto:' ~ r.email }}">
 | 
			
		||||
                          {{ r.email|chill_print_or_message("thirdparty.No_email") }}
 | 
			
		||||
                      </a>
 | 
			
		||||
                  </li>
 | 
			
		||||
                  <li><i class="fa fa-li fa-phone"></i>
 | 
			
		||||
                      {% if r.telephone %}
 | 
			
		||||
                          <a href="{{ 'tel:' ~ r.telephone }}">{{ r.telephone }}</a>
 | 
			
		||||
                      {% else %}
 | 
			
		||||
                          <span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
 | 
			
		||||
                      {% endif %}
 | 
			
		||||
                  </li>
 | 
			
		||||
                  <li><i class="fa fa-li fa-map-marker"></i>
 | 
			
		||||
                      {%- if r.address is not empty -%}
 | 
			
		||||
                          {{ r.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
 | 
			
		||||
                      {%- else -%}
 | 
			
		||||
                          <span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
 | 
			
		||||
                      {%- endif -%}
 | 
			
		||||
                  </li>
 | 
			
		||||
              </ul>
 | 
			
		||||
              <ul class="record_actions">
 | 
			
		||||
                  <li>
 | 
			
		||||
                      <a href="{{ path('chill_3party_3party_show', { thirdparty_id: r.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
 | 
			
		||||
                  </li>
 | 
			
		||||
              </ul>
 | 
			
		||||
          </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    <h2>{{ 'Resources'|trans }}</h2>
 | 
			
		||||
    <div class="flex-bloc">
 | 
			
		||||
    {% for r in accompanyingCourse.resources %}
 | 
			
		||||
        <div class="item-bloc">
 | 
			
		||||
        {% if r.person %}
 | 
			
		||||
 | 
			
		||||
            <div class="item-row">
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                    <h3>
 | 
			
		||||
                        {{ r.person.firstname ~ ' ' ~ r.person.lastname }}
 | 
			
		||||
                        <span class="badge badge-pill badge-secondary">{{ 'Usager' }}</span>
 | 
			
		||||
                    </h3>
 | 
			
		||||
                    <p>
 | 
			
		||||
                        {% set born = (r.person.gender == 'woman') ? 'née': 'né' %}
 | 
			
		||||
                        {% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
 | 
			
		||||
                            (r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
 | 
			
		||||
                        {% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
 | 
			
		||||
                            (r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %}
 | 
			
		||||
                        <i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
 | 
			
		||||
                    </p>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                    <ul class="list-content fa-ul">
 | 
			
		||||
                        <li>
 | 
			
		||||
                            {% if r.person.mobilenumber %}
 | 
			
		||||
                                <i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.person.mobilenumber }}">{{ r.person.mobilenumber }}</a>
 | 
			
		||||
                            {% else %}
 | 
			
		||||
                                <i class="fa fa-li fa-phone"></i>
 | 
			
		||||
                                {% if r.person.phonenumber %}
 | 
			
		||||
                                    <a href="{{ 'tel:' ~ r.person.phonenumber }}">{{ r.person.phonenumber }}</a>
 | 
			
		||||
                                {% else %}
 | 
			
		||||
                                    <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
 | 
			
		||||
                                {% endif %}
 | 
			
		||||
                            {% endif %}
 | 
			
		||||
                        </li>
 | 
			
		||||
                        <li>
 | 
			
		||||
                            <i class="fa fa-li fa-map-marker"></i>
 | 
			
		||||
                            {%- if r.person.lastAddress is not empty -%}
 | 
			
		||||
                                {{ r.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
 | 
			
		||||
                            {%- else -%}
 | 
			
		||||
                                <span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
 | 
			
		||||
                            {%- endif -%}
 | 
			
		||||
                        </li>
 | 
			
		||||
                    </ul>
 | 
			
		||||
                    <ul class="record_actions">
 | 
			
		||||
                        <li>
 | 
			
		||||
                            <a href="{{ path('chill_person_view', { person_id: r.person.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
 | 
			
		||||
                        </li>
 | 
			
		||||
                    </ul>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
    {% if accompanyingCourse.resources|length == 0 %}
 | 
			
		||||
      <p class="chill-no-data-statement">{{ 'Any resource for this accompanying course'|trans }}</p>
 | 
			
		||||
    {% else %}
 | 
			
		||||
      <div class="flex-bloc">
 | 
			
		||||
      {% for r in accompanyingCourse.resources %}
 | 
			
		||||
          <div class="item-bloc">
 | 
			
		||||
          {% if r.person %}
 | 
			
		||||
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        {% if r.thirdParty %}
 | 
			
		||||
              <div class="item-row">
 | 
			
		||||
                  <div class="item-col">
 | 
			
		||||
                      <h3>
 | 
			
		||||
                          {{ r.person.firstname ~ ' ' ~ r.person.lastname }}
 | 
			
		||||
                          <span class="badge badge-pill badge-secondary">{{ 'Usager' }}</span>
 | 
			
		||||
                      </h3>
 | 
			
		||||
                      <p>
 | 
			
		||||
                          {% set born = (r.person.gender == 'woman') ? 'née': 'né' %}
 | 
			
		||||
                          {% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
 | 
			
		||||
                              (r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
 | 
			
		||||
                          {% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
 | 
			
		||||
                              (r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %}
 | 
			
		||||
                          <i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
 | 
			
		||||
                      </p>
 | 
			
		||||
                  </div>
 | 
			
		||||
                  <div class="item-col">
 | 
			
		||||
                      <ul class="list-content fa-ul">
 | 
			
		||||
                          <li>
 | 
			
		||||
                              {% if r.person.mobilenumber %}
 | 
			
		||||
                                  <i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.person.mobilenumber }}">{{ r.person.mobilenumber }}</a>
 | 
			
		||||
                              {% else %}
 | 
			
		||||
                                  <i class="fa fa-li fa-phone"></i>
 | 
			
		||||
                                  {% if r.person.phonenumber %}
 | 
			
		||||
                                      <a href="{{ 'tel:' ~ r.person.phonenumber }}">{{ r.person.phonenumber }}</a>
 | 
			
		||||
                                  {% else %}
 | 
			
		||||
                                      <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
 | 
			
		||||
                                  {% endif %}
 | 
			
		||||
                              {% endif %}
 | 
			
		||||
                          </li>
 | 
			
		||||
                          <li>
 | 
			
		||||
                              <i class="fa fa-li fa-map-marker"></i>
 | 
			
		||||
                              {%- if r.person.lastAddress is not empty -%}
 | 
			
		||||
                                  {{ r.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
 | 
			
		||||
                              {%- else -%}
 | 
			
		||||
                                  <span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
 | 
			
		||||
                              {%- endif -%}
 | 
			
		||||
                          </li>
 | 
			
		||||
                      </ul>
 | 
			
		||||
                      <ul class="record_actions">
 | 
			
		||||
                          <li>
 | 
			
		||||
                              <a href="{{ path('chill_person_view', { person_id: r.person.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
 | 
			
		||||
                          </li>
 | 
			
		||||
                      </ul>
 | 
			
		||||
                  </div>
 | 
			
		||||
              </div>
 | 
			
		||||
 | 
			
		||||
            <div class="item-row">
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                    <h3>
 | 
			
		||||
                        {{ r.thirdParty.name }}
 | 
			
		||||
                        <span class="badge badge-pill badge-secondary">{{ 'Tiers' }}</span>
 | 
			
		||||
                    </h3>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                    <ul class="list-content fa-ul">
 | 
			
		||||
                        <li><i class="fa fa-li fa-envelope-o"></i>
 | 
			
		||||
                            <a href="{{ 'mailto:' ~ r.thirdParty.email }}">
 | 
			
		||||
                                {{ r.thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
 | 
			
		||||
                            </a>
 | 
			
		||||
                        </li>
 | 
			
		||||
                        <li><i class="fa fa-li fa-phone"></i>
 | 
			
		||||
                            {% if r.thirdParty.telephone %}
 | 
			
		||||
                                <a href="{{ 'tel:' ~ r.thirdParty.telephone }}">{{ r.thirdParty.telephone }}</a>
 | 
			
		||||
                            {% else %}
 | 
			
		||||
                                <span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
 | 
			
		||||
                            {% endif %}
 | 
			
		||||
                        </li>
 | 
			
		||||
                        <li><i class="fa fa-li fa-map-marker"></i>
 | 
			
		||||
                            {%- if r.thirdParty.address is not empty -%}
 | 
			
		||||
                                {{ r.thirdParty.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
 | 
			
		||||
                            {%- else -%}
 | 
			
		||||
                                <span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
 | 
			
		||||
                            {%- endif -%}
 | 
			
		||||
                        </li>
 | 
			
		||||
                    </ul>
 | 
			
		||||
                    <ul class="record_actions">
 | 
			
		||||
                        <li>
 | 
			
		||||
                            <a href="{{ path('chill_3party_3party_show', { thirdparty_id: r.thirdParty.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
 | 
			
		||||
                        </li>
 | 
			
		||||
                    </ul>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
          {% endif %}
 | 
			
		||||
          {% if r.thirdParty %}
 | 
			
		||||
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        </div>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
    </div>
 | 
			
		||||
              <div class="item-row">
 | 
			
		||||
                  <div class="item-col">
 | 
			
		||||
                      <h3>
 | 
			
		||||
                          {{ r.thirdParty.name }}
 | 
			
		||||
                          <span class="badge badge-pill badge-secondary">{{ 'Tiers' }}</span>
 | 
			
		||||
                      </h3>
 | 
			
		||||
                  </div>
 | 
			
		||||
                  <div class="item-col">
 | 
			
		||||
                      <ul class="list-content fa-ul">
 | 
			
		||||
                          <li><i class="fa fa-li fa-envelope-o"></i>
 | 
			
		||||
                              <a href="{{ 'mailto:' ~ r.thirdParty.email }}">
 | 
			
		||||
                                  {{ r.thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
 | 
			
		||||
                              </a>
 | 
			
		||||
                          </li>
 | 
			
		||||
                          <li><i class="fa fa-li fa-phone"></i>
 | 
			
		||||
                              {% if r.thirdParty.telephone %}
 | 
			
		||||
                                  <a href="{{ 'tel:' ~ r.thirdParty.telephone }}">{{ r.thirdParty.telephone }}</a>
 | 
			
		||||
                              {% else %}
 | 
			
		||||
                                  <span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
 | 
			
		||||
                              {% endif %}
 | 
			
		||||
                          </li>
 | 
			
		||||
                          <li><i class="fa fa-li fa-map-marker"></i>
 | 
			
		||||
                              {%- if r.thirdParty.address is not empty -%}
 | 
			
		||||
                                  {{ r.thirdParty.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
 | 
			
		||||
                              {%- else -%}
 | 
			
		||||
                                  <span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
 | 
			
		||||
                              {%- endif -%}
 | 
			
		||||
                          </li>
 | 
			
		||||
                      </ul>
 | 
			
		||||
                      <ul class="record_actions">
 | 
			
		||||
                          <li>
 | 
			
		||||
                              <a href="{{ path('chill_3party_3party_show', { thirdparty_id: r.thirdParty.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
 | 
			
		||||
                          </li>
 | 
			
		||||
                      </ul>
 | 
			
		||||
                  </div>
 | 
			
		||||
              </div>
 | 
			
		||||
 | 
			
		||||
          {% endif %}
 | 
			
		||||
          </div>
 | 
			
		||||
      {% endfor %}
 | 
			
		||||
      </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    <h2>{{ 'Social actions'|trans }}</h2>
 | 
			
		||||
 | 
			
		||||
    <div id="accompanying_course_work_list">
 | 
			
		||||
    <div id="accompanying_course_work_list" class="short">
 | 
			
		||||
      {% for w in works %}
 | 
			
		||||
      <div class="item">
 | 
			
		||||
          <div class="title">
 | 
			
		||||
          <p class="title_label">{{ 'accompanying_course_work.action'|trans }}</p >
 | 
			
		||||
            <h2 class="action_title">
 | 
			
		||||
              {{ w.socialAction|chill_entity_render_box({ 'no-badge': false }) }}
 | 
			
		||||
            </h2>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="timeline">
 | 
			
		||||
            <ul class="timeline">
 | 
			
		||||
              <li class="completed">
 | 
			
		||||
                <div class="date">
 | 
			
		||||
                  <span>{{ w.createdAt|format_date('long') }}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="label">
 | 
			
		||||
                  <span>{{ 'accompanying_course_work.create_date'|trans }}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
              </li>
 | 
			
		||||
              <li class="completed">
 | 
			
		||||
                <div class="date">
 | 
			
		||||
                  <span>{{ w.startDate|format_date('long') }}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="label">
 | 
			
		||||
                  <span>{{ 'accompanying_course_work.start_date'|trans }}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
              </li>
 | 
			
		||||
              <li class="{%if date(w.endDate) < date('now') %}completed{% endif %}">
 | 
			
		||||
                <div class="date">
 | 
			
		||||
                  <span>{{ w.endDate|format_date('long') }}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="label">
 | 
			
		||||
                  <span>{{ 'accompanying_course_work.end_date'|trans }}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
              </li>
 | 
			
		||||
            </ul>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          {% if w.results|length > 0 %}
 | 
			
		||||
            <div class="objective_results objective_results__without-objectives">
 | 
			
		||||
              <div class="obj without_objective">
 | 
			
		||||
                <p class="title_label">{{ 'accompanying_course_work.goal'|trans }}</p>
 | 
			
		||||
                <p class="chill-no-data-statement">{{ 'accompanying_course_work.results without objective'|trans }}</p>
 | 
			
		||||
              </div>
 | 
			
		||||
              <div class="res results">
 | 
			
		||||
                <p class="title_label">{{ 'accompanying_course_work.results'|trans }}</p>
 | 
			
		||||
                <ul class="result_list">
 | 
			
		||||
                  {% for r in w.results %}
 | 
			
		||||
                    <li class="badge badge-primary">{{ r.title|localize_translatable_string }}</li>
 | 
			
		||||
                  {% endfor %}
 | 
			
		||||
                </ul>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
          {% endif %}
 | 
			
		||||
 | 
			
		||||
          {% if w.goals|length > 0 %}
 | 
			
		||||
            {% for g in w.goals %}
 | 
			
		||||
              <div class="objective_results objective_results--with-objectives">
 | 
			
		||||
                <div class="objective obj">
 | 
			
		||||
                  <p class="title_label">{{ 'accompanying_course_work.goal'|trans }}</p>
 | 
			
		||||
                  <h3 class="goal_title">{{ g.goal.title|localize_translatable_string }}</h3>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="results res">
 | 
			
		||||
                  {% if g.results|length == 0 %}
 | 
			
		||||
                    <p class="title_label">{{ 'accompanying_course_work.results'|trans }}</p>
 | 
			
		||||
                    <p class="chill-no-data-statement">{{ 'accompanying_course_work.no_results'|trans }}</p>
 | 
			
		||||
                  {% else %}
 | 
			
		||||
                    <p class="title_label">{{ 'accompanying_course_work.results'|trans }}</p>
 | 
			
		||||
                    <ul class="result_list">
 | 
			
		||||
                      {% for r in g.results %}
 | 
			
		||||
                        <li class="badge badge-primary">{{ r.title|localize_translatable_string }}</li>
 | 
			
		||||
                      {% endfor %}
 | 
			
		||||
                    </ul>
 | 
			
		||||
                  {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
              </div>
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
          {% endif %}
 | 
			
		||||
 | 
			
		||||
          <div class="updatedBy">
 | 
			
		||||
            {{ 'Last updated by'|trans}}: {{ w.updatedBy|chill_entity_render_box }}, {{ w.updatedAt|format_datetime('long', 'short') }}
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
        <div class="actions">
 | 
			
		||||
          <ul class="record_actions">
 | 
			
		||||
            <li>
 | 
			
		||||
              <a 
 | 
			
		||||
                class="sc-button bt-edit"
 | 
			
		||||
                href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Edit'|trans }}</a>
 | 
			
		||||
            </li>
 | 
			
		||||
          </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      {% else %}
 | 
			
		||||
        <p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>    
 | 
			
		||||
@@ -317,7 +350,7 @@
 | 
			
		||||
 | 
			
		||||
    {% block contentActivity %}
 | 
			
		||||
        {% set person = null %}
 | 
			
		||||
        {% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'person'} %}
 | 
			
		||||
        {% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'accompanyingCourse'} %}
 | 
			
		||||
    {% endblock %}
 | 
			
		||||
 | 
			
		||||
    {#  ==> insert accompanyingCourse vue component  #}
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
        <div class="title">
 | 
			
		||||
          <p class="title_label">{{ 'accompanying_course_work.action'|trans }}</p >
 | 
			
		||||
          <h2 class="action_title">
 | 
			
		||||
            {{ w.socialAction|chill_entity_render_box({ 'no-badge': true }) }}
 | 
			
		||||
            {{ w.socialAction|chill_entity_render_box }}
 | 
			
		||||
          </h2>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
@@ -67,7 +67,7 @@
 | 
			
		||||
            <div class="objective_results objective_results--with-objectives">
 | 
			
		||||
              <div class="objective obj">
 | 
			
		||||
                <p class="title_label">{{ 'accompanying_course_work.goal'|trans }}</p>
 | 
			
		||||
                <h3 class="goal_title">{{ g.goal.title|localize_translatable_string }}</h3>
 | 
			
		||||
                <h4 class="goal_title">{{ g.goal.title|localize_translatable_string }}</h4>
 | 
			
		||||
              </div>
 | 
			
		||||
              <div class="results res">
 | 
			
		||||
                {% if g.results|length == 0 %}
 | 
			
		||||
@@ -96,7 +96,7 @@
 | 
			
		||||
            <li>
 | 
			
		||||
              <a 
 | 
			
		||||
                class="sc-button bt-edit"
 | 
			
		||||
                href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Update'|trans }}</a>
 | 
			
		||||
                href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Edit'|trans }}</a>
 | 
			
		||||
            </li>
 | 
			
		||||
          </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,136 @@
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
    {% for accompanying_period in accompanying_periods %}
 | 
			
		||||
    <div class="flex-table">
 | 
			
		||||
        <div class="item-bloc">
 | 
			
		||||
            <div class="item-row">
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                    {{'period'|trans}} <b>#{{ accompanying_period.id }}</b>
 | 
			
		||||
                    {% if accompanying_period.emergency %}
 | 
			
		||||
                     
 | 
			
		||||
                    <span class="badge badge-primary">
 | 
			
		||||
                        {{- 'Emergency'|trans|upper -}}
 | 
			
		||||
                    </span>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    {% if accompanying_period.confidential %}
 | 
			
		||||
                     
 | 
			
		||||
                    <span class="badge badge-primary">
 | 
			
		||||
                        {{- 'Confidential'|trans|upper -}}
 | 
			
		||||
                    </span>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    {% if accompanying_period.step == 'DRAFT' %}
 | 
			
		||||
                     
 | 
			
		||||
                    <span class="badge badge-primary">
 | 
			
		||||
                        {{- 'Draft'|trans|upper -}}
 | 
			
		||||
                    </span>
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                    <span class="badge badge-primary">
 | 
			
		||||
                        {{- 'Confirmed'|trans|upper -}}
 | 
			
		||||
                    </span>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                {% if chill_accompanying_periods.fields.user == 'visible'  %}
 | 
			
		||||
                    {% if accompanying_period.user %}
 | 
			
		||||
                    {{ accompanying_period.user.username }}
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                        <span class="chill-no-data-statement">{{ 'No accompanying user'|trans }}</span>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="item-row">
 | 
			
		||||
                {% if accompanying_period.closingDate == null %}
 | 
			
		||||
                    {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }}
 | 
			
		||||
                {% else %}
 | 
			
		||||
                    {{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
 | 
			
		||||
                        '%opening_date%': accompanying_period.openingDate|format_date('long'),
 | 
			
		||||
                        '%closing_date%': accompanying_period.closingDate|format_date('long')}
 | 
			
		||||
                    ) }}
 | 
			
		||||
 | 
			
		||||
                    {% if accompanying_period.isOpen == false %}
 | 
			
		||||
                        <dl class="chill_view_data">
 | 
			
		||||
                            <dt>{{ 'Closing motive'|trans }} :</dt>
 | 
			
		||||
                            <dd>{{ accompanying_period.closingMotive|chill_entity_render_box }}</dd>
 | 
			
		||||
                        </dl>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
 | 
			
		||||
                {% endif %}
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                    <h3>{{ 'Participants'|trans }}</h3>
 | 
			
		||||
                    {% if accompanying_period.participations.count > 0 %}
 | 
			
		||||
                        {% for p in accompanying_period.participations %}
 | 
			
		||||
                        <p>
 | 
			
		||||
                            <a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">
 | 
			
		||||
                                {{ p.person.firstname ~ ' ' ~ p.person.lastname }}
 | 
			
		||||
                            </a>
 | 
			
		||||
                        </p>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                        <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                    <h3>{{ 'Requestor'|trans }}</h3>
 | 
			
		||||
                    {% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
 | 
			
		||||
                        {% if accompanying_period.requestorPerson is not null %}
 | 
			
		||||
                        <p>{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}</p>
 | 
			
		||||
                        {% endif %}
 | 
			
		||||
                        {% if accompanying_period.requestorThirdParty is not null %}
 | 
			
		||||
                        <p>{{ accompanying_period.requestorThirdParty.name }}</p>
 | 
			
		||||
                        {% endif %}
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                        <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                    <h3>{{ 'Social issues'|trans }}</h3>
 | 
			
		||||
                    {% if accompanying_period.socialIssues.count > 0 %}
 | 
			
		||||
                        {% for si in accompanying_period.socialIssues %}
 | 
			
		||||
                        <p>{{ si.title|localize_translatable_string }}</p>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                        <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
            <div class="item-row">
 | 
			
		||||
                <ul class="record_actions">
 | 
			
		||||
                    {# TODO if enable_accompanying_course_with_multiple_persons is true ... #}
 | 
			
		||||
                    <li>
 | 
			
		||||
                        <a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': accompanying_period.id }) }}" class="sc-button bt-show"></a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    {#
 | 
			
		||||
                    <li>
 | 
			
		||||
                        <a  href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="sc-button bt-update no-content"></a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    {% if accompanying_period.isOpen == true %}
 | 
			
		||||
                    <li>
 | 
			
		||||
                        <a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}" class="sc-button bt-update has-hidden change-icon">
 | 
			
		||||
                            <i class="fa fa-lock" aria-hidden="true"></i><span class="show-on-hover">{{'Close accompanying period'|trans }}</span>
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    {% if accompanying_period.canBeReOpened(person) == true %}
 | 
			
		||||
                    <li>
 | 
			
		||||
                        <a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="sc-button bt-create change-icon has-hidden">
 | 
			
		||||
                            <i class="fa fa-unlock" aria-hidden="true"></i><span class="show-on-hover">{{'Re-open accompanying period'|trans }}</span>
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    #}
 | 
			
		||||
                </ul>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <p></p>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
@@ -5,139 +5,36 @@
 | 
			
		||||
{% block title %}{{ 'Person accompanying period - %name%'|trans({ '%name%' : person.__toString}) }}{% endblock title %}
 | 
			
		||||
 | 
			
		||||
{% block personcontent %}
 | 
			
		||||
 | 
			
		||||
<h1>{{ 'Accompanying period list'|trans }}</h1>
 | 
			
		||||
 | 
			
		||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
 | 
			
		||||
 | 
			
		||||
    {% for accompanying_period in accompanying_periods %}
 | 
			
		||||
<ul class="record_actions sticky-form-buttons">
 | 
			
		||||
    <li class="cancel">
 | 
			
		||||
        <a href="{{ path ('chill_person_view', {'person_id' : person.id } ) }}" class="sc-button bt-cancel">
 | 
			
		||||
            {{ 'Person details'|trans }}
 | 
			
		||||
        </a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li>
 | 
			
		||||
        <a href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" class="sc-button bt-create">
 | 
			
		||||
          {{ 'Create an accompanying period'|trans }}
 | 
			
		||||
        </a>
 | 
			
		||||
    </li>
 | 
			
		||||
    {#
 | 
			
		||||
    <li>
 | 
			
		||||
        <a href="{{ path ('chill_person_accompanying_period_create', {'person_id' : person.id } ) }}" class="sc-button bt-create has-hidden">
 | 
			
		||||
            <span class="show-on-hover">{{ 'Add an accompanying period in the past'|trans }}</span>
 | 
			
		||||
        </a>
 | 
			
		||||
    </li>
 | 
			
		||||
    {% if person.isOpen == false %}
 | 
			
		||||
    <li>
 | 
			
		||||
        <a href="{{ path('chill_person_accompanying_period_open', {'person_id' : person.id} ) }}" class="sc-button bt-create change-icon has-hidden">
 | 
			
		||||
            <i class="fa fa-unlock" aria-hidden="true"></i>
 | 
			
		||||
            <span class="show-on-hover">{{'Begin a new accompanying period'|trans }}</span>
 | 
			
		||||
        </a>
 | 
			
		||||
    </li>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    #}
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
    <div class="flex-table">
 | 
			
		||||
        <div class="item-bloc">
 | 
			
		||||
            <div class="item-row">
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                    {{'Accompanying period'|trans}} #{{ accompanying_period.id }}
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <div class="item-col">
 | 
			
		||||
                {% if chill_accompanying_periods.fields.user == 'visible'  %}
 | 
			
		||||
                    {% if accompanying_period.user %}
 | 
			
		||||
                    {{ accompanying_period.user.username }}
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                        <span class="chill-no-data-statement">{{ 'No accompanying user'|trans }}</span>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="item-row">
 | 
			
		||||
                {% if accompanying_period.closingDate == null %}
 | 
			
		||||
                    {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }}
 | 
			
		||||
                {% else %}
 | 
			
		||||
                    {{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
 | 
			
		||||
                        '%opening_date%': accompanying_period.openingDate|format_date('long'),
 | 
			
		||||
                        '%closing_date%': accompanying_period.closingDate|format_date('long')}
 | 
			
		||||
                    ) }}
 | 
			
		||||
 | 
			
		||||
                    {% if accompanying_period.isOpen == false %}
 | 
			
		||||
                        <dl class="chill_view_data">
 | 
			
		||||
                            <dt>{{ 'Closing motive'|trans }} :</dt>
 | 
			
		||||
                            <dd>{{ accompanying_period.closingMotive|chill_entity_render_box }}</dd>
 | 
			
		||||
                        </dl>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
 | 
			
		||||
                {% endif %}
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="item-row">
 | 
			
		||||
 | 
			
		||||
                    <h3>{{ 'Participants'|trans }}</h3>
 | 
			
		||||
                    {% if accompanying_period.participations.count > 0 %}
 | 
			
		||||
                        {% for p in accompanying_period.participations %}
 | 
			
		||||
                        <p>
 | 
			
		||||
                            <a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">
 | 
			
		||||
                                {{ p.person.firstname ~ ' ' ~ p.person.lastname }}
 | 
			
		||||
                            </a>
 | 
			
		||||
                        </p>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                        <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="item-col">
 | 
			
		||||
                <h3>{{ 'Requestors'|trans }}</h3>
 | 
			
		||||
                {% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
 | 
			
		||||
                    {% if accompanying_period.requestorPerson is not null %}
 | 
			
		||||
                    <p>{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}</p>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    {% if accompanying_period.requestorThirdParty is not null %}
 | 
			
		||||
                      <p>{{ accompanying_period.requestorThirdParty.name }}</p>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                {% else %}
 | 
			
		||||
                    <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div class="item-row">
 | 
			
		||||
                <ul class="record_actions">
 | 
			
		||||
                    {# TODO if enable_accompanying_course_with_multiple_persons is true ... #}
 | 
			
		||||
                    <li>
 | 
			
		||||
                        <a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': accompanying_period.id }) }}" class="sc-button bt-show"></a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    {#
 | 
			
		||||
                    <li>
 | 
			
		||||
                        <a  href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="sc-button bt-update no-content"></a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    {% if accompanying_period.isOpen == true %}
 | 
			
		||||
                    <li>
 | 
			
		||||
                        <a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}" class="sc-button bt-update has-hidden change-icon">
 | 
			
		||||
                            <i class="fa fa-lock" aria-hidden="true"></i><span class="show-on-hover">{{'Close accompanying period'|trans }}</span>
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    {% if accompanying_period.canBeReOpened(person) == true %}
 | 
			
		||||
                    <li>
 | 
			
		||||
                        <a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="sc-button bt-create change-icon has-hidden">
 | 
			
		||||
                            <i class="fa fa-unlock" aria-hidden="true"></i><span class="show-on-hover">{{'Re-open accompanying period'|trans }}</span>
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </li>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    #}
 | 
			
		||||
                </ul>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <p></p>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<div  class="form_control">
 | 
			
		||||
    <ul class="record_actions">
 | 
			
		||||
        <li class="cancel">
 | 
			
		||||
            <a href="{{ path ('chill_person_view', {'person_id' : person.id } ) }}" class="sc-button bt-cancel">
 | 
			
		||||
                {{ 'Person details'|trans }}
 | 
			
		||||
            </a>
 | 
			
		||||
        </li>
 | 
			
		||||
        <li>
 | 
			
		||||
            <a href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" class="sc-button bt-create">
 | 
			
		||||
              {{ 'Create an accompanying period'|trans }}
 | 
			
		||||
            </a>
 | 
			
		||||
        </li>
 | 
			
		||||
        {#
 | 
			
		||||
        <li>
 | 
			
		||||
            <a href="{{ path ('chill_person_accompanying_period_create', {'person_id' : person.id } ) }}" class="sc-button bt-create has-hidden">
 | 
			
		||||
                <span class="show-on-hover">{{ 'Add an accompanying period in the past'|trans }}</span>
 | 
			
		||||
            </a>
 | 
			
		||||
        </li>
 | 
			
		||||
        {% if person.isOpen == false %}
 | 
			
		||||
        <li>
 | 
			
		||||
            <a href="{{ path('chill_person_accompanying_period_open', {'person_id' : person.id} ) }}" class="sc-button bt-create change-icon has-hidden">
 | 
			
		||||
                <i class="fa fa-unlock" aria-hidden="true"></i>
 | 
			
		||||
                <span class="show-on-hover">{{'Begin a new accompanying period'|trans }}</span>
 | 
			
		||||
            </a>
 | 
			
		||||
        </li>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        #}
 | 
			
		||||
    </ul>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
{% endblock personcontent %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,25 @@
 | 
			
		||||
{% extends '@ChillPerson/Household/layout.html.twig' %}
 | 
			
		||||
 | 
			
		||||
{% block title 'Household accompanying period'|trans %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
<h1>{{ block('title') }}</h1>
 | 
			
		||||
 | 
			
		||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
 | 
			
		||||
 | 
			
		||||
<div class="form_control">
 | 
			
		||||
    <ul class="record_actions">
 | 
			
		||||
        <li class="cancel">
 | 
			
		||||
            <a href="{{ path ('chill_person_household_summary', {'household_id' : household.id } ) }}" class="sc-button bt-cancel">
 | 
			
		||||
                {{ 'Household summary'|trans }}
 | 
			
		||||
            </a>
 | 
			
		||||
        </li>
 | 
			
		||||
        {#<li>
 | 
			
		||||
            <a href="{{ path ('chill_person_household_accompanying_course_new', {'household_id' : [ household.id ] } ) }}" class="sc-button bt-create">
 | 
			
		||||
              {{ 'Create an accompanying period'|trans }}
 | 
			
		||||
            </a>
 | 
			
		||||
        </li>#}
 | 
			
		||||
    </ul>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -12,11 +12,11 @@
 | 
			
		||||
    {% else %}
 | 
			
		||||
        <div class="top"><i class="fa fa-caret-up fa-3x"></i></div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    {% for address in household.addresses %}
 | 
			
		||||
 | 
			
		||||
        <div class="col-b"></div>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
        <div class="col-c content{{ ' row' ~ loop.index }}">
 | 
			
		||||
            <div class="address">
 | 
			
		||||
                {% if address.isNoAddress == true %}
 | 
			
		||||
@@ -39,22 +39,22 @@
 | 
			
		||||
 | 
			
		||||
                {% endif %}
 | 
			
		||||
            </div>
 | 
			
		||||
            
 | 
			
		||||
            <ul class="record_actions">
 | 
			
		||||
 | 
			
		||||
            {#<ul class="record_actions">
 | 
			
		||||
                <li>
 | 
			
		||||
                    <a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}" class="sc-button bt-edit"></a>
 | 
			
		||||
                </li>
 | 
			
		||||
            </ul>
 | 
			
		||||
            </ul> #}
 | 
			
		||||
        </div>
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        <div class="date">
 | 
			
		||||
            {% if address.validFrom is not empty %}
 | 
			
		||||
                {{ address.validFrom|format_date('long') }}
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        </div>
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<ul class="record_actions">
 | 
			
		||||
 
 | 
			
		||||
@@ -30,19 +30,19 @@
 | 
			
		||||
            <div id="banner-misc">
 | 
			
		||||
              {%- set members = household.getCurrentMembersOrdered() -%}
 | 
			
		||||
              {%- if members|length > 0 -%}
 | 
			
		||||
                <span class="current-members-explain">
 | 
			
		||||
                {{- 'household.Current household members'|trans }}:
 | 
			
		||||
                </span>
 | 
			
		||||
                {%- for m in members|slice(0, 5) -%}
 | 
			
		||||
                  {{- m.person|chill_entity_render_box({'addLink': false}) -}}
 | 
			
		||||
                  {%- if m.holder %} <span class="badge badge-primary">{{ 'household.holder'|trans }}</span>{% endif -%}
 | 
			
		||||
                  {%- if false == loop.last -%}, {% endif -%}
 | 
			
		||||
                {%- endfor -%}
 | 
			
		||||
                  {% if members|length > 5 %}
 | 
			
		||||
                    <span class="current-members-more">
 | 
			
		||||
                    {{ 'household.and x other persons'|trans({'x': members|length-5}) }}
 | 
			
		||||
                    </span>
 | 
			
		||||
                  {% endif %} 
 | 
			
		||||
              <span class="current-members-explain">
 | 
			
		||||
              {{- 'household.Current household members'|trans }}:
 | 
			
		||||
              </span>
 | 
			
		||||
              {%- for m in members|slice(0, 5) -%}
 | 
			
		||||
              {{- m.person|chill_entity_render_box({'addLink': false}) -}}
 | 
			
		||||
              {%- if m.holder %} <span class="badge badge-primary">{{ 'household.holder'|trans }}</span>{% endif -%}
 | 
			
		||||
              {%- if false == loop.last -%}, {% endif -%}
 | 
			
		||||
              {%- endfor -%}
 | 
			
		||||
              {% if members|length > 5 %}
 | 
			
		||||
              <span class="current-members-more">
 | 
			
		||||
              {{ 'household.and x other persons'|trans({'x': members|length-5}) }}
 | 
			
		||||
              </span>
 | 
			
		||||
              {% endif %} 
 | 
			
		||||
              {%- endif -%}
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -16,8 +16,8 @@
 | 
			
		||||
#}
 | 
			
		||||
<ul class="tab-nav">
 | 
			
		||||
    {% for menu in menus %}
 | 
			
		||||
        <li class="">
 | 
			
		||||
        <li class="{{ menu.extra('class') }}">
 | 
			
		||||
            <a href="{{ menu.uri }}" >{{ menu.label|upper }}</a>
 | 
			
		||||
        </li>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
</ul>
 | 
			
		||||
</ul>
 | 
			
		||||
 
 | 
			
		||||
@@ -14,6 +14,6 @@ module.exports = function(encore, entries)
 | 
			
		||||
    encore.addEntry('household_edit_metadata', __dirname + '/Resources/public/modules/household_edit_metadata/index.js');
 | 
			
		||||
    encore.addEntry('accompanying_course_work_create', __dirname + '/Resources/public/vuejs/AccompanyingCourseWorkCreate/index.js');
 | 
			
		||||
    encore.addEntry('accompanying_course_work_edit', __dirname + '/Resources/public/vuejs/AccompanyingCourseWorkEdit/index.js');
 | 
			
		||||
    encore.addEntry('person', __dirname + '/Resources/public/js/person.js');
 | 
			
		||||
    encore.addEntry('accompanying_course_work_list', __dirname + '/Resources/public/modules/accompanying_course_work_list/index.js');
 | 
			
		||||
    encore.addEntry('person', __dirname + '/Resources/public/js/person.js');
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -38,12 +38,13 @@ household:
 | 
			
		||||
    Edit member household: Modifier l'appartenance au ménage
 | 
			
		||||
    Current household members: Membres actuels
 | 
			
		||||
    Household summary: Résumé
 | 
			
		||||
    Accompanying period: Parcours d'accompagnement
 | 
			
		||||
    Addresses: Adresses
 | 
			
		||||
    Current address: Adresse actuelle
 | 
			
		||||
    Household does not have any address currently: Le ménage n'a pas d'adresse renseignée actuellement
 | 
			
		||||
    Edit household members: Modifier l'appartenance au ménage
 | 
			
		||||
    and x other persons: >-
 | 
			
		||||
        {x, plural, 
 | 
			
		||||
        {x, plural,
 | 
			
		||||
            one {et une autre personne}
 | 
			
		||||
            many {et # autres personnes}
 | 
			
		||||
            other {et # autres personnes}
 | 
			
		||||
@@ -59,7 +60,7 @@ household:
 | 
			
		||||
    data_saved: Données enregistrées
 | 
			
		||||
    Household history for %name%: Historique des ménages pour {name}
 | 
			
		||||
    Household shared: Ménages domiciliés
 | 
			
		||||
    Household not shared: Ménage non domiciliés 
 | 
			
		||||
    Household not shared: Ménage non domiciliés
 | 
			
		||||
    Never in any household: Membre d'aucun ménage
 | 
			
		||||
    Membership currently running: En cours
 | 
			
		||||
    from: Depuis
 | 
			
		||||
 
 | 
			
		||||
@@ -165,7 +165,8 @@ An accompanying period starts: Une période d'accompagnement est ouverte
 | 
			
		||||
Any accompanying periods are open: Aucune période d'accompagnement ouverte
 | 
			
		||||
An accompanying period is open: Une période d'accompagnement est ouverte
 | 
			
		||||
Accompanying period list: Périodes d'accompagnement
 | 
			
		||||
Accompanying period: Période d'accompagnement
 | 
			
		||||
Accompanying period: Parcours d'accompagnement
 | 
			
		||||
period: Parcours
 | 
			
		||||
New accompanying course: Nouveau parcours d'accompagnement
 | 
			
		||||
Choose a motive: Motif de fermeture
 | 
			
		||||
Re-open accompanying period: Ré-ouvrir
 | 
			
		||||
@@ -181,6 +182,8 @@ Create an accompanying course: Créer un parcours
 | 
			
		||||
This accompanying course is still a draft: Ce parcours est à l'état brouillon
 | 
			
		||||
Associated peoples: Usagers concernés
 | 
			
		||||
Resources: Interlocuteurs privilégiés
 | 
			
		||||
Requestor: Demandeur
 | 
			
		||||
Any requestor to this accompanying course: Aucun demandeur pour ce parcours
 | 
			
		||||
Social actions: Actions d'accompagnement
 | 
			
		||||
Social issues: Problématiques sociales
 | 
			
		||||
Last events on accompanying course: Dernières actions de suivi
 | 
			
		||||
@@ -190,6 +193,7 @@ See accompanying period: Voir cette période d'accompagnement
 | 
			
		||||
Referrer: Référent
 | 
			
		||||
Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible.
 | 
			
		||||
Add to household now: Ajouter à un ménage
 | 
			
		||||
Any resource for this accompanying course: Aucun interlocuteur privilégié pour ce parcours
 | 
			
		||||
 | 
			
		||||
# pickAPersonType
 | 
			
		||||
Pick a person: Choisir une personne
 | 
			
		||||
@@ -321,6 +325,9 @@ accompanying_period:
 | 
			
		||||
    dates_from_%opening_date%_to_%closing_date%: Ouvert du %opening_date% au %closing_date%
 | 
			
		||||
occasional: ponctuel
 | 
			
		||||
regular: régulier
 | 
			
		||||
Confidential: confidentiel
 | 
			
		||||
Draft: brouillon
 | 
			
		||||
Confirmed: en file active
 | 
			
		||||
 | 
			
		||||
# Accompanying Course
 | 
			
		||||
Accompanying Course: Parcours d'accompagnement
 | 
			
		||||
@@ -338,6 +345,8 @@ Members: Membres
 | 
			
		||||
Addresses: Adresses
 | 
			
		||||
Move household: Nouveau déménagement
 | 
			
		||||
Addresses history for household: Historique des adresses
 | 
			
		||||
Household accompanying period: Parcours d'accompagnement du ménage
 | 
			
		||||
Household summary: Résumé du ménage
 | 
			
		||||
 | 
			
		||||
# accompanying course work
 | 
			
		||||
Accompanying Course Actions: Actions d'accompagnements
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user