improvement: lab/clinic commiunication flow completely overhauled. no more shit.
This commit is contained in:
@@ -16,6 +16,7 @@ interface LabDispatchAttentionPanelProps {
|
||||
labDependentCodes: Set<string>;
|
||||
orgs?: LinkedOrganizationOption[];
|
||||
onGoToDispatch: (item: LabDispatchAttentionItem) => void;
|
||||
compact?: boolean;
|
||||
}
|
||||
|
||||
export function LabDispatchAttentionPanel({
|
||||
@@ -24,6 +25,7 @@ export function LabDispatchAttentionPanel({
|
||||
labDependentCodes,
|
||||
orgs,
|
||||
onGoToDispatch,
|
||||
compact = false,
|
||||
}: LabDispatchAttentionPanelProps) {
|
||||
const t = useTranslations('treatment');
|
||||
|
||||
@@ -32,16 +34,22 @@ export function LabDispatchAttentionPanel({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="surface-card p-4 space-y-3 border border-amber-500/35 bg-amber-500/5">
|
||||
<div className="flex items-start gap-2">
|
||||
<AlertTriangle className="h-4 w-4 text-amber-600 dark:text-amber-400 shrink-0 mt-0.5 icon-flat" />
|
||||
<div className="min-w-0">
|
||||
<h3 className="text-sm font-semibold text-text-primary">{t('labAttentionTitle')}</h3>
|
||||
<p className="text-[11px] text-text-muted mt-0.5">{t('labAttentionSubtitle')}</p>
|
||||
<div className={compact ? 'space-y-2 pt-2' : 'surface-card p-4 space-y-3 border border-amber-500/35 bg-amber-500/5'}>
|
||||
{!compact ? (
|
||||
<div className="flex items-start gap-2">
|
||||
<AlertTriangle className="h-4 w-4 text-amber-600 dark:text-amber-400 shrink-0 mt-0.5 icon-flat" />
|
||||
<div className="min-w-0">
|
||||
<h3 className="text-sm font-semibold text-text-primary">{t('labAttentionTitle')}</h3>
|
||||
<p className="text-[11px] text-text-muted mt-0.5">{t('labAttentionSubtitle')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<ul className="space-y-2 max-h-[min(240px,35vh)] overflow-y-auto pr-1">
|
||||
<ul
|
||||
className={`space-y-1.5 overflow-y-auto overscroll-y-contain pr-1 ${
|
||||
compact ? 'max-h-[min(200px,30vh)]' : 'max-h-[min(240px,35vh)]'
|
||||
}`}
|
||||
>
|
||||
{items.map((item) => {
|
||||
const teeth = item.detail.teeth.length
|
||||
? [...item.detail.teeth].sort().join(', ')
|
||||
@@ -55,7 +63,9 @@ export function LabDispatchAttentionPanel({
|
||||
return (
|
||||
<li
|
||||
key={item.key}
|
||||
className="flex flex-col gap-2 rounded-[var(--radius-sm)] border border-border/60 bg-background-secondary/40 px-2.5 py-2 sm:flex-row sm:items-center sm:justify-between"
|
||||
className={`flex flex-col gap-1.5 rounded-[var(--radius-sm)] border border-border/60 bg-background-secondary/40 px-2 py-1.5 sm:flex-row sm:items-center sm:justify-between ${
|
||||
compact ? '' : ''
|
||||
}`}
|
||||
>
|
||||
<div className="min-w-0 space-y-1">
|
||||
<div className="flex flex-wrap items-center gap-1.5">
|
||||
@@ -92,7 +102,7 @@ export function LabDispatchAttentionPanel({
|
||||
<Button
|
||||
type="button"
|
||||
variant="primary"
|
||||
className="shrink-0 w-full sm:w-auto text-xs py-1.5"
|
||||
className={`shrink-0 w-full sm:w-auto text-xs ${compact ? 'py-1' : 'py-1.5'}`}
|
||||
onClick={() => onGoToDispatch(item)}
|
||||
>
|
||||
{item.isCurrentDraft ? t('labAttentionGoDispatch') : t('labAttentionLoadDispatch')}
|
||||
|
||||
Reference in New Issue
Block a user