fix(tasks): keep case header names readable on mobile

This commit is contained in:
2026-09-22 02:52:42 +03:30
parent 50daac44e3
commit 93d0baa178

View File

@@ -33,13 +33,13 @@ export function TaskCaseGroupHeader({
: null;
return (
<div className="sticky top-0 z-10 flex flex-wrap items-center justify-between gap-2 border-b border-border/80 bg-background-secondary/95 px-3 py-2.5 backdrop-blur-sm supports-[backdrop-filter]:bg-background-secondary/80">
<div className="min-w-0 space-y-0.5 flex-1">
<div className="flex flex-wrap items-center gap-1.5">
<p className="text-sm font-semibold text-text-primary truncate">
{t('fromClinic', { name: caseGroup.clinic.name })} ·{' '}
{formatPatientName(caseGroup.patient, t('walkIn'))}
</p>
<div className="sticky top-0 z-10 space-y-1.5 border-b border-border/80 bg-background-secondary/95 px-3 py-2.5 backdrop-blur-sm supports-[backdrop-filter]:bg-background-secondary/80">
<p className="min-w-0 text-sm font-semibold text-text-primary whitespace-normal break-words">
{t('fromClinic', { name: caseGroup.clinic.name })} ·{' '}
{formatPatientName(caseGroup.patient, t('walkIn'))}
</p>
<div className="flex flex-wrap items-center justify-between gap-2">
<div className="flex min-w-0 flex-wrap items-center gap-1.5">
<LabCaseDueDateBadge
dueDate={caseGroup.caseDueDate}
locale={locale}
@@ -52,32 +52,32 @@ export function TaskCaseGroupHeader({
) : null}
<LabCaseOriginBadge origin={caseGroup.origin} className="text-[10px]" />
</div>
{sentLabel ? (
<p className="text-[11px] text-text-muted">
{t('caseReceivedAt', { date: sentLabel })}
<div className="flex items-center gap-2 shrink-0">
{showCommentsButton && onToggleComments ? (
<button
type="button"
onClick={onToggleComments}
className={`inline-flex h-9 w-9 items-center justify-center rounded-md border ${
commentsOpen
? 'border-primary bg-primary/10 text-primary'
: 'border-border text-text-muted hover:border-primary/40'
}`}
title={t('commentsButton')}
aria-label={t('commentsButton')}
>
<MessageSquare className="h-4 w-4" />
</button>
) : null}
<p className="text-xs text-text-muted tabular-nums">
{t('caseTaskProgress', { completed: progress.completed, total: progress.total })}
</p>
) : null}
</div>
</div>
<div className="flex items-center gap-2 shrink-0">
{showCommentsButton && onToggleComments ? (
<button
type="button"
onClick={onToggleComments}
className={`inline-flex h-9 w-9 items-center justify-center rounded-md border ${
commentsOpen
? 'border-primary bg-primary/10 text-primary'
: 'border-border text-text-muted hover:border-primary/40'
}`}
title={t('commentsButton')}
aria-label={t('commentsButton')}
>
<MessageSquare className="h-4 w-4" />
</button>
) : null}
<p className="text-xs text-text-muted tabular-nums">
{t('caseTaskProgress', { completed: progress.completed, total: progress.total })}
{sentLabel ? (
<p className="text-[11px] text-text-muted">
{t('caseReceivedAt', { date: sentLabel })}
</p>
</div>
) : null}
</div>
);
}