improvement: treatment UX fully overhauled.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { DetailLabSendBadge } from '@/components/ui/treatment/DetailLabSendBadge';
|
||||
import { TreatmentTypeBadge } from '@/components/ui/treatment/TreatmentTypeBadge';
|
||||
import { isDetailTypeSelected } from '@/components/treatment/treatmentDetailRules';
|
||||
import { treatmentTypeLabelFromCatalog } from '@/components/shared/treatmentTypeDisplay';
|
||||
import type { TreatmentCatalogEntry } from '@/types/treatment-catalog';
|
||||
import type { LinkedOrganizationOption, PastTreatmentDetail } from '@/types/treatment';
|
||||
@@ -39,10 +40,16 @@ export function TreatmentDetailSummaryRow({
|
||||
<span className={`text-text-muted tabular-nums ${compact ? 'text-[11px]' : 'text-xs'}`}>
|
||||
{t('detailLabel', { n: detailNumber })}
|
||||
</span>
|
||||
<TreatmentTypeBadge
|
||||
type={detail.treatmentType}
|
||||
label={treatmentTypeLabelFromCatalog(detail.treatmentType, treatmentCatalog)}
|
||||
/>
|
||||
{isDetailTypeSelected(detail) ? (
|
||||
<TreatmentTypeBadge
|
||||
type={detail.treatmentType}
|
||||
label={treatmentTypeLabelFromCatalog(detail.treatmentType, treatmentCatalog)}
|
||||
/>
|
||||
) : (
|
||||
<span className={`text-text-muted italic ${compact ? 'text-[11px]' : 'text-xs'}`}>
|
||||
{t('treatmentTypeNotSelected')}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<DetailLabSendBadge detail={detail} labDependentCodes={labDependentCodes} orgs={orgs} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user