MED-198: add notification for new analysis result

This commit is contained in:
Danel Kungla
2025-10-08 16:32:19 +03:00
parent 3a8d73e742
commit 8386e541cb
16 changed files with 126 additions and 16 deletions

View File

@@ -32,6 +32,7 @@ import { Trans } from '@kit/ui/trans';
// home imports
import type { UserWorkspace } from '../_lib/server/load-user-workspace';
import { UserNotifications } from './user-notifications';
const PERSONAL_ACCOUNT_SLUG = 'personal';
@@ -90,7 +91,7 @@ export function HomeMobileNavigation(props: {
return (
<DropdownMenu>
<div className="flex justify-between gap-4">
<div className="flex justify-between gap-3">
<Link href={pathsConfig.app.cart}>
<Button
variant="ghost"
@@ -108,6 +109,9 @@ export function HomeMobileNavigation(props: {
)}
</Button>
</Link>
<UserNotifications userId={user.id} />
<DropdownMenuTrigger>
<Menu className="h-6 w-6" />
</DropdownMenuTrigger>

View File

@@ -61,6 +61,7 @@ export default function OrderBlock({
id: analysisOrder.id,
status: analysisOrder.status,
}}
isPackage
/>
)}
{itemsTtoService && (

View File

@@ -32,11 +32,13 @@ export default function OrderItemsTable({
title,
order,
type = 'analysisOrder',
isPackage = false,
}: {
items: StoreOrderLineItem[];
title: string;
order: Order;
type?: OrderItemType;
isPackage?: boolean;
}) {
const router = useRouter();
const [isConfirmOpen, setIsConfirmOpen] = useState(false);
@@ -100,9 +102,15 @@ export default function OrderItemsTable({
</TableCell>
)}
<TableCell className="min-w-[180px] px-6">
<Trans
i18nKey={`orders:status.${type}.${order?.status ?? 'CONFIRMED'}`}
/>
{isPackage ? (
<Trans
i18nKey={`orders:status.analysisPackageOrder.${order?.status ?? 'CONFIRMED'}`}
/>
) : (
<Trans
i18nKey={`orders:status.${type}.${order?.status ?? 'CONFIRMED'}`}
/>
)}
</TableCell>
<TableCell className="px-6 text-right">