feat(upload): add upload status column and rename analysis status

This commit is contained in:
2026-07-01 12:38:53 +05:30
parent 81df3a9973
commit 57b33bd061
2 changed files with 17 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import type { ColumnDef } from '@tanstack/react-table';
import { Video } from 'lucide-react';
import { ENV_CONSTANT } from '@/constants/secrect.constant';
import { Badge } from '@/components/ui/badge';
import type { UploadListItem } from '@/types';
import { formatDate } from '@/utils/date';
@@ -111,9 +112,23 @@ export function useUploadListColumns(
size: 175,
cell: ({ row }) => formatDate(row.original.uploaded_at),
},
{
accessorKey: 'is_uploaded',
header: 'Upload Status',
size: 125,
meta: { disableTruncate: true },
cell: ({ row }) =>
row.original.is_uploaded ? (
<Badge className="bg-emerald-500/15 text-emerald-600 dark:text-emerald-400">
Uploaded
</Badge>
) : (
<span className="text-muted-foreground"></span>
),
},
{
id: 'status',
header: 'Status',
header: 'Analysis Status',
size: 145,
meta: { disableTruncate: true },
cell: ({ row }) => (

View File

@@ -12,6 +12,7 @@ export interface UploadListItem {
segment: string | null;
chainage: string | null;
uploaded_at: string | null;
is_uploaded: boolean;
status: UploadStatus;
progress: number;
result: UploadResult;