diff --git a/src/Application/Regulation/Command/DuplicateRegulationCommandHandler.php b/src/Application/Regulation/Command/DuplicateRegulationCommandHandler.php index a065abd59..86aae5e52 100644 --- a/src/Application/Regulation/Command/DuplicateRegulationCommandHandler.php +++ b/src/Application/Regulation/Command/DuplicateRegulationCommandHandler.php @@ -53,8 +53,6 @@ private function duplicateRegulationOrderRecord( $generalInfo->organization = $organization; $generalInfo->identifier = $identifier; $generalInfo->description = $originalRegulationOrder->getDescription(); - $generalInfo->startDate = $originalRegulationOrder->getStartDate(); - $generalInfo->endDate = $originalRegulationOrder->getEndDate(); $generalInfo->additionalVisas = $originalRegulationOrder->getAdditionalVisas(); $generalInfo->additionalReasons = $originalRegulationOrder->getAdditionalReasons(); diff --git a/src/Application/Regulation/Command/SaveRegulationGeneralInfoCommand.php b/src/Application/Regulation/Command/SaveRegulationGeneralInfoCommand.php index 36b16fb98..9c58222d1 100644 --- a/src/Application/Regulation/Command/SaveRegulationGeneralInfoCommand.php +++ b/src/Application/Regulation/Command/SaveRegulationGeneralInfoCommand.php @@ -18,8 +18,6 @@ final class SaveRegulationGeneralInfoCommand implements CommandInterface public ?string $otherCategoryText = null; public ?string $description; public ?Organization $organization; - public ?\DateTimeInterface $startDate; - public ?\DateTimeInterface $endDate = null; public array $additionalVisas = []; public array $additionalReasons = []; @@ -40,8 +38,6 @@ public static function create( $command->category = $regulationOrder?->getCategory(); $command->otherCategoryText = $regulationOrder?->getOtherCategoryText(); $command->description = $regulationOrder?->getDescription(); - $command->startDate = $startDate ?? $regulationOrder?->getStartDate(); - $command->endDate = $regulationOrder?->getEndDate(); $command->additionalVisas = $regulationOrder?->getAdditionalVisas() ?? []; $command->additionalReasons = $regulationOrder?->getAdditionalReasons() ?? []; diff --git a/src/Application/Regulation/Command/SaveRegulationGeneralInfoCommandHandler.php b/src/Application/Regulation/Command/SaveRegulationGeneralInfoCommandHandler.php index f02ed7e6c..22897c888 100644 --- a/src/Application/Regulation/Command/SaveRegulationGeneralInfoCommandHandler.php +++ b/src/Application/Regulation/Command/SaveRegulationGeneralInfoCommandHandler.php @@ -33,8 +33,6 @@ public function __invoke(SaveRegulationGeneralInfoCommand $command): RegulationO identifier: $command->identifier, category: $command->category, description: $command->description, - startDate: $command->startDate, - endDate: $command->endDate, otherCategoryText: $command->otherCategoryText, additionalVisas: $command->additionalVisas, additionalReasons: $command->additionalReasons, @@ -60,8 +58,6 @@ public function __invoke(SaveRegulationGeneralInfoCommand $command): RegulationO identifier: $command->identifier, category: $command->category, description: $command->description, - startDate: $command->startDate, - endDate: $command->endDate, otherCategoryText: $command->otherCategoryText, additionalVisas: $command->additionalVisas, additionalReasons: $command->additionalReasons, diff --git a/src/Application/Regulation/Query/GetGeneralInfoQueryHandler.php b/src/Application/Regulation/Query/GetGeneralInfoQueryHandler.php index 54e3abfca..5f1e46da3 100644 --- a/src/Application/Regulation/Query/GetGeneralInfoQueryHandler.php +++ b/src/Application/Regulation/Query/GetGeneralInfoQueryHandler.php @@ -25,6 +25,17 @@ public function __invoke(GetGeneralInfoQuery $query): GeneralInfoView throw new RegulationOrderRecordNotFoundException(); } - return $row[0]; + return new GeneralInfoView( + uuid: $row['uuid'], + identifier: $row['identifier'], + organizationName: $row['organizationName'], + organizationUuid: $row['organizationUuid'], + status: $row['status'], + category: $row['category'], + otherCategoryText: $row['otherCategoryText'], + description: $row['description'], + startDate: $row['overallStartDate'] ? new \DateTimeImmutable($row['overallStartDate']) : null, + endDate: $row['overallEndDate'] ? new \DateTimeImmutable($row['overallEndDate']) : null, + ); } } diff --git a/src/Application/Regulation/Query/GetRegulationsQueryHandler.php b/src/Application/Regulation/Query/GetRegulationsQueryHandler.php index feda824bd..fa2c51c2c 100644 --- a/src/Application/Regulation/Query/GetRegulationsQueryHandler.php +++ b/src/Application/Regulation/Query/GetRegulationsQueryHandler.php @@ -46,8 +46,8 @@ public function __invoke(GetRegulationsQuery $query): Pagination organizationName: $row['organizationName'], organizationUuid: $row['organizationUuid'], location: $locationView, - startDate: $row['startDate'], - endDate: $row['endDate'], + startDate: $row['overallStartDate'] ? new \DateTimeImmutable($row['overallStartDate']) : null, + endDate: $row['overallEndDate'] ? new \DateTimeImmutable($row['overallEndDate']) : null, ); } diff --git a/src/Domain/Regulation/RegulationOrder.php b/src/Domain/Regulation/RegulationOrder.php index d5ae628d9..d2f229425 100644 --- a/src/Domain/Regulation/RegulationOrder.php +++ b/src/Domain/Regulation/RegulationOrder.php @@ -4,6 +4,7 @@ namespace App\Domain\Regulation; +use App\Domain\Regulation\Enum\RegulationOrderCategoryEnum; use App\Domain\VisaModel\VisaModel; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; @@ -18,8 +19,6 @@ public function __construct( private string $identifier, private string $category, private string $description, - private ?\DateTimeInterface $startDate, - private ?\DateTimeInterface $endDate = null, private ?string $otherCategoryText = null, private ?VisaModel $visaModel = null, private ?array $additionalVisas = [], @@ -53,14 +52,16 @@ public function getDescription(): string return $this->description; } + // TODO used in DATEX and CIFS exports only, replace with dedicated queries public function getStartDate(): ?\DateTimeInterface { - return $this->startDate; + return new \DateTimeImmutable('2024-10-01'); } + // TODO used in DATEX and CIFS exports only, replace with dedicated queries public function getEndDate(): ?\DateTimeInterface { - return $this->endDate; + return new \DateTimeImmutable('2024-10-02'); } public function getMeasures(): iterable @@ -80,9 +81,10 @@ public function getRegulationOrderRecord(): ?RegulationOrderRecord return $this->regulationOrderRecord; } + // TODO force-set category in migration when regulation order had no endDate public function isPermanent(): bool { - return !$this->endDate; + return $this->category === RegulationOrderCategoryEnum::PERMANENT_REGULATION->value; } public function getVisaModel(): ?VisaModel @@ -104,8 +106,6 @@ public function update( string $identifier, string $category, string $description, - \DateTimeInterface $startDate, - ?\DateTimeInterface $endDate = null, ?string $otherCategoryText = null, array $additionalVisas = [], array $additionalReasons = [], @@ -113,8 +113,6 @@ public function update( $this->identifier = $identifier; $this->category = $category; $this->description = $description; - $this->startDate = $startDate; - $this->endDate = $endDate; $this->otherCategoryText = $otherCategoryText; $this->additionalVisas = $additionalVisas; $this->additionalReasons = $additionalReasons; diff --git a/src/Infrastructure/BacIdf/BacIdfTransformer.php b/src/Infrastructure/BacIdf/BacIdfTransformer.php index ca3bca1db..574fee446 100644 --- a/src/Infrastructure/BacIdf/BacIdfTransformer.php +++ b/src/Infrastructure/BacIdf/BacIdfTransformer.php @@ -68,7 +68,7 @@ public function transform(array $row): BacIdfTransformerResult ]); } - $generalInfo->startDate = new \DateTimeImmutable($date); // $date already contains the timezone (UTC) + $overallStartDate = new \DateTimeImmutable($date); // $date already contains the timezone (UTC) $inseeCode = $row['ARR_COMMUNE']['ARR_INSEE']; $siret = $this->cityProcessor->getSiretFromInseeCode($inseeCode); @@ -150,7 +150,7 @@ public function transform(array $row): BacIdfTransformerResult continue; } - $periodCommands = $this->parsePeriods($circReg, startDate: $generalInfo->startDate); + $periodCommands = $this->parsePeriods($circReg, startDate: $overallStartDate); foreach ($periodCommands as $periodCommand) { $measureCommand->periods[] = $periodCommand; diff --git a/src/Infrastructure/EudonetParis/EudonetParisTransformer.php b/src/Infrastructure/EudonetParis/EudonetParisTransformer.php index 6d7c46aa3..19d62d406 100644 --- a/src/Infrastructure/EudonetParis/EudonetParisTransformer.php +++ b/src/Infrastructure/EudonetParis/EudonetParisTransformer.php @@ -63,26 +63,6 @@ public function transform(array $row, Organization $organization): EudonetParisT return new EudonetParisTransformerResult($command, $errors); } - private function parseDate(string $value): ?\DateTimeInterface - { - if ($date = \DateTimeImmutable::createFromFormat('Y/m/d H:i:s', $value, new \DateTimeZone('Europe/Paris'))) { - return $date; - } - - if (\DateTimeImmutable::createFromFormat('Y/m/d', $value, new \DateTimeZone('Europe/Paris'))) { - // Need to add a datetime otherwise PHP would use the current server time, not midnight. - return $this->parseDate($value . ' 00:00:00'); - } - - if (\DateTimeImmutable::createFromFormat('d/m/Y', $value, new \DateTimeZone('Europe/Paris'))) { - // This format is somtimes used by some Eudonet Paris data input users. - // Again, we need to ensure there is a datetime. - return \DateTimeImmutable::createFromFormat('d/m/Y H:i:s', $value . ' 00:00:00', new \DateTimeZone('Europe/Paris')); - } - - return null; - } - private function buildGeneralInfoCommand(array $row, Organization $organization): array { $command = new SaveRegulationGeneralInfoCommand(); @@ -98,26 +78,6 @@ private function buildGeneralInfoCommand(array $row, Organization $organization) $command->organization = $organization; - $startDate = $this->parseDate($row['fields'][EudonetParisExtractor::ARRETE_DATE_DEBUT]); - - if (!$startDate) { - $error = ['loc' => ['fieldname' => 'ARRETE_DATE_DEBUT'], 'reason' => EudonetParisErrorEnum::PARSING_FAILED->value, 'value' => $row['fields'][EudonetParisExtractor::ARRETE_DATE_DEBUT]]; - - return [null, $error]; - } - - $command->startDate = $startDate; - - $endDate = $this->parseDate($row['fields'][EudonetParisExtractor::ARRETE_DATE_FIN]); - - if (!$endDate) { - $error = ['loc' => ['fieldname' => 'ARRETE_DATE_FIN'], 'reason' => EudonetParisErrorEnum::PARSING_FAILED->value, 'value' => $row['fields'][EudonetParisExtractor::ARRETE_DATE_FIN]]; - - return [null, $error]; - } - - $command->endDate = $endDate; - return [$command, null]; } diff --git a/src/Infrastructure/Form/Regulation/GeneralInfoFormType.php b/src/Infrastructure/Form/Regulation/GeneralInfoFormType.php index 763244b87..e97fe86bc 100644 --- a/src/Infrastructure/Form/Regulation/GeneralInfoFormType.php +++ b/src/Infrastructure/Form/Regulation/GeneralInfoFormType.php @@ -12,7 +12,6 @@ use Symfony\Component\Form\CallbackTransformer; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\CollectionType; -use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\Extension\Core\Type\TextType; @@ -22,7 +21,6 @@ final class GeneralInfoFormType extends AbstractType { public function __construct( - private string $clientTimezone, private EntityManagerInterface $entityManager, ) { } @@ -38,27 +36,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'help' => 'regulation.general_info.identifier.help', ], ) - ->add( - 'startDate', - DateType::class, - options: [ - 'label' => 'regulation.general_info.start_date', - 'help' => 'regulation.general_info.start_date.help', - 'widget' => 'single_text', - 'view_timezone' => $this->clientTimezone, - ], - ) - ->add( - 'endDate', - DateType::class, - options: [ - 'label' => 'regulation.general_info.end_date', - 'help' => 'regulation.general_info.end_date.help', - 'widget' => 'single_text', - 'view_timezone' => $this->clientTimezone, - 'required' => false, - ], - ) ->add( 'organization', ChoiceType::class, diff --git a/src/Infrastructure/JOP/JOPTransformer.php b/src/Infrastructure/JOP/JOPTransformer.php index 656dd69b1..3836aab10 100644 --- a/src/Infrastructure/JOP/JOPTransformer.php +++ b/src/Infrastructure/JOP/JOPTransformer.php @@ -119,9 +119,6 @@ public function transform(array $geoJSON, Organization $organization): ImportJOP $measureCommands[] = $measureCommand; } - $generalInfoCommand->startDate = min($startDates); - $generalInfoCommand->endDate = max($endDates); - return new ImportJOPRegulationCommand($generalInfoCommand, $measureCommands); } } diff --git a/src/Infrastructure/Litteralis/LitteralisTransformer.php b/src/Infrastructure/Litteralis/LitteralisTransformer.php index 721861f65..d9b875293 100644 --- a/src/Infrastructure/Litteralis/LitteralisTransformer.php +++ b/src/Infrastructure/Litteralis/LitteralisTransformer.php @@ -65,7 +65,6 @@ public function transform( $this->setCategory($generalInfoCommand, $properties); $generalInfoCommand->description = $this->buildDescription($properties); $generalInfoCommand->organization = $organization; - $this->setRegulationDates($generalInfoCommand, $properties, $reporter); // (2) Parsing des mesures et leur contenu @@ -163,38 +162,6 @@ private function parseRegulationParameters(array $properties): array return $parameters; } - private function setRegulationDates(SaveRegulationGeneralInfoCommand $command, array $properties, Reporter $reporter): void - { - $startDate = \DateTimeImmutable::createFromFormat(\DateTimeInterface::ISO8601, $properties['arretedebut']); - - if ($startDate) { - $command->startDate = $startDate; - } else { - $reporter->addError(LitteralisRecordEnum::ERROR_REGULATION_START_DATE_PARSING_FAILED->value, [ - CommonRecordEnum::ATTR_REGULATION_ID->value => $properties['arretesrcid'], - CommonRecordEnum::ATTR_URL->value => $properties['shorturl'], - 'arretedebut' => $properties['arretedebut'], - ]); - } - - if ($properties['arretefin'] === null) { - // It's a temporary regulation - return; - } - - $endDate = \DateTimeImmutable::createFromFormat(\DateTimeInterface::ISO8601, $properties['arretefin']); - - if ($endDate) { - $command->endDate = $endDate; - } else { - $reporter->addError(LitteralisRecordEnum::ERROR_REGULATION_END_DATE_PARSING_FAILED->value, [ - CommonRecordEnum::ATTR_REGULATION_ID->value => $properties['arretesrcid'], - CommonRecordEnum::ATTR_URL->value => $properties['shorturl'], - 'arretefin' => $properties['arretefin'], - ]); - } - } - private function parseLocation(array $feature): SaveLocationCommand { $properties = $feature['properties']; diff --git a/src/Infrastructure/Persistence/Doctrine/Fixtures/RegulationOrderFixture.php b/src/Infrastructure/Persistence/Doctrine/Fixtures/RegulationOrderFixture.php index dfebfc08e..59445ce94 100644 --- a/src/Infrastructure/Persistence/Doctrine/Fixtures/RegulationOrderFixture.php +++ b/src/Infrastructure/Persistence/Doctrine/Fixtures/RegulationOrderFixture.php @@ -21,8 +21,6 @@ public function load(ObjectManager $manager): void identifier: self::TYPICAL_IDENTIFIER, category: RegulationOrderCategoryEnum::EVENT->value, description: 'Description 1', - startDate: new \DateTimeImmutable('2023-03-13'), - endDate: new \DateTimeImmutable('2023-03-15'), ); $publishedRegulationOrder = new RegulationOrder( @@ -30,8 +28,6 @@ public function load(ObjectManager $manager): void identifier: 'FO2/2023', category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, description: 'Description 2', - startDate: new \DateTimeImmutable('2023-03-10'), - endDate: new \DateTimeImmutable('2023-03-20'), ); $regulationOrderDuplicate = new RegulationOrder( @@ -39,8 +35,6 @@ public function load(ObjectManager $manager): void identifier: 'FO2/2023-1', category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, description: 'Description 2', - startDate: new \DateTimeImmutable('2023-03-10'), - endDate: new \DateTimeImmutable('2023-03-20'), ); $regulationOrderPermanent = new RegulationOrder( @@ -48,8 +42,6 @@ public function load(ObjectManager $manager): void identifier: 'FO3/2023', category: RegulationOrderCategoryEnum::PERMANENT_REGULATION->value, description: 'Description 3', - startDate: new \DateTimeImmutable('2023-03-11'), - endDate: null, ); $otherOrgRegulationOrder = new RegulationOrder( @@ -57,8 +49,6 @@ public function load(ObjectManager $manager): void identifier: 'FO4/2023', category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, description: 'Description 4', - startDate: null, // Simulate a regulation order before migration - endDate: null, ); $fullCityRegulationOrder = new RegulationOrder( @@ -66,8 +56,6 @@ public function load(ObjectManager $manager): void identifier: 'F2023/full-city', category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, description: 'Description 2', - startDate: new \DateTimeImmutable('2023-03-11'), - endDate: new \DateTimeImmutable('2023-03-21'), ); $regulationOrderNoLocations = new RegulationOrder( @@ -76,8 +64,6 @@ public function load(ObjectManager $manager): void description: 'Description 5 that is very long and will be truncated', category: RegulationOrderCategoryEnum::OTHER->value, otherCategoryText: 'Dérogation préfectorale', - startDate: new \DateTimeImmutable('2023-07-13'), - endDate: new \DateTimeImmutable('2023-07-15'), ); $regulationOrderNoMeasures = new RegulationOrder( @@ -85,8 +71,6 @@ public function load(ObjectManager $manager): void identifier: 'FO14/2023', description: 'No measures', category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, - startDate: new \DateTimeImmutable('2023-01-13'), - endDate: new \DateTimeImmutable('2023-01-15'), ); $regulationOrderCifs = new RegulationOrder( @@ -94,8 +78,6 @@ public function load(ObjectManager $manager): void identifier: self::IDENTIFIER_CIFS, category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, description: 'Arrêté exporté vers CIFS', - startDate: new \DateTimeImmutable('2023-06-02'), - endDate: new \DateTimeImmutable('2023-06-10'), ); $outDatedRegulationOrderCifs = new RegulationOrder( @@ -103,8 +85,6 @@ public function load(ObjectManager $manager): void identifier: 'F/OUTDATED/CIFS/2021', category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, description: 'Arrêté exporté vers CIFS', - startDate: new \DateTimeImmutable('2021-06-02'), - endDate: new \DateTimeImmutable('2021-06-10'), ); $rawGeoJSONRegulationOrder = new RegulationOrder( @@ -112,8 +92,6 @@ public function load(ObjectManager $manager): void identifier: 'F2024/RAWGEOJSON', category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, description: 'Arrêté avec données brutes GeoJSON', - startDate: new \DateTimeImmutable('2020-06-02'), - endDate: new \DateTimeImmutable('2020-06-10'), ); $litteralisRegulationOrder = new RegulationOrder( @@ -121,8 +99,6 @@ public function load(ObjectManager $manager): void identifier: '117374#24-A-0473', category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, description: 'Arrêté de voirie (URL : https://dl.sogelink.fr/?iX5UN3GL)', - startDate: new \DateTimeImmutable('2023-06-03'), - endDate: new \DateTimeImmutable('2023-11-10'), ); $manager->persist($typicalRegulationOrder); diff --git a/src/Infrastructure/Persistence/Doctrine/Mapping/Regulation.RegulationOrder.orm.xml b/src/Infrastructure/Persistence/Doctrine/Mapping/Regulation.RegulationOrder.orm.xml index c4e12df77..1988ec5ec 100644 --- a/src/Infrastructure/Persistence/Doctrine/Mapping/Regulation.RegulationOrder.orm.xml +++ b/src/Infrastructure/Persistence/Doctrine/Mapping/Regulation.RegulationOrder.orm.xml @@ -3,16 +3,11 @@ - - - - - diff --git a/src/Infrastructure/Persistence/Doctrine/Migrations/Version20241016130817.php b/src/Infrastructure/Persistence/Doctrine/Migrations/Version20241016130817.php new file mode 100644 index 000000000..d31fe03e9 --- /dev/null +++ b/src/Infrastructure/Persistence/Doctrine/Migrations/Version20241016130817.php @@ -0,0 +1,39 @@ +addSql( + 'INSERT INTO period (uuid, measure_uuid, start_datetime, end_datetime, recurrence_type) + SELECT + uuid_generate_v4() AS uuid, + m.uuid as measure_uuid, + ro.start_date AS start_datetime, + ro.end_date + interval \'23 hours 59 minutes\' AS end_datetime, + \'everyDay\' AS recurrence_type + FROM measure AS m + INNER JOIN regulation_order AS ro ON ro.uuid = m.regulation_order_uuid + WHERE NOT EXISTS (SELECT 1 FROM period AS _p WHERE _p.measure_uuid = m.uuid) + ', ); + + $this->addSql('ALTER TABLE regulation_order DROP COLUMN start_date'); + $this->addSql('ALTER TABLE regulation_order DROP COLUMN end_date'); + } + + public function down(Schema $schema): void + { + } +} diff --git a/src/Infrastructure/Persistence/Doctrine/Repository/Regulation/RegulationOrderRecordRepository.php b/src/Infrastructure/Persistence/Doctrine/Repository/Regulation/RegulationOrderRecordRepository.php index bafb2d278..a74b24695 100644 --- a/src/Infrastructure/Persistence/Doctrine/Repository/Regulation/RegulationOrderRecordRepository.php +++ b/src/Infrastructure/Persistence/Doctrine/Repository/Regulation/RegulationOrderRecordRepository.php @@ -29,6 +29,20 @@ public function __construct( parent::__construct($registry, RegulationOrderRecord::class); } + private const OVERALL_START_DATE_QUERY_TEMPLATE = ' + SELECT MIN(_p%%n.startDateTime) + FROM App\Domain\Condition\Period\Period _p%%n + INNER JOIN _p%%n.measure _m%%n + INNER JOIN _m%%n.regulationOrder _ro%%n + WHERE _ro%%n.uuid = ro.uuid'; + + private const OVERALL_END_DATE_QUERY_TEMPLATE = ' + SELECT MAX(_p%%n.endDateTime) + FROM App\Domain\Condition\Period\Period _p%%n + INNER JOIN _p%%n.measure _m%%n + INNER JOIN _m%%n.regulationOrder _ro%%n + WHERE _ro%%n.uuid = ro.uuid'; + private const COUNT_LOCATIONS_QUERY = ' SELECT count(DISTINCT(_loc.uuid)) FROM App\Domain\Regulation\Location\Location _loc @@ -70,7 +84,9 @@ public function findAllRegulations( RegulationListFiltersDTO $dto, ): array { $query = $this->createQueryBuilder('roc') - ->select('roc.uuid, ro.identifier, roc.status, o.name as organizationName, o.uuid as organizationUuid, ro.startDate, ro.endDate') + ->select('roc.uuid, ro.identifier, roc.status, o.name as organizationName, o.uuid as organizationUuid') + ->addSelect(\sprintf('(%s) AS overallStartDate', str_replace('%%n', '10', self::OVERALL_START_DATE_QUERY_TEMPLATE))) + ->addSelect(\sprintf('(%s) AS overallEndDate', str_replace('%%n', '11', self::OVERALL_START_DATE_QUERY_TEMPLATE))) ->addSelect(\sprintf('(%s) as nbLocations', self::COUNT_LOCATIONS_QUERY)) ->addSelect(\sprintf('(%s) as namedStreet', self::GET_NAMED_STREET_QUERY)) ->addSelect(\sprintf('(%s) as numberedRoad', self::GET_NUMBERED_ROAD_QUERY)) @@ -97,10 +113,10 @@ public function findAllRegulations( // Regulation order type filter if ($dto->regulationOrderType === RegulationOrderTypeEnum::PERMANENT->value) { $query - ->andWhere('ro.endDate IS NULL'); + ->andWhere(\sprintf('NOT EXISTS (%s)', str_replace('%%n', '12', self::OVERALL_END_DATE_QUERY_TEMPLATE))); } elseif ($dto->regulationOrderType === RegulationOrderTypeEnum::TEMPORARY->value) { $query - ->andWhere('ro.endDate IS NOT NULL'); + ->andWhere(\sprintf('EXISTS (%s)', str_replace('%%n', '12', self::OVERALL_END_DATE_QUERY_TEMPLATE))); } // Status filter @@ -119,7 +135,7 @@ public function findAllRegulations( $query ->innerJoin('roc.organization', 'o') ->innerJoin('roc.regulationOrder', 'ro') - ->orderBy('ro.startDate', 'DESC') + ->orderBy('overallEndDate', 'DESC') ->addOrderBy('ro.identifier', 'ASC') ->addGroupBy('ro, roc, o') ->setFirstResult($dto->pageSize * ($dto->page - 1)) @@ -181,19 +197,20 @@ public function findGeneralInformation(string $uuid): ?array return $this->createQueryBuilder('roc') ->select( \sprintf( - 'NEW %s( + ' roc.uuid, ro.identifier, - org.name, - org.uuid, + org.name as organizationName, + org.uuid as organizationUuid, roc.status, ro.category, ro.otherCategoryText, ro.description, - ro.startDate, - ro.endDate - )', - GeneralInfoView::class, + (%s) as overallStartDate, + (%s) as overallEndDate + ', + str_replace('%%n', '10', self::OVERALL_START_DATE_QUERY_TEMPLATE), + str_replace('%%n', '11', self::OVERALL_END_DATE_QUERY_TEMPLATE), ), ) ->where('roc.uuid = :uuid') @@ -201,7 +218,7 @@ public function findGeneralInformation(string $uuid): ?array ->innerJoin('roc.organization', 'org') ->innerJoin('roc.regulationOrder', 'ro') ->getQuery() - ->getResult() + ->getOneOrNullResult() ; } @@ -261,7 +278,7 @@ public function findRegulationOrdersForCifsIncidentFormat( ->leftJoin('p.timeSlots', 't') ->where( 'roc.status = :status', - 'ro.endDate >= :today', + \sprintf('%s >= :today', str_replace('%%n', '10', self::OVERALL_END_DATE_QUERY_TEMPLATE)), 'loc.geometry IS NOT NULL', 'loc.roadType NOT IN (:excludedRoadTypes) OR (loc.roadType = :rawGeoJSONRoadType AND roc.source = :litteralisSource)', $allowedSources ? 'roc.source in (:allowedSources)' : null, diff --git a/src/Infrastructure/Validator/SaveRegulationGeneralInfoCommandConstraintValidator.php b/src/Infrastructure/Validator/SaveRegulationGeneralInfoCommandConstraintValidator.php index 152adb5a3..92bb5ef72 100644 --- a/src/Infrastructure/Validator/SaveRegulationGeneralInfoCommandConstraintValidator.php +++ b/src/Infrastructure/Validator/SaveRegulationGeneralInfoCommandConstraintValidator.php @@ -13,7 +13,6 @@ final class SaveRegulationGeneralInfoCommandConstraintValidator extends ConstraintValidator { public function __construct( - private string $clientTimezone, private DoesOrganizationAlreadyHaveRegulationOrderWithThisIdentifier $doesOrganizationAlreadyHaveRegulationOrderWithThisIdentifier, ) { } @@ -38,16 +37,5 @@ public function validate(mixed $command, Constraint $constraint): void ->addViolation(); } } - - if ($command->endDate !== null && $command->endDate < $command->startDate) { - $viewStartDate = \DateTimeImmutable::createFromInterface($command->startDate) - ->setTimezone(new \DateTimeZone($this->clientTimezone)) - ->format('d/m/Y'); - - $this->context->buildViolation('regulation.error.end_date_before_start_date') - ->setParameter('{{ compared_value }}', $viewStartDate) - ->atPath('endDate') - ->addViolation(); - } } } diff --git a/templates/regulation/_general_info_form.html.twig b/templates/regulation/_general_info_form.html.twig index df1cc69aa..a166575e1 100644 --- a/templates/regulation/_general_info_form.html.twig +++ b/templates/regulation/_general_info_form.html.twig @@ -56,8 +56,6 @@ {{ form_row(form.description, {group_class: 'fr-input-group', attr: {class: 'fr-input'}, help_attr: {class: 'fr-hint-text'}}) }} - {{ form_row(form.startDate, {group_class: 'fr-input-group', widget_class: 'fr-input', row_attr: {class: 'fr-col-12 fr-col-sm-6 fr-col-lg-5'}}) }} - {{ form_row(form.endDate, {group_class: 'fr-input-group', widget_class: 'fr-input', row_attr: {class: 'fr-col-12 fr-col-sm-6 fr-col-lg-5'}}) }}

{{ 'regulation.general_info.visas_and_reasons.description'|trans }}

diff --git a/templates/regulation/_overall_period.html.twig b/templates/regulation/_overall_period.html.twig index 47472b672..cfa7fb16e 100644 --- a/templates/regulation/_overall_period.html.twig +++ b/templates/regulation/_overall_period.html.twig @@ -1,12 +1,17 @@ {% set startDate = generalInfo.startDate %} {% set endDate = generalInfo.endDate %} -{% set isFuture = app_is_client_future_day(startDate) %} -{% if startDate and endDate %} - {{ 'common.date.from'|trans({ '%date%': app_datetime(startDate) })|capitalize }} - {{ 'common.date.to'|trans({ '%date%': app_datetime(endDate) }) }} -{% elseif isFuture %} - {{ 'common.date.starting'|trans({'%date%': app_datetime(startDate) })|capitalize }} +{% if startDate %} + {% set isFuture = app_is_client_future_day(startDate) %} + + {% if startDate and endDate %} + {{ 'common.date.from'|trans({ '%date%': app_datetime(startDate) })|capitalize }} + {{ 'common.date.to'|trans({ '%date%': app_datetime(endDate) }) }} + {% elseif isFuture %} + {{ 'common.date.starting'|trans({'%date%': app_datetime(startDate) })|capitalize }} + {% else %} + {{ 'common.date.since'|trans({'%date%': app_datetime(startDate) })|capitalize }} + {% endif %} {% else %} - {{ 'common.date.since'|trans({'%date%': app_datetime(startDate) })|capitalize }} + {{ 'regulation.overall_period.tbd'|trans }} {% endif %} diff --git a/tests/Unit/Application/Regulation/Command/DuplicateRegulationCommandHandlerTest.php b/tests/Unit/Application/Regulation/Command/DuplicateRegulationCommandHandlerTest.php index f69d354c2..66f9bd78f 100644 --- a/tests/Unit/Application/Regulation/Command/DuplicateRegulationCommandHandlerTest.php +++ b/tests/Unit/Application/Regulation/Command/DuplicateRegulationCommandHandlerTest.php @@ -315,8 +315,6 @@ public function testRegulationFullyDuplicated(): void $generalInfoCommand->identifier = 'F01/2023-1'; $generalInfoCommand->description = 'Description'; $generalInfoCommand->category = RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value; - $generalInfoCommand->startDate = $startDate; - $generalInfoCommand->endDate = $endDate; $generalInfoCommand->organization = $originalOrganization; $generalInfoCommand->additionalVisas = ['Vu 1']; $generalInfoCommand->additionalReasons = ['Motif 1']; diff --git a/tests/Unit/Application/Regulation/Command/SaveRegulationGeneralInfoCommandHandlerTest.php b/tests/Unit/Application/Regulation/Command/SaveRegulationGeneralInfoCommandHandlerTest.php index 2717cd63d..6d70e1804 100644 --- a/tests/Unit/Application/Regulation/Command/SaveRegulationGeneralInfoCommandHandlerTest.php +++ b/tests/Unit/Application/Regulation/Command/SaveRegulationGeneralInfoCommandHandlerTest.php @@ -35,8 +35,6 @@ public function setUp(): void public function testCreate(): void { $now = new \DateTimeImmutable('2022-01-09'); - $start = new \DateTimeImmutable('2023-03-13'); - $end = new \DateTimeImmutable('2023-03-15'); $this->idFactory ->expects(self::exactly(2)) @@ -59,8 +57,6 @@ public function testCreate(): void identifier: 'FO2/2023', category: RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value, description: 'Interdiction de circuler', - startDate: $start, - endDate: $end, ), ), ) @@ -94,8 +90,6 @@ public function testCreate(): void $command->identifier = 'FO2/2023'; $command->category = RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value; $command->description = 'Interdiction de circuler'; - $command->startDate = $start; - $command->endDate = $end; $command->organization = $this->organization; $result = $handler($command); @@ -106,8 +100,6 @@ public function testCreate(): void public function testUpdate(): void { $now = new \DateTimeImmutable('2022-01-09'); - $start = new \DateTimeImmutable('2023-03-13'); - $end = new \DateTimeImmutable('2023-03-15'); $organization = $this->createMock(Organization::class); $this->idFactory @@ -135,8 +127,6 @@ public function testUpdate(): void 'FO2/2030', RegulationOrderCategoryEnum::OTHER->value, 'Interdiction de circuler', - new \DateTimeImmutable('2023-03-13'), - new \DateTimeImmutable('2023-03-15'), 'Trou en formation', ); @@ -162,8 +152,6 @@ public function testUpdate(): void $command->organization = $organization; $command->category = RegulationOrderCategoryEnum::OTHER->value; $command->description = 'Interdiction de circuler'; - $command->startDate = $start; - $command->endDate = $end; $command->otherCategoryText = 'Trou en formation'; $result = $handler($command); diff --git a/tests/Unit/Application/Regulation/Command/SaveRegulationGeneralInfoCommandTest.php b/tests/Unit/Application/Regulation/Command/SaveRegulationGeneralInfoCommandTest.php index 517c5f256..d9a0e421a 100644 --- a/tests/Unit/Application/Regulation/Command/SaveRegulationGeneralInfoCommandTest.php +++ b/tests/Unit/Application/Regulation/Command/SaveRegulationGeneralInfoCommandTest.php @@ -22,8 +22,6 @@ public function testWithoutRegulationOrderRecord(): void $this->assertSame(RegulationOrderRecordSourceEnum::DIALOG->value, $command->source); $this->assertEmpty($command->organization); $this->assertEmpty($command->description); - $this->assertEmpty($command->startDate); - $this->assertEmpty($command->endDate); } public function testWithRegulationOrderRecord(): void @@ -43,16 +41,6 @@ public function testWithRegulationOrderRecord(): void ->method('getDescription') ->willReturn('Description'); - $regulationOrder - ->expects(self::once()) - ->method('getStartDate') - ->willReturn($start); - - $regulationOrder - ->expects(self::once()) - ->method('getEndDate') - ->willReturn($end); - $regulationOrderRecord = $this->createMock(RegulationOrderRecord::class); $regulationOrderRecord ->expects(self::once()) @@ -74,8 +62,6 @@ public function testWithRegulationOrderRecord(): void $this->assertSame($command->identifier, 'F02/2023'); $this->assertSame('my_source', $command->source); $this->assertSame($command->description, 'Description'); - $this->assertSame($command->startDate, $start); - $this->assertSame($command->endDate, $end); $this->assertSame($command->organization, $organization); } diff --git a/tests/Unit/Domain/Regulation/RegulationOrderTest.php b/tests/Unit/Domain/Regulation/RegulationOrderTest.php index f60cda99f..abbdf022c 100644 --- a/tests/Unit/Domain/Regulation/RegulationOrderTest.php +++ b/tests/Unit/Domain/Regulation/RegulationOrderTest.php @@ -15,8 +15,6 @@ final class RegulationOrderTest extends TestCase { public function testGetters(): void { - $start = new \DateTimeImmutable('2023-03-13'); - $end = new \DateTimeImmutable('2023-03-15'); $visaModel = $this->createMock(VisaModel::class); $regulationOrder = new RegulationOrder( @@ -24,8 +22,6 @@ public function testGetters(): void identifier: 'F02/2023', category: RegulationOrderCategoryEnum::EVENT->value, description: 'Arrêté temporaire portant réglementation de la circulation sur : Routes Départementales N° 3-93, Voie communautaire de la Colleraye', - startDate: $start, - endDate: $end, otherCategoryText: null, visaModel: $visaModel, additionalVisas: ['vu que 1'], @@ -36,8 +32,6 @@ public function testGetters(): void $this->assertSame('F02/2023', $regulationOrder->getIdentifier()); $this->assertSame(RegulationOrderCategoryEnum::EVENT->value, $regulationOrder->getCategory()); $this->assertSame('Arrêté temporaire portant réglementation de la circulation sur : Routes Départementales N° 3-93, Voie communautaire de la Colleraye', $regulationOrder->getDescription()); - $this->assertSame($start, $regulationOrder->getStartDate()); - $this->assertSame($end, $regulationOrder->getEndDate()); $this->assertEmpty($regulationOrder->getMeasures()); // Automatically set by Doctrine $this->assertEmpty($regulationOrder->getRegulationOrderRecord()); // Automatically set by Doctrine $this->assertEmpty($regulationOrder->getOtherCategoryText()); @@ -49,9 +43,6 @@ public function testGetters(): void public function testUpdate(): void { - $start = new \DateTime('2023-03-13'); - $newStart = new \DateTime('2023-03-13'); - $end = new \DateTimeImmutable('2023-03-15'); $measure1 = $this->createMock(Measure::class); $measure2 = $this->createMock(Measure::class); @@ -60,24 +51,18 @@ public function testUpdate(): void identifier: 'F02/2023', category: RegulationOrderCategoryEnum::EVENT->value, description: 'Arrêté temporaire portant réglementation de la circulation sur : Routes Départementales N° 3-93, Voie communautaire de la Colleraye', - startDate: $start, - endDate: null, ); $regulationOrder->update( identifier: 'F01/2023', category: RegulationOrderCategoryEnum::OTHER->value, description: 'Arrêté temporaire', - startDate: $newStart, - endDate: $end, otherCategoryText: 'Trou en formation', ); $this->assertSame('F01/2023', $regulationOrder->getIdentifier()); $this->assertSame(RegulationOrderCategoryEnum::OTHER->value, $regulationOrder->getCategory()); $this->assertSame('Arrêté temporaire', $regulationOrder->getDescription()); - $this->assertSame($newStart, $regulationOrder->getStartDate()); - $this->assertSame($end, $regulationOrder->getEndDate()); $this->assertSame('Trou en formation', $regulationOrder->getOtherCategoryText()); $regulationOrder->addMeasure($measure1); diff --git a/tests/Unit/Infrastructure/BacIdf/BacIdfTransformerTest.php b/tests/Unit/Infrastructure/BacIdf/BacIdfTransformerTest.php index 5e7b590b7..a73a9de63 100644 --- a/tests/Unit/Infrastructure/BacIdf/BacIdfTransformerTest.php +++ b/tests/Unit/Infrastructure/BacIdf/BacIdfTransformerTest.php @@ -63,8 +63,6 @@ public function testTransform(): void $generalInfoCommand->identifier = '15.248-circ'; $generalInfoCommand->category = RegulationOrderCategoryEnum::PERMANENT_REGULATION->value; $generalInfoCommand->description = 'Circulation passage Pierre Curie'; - $generalInfoCommand->startDate = new \DateTimeImmutable('2015-08-17 00:00'); - $generalInfoCommand->endDate = null; $locationCommand = new SaveLocationCommand(); $locationCommand->roadType = RoadTypeEnum::LANE->value; @@ -175,8 +173,6 @@ public function testTransformMinimal(): void $generalInfoCommand->identifier = 'arr_1'; $generalInfoCommand->category = RegulationOrderCategoryEnum::PERMANENT_REGULATION->value; $generalInfoCommand->description = 'nom_1'; - $generalInfoCommand->startDate = new \DateTimeImmutable('2024-02-06 17:25:00'); - $generalInfoCommand->endDate = null; $locationCommand = new SaveLocationCommand(); $locationCommand->roadType = RoadTypeEnum::LANE->value; @@ -589,8 +585,6 @@ private function doTestTransform(callable $callback): void $generalInfoCommand->identifier = 'arr_1'; $generalInfoCommand->category = RegulationOrderCategoryEnum::PERMANENT_REGULATION->value; $generalInfoCommand->description = 'nom_1'; - $generalInfoCommand->startDate = new \DateTimeImmutable('2024-02-06 17:25:00'); - $generalInfoCommand->endDate = null; $locationCommand = new SaveLocationCommand(); $locationCommand->roadType = RoadTypeEnum::LANE->value; diff --git a/tests/Unit/Infrastructure/EudonetParis/EudonetParisTransformerTest.php b/tests/Unit/Infrastructure/EudonetParis/EudonetParisTransformerTest.php index 0c458ffa4..eeb083f7c 100644 --- a/tests/Unit/Infrastructure/EudonetParis/EudonetParisTransformerTest.php +++ b/tests/Unit/Infrastructure/EudonetParis/EudonetParisTransformerTest.php @@ -81,8 +81,6 @@ public function testTransform(): void $generalInfoCommand->otherCategoryText = 'Temporaire'; $generalInfoCommand->description = str_repeat('a', 255); $generalInfoCommand->organization = $organization; - $generalInfoCommand->startDate = new \DateTimeImmutable('2023-06-05 14:30:00 Europe/Paris'); - $generalInfoCommand->endDate = new \DateTimeImmutable('2023-07-12 18:00:00 Europe/Paris'); $locationCommand1 = new SaveLocationCommand(); $locationCommand1->roadType = 'lane'; @@ -129,53 +127,6 @@ private function provideDateParsing(): array ]; } - /** @dataProvider provideDateParsing */ - public function testDateParsing($startDateValue): void - { - $organization = $this->createMock(Organization::class); - - $record = [ - 'fields' => [ - EudonetParisExtractor::ARRETE_ID => '20230514-1', - EudonetParisExtractor::ARRETE_DATE_DEBUT => $startDateValue, - EudonetParisExtractor::ARRETE_DATE_FIN => '2023/07/12 18:00:00', - EudonetParisExtractor::ARRETE_TYPE => 'Temporaire', - EudonetParisExtractor::ARRETE_COMPLEMENT_DE_TITRE => str_repeat('a', 256), - ], - 'measures' => [ - [ - 'fields' => [ - EudonetParisExtractor::MESURE_ID => 'mesure1', - EudonetParisExtractor::MESURE_NOM => 'circulation interdite', - EudonetParisExtractor::MESURE_ALINEA => '', - ], - 'locations' => [ - [ - 'fields' => [ - EudonetParisExtractor::LOCALISATION_ID => 'localisation1', - EudonetParisExtractor::LOCALISATION_PORTE_SUR => 'La totalité de la voie', - EudonetParisExtractor::LOCALISATION_ARRONDISSEMENT => '18ème Arrondissement', - EudonetParisExtractor::LOCALISATION_LIBELLE_VOIE => 'Rue Eugène Berthoud', - EudonetParisExtractor::LOCALISATION_LIBELLE_VOIE_DEBUT => null, - EudonetParisExtractor::LOCALISATION_LIBELLE_VOIE_FIN => null, - EudonetParisExtractor::LOCALISATION_N_ADRESSE_DEBUT => null, - EudonetParisExtractor::LOCALISATION_N_ADRESSE_FIN => null, - ], - ], - ], - ], - ], - ]; - - $transformer = new EudonetParisTransformer(); - $result = $transformer->transform($record, $organization); - - $this->assertEquals( - \DateTimeImmutable::createFromFormat('Y-m-d H:i:s', '2023-12-14 00:00:00', new \DateTimeZone('Europe/Paris')), - $result->command->generalInfoCommand->startDate, - ); - } - public function testSkipNoMeasures(): void { $organization = $this->createMock(Organization::class); diff --git a/tests/Unit/Infrastructure/JOP/JOPTransformerTest.php b/tests/Unit/Infrastructure/JOP/JOPTransformerTest.php index 478bc9a2b..8ffa7503d 100644 --- a/tests/Unit/Infrastructure/JOP/JOPTransformerTest.php +++ b/tests/Unit/Infrastructure/JOP/JOPTransformerTest.php @@ -96,8 +96,6 @@ public function testTransform(): void $generalInfoCommand->category = RegulationOrderCategoryEnum::EVENT->value; $generalInfoCommand->description = 'Description arrêté JOP'; $generalInfoCommand->organization = $organization; - $generalInfoCommand->startDate = new \DateTimeImmutable('2024-09-08 05:30:00 Europe/Paris'); - $generalInfoCommand->endDate = new \DateTimeImmutable('2024-09-12 11:00:00 Europe/Paris'); $locationCommand1 = new SaveLocationCommand(); $locationCommand1->roadType = RoadTypeEnum::RAW_GEOJSON->value; diff --git a/tests/Unit/Infrastructure/Litteralis/LitteralisTransformerTest.php b/tests/Unit/Infrastructure/Litteralis/LitteralisTransformerTest.php index 745359611..3fd2413e2 100644 --- a/tests/Unit/Infrastructure/Litteralis/LitteralisTransformerTest.php +++ b/tests/Unit/Infrastructure/Litteralis/LitteralisTransformerTest.php @@ -70,8 +70,6 @@ public function testTransformRealWorldExample(): void $generalInfo->identifier = $identifier; $generalInfo->category = RegulationOrderCategoryEnum::ROAD_MAINTENANCE->value; $generalInfo->description = "de chargement d'engin de chantier (URL : https://dl.sogelink.fr/?0dbjHha7)"; - $generalInfo->startDate = new \DateTimeImmutable('2024-03-18T01:00:00Z'); - $generalInfo->endDate = new \DateTimeImmutable('2024-03-19T01:00:00Z'); $generalInfo->organization = $this->organization; $measureCommands = []; diff --git a/tests/Unit/Infrastructure/Validation/SaveRegulationGeneralInfoCommandConstraintValidatorTest.php b/tests/Unit/Infrastructure/Validation/SaveRegulationGeneralInfoCommandConstraintValidatorTest.php index 5aee8bcb5..29b97266c 100644 --- a/tests/Unit/Infrastructure/Validation/SaveRegulationGeneralInfoCommandConstraintValidatorTest.php +++ b/tests/Unit/Infrastructure/Validation/SaveRegulationGeneralInfoCommandConstraintValidatorTest.php @@ -43,54 +43,13 @@ public function testUnexpectedValue(): void $this->validator->validate('not a command instance', $this->constraintObj); } - public function provideValidCases(): array - { - return [ - [ - // Start date only - 'startDate' => '2023-03-12', - 'endDate' => '', - ], - [ - // End date after start date - 'startDate' => '2023-03-12', - 'endDate' => '2023-03-13', - ], - [ - // Same day - 'startDate' => '2023-03-12', - 'endDate' => '2023-03-12', - ], - ]; - } - - /** - * @dataProvider provideValidCases - */ - public function testValid(string $startDate, string $endDate): void + public function testValid(): void { $command = new SaveRegulationGeneralInfoCommand($this->regulationOrderRecord); - $command->startDate = new \DateTimeImmutable($startDate); - $command->endDate = $endDate ? new \DateTimeImmutable($endDate) : null; $command->identifier = 'F01/2023'; $command->organization = $this->organization; $this->validator->validate($command, $this->constraintObj); $this->assertNoViolation(); } - - public function testInvalidEndDateBeforeStartDate(): void - { - $command = new SaveRegulationGeneralInfoCommand($this->regulationOrderRecord); - $command->startDate = new \DateTimeImmutable('2023-03-12'); - $command->endDate = new \DateTimeImmutable('2023-03-11'); - $command->identifier = 'F01/2023'; - $command->organization = $this->organization; - - $this->validator->validate($command, $this->constraintObj); - $this->buildViolation('regulation.error.end_date_before_start_date') - ->setParameter('{{ compared_value }}', '12/03/2023') - ->atPath('property.path.endDate') - ->assertRaised(); - } } diff --git a/translations/messages.fr.xlf b/translations/messages.fr.xlf index abc899b30..d872e58ec 100644 --- a/translations/messages.fr.xlf +++ b/translations/messages.fr.xlf @@ -501,21 +501,9 @@ Décrivez brièvement les raisons de la perturbation. (Exemple : "travaux sur la voie") - - regulation.general_info.start_date - Date de début - - - regulation.general_info.start_date.help - Début d'effet de l'arrêté - - - regulation.general_info.end_date - Date de fin - - - regulation.general_info.end_date.help - Laisser vide si l'arrêté est permanent. + + regulation.overall_period.tbd + Dates à définir regulation.location.type diff --git a/translations/validators.fr.xlf b/translations/validators.fr.xlf index 2c0915a2b..bf80bd9d0 100644 --- a/translations/validators.fr.xlf +++ b/translations/validators.fr.xlf @@ -34,10 +34,6 @@ regulation.detail.regulation_cant_be_published ]]>La réglementation ne peut pas être publiée. Vérifiez qu'elle a correctement été créée.]]> - - regulation.error.end_date_before_start_date - La date de fin doit être après le {{ compared_value }}. - regulation.step1.error.identifier L'identifiant est déjà utilisé sur un autre arrêté.