Make it clearer which date is shown inside tooltip
This commit is contained in:
@@ -11,6 +11,7 @@ import { pathsConfig } from '@kit/shared/config';
|
|||||||
import { Button } from '@kit/ui/button';
|
import { Button } from '@kit/ui/button';
|
||||||
import { PageBody, PageHeader } from '@kit/ui/page';
|
import { PageBody, PageHeader } from '@kit/ui/page';
|
||||||
import { Trans } from '@kit/ui/trans';
|
import { Trans } from '@kit/ui/trans';
|
||||||
|
import { formatDateAndTime } from '@kit/shared/utils';
|
||||||
|
|
||||||
import { loadCurrentUserAccount } from '~/home/(user)/_lib/server/load-user-account';
|
import { loadCurrentUserAccount } from '~/home/(user)/_lib/server/load-user-account';
|
||||||
import { loadUserAnalysis } from '~/home/(user)/_lib/server/load-user-analysis';
|
import { loadUserAnalysis } from '~/home/(user)/_lib/server/load-user-analysis';
|
||||||
@@ -103,7 +104,14 @@ export default async function AnalysisResultsPage({
|
|||||||
<h6>
|
<h6>
|
||||||
<Trans i18nKey={`orders:status.${analysisResponse.order.status}`} />
|
<Trans i18nKey={`orders:status.${analysisResponse.order.status}`} />
|
||||||
<ButtonTooltip
|
<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"
|
className="ml-6"
|
||||||
/>
|
/>
|
||||||
</h6>
|
</h6>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export function ButtonTooltip({
|
|||||||
content,
|
content,
|
||||||
className,
|
className,
|
||||||
}: {
|
}: {
|
||||||
content?: string;
|
content?: string | React.ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
}) {
|
}) {
|
||||||
if (!content) return null;
|
if (!content) return null;
|
||||||
|
|||||||
@@ -24,5 +24,6 @@
|
|||||||
"view": "View results",
|
"view": "View results",
|
||||||
"notification": {
|
"notification": {
|
||||||
"body": "You have new analysis results"
|
"body": "You have new analysis results"
|
||||||
}
|
},
|
||||||
|
"orderCreatedAt": "Order created at: {{createdAt}}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,5 +24,6 @@
|
|||||||
"view": "Vaata tulemusi",
|
"view": "Vaata tulemusi",
|
||||||
"notification": {
|
"notification": {
|
||||||
"body": "Teil on valmis uued analüüsi tulemused"
|
"body": "Teil on valmis uued analüüsi tulemused"
|
||||||
}
|
},
|
||||||
|
"orderCreatedAt": "Tellimus loodud: {{createdAt}}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,5 +23,6 @@
|
|||||||
"orderTitle": "Заказ {{orderNumber}}",
|
"orderTitle": "Заказ {{orderNumber}}",
|
||||||
"notification": {
|
"notification": {
|
||||||
"body": "Teil on valmis uued analüüsi tulemused"
|
"body": "Teil on valmis uued analüüsi tulemused"
|
||||||
}
|
},
|
||||||
|
"orderCreatedAt": "Заказ создан: {{createdAt}}"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user