fixed date fields

This commit is contained in:
Jelaletdin12 committed 2026-08-31 22:36:56 +05:00
1 parent 9ad86634dd
commit cc5b5fca24
18 files changed
+78 -53

No files matched your search

+2 -1
View File
@@ -8,6 +8,7 @@ import { DataTableToolbar, type ColumnMeta } from "@/components/dataTableToolbar
import { useActivityLogs } from "@/features/activityLogs/hooks/useActivityLogs";
import type { ActivityLog } from "@/features/activityLogs/api/activityLogsApi";
import type { VisibilityState } from "@tanstack/react-table";
import { formatFromApiDate } from "@/lib/utils";
const MODULE_OPTIONS = [
"loan-orders",
@@ -135,7 +136,7 @@ export default function ActivityLogsPage() {
{
accessorKey: "createdAt",
header: t("logs.fields.createdAt", "Wagty"),
cell: ({ row }) => <span className="text-sm text-muted-foreground">{new Date(row.original.createdAt).toLocaleString()}</span>,
cell: ({ row }) => <span className="text-sm text-muted-foreground">{formatFromApiDate(row.original.createdAt)}</span>,
size: 170,
},
{
+2 -1
View File
@@ -6,6 +6,7 @@ import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
import { Spinner } from "@/components/ui/spinner";
import { useActivityLog } from "@/features/activityLogs/hooks/useActivityLogs";
import { formatFromApiDate } from "@/lib/utils";
export default function ActivityLogViewPage() {
const { t } = useTranslation();
@@ -115,7 +116,7 @@ export default function ActivityLogViewPage() {
<Separator />
<div className="flex justify-between">
<span className="text-sm text-muted-foreground">{t("logs.fields.createdAt", "Wagty")}</span>
<span className="text-sm">{new Date(log.createdAt).toLocaleString()}</span>
<span className="text-sm">{formatFromApiDate(log.createdAt)}</span>
</div>
</CardContent>
</Card>