improvement: icons added to prosthesis types catalog.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import QRCode from 'react-qr-code';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { CaseSheetFdiChart } from '@/components/ui/lab/CaseSheetFdiChart';
|
||||
import {
|
||||
buildCaseConnectedTeeth,
|
||||
@@ -9,6 +10,7 @@ import {
|
||||
formatPatientName,
|
||||
} from '@/components/lab/caseDetailUtils';
|
||||
import { formatToothList } from '@/components/treatment/prosthesisTypeDisplay';
|
||||
import { prosthesisJobPathLabel } from '@/components/treatment/prosthesisJobPath';
|
||||
import type { LabCaseDetail } from '@/types/cases';
|
||||
import type { ProsthesisCatalogEntry } from '@/types/treatment-catalog';
|
||||
import type { FdiToothId } from '@/types/treatment';
|
||||
@@ -54,6 +56,7 @@ export function CaseSheetPrintLayout({
|
||||
labels,
|
||||
prosthesisCatalog,
|
||||
}: CaseSheetPrintLayoutProps) {
|
||||
const tProsthesis = useTranslations('prosthesis');
|
||||
const prosthesisRows = buildCaseProsthesisRows(labCase);
|
||||
const connectedTeeth = buildCaseConnectedTeeth(labCase);
|
||||
const selected = new Set<FdiToothId>();
|
||||
@@ -156,16 +159,11 @@ export function CaseSheetPrintLayout({
|
||||
<li style={{ color: '#64748b' }}>—</li>
|
||||
) : (
|
||||
prosthesisRows.map((row) => {
|
||||
const fromCatalog = prosthesisCatalog.find(
|
||||
(e) => e.code === row.prosthesisTypeCode,
|
||||
)?.label;
|
||||
const fromTasks = labCase.tasksByTooth.find(
|
||||
(g) => g.prosthesisTypeCode === row.prosthesisTypeCode,
|
||||
)?.prosthesisTypeLabel;
|
||||
const label =
|
||||
fromCatalog?.trim() ||
|
||||
fromTasks?.trim() ||
|
||||
row.prosthesisTypeCode.replace(/_/g, ' ');
|
||||
const label = prosthesisJobPathLabel(
|
||||
row.prosthesisTypeCode,
|
||||
prosthesisCatalog,
|
||||
(key) => tProsthesis(key as never),
|
||||
);
|
||||
return (
|
||||
<li
|
||||
key={`${row.selectionGroupId ?? ''}-${row.prosthesisTypeCode}-${row.teeth.join(',')}`}
|
||||
|
||||
Reference in New Issue
Block a user