MED-137: add doctor other jobs view (#55)

* add doctor jobs view

* change translation

* another translation change

* clean up

* add analaysis detail view to paths config

* translation

* merge fix

* fix path

* move components to shared

* refactor

* imports

* clean up
This commit is contained in:
Helena
2025-08-25 11:12:57 +03:00
committed by GitHub
parent ee86bb8829
commit 195af1db3d
156 changed files with 2823 additions and 364 deletions

View File

@@ -1,9 +1,9 @@
import React, { useMemo } from 'react';
import { useMemo } from 'react';
import { ArrowDown } from 'lucide-react';
import { cn } from '@kit/ui/utils';
import { UserAnalysisElement } from '@/packages/features/accounts/src/types/accounts';
import { AnalysisResultForDisplay } from './analysis';
export enum AnalysisResultLevel {
VERY_LOW = 0,
@@ -63,7 +63,7 @@ const AnalysisLevelBar = ({
normLowerIncluded?: boolean;
normUpperIncluded?: boolean;
level: AnalysisResultLevel;
results: UserAnalysisElement;
results: AnalysisResultForDisplay;
}) => {
const { norm_lower: lower, norm_upper: upper, response_value: value } = results;

View File

@@ -16,6 +16,18 @@ import AnalysisLevelBar, {
AnalysisResultLevel,
} from './analysis-level-bar';
export type AnalysisResultForDisplay = Pick<
UserAnalysisElement,
| 'norm_status'
| 'response_value'
| 'unit'
| 'norm_lower_included'
| 'norm_upper_included'
| 'norm_lower'
| 'norm_upper'
| 'response_time'
>;
export enum AnalysisStatus {
NORMAL = 0,
MEDIUM = 1,
@@ -26,8 +38,8 @@ const Analysis = ({
analysisElement,
results,
}: {
analysisElement: AnalysisElement;
results?: UserAnalysisElement;
analysisElement: Pick<AnalysisElement, 'analysis_name_lab'>;
results?: AnalysisResultForDisplay;
}) => {
const name = analysisElement.analysis_name_lab || '';
const status = results?.norm_status || AnalysisStatus.NORMAL;

View File

@@ -9,17 +9,18 @@ import { Trans } from '@kit/ui/makerkit/trans';
import { PageBody } from '@kit/ui/page';
import { Button } from '@kit/ui/shadcn/button';
import pathsConfig from '~/config/paths.config';
import { pathsConfig } from '@kit/shared/config';
import { getAnalysisElements } from '~/lib/services/analysis-element.service';
import {
PAGE_VIEW_ACTION,
createPageViewLog,
} from '~/lib/services/audit/pageView.service';
import { AnalysisOrder, getAnalysisOrders } from '~/lib/services/order.service';
import { ButtonTooltip } from '~/components/ui/button-tooltip';
import { ButtonTooltip } from '@kit/shared/components/ui/button-tooltip';
import Analysis from './_components/analysis';
import { loadUserAnalysis } from '../../_lib/server/load-user-analysis';
import Analysis from './_components/analysis';
export const generateMetadata = async () => {
const i18n = await createI18nServerInstance();