Commit 6f1cc2ec authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Auto-synchronisation de la fiche intervenant lors de la validation des données personnelles

parent 045a3ca8
......@@ -6,6 +6,7 @@ use Application\Controller\DossierController;
use Application\Controller\IntervenantDossierController;
use Psr\Container\ContainerInterface;
use UnicaenAuth\Service\UserContext;
use UnicaenImport\Processus\ImportProcessus;
class IntervenantDossierControllerFactory
{
......@@ -25,6 +26,8 @@ class IntervenantDossierControllerFactory
$controller->setServiceUserContext($userContextService);
$controller->setProcessusImport($container->get(ImportProcessus::class));
return $controller;
}
......
......@@ -20,6 +20,7 @@ use Application\Service\Traits\WorkflowServiceAwareTrait;
use UnicaenApp\Util;
use UnicaenApp\View\Model\MessengerViewModel;
use UnicaenAuth\Service\Traits\UserContextServiceAwareTrait;
use UnicaenImport\Processus\Traits\ImportProcessusAwareTrait;
class IntervenantDossierController extends AbstractController
......@@ -38,6 +39,7 @@ class IntervenantDossierController extends AbstractController
use IntervenantServiceAwareTrait;
use AnneeServiceAwareTrait;
use StatutIntervenantServiceAwareTrait;
use ImportProcessusAwareTrait;
protected function initFilters()
......@@ -179,6 +181,9 @@ class IntervenantDossierController extends AbstractController
}
try {
$this->getServiceValidation()->validerDossier($intervenantDossier);
if ($intervenant->getSourceCode() && $intervenant->getSource()->getImportable()) {
$this->getProcessusImport()->execMaj('INTERVENANT', 'SOURCE_CODE', $intervenant->getSourceCode());
}
$this->updateTableauxBord($intervenant, true);
$this->flashMessenger()->addSuccessMessage("Validation des données personnelles <strong>enregistrée</strong> avec succès.");
} catch (\Exception $e) {
......
......@@ -25,7 +25,6 @@ class IntervenantServiceFactory
public function __invoke(ContainerInterface $container, $requestedName, $options = null)
{
$service = new IntervenantService;
$service->setProcessusImport($container->get(ImportProcessus::class));
return $service;
}
......
......@@ -16,7 +16,6 @@ use Application\Service\Traits\StatutIntervenantServiceAwareTrait;
use Application\Service\Traits\WorkflowServiceAwareTrait;
use RuntimeException;
use Doctrine\ORM\QueryBuilder;
use UnicaenImport\Processus\Traits\ImportProcessusAwareTrait;
/**
......@@ -31,7 +30,6 @@ use UnicaenImport\Processus\Traits\ImportProcessusAwareTrait;
class IntervenantService extends AbstractEntityService
{
use StatutIntervenantServiceAwareTrait;
use ImportProcessusAwareTrait;
use MiseEnPaiementServiceAwareTrait;
use MiseEnPaiementIntervenantStructureServiceAwareTrait;
use WorkflowServiceAwareTrait;
......@@ -39,7 +37,6 @@ class IntervenantService extends AbstractEntityService
use AnneeServiceAwareTrait;
/**
* retourne la classe des entités
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment