mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 10:05:03 +00:00
Add title and creation date to export data handling
Enhanced export functionality by including `title` and `createdDate` in data passed to the Vue app. Updated controllers, templates, and components to handle and display the new fields, improving export file naming and user interface. Removed a debug `dump` call for cleaner code.
This commit is contained in:
@@ -538,7 +538,6 @@ class ExportController extends AbstractController
|
||||
$formFormatter->submit($dataFormatter);
|
||||
$dataFormatter = $formFormatter->getData();
|
||||
}
|
||||
dump($dataExport);
|
||||
|
||||
return [
|
||||
'centers' => $dataCenters['centers'],
|
||||
|
@@ -13,6 +13,7 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
use Chill\MainBundle\Entity\ExportGeneration;
|
||||
use Chill\MainBundle\Export\ExportManager;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
@@ -28,6 +29,7 @@ final readonly class ExportGenerationController
|
||||
private Security $security,
|
||||
private Environment $twig,
|
||||
private SerializerInterface $serializer,
|
||||
private ExportManager $exportManager,
|
||||
) {}
|
||||
|
||||
#[Route('/{_locale}/main/export-generation/{id}/wait', methods: ['GET'], name: 'chill_main_export-generation_wait')]
|
||||
@@ -37,8 +39,10 @@ final readonly class ExportGenerationController
|
||||
throw new AccessDeniedHttpException('Only users can download an export');
|
||||
}
|
||||
|
||||
$export = $this->exportManager->getExport($exportGeneration->getExportAlias());
|
||||
|
||||
return new Response(
|
||||
$this->twig->render('@ChillMain/ExportGeneration/wait.html.twig', ['exportGeneration' => $exportGeneration]),
|
||||
$this->twig->render('@ChillMain/ExportGeneration/wait.html.twig', ['exportGeneration' => $exportGeneration, 'export' => $export]),
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user