Skip to content

Commit 4d6e0f0

Browse files
authored
Merge pull request #1932 from all-of-us/sn/hpro-1862/nph-add-export-biobank-view
2 parents 880546e + f4e1adf commit 4d6e0f0

15 files changed

+366
-89
lines changed

package-lock.json

+127-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"jquery": "^3.6.0",
2727
"jsbarcode": "^3.11.5",
2828
"parsleyjs": "^2.9.0",
29-
"underscore": "^1.13.1"
29+
"underscore": "^1.13.1",
30+
"jszip": "^3.10.1"
3031
},
3132
"devDependencies": {
3233
"@symfony/webpack-encore": "^4.1.1",

src/Audit/Log.php

+1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,5 @@ class Log
7979
public const NPH_DLW_RDR_UPDATE = 'NPH_DLW_RDR_UPDATE';
8080
public const NPH_DLW_RDR_BACKLOG_FAILURE = 'NPH_DLW_RDR_BACKLOG_FAILURE';
8181
public const NPH_DLW_RDR_BACKLOG_SUCCESS = 'NPH_DLW_RDR_BACKLOG_SUCCESS';
82+
public const NPH_BIOBANK_DAILY_REVIEW_EXPORT = 'NPH_BIOBANK_DAILY_REVIEW_EXPORT';
8283
}

src/Controller/NphBiobankController.php

+12
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Controller;
44

5+
use App\Audit\Log;
56
use App\Entity\NphAliquot;
67
use App\Entity\NphGenerateOrderWarningLog;
78
use App\Entity\NphOrder;
@@ -16,13 +17,16 @@
1617
use App\Form\ParticipantLookupBiobankIdType;
1718
use App\Form\ReviewTodayFilterType;
1819
use App\Helper\NphDietPeriodStatus;
20+
use App\Service\LoggerService;
1921
use App\Service\Nph\NphOrderService;
2022
use App\Service\Nph\NphParticipantReviewService;
2123
use App\Service\Nph\NphParticipantSummaryService;
2224
use App\Service\Nph\NphProgramSummaryService;
25+
use App\Service\SiteService;
2326
use Doctrine\ORM\EntityManagerInterface;
2427
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
2528
use Symfony\Component\Form\FormError;
29+
use Symfony\Component\HttpFoundation\JsonResponse;
2630
use Symfony\Component\HttpFoundation\Request;
2731
use Symfony\Component\HttpFoundation\Response;
2832
use Symfony\Component\Routing\Annotation\Route;
@@ -444,6 +448,14 @@ public function aliquotFinalizeAction(
444448
]);
445449
}
446450

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+
447459
private function getDateRangeFilterForm(Request $request): array
448460
{
449461
$userTimeZone = $this->getSecurityUser()->getTimeZone();

0 commit comments

Comments
 (0)