|
2 | 2 |
|
3 | 3 | namespace App\Controller;
|
4 | 4 |
|
| 5 | +use App\Audit\Log; |
5 | 6 | use App\Entity\NphAliquot;
|
6 | 7 | use App\Entity\NphGenerateOrderWarningLog;
|
7 | 8 | use App\Entity\NphOrder;
|
|
16 | 17 | use App\Form\ParticipantLookupBiobankIdType;
|
17 | 18 | use App\Form\ReviewTodayFilterType;
|
18 | 19 | use App\Helper\NphDietPeriodStatus;
|
| 20 | +use App\Service\LoggerService; |
19 | 21 | use App\Service\Nph\NphOrderService;
|
20 | 22 | use App\Service\Nph\NphParticipantReviewService;
|
21 | 23 | use App\Service\Nph\NphParticipantSummaryService;
|
22 | 24 | use App\Service\Nph\NphProgramSummaryService;
|
| 25 | +use App\Service\SiteService; |
23 | 26 | use Doctrine\ORM\EntityManagerInterface;
|
24 | 27 | use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
25 | 28 | use Symfony\Component\Form\FormError;
|
| 29 | +use Symfony\Component\HttpFoundation\JsonResponse; |
26 | 30 | use Symfony\Component\HttpFoundation\Request;
|
27 | 31 | use Symfony\Component\HttpFoundation\Response;
|
28 | 32 | use Symfony\Component\Routing\Annotation\Route;
|
@@ -444,6 +448,14 @@ public function aliquotFinalizeAction(
|
444 | 448 | ]);
|
445 | 449 | }
|
446 | 450 |
|
| 451 | + #[Route(path: '/review/export/log', name: 'nph_biobank_review_export_log')] |
| 452 | + public function exportAction(Request $request, LoggerService $loggerService, SiteService $siteService): ?Response |
| 453 | + { |
| 454 | + $exportType = $request->get('exportType'); |
| 455 | + $loggerService->log(Log::NPH_BIOBANK_DAILY_REVIEW_EXPORT, ['site' => $siteService->getSiteId(), 'exportType' => $exportType]); |
| 456 | + return new JsonResponse(['success' => true]); |
| 457 | + } |
| 458 | + |
447 | 459 | private function getDateRangeFilterForm(Request $request): array
|
448 | 460 | {
|
449 | 461 | $userTimeZone = $this->getSecurityUser()->getTimeZone();
|
|
0 commit comments