mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'features/list-possible-user-referral-period' into 'master'
Features/list possible user referral period See merge request Chill-Projet/chill-bundles!180
This commit is contained in:
commit
2f053d3b5f
@ -8,6 +8,7 @@ use Chill\MainBundle\Security\Authorization\ChillVoterInterface;
|
|||||||
use Chill\MainBundle\Security\ProvideRoleInterface;
|
use Chill\MainBundle\Security\ProvideRoleInterface;
|
||||||
use Chill\MainBundle\Security\Resolver\CenterResolverInterface;
|
use Chill\MainBundle\Security\Resolver\CenterResolverInterface;
|
||||||
use Chill\MainBundle\Security\Resolver\ScopeResolverInterface;
|
use Chill\MainBundle\Security\Resolver\ScopeResolverInterface;
|
||||||
|
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
|
||||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Chill\MainBundle\DependencyInjection\CompilerPass\SearchableServicesCompilerPass;
|
use Chill\MainBundle\DependencyInjection\CompilerPass\SearchableServicesCompilerPass;
|
||||||
@ -38,6 +39,8 @@ class ChillMainBundle extends Bundle
|
|||||||
->addTag('chill_main.center_resolver');
|
->addTag('chill_main.center_resolver');
|
||||||
$container->registerForAutoconfiguration(ScopeResolverInterface::class)
|
$container->registerForAutoconfiguration(ScopeResolverInterface::class)
|
||||||
->addTag('chill_main.scope_resolver');
|
->addTag('chill_main.scope_resolver');
|
||||||
|
$container->registerForAutoconfiguration(ChillEntityRenderInterface::class)
|
||||||
|
->addTag('chill.render_entity');
|
||||||
|
|
||||||
$container->addCompilerPass(new SearchableServicesCompilerPass());
|
$container->addCompilerPass(new SearchableServicesCompilerPass());
|
||||||
$container->addCompilerPass(new ConfigConsistencyCompilerPass());
|
$container->addCompilerPass(new ConfigConsistencyCompilerPass());
|
||||||
|
@ -3,10 +3,14 @@
|
|||||||
namespace Chill\MainBundle\Entity;
|
namespace Chill\MainBundle\Entity;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity
|
||||||
* @ORM\Table("chill_main_user_job")
|
* @ORM\Table("chill_main_user_job")
|
||||||
|
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
|
||||||
|
* "user_job"=UserJob::class
|
||||||
|
* })
|
||||||
*/
|
*/
|
||||||
class UserJob
|
class UserJob
|
||||||
{
|
{
|
||||||
@ -15,12 +19,14 @@ class UserJob
|
|||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\Column(name="id", type="integer")
|
* @ORM\Column(name="id", type="integer")
|
||||||
* @ORM\GeneratedValue(strategy="AUTO")
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
|
* @Serializer\Groups({"read"})
|
||||||
*/
|
*/
|
||||||
protected ?int $id = null;
|
protected ?int $id = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array|string[]A
|
* @var array|string[]A
|
||||||
* @ORM\Column(name="label", type="json")
|
* @ORM\Column(name="label", type="json")
|
||||||
|
* @Serializer\Groups({"read"})
|
||||||
*/
|
*/
|
||||||
protected array $label = [];
|
protected array $label = [];
|
||||||
|
|
||||||
|
@ -48,6 +48,24 @@ final class UserRepository implements ObjectRepository
|
|||||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function countBy(array $criteria): int
|
||||||
|
{
|
||||||
|
return $this->repository->count($criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function countByActive(): int
|
||||||
|
{
|
||||||
|
return $this->countBy(['enabled' => true]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return User[]|array
|
||||||
|
*/
|
||||||
|
public function findByActive(array $orderBy = null, int $limit = null, int $offset = null): array
|
||||||
|
{
|
||||||
|
return $this->findBy(['enabled' => true], $orderBy, $limit, $offset);
|
||||||
|
}
|
||||||
|
|
||||||
public function getClassName() {
|
public function getClassName() {
|
||||||
return User::class;
|
return User::class;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
<template>
|
||||||
|
<span class="chill-entity entity-user">
|
||||||
|
{{ user.label }}
|
||||||
|
<span class="user-job" v-if="user.user_job !== null">({{ user.user_job.label.fr }})</span>
|
||||||
|
<span class="main-scope" v-if="user.main_scope !== null">({{ user.main_scope.name.fr }})</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "UserRenderBoxBadge",
|
||||||
|
props: ['user'],
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,9 @@
|
|||||||
|
<span class="chill-entity entity-user">
|
||||||
|
{{- user.label }}
|
||||||
|
{%- if opts['user_job'] and user.userJob is not null %}
|
||||||
|
<span class="user-job">({{ user.userJob.label|localize_translatable_string }})</span>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if opts['main_scope'] and user.mainScope is not null %}
|
||||||
|
<span class="main-scope">({{ user.mainScope.name|localize_translatable_string }})</span>
|
||||||
|
{%- endif -%}
|
||||||
|
</span>
|
@ -20,14 +20,21 @@
|
|||||||
namespace Chill\MainBundle\Serializer\Normalizer;
|
namespace Chill\MainBundle\Serializer\Normalizer;
|
||||||
|
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\MainBundle\Templating\Entity\UserRender;
|
||||||
|
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||||
|
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||||
|
|
||||||
/**
|
class UserNormalizer implements NormalizerInterface, NormalizerAwareInterface
|
||||||
*
|
|
||||||
* @internal we keep this normalizer, because the property 'text' may be replace by a rendering in the future
|
|
||||||
*/
|
|
||||||
class UserNormalizer implements NormalizerInterface
|
|
||||||
{
|
{
|
||||||
|
use NormalizerAwareTrait;
|
||||||
|
private UserRender $userRender;
|
||||||
|
|
||||||
|
public function __construct(UserRender $userRender)
|
||||||
|
{
|
||||||
|
$this->userRender = $userRender;
|
||||||
|
}
|
||||||
|
|
||||||
public function normalize($user, string $format = null, array $context = array())
|
public function normalize($user, string $format = null, array $context = array())
|
||||||
{
|
{
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
@ -35,7 +42,11 @@ class UserNormalizer implements NormalizerInterface
|
|||||||
'type' => 'user',
|
'type' => 'user',
|
||||||
'id' => $user->getId(),
|
'id' => $user->getId(),
|
||||||
'username' => $user->getUsername(),
|
'username' => $user->getUsername(),
|
||||||
'text' => $user->getUsername()
|
'text' => $this->userRender->renderString($user, []),
|
||||||
|
'label' => $user->getLabel(),
|
||||||
|
'user_job' => $this->normalizer->normalize($user->getUserJob(), $format, $context),
|
||||||
|
'main_center' => $this->normalizer->normalize($user->getMainCenter(), $format, $context),
|
||||||
|
'main_scope' => $this->normalizer->normalize($user->getMainScope(), $format, $context),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
66
src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php
Normal file
66
src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\MainBundle\Templating\Entity;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
|
use Symfony\Component\Templating\EngineInterface;
|
||||||
|
|
||||||
|
class UserRender implements ChillEntityRenderInterface
|
||||||
|
{
|
||||||
|
private TranslatableStringHelper $translatableStringHelper;
|
||||||
|
private EngineInterface $engine;
|
||||||
|
|
||||||
|
const DEFAULT_OPTIONS = [
|
||||||
|
'main_scope' => true,
|
||||||
|
'user_job' => true
|
||||||
|
];
|
||||||
|
|
||||||
|
public function __construct(TranslatableStringHelper $translatableStringHelper, EngineInterface $engine)
|
||||||
|
{
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->engine = $engine;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function supports($entity, array $options): bool
|
||||||
|
{
|
||||||
|
return $entity instanceof User;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
* @param User $entity
|
||||||
|
*/
|
||||||
|
public function renderString($entity, array $options): string
|
||||||
|
{
|
||||||
|
$opts = \array_merge(self::DEFAULT_OPTIONS, $options);
|
||||||
|
|
||||||
|
$str = $entity->getLabel();
|
||||||
|
if (NULL !== $entity->getUserJob() && $opts['user_job']) {
|
||||||
|
$str .= ' ('.$this->translatableStringHelper
|
||||||
|
->localize($entity->getUserJob()->getLabel()).')';
|
||||||
|
}
|
||||||
|
if (NULL !== $entity->getMainScope() && $opts['main_scope']) {
|
||||||
|
$str .= ' ('.$this->translatableStringHelper
|
||||||
|
->localize($entity->getMainScope()->getName()).')';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function renderBox($entity, array $options): string
|
||||||
|
{
|
||||||
|
$opts = \array_merge(self::DEFAULT_OPTIONS, $options);
|
||||||
|
|
||||||
|
return $this->engine->render('@ChillMain/Entity/user.html.twig', [
|
||||||
|
'user' => $entity,
|
||||||
|
'opts' => $opts
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
@ -42,10 +42,12 @@ services:
|
|||||||
- { name: twig.extension }
|
- { name: twig.extension }
|
||||||
|
|
||||||
Chill\MainBundle\Templating\Entity\AddressRender:
|
Chill\MainBundle\Templating\Entity\AddressRender:
|
||||||
arguments:
|
autoconfigure: true
|
||||||
- '@Symfony\Component\Templating\EngineInterface'
|
autowire: true
|
||||||
tags:
|
|
||||||
- { name: 'chill.render_entity' }
|
Chill\MainBundle\Templating\Entity\UserRender:
|
||||||
|
autoconfigure: true
|
||||||
|
autowire: true
|
||||||
|
|
||||||
Chill\MainBundle\Templating\Listing\:
|
Chill\MainBundle\Templating\Listing\:
|
||||||
resource: './../../Templating/Listing'
|
resource: './../../Templating/Listing'
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\PersonBundle\AccompanyingPeriod\Suggestion;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Basic implementation: this suggestion does not return any suggestion
|
||||||
|
*/
|
||||||
|
final class ReferralsSuggestion implements ReferralsSuggestionInterface
|
||||||
|
{
|
||||||
|
public function countReferralSuggested(AccompanyingPeriod $period, ?array $options = []): int
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param AccompanyingPeriod $period
|
||||||
|
* @return array|User[]
|
||||||
|
*/
|
||||||
|
public function findReferralSuggested(AccompanyingPeriod $period, int $limit = 50, int $start = 0): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\PersonBundle\AccompanyingPeriod\Suggestion;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process the suggestion of referral for a given accompanying period
|
||||||
|
*/
|
||||||
|
interface ReferralsSuggestionInterface
|
||||||
|
{
|
||||||
|
public function countReferralSuggested(AccompanyingPeriod $period, ?array $options = []): int;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array|User[]
|
||||||
|
*/
|
||||||
|
public function findReferralSuggested(AccompanyingPeriod $period, int $limit = 50, int $start = 0): array;
|
||||||
|
|
||||||
|
}
|
@ -3,12 +3,18 @@
|
|||||||
namespace Chill\PersonBundle\Controller;
|
namespace Chill\PersonBundle\Controller;
|
||||||
|
|
||||||
use Chill\MainBundle\CRUD\Controller\ApiController;
|
use Chill\MainBundle\CRUD\Controller\ApiController;
|
||||||
|
use Chill\MainBundle\Serializer\Model\Collection;
|
||||||
|
use Chill\PersonBundle\AccompanyingPeriod\Suggestion\ReferralsSuggestionInterface;
|
||||||
|
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
||||||
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||||
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
|
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||||
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||||
use Chill\PersonBundle\Privacy\AccompanyingPeriodPrivacyEvent;
|
use Chill\PersonBundle\Privacy\AccompanyingPeriodPrivacyEvent;
|
||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
@ -28,19 +34,23 @@ class AccompanyingCourseApiController extends ApiController
|
|||||||
|
|
||||||
private Registry $registry;
|
private Registry $registry;
|
||||||
|
|
||||||
|
private ReferralsSuggestionInterface $referralAvailable;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
EventDispatcherInterface $eventDispatcher,
|
EventDispatcherInterface $eventDispatcher,
|
||||||
ValidatorInterface $validator,
|
ValidatorInterface $validator,
|
||||||
Registry $registry
|
Registry $registry,
|
||||||
|
ReferralsSuggestionInterface $referralAvailable
|
||||||
) {
|
) {
|
||||||
$this->eventDispatcher = $eventDispatcher;
|
$this->eventDispatcher = $eventDispatcher;
|
||||||
$this->validator = $validator;
|
$this->validator = $validator;
|
||||||
$this->registry = $registry;
|
$this->registry = $registry;
|
||||||
|
$this->referralAvailable = $referralAvailable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function confirmApi($id, Request $request, $_format): Response
|
public function confirmApi($id, Request $request, $_format): Response
|
||||||
{
|
{
|
||||||
/** @var AccompanyingPeriod $accompanyingPeriod */
|
/** @var AccompanyingPeriod $accompanyingPeriod */
|
||||||
$accompanyingPeriod = $this->getEntity('participation', $id, $request);
|
$accompanyingPeriod = $this->getEntity('participation', $id, $request);
|
||||||
|
|
||||||
$this->checkACL('confirm', $request, $_format, $accompanyingPeriod);
|
$this->checkACL('confirm', $request, $_format, $accompanyingPeriod);
|
||||||
@ -58,10 +68,10 @@ $workflow = $this->registry->get($accompanyingPeriod);
|
|||||||
'groups' => [ 'read' ]
|
'groups' => [ 'read' ]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function participationApi($id, Request $request, $_format)
|
public function participationApi($id, Request $request, $_format)
|
||||||
{
|
{
|
||||||
/** @var AccompanyingPeriod $accompanyingPeriod */
|
/** @var AccompanyingPeriod $accompanyingPeriod */
|
||||||
$accompanyingPeriod = $this->getEntity('participation', $id, $request);
|
$accompanyingPeriod = $this->getEntity('participation', $id, $request);
|
||||||
$person = $this->getSerializer()
|
$person = $this->getSerializer()
|
||||||
->deserialize($request->getContent(), Person::class, $_format, []);
|
->deserialize($request->getContent(), Person::class, $_format, []);
|
||||||
@ -152,7 +162,7 @@ $workflow = $this->registry->get($accompanyingPeriod);
|
|||||||
->deserialize($request->getContent(), $class, $_format, []);
|
->deserialize($request->getContent(), $class, $_format, []);
|
||||||
} catch (RuntimeException $e) {
|
} catch (RuntimeException $e) {
|
||||||
$exceptions[] = $e;
|
$exceptions[] = $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($requestor === null) {
|
if ($requestor === null) {
|
||||||
throw new BadRequestException('Could not find any person or requestor', 0, $exceptions[0]);
|
throw new BadRequestException('Could not find any person or requestor', 0, $exceptions[0]);
|
||||||
@ -187,4 +197,29 @@ $workflow = $this->registry->get($accompanyingPeriod);
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Route("/api/1.0/person/accompanying-course/{id}/referrers-suggested.{_format}",
|
||||||
|
* requirements={ "_format"="json"},
|
||||||
|
* name="chill_api_person_accompanying_period_referrers_suggested")
|
||||||
|
* @param AccompanyingPeriod $period
|
||||||
|
* @return JsonResponse
|
||||||
|
*/
|
||||||
|
public function suggestReferrals(AccompanyingPeriod $period, string $_format = 'json'): JsonResponse
|
||||||
|
{
|
||||||
|
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $period);
|
||||||
|
|
||||||
|
$total = $this->referralAvailable->countReferralSuggested($period);
|
||||||
|
$paginator = $this->getPaginatorFactory()->create($total);
|
||||||
|
|
||||||
|
if (0 < $total) {
|
||||||
|
$users = $this->referralAvailable->findReferralSuggested($period, $paginator->getItemsPerPage(),
|
||||||
|
$paginator->getCurrentPageFirstItemNumber());
|
||||||
|
} else {
|
||||||
|
$users = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->json(new Collection($users, $paginator), Response::HTTP_OK,
|
||||||
|
[], [ AbstractNormalizer::GROUPS => [ 'read' ]]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import { fetchResults } from 'ChillMainAssets/lib/api/download.js';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Endpoint v.2 chill_api_single_accompanying_course__entity
|
* Endpoint v.2 chill_api_single_accompanying_course__entity
|
||||||
* method GET/HEAD, get AccompanyingCourse Instance
|
* method GET/HEAD, get AccompanyingCourse Instance
|
||||||
@ -168,11 +170,8 @@ const postSocialIssue = (id, body, method) => {
|
|||||||
|
|
||||||
const getUsers = () => {
|
const getUsers = () => {
|
||||||
const url = `/api/1.0/main/user.json`;
|
const url = `/api/1.0/main/user.json`;
|
||||||
return fetch(url)
|
|
||||||
.then(response => {
|
return fetchResults(url);
|
||||||
if (response.ok) { return response.json(); }
|
|
||||||
throw { msg: 'Error while retriving users.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const whoami = () => {
|
const whoami = () => {
|
||||||
@ -216,8 +215,6 @@ const addScope = (id, scope) => {
|
|||||||
|
|
||||||
const removeScope = (id, scope) => {
|
const removeScope = (id, scope) => {
|
||||||
const url = `/api/1.0/person/accompanying-course/${id}/scope.json`;
|
const url = `/api/1.0/person/accompanying-course/${id}/scope.json`;
|
||||||
console.log(url);
|
|
||||||
console.log(scope);
|
|
||||||
|
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
@ -235,6 +232,12 @@ const removeScope = (id, scope) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getReferrersSuggested = (course) => {
|
||||||
|
const url = `/api/1.0/person/accompanying-course/${course.id}/referrers-suggested.json`;
|
||||||
|
|
||||||
|
return fetchResults(url);
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getAccompanyingCourse,
|
getAccompanyingCourse,
|
||||||
patchAccompanyingCourse,
|
patchAccompanyingCourse,
|
||||||
@ -249,4 +252,5 @@ export {
|
|||||||
postSocialIssue,
|
postSocialIssue,
|
||||||
addScope,
|
addScope,
|
||||||
removeScope,
|
removeScope,
|
||||||
|
getReferrersSuggested,
|
||||||
};
|
};
|
||||||
|
@ -15,9 +15,20 @@
|
|||||||
v-bind:searchable="true"
|
v-bind:searchable="true"
|
||||||
v-bind:placeholder="$t('referrer.placeholder')"
|
v-bind:placeholder="$t('referrer.placeholder')"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
v-bind:options="options"
|
v-bind:options="users"
|
||||||
@select="updateReferrer">
|
@select="updateReferrer">
|
||||||
</VueMultiselect>
|
</VueMultiselect>
|
||||||
|
|
||||||
|
|
||||||
|
<template v-if="referrersSuggested.length > 0">
|
||||||
|
<ul>
|
||||||
|
<li v-for="u in referrersSuggested" @click="updateReferrer(u)">
|
||||||
|
<user-render-box-badge :user="u"></user-render-box-badge>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@ -41,30 +52,29 @@
|
|||||||
import VueMultiselect from 'vue-multiselect';
|
import VueMultiselect from 'vue-multiselect';
|
||||||
import { getUsers, whoami } from '../api';
|
import { getUsers, whoami } from '../api';
|
||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
|
import UserRenderBoxBadge from "ChillMainAssets/vuejs/_components/Entity/UserRenderBoxBadge";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Referrer",
|
name: "Referrer",
|
||||||
components: { VueMultiselect },
|
components: {
|
||||||
data() {
|
UserRenderBoxBadge,
|
||||||
return {
|
VueMultiselect,
|
||||||
options: []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
value: state => state.accompanyingCourse.user,
|
value: state => state.accompanyingCourse.user,
|
||||||
|
users: state => state.users,
|
||||||
|
referrersSuggested: state => {
|
||||||
|
return state.referrersSuggested.filter(u => {
|
||||||
|
if (null === state.accompanyingCourse.user) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return state.accompanyingCourse.user.id !== u.id;
|
||||||
|
})
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.getOptions();
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getOptions() {
|
|
||||||
getUsers().then(response => new Promise((resolve, reject) => {
|
|
||||||
this.options = response.results;
|
|
||||||
resolve();
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
updateReferrer(value) {
|
updateReferrer(value) {
|
||||||
//console.log('value', value);
|
//console.log('value', value);
|
||||||
this.$store.dispatch('updateReferrer', value);
|
this.$store.dispatch('updateReferrer', value);
|
||||||
|
@ -10,6 +10,8 @@ import { getAccompanyingCourse,
|
|||||||
postSocialIssue,
|
postSocialIssue,
|
||||||
addScope,
|
addScope,
|
||||||
removeScope,
|
removeScope,
|
||||||
|
getReferrersSuggested,
|
||||||
|
getUsers,
|
||||||
} from '../api';
|
} from '../api';
|
||||||
import { patchPerson } from "ChillPersonAssets/vuejs/_api/OnTheFly";
|
import { patchPerson } from "ChillPersonAssets/vuejs/_api/OnTheFly";
|
||||||
import { patchThirdparty } from "ChillThirdPartyAssets/vuejs/_api/OnTheFly";
|
import { patchThirdparty } from "ChillThirdPartyAssets/vuejs/_api/OnTheFly";
|
||||||
@ -38,6 +40,10 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
scopesAtStart: accompanyingCourse.scopes.map(scope => scope),
|
scopesAtStart: accompanyingCourse.scopes.map(scope => scope),
|
||||||
// the scope states at server side
|
// the scope states at server side
|
||||||
scopesAtBackend: accompanyingCourse.scopes.map(scope => scope),
|
scopesAtBackend: accompanyingCourse.scopes.map(scope => scope),
|
||||||
|
// the users which are available for referrer
|
||||||
|
referrersSuggested: [],
|
||||||
|
// all the users available
|
||||||
|
users: [],
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
isParticipationValid(state) {
|
isParticipationValid(state) {
|
||||||
@ -170,6 +176,16 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
//console.log('value', value);
|
//console.log('value', value);
|
||||||
state.accompanyingCourse.user = value;
|
state.accompanyingCourse.user = value;
|
||||||
},
|
},
|
||||||
|
setReferrersSuggested(state, users) {
|
||||||
|
state.referrersSuggested = users.map(u => {
|
||||||
|
if (state.accompanyingCourse.user !== null) {
|
||||||
|
if (state.accompanyingCourse.user.id === u.id) {
|
||||||
|
return state.accompanyingCourse.user;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return u;
|
||||||
|
});
|
||||||
|
},
|
||||||
confirmAccompanyingCourse(state, response) {
|
confirmAccompanyingCourse(state, response) {
|
||||||
//console.log('### mutation: confirmAccompanyingCourse: response', response);
|
//console.log('### mutation: confirmAccompanyingCourse: response', response);
|
||||||
state.accompanyingCourse.step = response.step;
|
state.accompanyingCourse.step = response.step;
|
||||||
@ -178,6 +194,16 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
//console.log('define location context');
|
//console.log('define location context');
|
||||||
state.addressContext = context;
|
state.addressContext = context;
|
||||||
},
|
},
|
||||||
|
setUsers(state, users) {
|
||||||
|
state.users = users.map(u => {
|
||||||
|
if (state.accompanyingCourse.user !== null) {
|
||||||
|
if (state.accompanyingCourse.user.id === u.id) {
|
||||||
|
return state.accompanyingCourse.user;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return u;
|
||||||
|
});
|
||||||
|
},
|
||||||
updateLocation(state, r) {
|
updateLocation(state, r) {
|
||||||
//console.log('### mutation: set location attributes', r);
|
//console.log('### mutation: set location attributes', r);
|
||||||
state.accompanyingCourse.locationStatus = r.locationStatus;
|
state.accompanyingCourse.locationStatus = r.locationStatus;
|
||||||
@ -272,6 +298,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
})).catch((error) => { commit('catchError', error) });
|
})).catch((error) => { commit('catchError', error) });
|
||||||
},
|
},
|
||||||
patchOnTheFly({ commit }, payload) {
|
patchOnTheFly({ commit }, payload) {
|
||||||
|
// TODO should be into the dedicated component, no ? JF
|
||||||
console.log('## action: patch OnTheFly', payload);
|
console.log('## action: patch OnTheFly', payload);
|
||||||
let body = { type: payload.type };
|
let body = { type: payload.type };
|
||||||
if (payload.type === 'person') {
|
if (payload.type === 'person') {
|
||||||
@ -313,10 +340,12 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
},
|
},
|
||||||
toggleEmergency({ commit }, payload) {
|
toggleEmergency({ commit }, payload) {
|
||||||
patchAccompanyingCourse(id, { type: "accompanying_period", emergency: payload })
|
patchAccompanyingCourse(id, { type: "accompanying_period", emergency: payload })
|
||||||
.then(course => new Promise((resolve, reject) => {
|
.then(course => new Promise((resolve, reject) => {
|
||||||
commit('toggleEmergency', course.emergency);
|
commit('toggleEmergency', course.emergency);
|
||||||
resolve();
|
return dispatch('setRefererresAvailable');
|
||||||
})).catch((error) => { commit('catchError', error) });
|
}))
|
||||||
|
.then(() => Promise.resolve())
|
||||||
|
.catch((error) => { commit('catchError', error) });
|
||||||
},
|
},
|
||||||
toggleConfidential({ commit }, payload) {
|
toggleConfidential({ commit }, payload) {
|
||||||
patchAccompanyingCourse(id, { type: "accompanying_period", confidential: payload })
|
patchAccompanyingCourse(id, { type: "accompanying_period", confidential: payload })
|
||||||
@ -387,11 +416,15 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
// check/uncheck in the UI. I do not know of to avoid it.
|
// check/uncheck in the UI. I do not know of to avoid it.
|
||||||
commit('setScopes', scopes);
|
commit('setScopes', scopes);
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
}).then(() => {
|
||||||
|
return dispatch('fetchReferrersSuggested');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return dispatch('setScopes', state.scopesAtStart).then(() => {
|
return dispatch('setScopes', state.scopesAtStart).then(() => {
|
||||||
commit('setScopes', scopes);
|
commit('setScopes', scopes);
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
}).then(() => {
|
||||||
|
return dispatch('fetchReferrersSuggested');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -434,7 +467,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
resolve();
|
resolve();
|
||||||
})).catch((error) => { commit('catchError', error) });
|
})).catch((error) => { commit('catchError', error) });
|
||||||
},
|
},
|
||||||
updateSocialIssues({ state, commit }, { payload, body, method }) {
|
updateSocialIssues({ state, commit, dispatch }, { payload, body, method }) {
|
||||||
//console.log('## action: payload', { payload, body, method });
|
//console.log('## action: payload', { payload, body, method });
|
||||||
postSocialIssue(id, body, method)
|
postSocialIssue(id, body, method)
|
||||||
.then(response => new Promise((resolve, reject) => {
|
.then(response => new Promise((resolve, reject) => {
|
||||||
@ -445,6 +478,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
return getAccompanyingCourse(state.accompanyingCourse.id);
|
return getAccompanyingCourse(state.accompanyingCourse.id);
|
||||||
}).then(accompanying_course => {
|
}).then(accompanying_course => {
|
||||||
commit('refreshSocialIssues', accompanying_course.socialIssues);
|
commit('refreshSocialIssues', accompanying_course.socialIssues);
|
||||||
|
dispatch('fetchReferrersSuggested');
|
||||||
})
|
})
|
||||||
.catch((error) => { commit('catchError', error) });
|
.catch((error) => { commit('catchError', error) });
|
||||||
},
|
},
|
||||||
@ -462,7 +496,24 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
resolve();
|
resolve();
|
||||||
})).catch((error) => { commit('catchError', error) });
|
})).catch((error) => { commit('catchError', error) });
|
||||||
},
|
},
|
||||||
updateLocation({ commit }, payload) {
|
async fetchReferrersSuggested({ state, commit}) {
|
||||||
|
let users = await getReferrersSuggested(state.accompanyingCourse);
|
||||||
|
commit('setReferrersSuggested', users);
|
||||||
|
if (
|
||||||
|
null === state.accompanyingCourse.user
|
||||||
|
&& !state.accompanyingCourse.confidential
|
||||||
|
&& !state.accompanyingCourse.step === 'DRAFT'
|
||||||
|
&& users.length === 1
|
||||||
|
) {
|
||||||
|
// set the user if unique
|
||||||
|
commit('updateReferrer', users[0]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async fetchUsers({commit}) {
|
||||||
|
let users = await getUsers();
|
||||||
|
commit('setUsers', users);
|
||||||
|
},
|
||||||
|
updateLocation({ commit, dispatch }, payload) {
|
||||||
//console.log('## action: updateLocation', payload.locationStatusTo);
|
//console.log('## action: updateLocation', payload.locationStatusTo);
|
||||||
let body = { 'type': payload.target, 'id': payload.targetId };
|
let body = { 'type': payload.target, 'id': payload.targetId };
|
||||||
let location = {};
|
let location = {};
|
||||||
@ -484,6 +535,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
personLocation: accompanyingCourse.personLocation
|
personLocation: accompanyingCourse.personLocation
|
||||||
});
|
});
|
||||||
resolve();
|
resolve();
|
||||||
|
dispatch('fetchReferrersSuggested');
|
||||||
})).catch((error) => { commit('catchError', error) });
|
})).catch((error) => { commit('catchError', error) });
|
||||||
},
|
},
|
||||||
confirmAccompanyingCourse({ commit }) {
|
confirmAccompanyingCourse({ commit }) {
|
||||||
@ -498,6 +550,9 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
store.dispatch('fetchReferrersSuggested');
|
||||||
|
store.dispatch('fetchUsers');
|
||||||
resolve(store);
|
resolve(store);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -325,6 +325,19 @@ class AccompanyingCourseApiControllerTest extends WebTestCase
|
|||||||
$this->period = $period;
|
$this->period = $period;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider dataGenerateRandomAccompanyingCourse
|
||||||
|
*/
|
||||||
|
public function testReferralAvailable(int $personId, int $periodId)
|
||||||
|
{
|
||||||
|
$this->client->request(
|
||||||
|
Request::METHOD_POST,
|
||||||
|
sprintf('/api/1.0/person/accompanying-course/%d/referrers-suggested.json', $periodId)
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @dataProvider dataGenerateRandomAccompanyingCourse
|
* @dataProvider dataGenerateRandomAccompanyingCourse
|
||||||
|
@ -445,7 +445,7 @@ paths:
|
|||||||
/1.0/person/accompanying-course/{id}.json:
|
/1.0/person/accompanying-course/{id}.json:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Return the description for an accompanying course (accompanying period)"
|
summary: "Return the description for an accompanying course (accompanying period)"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -532,7 +532,7 @@ paths:
|
|||||||
/1.0/person/accompanying-course/{id}/requestor.json:
|
/1.0/person/accompanying-course/{id}/requestor.json:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Add a requestor to the accompanying course"
|
summary: "Add a requestor to the accompanying course"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -574,7 +574,7 @@ paths:
|
|||||||
description: "object with validation errors"
|
description: "object with validation errors"
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Remove the requestor for the accompanying course"
|
summary: "Remove the requestor for the accompanying course"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -598,7 +598,7 @@ paths:
|
|||||||
/1.0/person/accompanying-course/{id}/participation.json:
|
/1.0/person/accompanying-course/{id}/participation.json:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Add a participant to the accompanying course"
|
summary: "Add a participant to the accompanying course"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -627,7 +627,7 @@ paths:
|
|||||||
description: "object with validation errors"
|
description: "object with validation errors"
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Remove the participant for the accompanying course"
|
summary: "Remove the participant for the accompanying course"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -658,7 +658,7 @@ paths:
|
|||||||
/1.0/person/accompanying-course/{id}/resource.json:
|
/1.0/person/accompanying-course/{id}/resource.json:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Add a resource to the accompanying course"
|
summary: "Add a resource to the accompanying course"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -703,7 +703,7 @@ paths:
|
|||||||
description: "object with validation errors"
|
description: "object with validation errors"
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Remove the resource"
|
summary: "Remove the resource"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -734,7 +734,7 @@ paths:
|
|||||||
/1.0/person/accompanying-course/{id}/comment.json:
|
/1.0/person/accompanying-course/{id}/comment.json:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Add a comment to the accompanying course"
|
summary: "Add a comment to the accompanying course"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -772,7 +772,7 @@ paths:
|
|||||||
description: "object with validation errors"
|
description: "object with validation errors"
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Remove the comment"
|
summary: "Remove the comment"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -803,7 +803,7 @@ paths:
|
|||||||
/1.0/person/accompanying-course/{id}/scope.json:
|
/1.0/person/accompanying-course/{id}/scope.json:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Add a scope to the accompanying course"
|
summary: "Add a scope to the accompanying course"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -837,7 +837,7 @@ paths:
|
|||||||
description: "object with validation errors"
|
description: "object with validation errors"
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Remove the scope"
|
summary: "Remove the scope"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -868,7 +868,7 @@ paths:
|
|||||||
/1.0/person/accompanying-course/{id}/socialissue.json:
|
/1.0/person/accompanying-course/{id}/socialissue.json:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Add a social issue to the accompanying course"
|
summary: "Add a social issue to the accompanying course"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -902,7 +902,7 @@ paths:
|
|||||||
description: "object with validation errors"
|
description: "object with validation errors"
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- accompanying-course
|
||||||
summary: "Remove the social issue"
|
summary: "Remove the social issue"
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -929,11 +929,31 @@ paths:
|
|||||||
description: "OK"
|
description: "OK"
|
||||||
422:
|
422:
|
||||||
description: "object with validation errors"
|
description: "object with validation errors"
|
||||||
|
/1.0/person/accompanying-course/{id}/referrers-suggested.json:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- accompanying-course
|
||||||
|
summary: "get a list of available referral for a given accompanying cours"
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The accompanying period's id
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: integer
|
||||||
|
minimum: 1
|
||||||
|
responses:
|
||||||
|
401:
|
||||||
|
description: "Unauthorized"
|
||||||
|
404:
|
||||||
|
description: "Not found"
|
||||||
|
200:
|
||||||
|
description: "OK"
|
||||||
|
|
||||||
/1.0/person/accompanying-course/{id}/work.json:
|
/1.0/person/accompanying-course/{id}/work.json:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- person
|
|
||||||
- accompanying-course-work
|
- accompanying-course-work
|
||||||
summary: "Add a work (AccompanyingPeriodwork) to the accompanying course"
|
summary: "Add a work (AccompanyingPeriodwork) to the accompanying course"
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -16,5 +16,5 @@ module.exports = function(encore, entries)
|
|||||||
encore.addEntry('page_household_edit_metadata', __dirname + '/Resources/public/page/household_edit_metadata/index.js');
|
encore.addEntry('page_household_edit_metadata', __dirname + '/Resources/public/page/household_edit_metadata/index.js');
|
||||||
encore.addEntry('page_person', __dirname + '/Resources/public/page/person/index.js');
|
encore.addEntry('page_person', __dirname + '/Resources/public/page/person/index.js');
|
||||||
encore.addEntry('page_accompanying_course_index_person_locate', __dirname + '/Resources/public/page/accompanying_course_index/person_locate.js');
|
encore.addEntry('page_accompanying_course_index_person_locate', __dirname + '/Resources/public/page/accompanying_course_index/person_locate.js');
|
||||||
encore.addEntry('page_vis', __dirname + '/Resources/public/page/vis/index.js');
|
//encore.addEntry('page_vis', __dirname + '/Resources/public/page/vis/index.js');
|
||||||
};
|
};
|
||||||
|
@ -13,3 +13,10 @@ services:
|
|||||||
entity: 'Chill\PersonBundle\Entity\AccompanyingPeriod'
|
entity: 'Chill\PersonBundle\Entity\AccompanyingPeriod'
|
||||||
lazy: true
|
lazy: true
|
||||||
method: preUpdateAccompanyingPeriod
|
method: preUpdateAccompanyingPeriod
|
||||||
|
|
||||||
|
Chill\PersonBundle\AccompanyingPeriod\Suggestion\ReferralsSuggestion:
|
||||||
|
autowire: true
|
||||||
|
autoconfigure: true
|
||||||
|
|
||||||
|
Chill\PersonBundle\AccompanyingPeriod\Suggestion\ReferralsSuggestionInterface: '@Chill\PersonBundle\AccompanyingPeriod\Suggestion\ReferralsSuggestion'
|
||||||
|
|
||||||
|
@ -41,10 +41,8 @@ services:
|
|||||||
tags: ['controller.service_arguments']
|
tags: ['controller.service_arguments']
|
||||||
|
|
||||||
Chill\PersonBundle\Controller\AccompanyingCourseApiController:
|
Chill\PersonBundle\Controller\AccompanyingCourseApiController:
|
||||||
arguments:
|
autoconfigure: true
|
||||||
$eventDispatcher: '@Symfony\Contracts\EventDispatcher\EventDispatcherInterface'
|
autowire: true
|
||||||
$validator: '@Symfony\Component\Validator\Validator\ValidatorInterface'
|
|
||||||
$registry: '@Symfony\Component\Workflow\Registry'
|
|
||||||
tags: ['controller.service_arguments']
|
tags: ['controller.service_arguments']
|
||||||
|
|
||||||
Chill\PersonBundle\Controller\PersonApiController:
|
Chill\PersonBundle\Controller\PersonApiController:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user