Commit 49c5a0d1 authored by Laurent Lécluse's avatar Laurent Lécluse

Améliorations de l'IHM : génération automatique des procédures d'import...

Améliorations de l'IHM : génération automatique des procédures d'import lorsqu'on active ou désactive une table.
Bouton de make-procs dans la page table maintenant.
parent ba773720
Pipeline #7916 failed with stage
in 4 seconds
......@@ -5,6 +5,7 @@ namespace UnicaenImport\Controller\Factory;
use Interop\Container\ContainerInterface;
use UnicaenImport\Controller\TableController;
use UnicaenImport\Form\TableForm;
use UnicaenImport\Processus\ImportProcessus;
use UnicaenImport\Service\SchemaService;
use UnicaenImport\Service\TableService;
......@@ -30,6 +31,7 @@ class TableControllerFactory
$controller->setServiceTable($container->get(TableService::class));
$controller->setServiceSchema($container->get(SchemaService::class));
$controller->setFormTable($container->get('FormElementManager')->get(TableForm::class));
$controller->setProcessusImport($container->get(ImportProcessus::class));
return $controller;
}
......
......@@ -3,6 +3,7 @@
namespace UnicaenImport\Controller;
use UnicaenImport\Form\Traits\TableFormAwareTrait;
use UnicaenImport\Processus\Traits\ImportProcessusAwareTrait;
use UnicaenImport\Service\Traits\SchemaServiceAwareTrait;
use UnicaenImport\Service\Traits\TableServiceAwareTrait;
use Zend\Mvc\Controller\AbstractActionController;
......@@ -19,6 +20,7 @@ class TableController extends AbstractActionController
use TableServiceAwareTrait;
use SchemaServiceAwareTrait;
use TableFormAwareTrait;
use ImportProcessusAwareTrait;
......@@ -51,6 +53,7 @@ class TableController extends AbstractActionController
if ($table) {
$table->setSyncEnabled(!$table->isSyncEnabled());
$this->getServiceTable()->save($table);
$this->getProcessusImport()->updateViewsAndPackages();
}
$result = [
......@@ -89,6 +92,7 @@ class TableController extends AbstractActionController
if ($form->isValid()) {
try {
$this->getServiceTable()->save($table);
$this->getProcessusImport()->updateViewsAndPackages();
} catch (\Exception $e) {
$this->flashMessenger()->addErrorMessage($e->getMessage());
}
......
<h1 class="page-header">Mise à jour des vues et procédures d'import</h1>
<?php
echo $this->partial('unicaen-import/import/menu', ['active' => 'maj-vues-fonctions']);
echo $this->messenger()->setMessage($message, \UnicaenApp\View\Helper\Messenger::SUCCESS);
\ No newline at end of file
......@@ -33,13 +33,6 @@ $pages = [
'popover' => false,
'icon' => 'glyphicon glyphicon-import',
],
'maj-vues-fonctions' => [
'url' => $this->url('import/maj-vues-fonctions'),
'label' => 'Mise à jour des vues et procédures d\'import',
'visible' => $this->isAllowed(Privileges::getResourceId(Privileges::IMPORT_VUES_PROCEDURES)),
'popover' => false,
'icon' => 'glyphicon glyphicon-wrench',
],
];
?>
......
This diff is collapsed.
Markdown is supported
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