feat(MED-87): improve naming
This commit is contained in:
@@ -11,7 +11,7 @@ import { loadUserAnalysis } from '../../_lib/server/load-user-analysis';
|
||||
import Analysis from './_components/analysis';
|
||||
import pathsConfig from '~/config/paths.config';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { getOrders } from '~/lib/services/order.service';
|
||||
import { getAnalysisOrders } from '~/lib/services/order.service';
|
||||
import { getAnalysisElements } from '~/lib/services/analysis-element.service';
|
||||
import { loadCurrentUserAccount } from '@/app/home/(user)/_lib/server/load-user-account';
|
||||
import { createPageViewLog } from '~/lib/services/audit/pageView.service';
|
||||
@@ -34,9 +34,9 @@ async function AnalysisResultsPage() {
|
||||
const analysisResponses = await loadUserAnalysis();
|
||||
const analysisResponseElements = analysisResponses?.flatMap(({ elements }) => elements);
|
||||
|
||||
const orders = await getOrders().catch(() => null);
|
||||
const analysisOrders = await getAnalysisOrders().catch(() => null);
|
||||
|
||||
if (!orders) {
|
||||
if (!analysisOrders) {
|
||||
redirect(pathsConfig.auth.signIn);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ async function AnalysisResultsPage() {
|
||||
});
|
||||
|
||||
const analysisElementIds = [
|
||||
...new Set(orders?.flatMap((order) => order.analysis_element_ids).filter(Boolean) as number[]),
|
||||
...new Set(analysisOrders?.flatMap((order) => order.analysis_element_ids).filter(Boolean) as number[]),
|
||||
];
|
||||
const analysisElements = await getAnalysisElements({ ids: analysisElementIds });
|
||||
const analysisElementsWithResults = analysisResponseElements
|
||||
|
||||
Reference in New Issue
Block a user