mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch '133-location-asideactivity' into 'master'
Resolve "Ajouter la localisation aux activités annexes" Closes #133 See merge request Chill-Projet/chill-bundles!581
This commit is contained in:
commit
ae9f1e3905
6
.changes/unreleased/Feature-20230817-131059.yaml
Normal file
6
.changes/unreleased/Feature-20230817-131059.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
kind: Feature
|
||||
body: Add locations in Aside Activity. By default, suggest user location, otherwise
|
||||
a select with all locations.
|
||||
time: 2023-08-17T13:10:59.152278661+02:00
|
||||
custom:
|
||||
Issue: "133"
|
6
.changes/unreleased/Feature-20230817-131152.yaml
Normal file
6
.changes/unreleased/Feature-20230817-131152.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
kind: Feature
|
||||
body: 'Adapt Aside Activity exports: display location, filter by location, group by
|
||||
location'
|
||||
time: 2023-08-17T13:11:52.911356021+02:00
|
||||
custom:
|
||||
Issue: "133"
|
5
.changes/unreleased/Fixed-20230817-131239.yaml
Normal file
5
.changes/unreleased/Fixed-20230817-131239.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
kind: Fixed
|
||||
body: Missing translation in Work Actions exports
|
||||
time: 2023-08-17T13:12:39.159627128+02:00
|
||||
custom:
|
||||
Issue: ""
|
@ -94,7 +94,7 @@ class CountPerson implements ExportInterface
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
// we gather all center the user choose.
|
||||
$centers = array_map(static fn($el) => $el['center'], $acl);
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
$qb = $this->entityManager->createQueryBuilder();
|
||||
|
||||
|
@ -56,7 +56,7 @@ class ChillMainConfiguration implements ConfigurationInterface
|
||||
->end() // end of widgets
|
||||
->end() // end of root/children
|
||||
->end() // end of root
|
||||
;
|
||||
;
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
|
@ -2,6 +2,13 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Set\ValueObject\LevelSetList;
|
||||
|
@ -320,7 +320,6 @@ final class ActivityController extends AbstractController
|
||||
|
||||
private function buildFilterOrder(AccompanyingPeriod|Person $associated): FilterOrderHelper
|
||||
{
|
||||
|
||||
$filterBuilder = $this->filterOrderHelperFactory->create(self::class);
|
||||
$types = $this->activityACLAwareRepository->findActivityTypeByAssociated($associated);
|
||||
$jobs = $this->activityACLAwareRepository->findUserJobByAssociated($associated);
|
||||
|
@ -322,7 +322,7 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos
|
||||
$counter++;
|
||||
}
|
||||
|
||||
foreach ($person->getAccompanyingPeriodParticipations() as $participation) {
|
||||
foreach ($person->getAccompanyingPeriodParticipations() as $participation) {
|
||||
if (!$this->security->isGranted(ActivityVoter::SEE, $participation->getAccompanyingPeriod())) {
|
||||
continue;
|
||||
}
|
||||
|
@ -122,5 +122,4 @@ class ActivityDocumentACLAwareRepositoryTest extends KernelTestCase
|
||||
yield [$person, $scopes, true, null, new \DateTimeImmutable("1 week ago"), "content"];
|
||||
yield [$person, [], true, new \DateTimeImmutable("1 month ago"), new \DateTimeImmutable("1 week ago"), "content"];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ final class AsideActivityController extends CRUDController
|
||||
$asideActivity = new AsideActivity();
|
||||
|
||||
$asideActivity->setAgent($this->getUser());
|
||||
$asideActivity->setLocation($this->getUser()->getCurrentLocation());
|
||||
|
||||
$duration = $request->query->get('duration', '300');
|
||||
$duration = DateTime::createFromFormat('U', $duration);
|
||||
|
@ -14,6 +14,7 @@ namespace Chill\AsideActivityBundle\Entity;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use DateTimeInterface;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
@ -60,9 +61,10 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=100, nullable=true)
|
||||
* @ORM\ManyToOne(targetEntity=Location::class)
|
||||
* @ORM\JoinColumn(nullable=true)
|
||||
*/
|
||||
private $location;
|
||||
private ?Location $location = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
@ -115,7 +117,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getLocation(): ?string
|
||||
public function getLocation(): ?Location
|
||||
{
|
||||
return $this->location;
|
||||
}
|
||||
@ -175,7 +177,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setLocation(?string $location): self
|
||||
public function setLocation(?Location $location): self
|
||||
{
|
||||
$this->location = $location;
|
||||
|
||||
|
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\AsideActivityBundle\Export\Aggregator;
|
||||
|
||||
use Chill\AsideActivityBundle\Export\Declarations;
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Chill\MainBundle\Repository\LocationRepository;
|
||||
use Closure;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByLocationAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private LocationRepository $locationRepository)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
return 'export.aggregator.Aside activity localisation';
|
||||
}
|
||||
if (null === $value || '' === $value || null === $l = $this->locationRepository->find($value)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $l->getName();
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['by_aside_activity_location_aggregator'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.aggregator.Group by aside activity location';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('IDENTITY(aside.location) AS by_aside_activity_location_aggregator')
|
||||
->addGroupBy('by_aside_activity_location_aggregator');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||
}
|
||||
}
|
@ -23,6 +23,7 @@ use Chill\MainBundle\Export\Helper\DateTimeHelper;
|
||||
use Chill\MainBundle\Export\Helper\UserHelper;
|
||||
use Chill\MainBundle\Export\ListInterface;
|
||||
use Chill\MainBundle\Repository\CenterRepositoryInterface;
|
||||
use Chill\MainBundle\Repository\LocationRepository;
|
||||
use Chill\MainBundle\Repository\ScopeRepositoryInterface;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use DateTimeInterface;
|
||||
@ -58,6 +59,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
|
||||
CenterRepositoryInterface $centerRepository,
|
||||
AsideActivityCategoryRepository $asideActivityCategoryRepository,
|
||||
CategoryRender $categoryRender,
|
||||
private LocationRepository $locationRepository,
|
||||
TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {
|
||||
$this->em = $em;
|
||||
@ -73,6 +75,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
@ -145,6 +148,19 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
|
||||
return $this->categoryRender->renderString($c, []);
|
||||
};
|
||||
|
||||
case 'location':
|
||||
return function ($value) {
|
||||
if ('_header' === $value) {
|
||||
return 'export.aside_activity.location';
|
||||
}
|
||||
|
||||
if (null === $value || '' === $value || null === $l = $this->locationRepository->find($value)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $l->getName();
|
||||
};
|
||||
|
||||
case 'main_scope':
|
||||
return function ($value) {
|
||||
if ('_header' === $value) {
|
||||
@ -191,6 +207,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
|
||||
'date',
|
||||
'duration',
|
||||
'note',
|
||||
'location',
|
||||
];
|
||||
}
|
||||
|
||||
@ -226,6 +243,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
|
||||
->addSelect('IDENTITY(aside.type) AS aside_activity_type')
|
||||
->addSelect('aside.date')
|
||||
->addSelect('aside.duration')
|
||||
->addSelect('IDENTITY(aside.location) AS location')
|
||||
->addSelect('aside.note');
|
||||
|
||||
return $qb;
|
||||
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\AsideActivityBundle\Export\Filter;
|
||||
|
||||
use Chill\AsideActivityBundle\Export\Declarations;
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Export\FilterInterface;
|
||||
use Chill\MainBundle\Form\Type\PickUserLocationType;
|
||||
use Chill\MainBundle\Repository\LocationRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
final readonly class ByLocationFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(
|
||||
private Security $security
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.filter.Filter by aside activity location';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('locations', PickUserLocationType::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
|
||||
if ($user instanceof User) {
|
||||
return [
|
||||
'locations' => $user->getCurrentLocation(),
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'locations' => null,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$locations = $data['locations']->map(fn (Location $l): string => $l->getName());
|
||||
|
||||
return ['export.filter.Filtered by aside activity location: only %location%', [
|
||||
'%location%' => implode(', ', $locations),
|
||||
]];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$clause = $qb->expr()->in('aside.location', ':locations');
|
||||
|
||||
$qb->andWhere($clause);
|
||||
$qb->setParameter('locations', $data['locations']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||
}
|
||||
}
|
@ -13,13 +13,16 @@ namespace Chill\AsideActivityBundle\Form;
|
||||
|
||||
use Chill\AsideActivityBundle\Entity\AsideActivity;
|
||||
use Chill\AsideActivityBundle\Form\Type\PickAsideActivityCategoryType;
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Chill\MainBundle\Form\Type\ChillDateType;
|
||||
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
||||
use Chill\MainBundle\Form\Type\PickUserDynamicType;
|
||||
use Chill\MainBundle\Form\Type\PickUserLocationType;
|
||||
use DateInterval;
|
||||
use DateTime;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer;
|
||||
@ -77,7 +80,9 @@ final class AsideActivityFormType extends AbstractType
|
||||
->add('note', ChillTextareaType::class, [
|
||||
'label' => 'Note',
|
||||
'required' => false,
|
||||
]);
|
||||
])
|
||||
->add('location', PickUserLocationType::class)
|
||||
;
|
||||
|
||||
foreach (['duration'] as $fieldName) {
|
||||
$builder->get($fieldName)
|
||||
|
@ -39,6 +39,9 @@
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- if entity.location.name is defined -%}
|
||||
<div><i class="fa fa-fw fa-map-marker"></i>{{ entity.location.name }}</div>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
<div class="item-col" style="justify-content: flex-end;">
|
||||
<div class="box">
|
||||
|
@ -22,6 +22,13 @@
|
||||
|
||||
<dt class="inline">{{ 'Created for'|trans }}</dt>
|
||||
<dd>{{ entity.agent }}</dd>
|
||||
|
||||
<dt class="inline">{{ 'Asideactivity location'|trans }}</dt>
|
||||
{%- if entity.location.name is defined -%}
|
||||
<dd>{{ entity.location.name }}</dd>
|
||||
{%- else -%}
|
||||
<dd><span class="chill-no-data-statement">{{ 'No data given'|trans }}</span></dd>
|
||||
{%- endif -%}
|
||||
|
||||
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
|
||||
|
||||
|
@ -46,19 +46,27 @@ services:
|
||||
tags:
|
||||
- { name: chill.export_filter, alias: 'aside_activity_user_filter' }
|
||||
|
||||
Chill\AsideActivityBundle\Export\Filter\ByLocationFilter:
|
||||
tags:
|
||||
- { name: chill.export_filter, alias: 'aside_activity_location_filter' }
|
||||
|
||||
## Aggregators
|
||||
|
||||
chill.aside_activity.export.type_aggregator:
|
||||
class: Chill\AsideActivityBundle\Export\Aggregator\ByActivityTypeAggregator
|
||||
tags:
|
||||
- { name: chill.export_aggregator, alias: activity_type_aggregator }
|
||||
- { name: chill.export_aggregator, alias: 'activity_type_aggregator' }
|
||||
|
||||
chill.aside_activity.export.user_job_aggregator:
|
||||
class: Chill\AsideActivityBundle\Export\Aggregator\ByUserJobAggregator
|
||||
tags:
|
||||
- { name: chill.export_aggregator, alias: aside_activity_user_job_aggregator }
|
||||
- { name: chill.export_aggregator, alias: 'aside_activity_user_job_aggregator' }
|
||||
|
||||
chill.aside_activity.export.user_scope_aggregator:
|
||||
class: Chill\AsideActivityBundle\Export\Aggregator\ByUserScopeAggregator
|
||||
tags:
|
||||
- { name: chill.export_aggregator, alias: aside_activity_user_scope_aggregator }
|
||||
- { name: chill.export_aggregator, alias: 'aside_activity_user_scope_aggregator' }
|
||||
|
||||
Chill\AsideActivityBundle\Export\Aggregator\ByLocationAggregator:
|
||||
tags:
|
||||
- { name: chill.export_aggregator, alias: 'aside_activity_location_aggregator' }
|
||||
|
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\Migrations\AsideActivity;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20230816112809 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Update location attribute in asideactivity';
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DROP INDEX chill_asideactivity.IDX_A866DA0E64D218E');
|
||||
$this->addSql('ALTER TABLE chill_asideactivity.AsideActivity DROP CONSTRAINT FK_A866DA0E64D218E');
|
||||
$this->addSql('ALTER TABLE chill_asideactivity.AsideActivity DROP location_id');
|
||||
$this->addSql('ALTER TABLE chill_asideactivity.AsideActivity ADD location VARCHAR(100) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_asideactivity.asideactivity ADD location_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_asideactivity.asideactivity DROP location');
|
||||
$this->addSql('ALTER TABLE chill_asideactivity.asideactivity ADD CONSTRAINT FK_A866DA0E64D218E FOREIGN KEY (location_id) REFERENCES chill_main_location (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX IDX_A866DA0E64D218E ON chill_asideactivity.asideactivity (location_id)');
|
||||
}
|
||||
}
|
@ -26,6 +26,7 @@ Users: Utilisateurs
|
||||
Emergency: Urgent
|
||||
by: "Par "
|
||||
location: Lieu
|
||||
Asideactivity location: Localisation de l'activité
|
||||
|
||||
# Crud
|
||||
crud:
|
||||
@ -182,6 +183,7 @@ export:
|
||||
duration: Durée
|
||||
note: Note
|
||||
id: Identifiant
|
||||
location: Localisation
|
||||
|
||||
Exports of aside activities: Exports des activités annexes
|
||||
Count aside activities: Nombre d'activités annexes
|
||||
@ -202,11 +204,16 @@ export:
|
||||
Filter by user jobs: Filtrer les activités annexes par métier des utilisateurs
|
||||
'Filtered aside activities by user scope: only %scopes%': "Filtré par service des utilisateur: uniquement %scopes%"
|
||||
Filter by user scope: Filtrer les activités annexes par service d'utilisateur
|
||||
Filter by aside activity location: Filtrer les activités annexes par localisation
|
||||
'Filtered by aside activity location: only %location%': "Filtré par localisation: uniquement %location%"
|
||||
aggregator:
|
||||
Group by aside activity type: Grouper les activités annexes par type d'activité
|
||||
Aside activity type: Type d'activité annexe
|
||||
Aggregate by user job: Grouper les activités annexes par métier des utilisateurs
|
||||
Aggregate by user scope: Grouper les activités annexes par service des utilisateurs
|
||||
Aside activity location: Localisation des activités annexe
|
||||
Group by aside activity location: Grouper les activités annexes par localisation
|
||||
Aside activity localisation: Localisation
|
||||
|
||||
# ROLES
|
||||
CHILL_ASIDE_ACTIVITY_STATS: Statistiques pour les activités annexes
|
||||
|
@ -65,5 +65,4 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface
|
||||
default => throw new UserAbsenceSyncException("this status is not documented by Microsoft")
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -190,6 +190,4 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -172,5 +172,4 @@ class MSUserAbsenceReaderTest extends TestCase
|
||||
"User is absent: absence is always enabled"
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -94,5 +94,4 @@ final readonly class GenericDocForAccompanyingPeriodController
|
||||
]
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -91,5 +91,4 @@ final readonly class GenericDocForPerson
|
||||
]
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -82,7 +82,6 @@ class FetchQuery implements FetchQueryInterface
|
||||
}
|
||||
|
||||
unset($this->wheres[$index], $this->whereParams[$index], $this->whereTypes[$index]);
|
||||
|
||||
}
|
||||
|
||||
public function removeJoinClause(int $index): void
|
||||
@ -92,7 +91,6 @@ class FetchQuery implements FetchQueryInterface
|
||||
}
|
||||
|
||||
unset($this->joins[$index], $this->joinParams[$index], $this->joinTypes[$index]);
|
||||
|
||||
}
|
||||
|
||||
public function getSelectKeyString(): string
|
||||
|
@ -27,5 +27,4 @@ interface GenericDocForAccompanyingPeriodProviderInterface
|
||||
* Return true if the user is allowed to see some documents for this provider.
|
||||
*/
|
||||
public function isAllowedForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod): bool;
|
||||
|
||||
}
|
||||
|
@ -143,5 +143,4 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,5 +46,4 @@ final readonly class GenericDocExtensionRuntime implements RuntimeExtensionInter
|
||||
|
||||
throw new \LogicException("no renderer found");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,5 +20,4 @@ interface GenericDocRendererInterface
|
||||
public function getTemplate(GenericDocDTO $genericDocDTO, $options = []): string;
|
||||
|
||||
public function getTemplateData(GenericDocDTO $genericDocDTO, $options = []): array;
|
||||
|
||||
}
|
||||
|
@ -98,7 +98,6 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA
|
||||
continue;
|
||||
}
|
||||
$orPersonId[] = $participation->getPerson()->getId();
|
||||
|
||||
}
|
||||
|
||||
if ([] === $orPersonId) {
|
||||
|
@ -54,9 +54,6 @@ class FetchQueryToSqlBuilderTest extends KernelTestCase
|
||||
);
|
||||
self::assertEquals(['foo', 'bar_baz', 'baz'], $params);
|
||||
self::assertEquals([Types::STRING, Types::STRING, Types::STRING], $types);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function testToSqlWithoutWhere(): void
|
||||
@ -85,5 +82,4 @@ class FetchQueryToSqlBuilderTest extends KernelTestCase
|
||||
self::assertEquals([], $params);
|
||||
self::assertEquals([], $types);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -142,7 +142,6 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase
|
||||
yield [$period, new DateTimeImmutable('2 years ago'), new DateTimeImmutable('1 year ago'), null];
|
||||
yield [$period, null, null, 'test'];
|
||||
yield [$period, new DateTimeImmutable('2 years ago'), new DateTimeImmutable('1 year ago'), 'test'];
|
||||
|
||||
}
|
||||
|
||||
public function provideDataBuildFetchQueryForPerson(): iterable
|
||||
@ -154,5 +153,4 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase
|
||||
yield [null, null, 'test'];
|
||||
yield [new DateTimeImmutable('2 years ago'), new DateTimeImmutable('1 year ago'), 'test'];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -88,7 +88,6 @@ class CronManager implements CronManagerInterface
|
||||
foreach ($orderedJobs as $job) {
|
||||
if ($job->canRun($lasts[$job->getKey()] ?? null)) {
|
||||
if (array_key_exists($job->getKey(), $lasts)) {
|
||||
|
||||
$executionData = $lasts[$job->getKey()]->getLastExecutionData();
|
||||
|
||||
$this->entityManager
|
||||
|
@ -122,7 +122,6 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
|
||||
foreach ($helper->getUserPickers() as $name => [
|
||||
'label' => $label, 'options' => $opts
|
||||
]) {
|
||||
|
||||
$userPickersBuilder->add(
|
||||
$name,
|
||||
PickUserDynamicType::class,
|
||||
@ -136,7 +135,6 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
|
||||
|
||||
$builder->add($userPickersBuilder);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static function buildCheckboxChoices(array $choices, array $trans = []): array
|
||||
|
@ -65,7 +65,6 @@ class CronJobDatabaseInteractionTest extends KernelTestCase
|
||||
// run a second time
|
||||
$manager->run();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class JobWithReturn implements CronJobInterface
|
||||
|
@ -64,5 +64,4 @@ class CollateAddressWithReferenceOrPostalCodeCronJobTest extends TestCase
|
||||
yield [new \DateTimeImmutable('2023-07-10T12:00:00'), new \DateTimeImmutable('2023-07-01T12:00:00'), true];
|
||||
yield [new \DateTimeImmutable('2023-07-10T12:00:00'), null, true];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -47,11 +47,9 @@ class RelationshipNoDuplicateValidator extends ConstraintValidator
|
||||
|
||||
foreach ($relationships as $r) {
|
||||
if (spl_object_hash($r) !== spl_object_hash($value)
|
||||
and
|
||||
(
|
||||
and (
|
||||
($r->getFromPerson() === $fromPerson and $r->getToPerson() === $toPerson)
|
||||
||
|
||||
($r->getFromPerson() === $toPerson and $r->getToPerson() === $fromPerson)
|
||||
|| ($r->getFromPerson() === $toPerson and $r->getToPerson() === $fromPerson)
|
||||
)
|
||||
) {
|
||||
$this->context->buildViolation($constraint->message)
|
||||
|
@ -1225,6 +1225,7 @@ export:
|
||||
acpw:
|
||||
List of accompanying period works: Liste des actions
|
||||
List description: Génère une liste des actions d'accompagnement, filtrée sur différents paramètres.
|
||||
Date of calculation for associated elements: Date de calcul des éléments associés
|
||||
help_description: L'agent traitant de l'action sera valide à cette date
|
||||
id: Identifiant de l'action
|
||||
startDate: Date de début
|
||||
|
@ -43,5 +43,4 @@ class SingleTaskStateRepository
|
||||
|
||||
return $states;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user