feat: Permettre l'import d'élèves via fichier CSV ou XLSX
L'import manuel élève par élève est fastidieux pour les établissements qui gèrent des centaines d'élèves. Un wizard d'import en 4 étapes (upload → mapping → preview → confirmation) permet de traiter un fichier complet en une seule opération, avec détection automatique du format (Pronote, École Directe) et validation avant import. L'import est traité de manière asynchrone via Messenger pour ne pas bloquer l'interface, avec suivi de progression en temps réel et réutilisation des mappings entre imports successifs.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Administration\Domain\Exception;
|
||||
|
||||
use App\Administration\Domain\Model\Import\ImportBatchId;
|
||||
use App\Administration\Domain\Model\Import\ImportStatus;
|
||||
use DomainException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
final class ImportNonDemarrableException extends DomainException
|
||||
{
|
||||
public static function pourStatut(ImportBatchId $batchId, ImportStatus $status): self
|
||||
{
|
||||
return new self(sprintf(
|
||||
'L\'import "%s" ne peut pas être démarré depuis le statut "%s".',
|
||||
$batchId,
|
||||
$status->value,
|
||||
));
|
||||
}
|
||||
|
||||
public static function mappingManquant(ImportBatchId $batchId): self
|
||||
{
|
||||
return new self(sprintf(
|
||||
'L\'import "%s" ne peut pas être démarré sans mapping de colonnes.',
|
||||
$batchId,
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user