Make it clearer which date is shown inside tooltip

This commit is contained in:
2025-11-12 08:52:24 +02:00
parent 8f32fdf08d
commit 2cb6a0343a
5 changed files with 16 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ import { pathsConfig } from '@kit/shared/config';
import { Button } from '@kit/ui/button';
import { PageBody, PageHeader } from '@kit/ui/page';
import { Trans } from '@kit/ui/trans';
import { formatDateAndTime } from '@kit/shared/utils';
import { loadCurrentUserAccount } from '~/home/(user)/_lib/server/load-user-account';
import { loadUserAnalysis } from '~/home/(user)/_lib/server/load-user-analysis';
@@ -103,7 +104,14 @@ export default async function AnalysisResultsPage({
<h6>
<Trans i18nKey={`orders:status.${analysisResponse.order.status}`} />
<ButtonTooltip
content={`${analysisResponse.order.createdAt ? new Date(analysisResponse?.order?.createdAt).toLocaleString() : ''}`}
content={
<Trans
i18nKey="analysis-results:orderCreatedAt"
values={{
createdAt: formatDateAndTime(analysisResponse.order.createdAt)
}}
/>
}
className="ml-6"
/>
</h6>

View File

@@ -12,7 +12,7 @@ export function ButtonTooltip({
content,
className,
}: {
content?: string;
content?: string | React.ReactNode;
className?: string;
}) {
if (!content) return null;

View File

@@ -24,5 +24,6 @@
"view": "View results",
"notification": {
"body": "You have new analysis results"
}
},
"orderCreatedAt": "Order created at: {{createdAt}}"
}

View File

@@ -24,5 +24,6 @@
"view": "Vaata tulemusi",
"notification": {
"body": "Teil on valmis uued analüüsi tulemused"
}
},
"orderCreatedAt": "Tellimus loodud: {{createdAt}}"
}

View File

@@ -23,5 +23,6 @@
"orderTitle": "Заказ {{orderNumber}}",
"notification": {
"body": "Teil on valmis uued analüüsi tulemused"
}
},
"orderCreatedAt": "Заказ создан: {{createdAt}}"
}