improvement: users can now comment on a case and it's details and have an option to make it visible for clinics too.
This commit is contained in:
@@ -97,11 +97,13 @@ export function LabCaseCommentsPanel({
|
||||
{comment.authorSide === 'LAB' ? t('labAuthor') : t('clinicAuthor')}
|
||||
{comment.authorName ? ` · ${comment.authorName}` : ''}
|
||||
</span>
|
||||
{comment.visibleToClinic ? (
|
||||
<span className="text-primary">{t('clinicCanSee')}</span>
|
||||
) : (
|
||||
<span>{t('hiddenFromClinic')}</span>
|
||||
)}
|
||||
{comment.showVisibilityStatus !== false ? (
|
||||
comment.visibleToClinic ? (
|
||||
<span className="text-primary">{t('clinicCanSee')}</span>
|
||||
) : (
|
||||
<span>{t('hiddenFromClinic')}</span>
|
||||
)
|
||||
) : null}
|
||||
</div>
|
||||
<p className="mt-1 text-text-primary whitespace-pre-wrap">{comment.body}</p>
|
||||
</div>
|
||||
|
||||
17
frontend/src/components/ui/lab/labTaskStatusDisplay.ts
Normal file
17
frontend/src/components/ui/lab/labTaskStatusDisplay.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { BadgeVariant } from '@/components/ui/shared/Badge';
|
||||
import type { LabTaskStatus } from '@/types/cases';
|
||||
|
||||
export function labTaskStatusVariant(status: LabTaskStatus): BadgeVariant {
|
||||
return status === 'COMPLETED' ? 'success' : 'default';
|
||||
}
|
||||
|
||||
export function labTaskStatusSelectClass(status: LabTaskStatus): string {
|
||||
switch (status) {
|
||||
case 'COMPLETED':
|
||||
return 'border-success/60 text-success';
|
||||
case 'IN_PROGRESS':
|
||||
return 'border-primary/60 text-primary';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user