Files
dyolink/frontend/src/components/ui/lab/TaskProsthesisGroupHeader.tsx
Admin 5d3597f973
Some checks failed
Production — tag build, push, deploy / build-and-push (push) Failing after 23s
Production — tag build, push, deploy / deploy (push) Has been skipped
improvement: icons added to prosthesis types catalog.
2026-09-05 01:29:53 +03:30

38 lines
1.3 KiB
TypeScript

'use client';
import { useTranslations } from 'next-intl';
import { formatToothList } from '@/components/treatment/prosthesisTypeDisplay';
import { ProsthesisStackedTypeLabel } from '@/components/ui/lab/ProsthesisStackedTypeLabel';
import type { ProsthesisTaskGroup } from '@/components/lab/taskListGrouping';
import type { ProsthesisCatalogEntry } from '@/types/treatment-catalog';
interface TaskProsthesisGroupHeaderProps {
group: ProsthesisTaskGroup;
prosthesisCatalog: readonly ProsthesisCatalogEntry[];
}
export function TaskProsthesisGroupHeader({
group,
prosthesisCatalog,
}: TaskProsthesisGroupHeaderProps) {
const t = useTranslations('tasks');
const tTreatment = useTranslations('treatment');
const archLabels = {
UA: tTreatment('selectedArchUpper'),
LA: tTreatment('selectedArchLower'),
};
return (
<div className="flex flex-wrap items-center gap-2 px-3 py-1.5 bg-background-secondary/30 border-b border-border/40">
<ProsthesisStackedTypeLabel
className="min-w-0 whitespace-normal break-words text-xs font-medium"
code={group.prosthesisTypeCode}
catalog={prosthesisCatalog}
/>
<span className="text-xs text-text-secondary">
{t('teethLabel', { teeth: formatToothList(group.teeth, archLabels) })}
</span>
</div>
);
}