summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dolce/table/detail-drawing-columns.tsx29
-rw-r--r--lib/dolce/table/drawing-list-columns.tsx10
-rw-r--r--lib/dolce/table/file-list-columns.tsx64
3 files changed, 50 insertions, 53 deletions
diff --git a/lib/dolce/table/detail-drawing-columns.tsx b/lib/dolce/table/detail-drawing-columns.tsx
index 6127a7b6..851d8903 100644
--- a/lib/dolce/table/detail-drawing-columns.tsx
+++ b/lib/dolce/table/detail-drawing-columns.tsx
@@ -123,15 +123,6 @@ export function createDetailDrawingColumns(
},
},
{
- accessorKey: "CreateDt",
- header: t("detailDrawing.columns.createdAt"),
- minSize: 200,
- cell: ({ row }) => {
- const date = row.getValue("CreateDt") as string;
- return <div className="text-sm text-muted-foreground">{formatDolceDateTime(date)}</div>;
- },
- },
- {
accessorKey: "RegisterDesc",
header: "Comment",
minSize: 200,
@@ -145,18 +136,14 @@ export function createDetailDrawingColumns(
id: "actions",
header: t("detailDrawing.columns.actions"),
minSize: 100,
- maxSize: 100,
cell: ({ row }) => {
const status = row.getValue("Status") as string;
const isEditable = status === "Standby";
return (
- <div
- className="flex items-center justify-center"
- onClick={(e) => e.stopPropagation()}
- >
+ <div className="flex gap-2 items-center justify-center">
<Button
- variant="ghost"
+ variant="outline"
size="sm"
disabled={!isEditable || !onEdit}
onClick={(e) => {
@@ -165,11 +152,21 @@ export function createDetailDrawingColumns(
}}
title={!isEditable ? t("editDetailDialog.statusSubmittedOnly") : t("editDetailDialog.editButton")}
>
- <Edit className="h-4 w-4" />
+ <Edit className="h-4 w-4 mr-2" />
+ {t("editDetailDialog.editButton")}
</Button>
</div>
);
},
},
+ {
+ accessorKey: "CreateDt",
+ header: t("detailDrawing.columns.createdAt"),
+ minSize: 250,
+ cell: ({ row }) => {
+ const date = row.getValue("CreateDt") as string;
+ return <div className="text-sm text-muted-foreground">{formatDolceDateTime(date)}</div>;
+ },
+ },
];
}
diff --git a/lib/dolce/table/drawing-list-columns.tsx b/lib/dolce/table/drawing-list-columns.tsx
index 34055eff..eefd0b40 100644
--- a/lib/dolce/table/drawing-list-columns.tsx
+++ b/lib/dolce/table/drawing-list-columns.tsx
@@ -14,11 +14,11 @@ export function drawingListColumns(lng: string, t: any): ColumnDef<DwgReceiptIte
return <div className="font-medium">{row.getValue("DrawingNo")}</div>;
},
},
- {
- accessorKey: "RegisterGroupId",
- header: "RegisterGroupId",
- minSize: 150,
- },
+ // {
+ // accessorKey: "RegisterGroupId",
+ // header: "RegisterGroupId",
+ // minSize: 150,
+ // },
{
accessorKey: "DrawingName",
header: t("drawingList.columns.drawingName"),
diff --git a/lib/dolce/table/file-list-columns.tsx b/lib/dolce/table/file-list-columns.tsx
index 3018e240..e21f4382 100644
--- a/lib/dolce/table/file-list-columns.tsx
+++ b/lib/dolce/table/file-list-columns.tsx
@@ -31,39 +31,9 @@ export const createFileListColumns = ({
},
},
{
- accessorKey: "FileName",
- header: lng === "ko" ? "파일명" : "File Name",
- minSize: 300,
- cell: ({ row }) => {
- return <div className="font-medium">{row.getValue("FileName")}</div>;
- },
- },
- {
- accessorKey: "FileSize",
- header: lng === "ko" ? "파일크기" : "File Size",
- minSize: 100,
- cell: ({ row }) => {
- const size = parseInt(row.getValue("FileSize") as string);
- if (isNaN(size) || size === 0) return "-";
-
- if (size < 1024) return `${size} B`;
- if (size < 1024 * 1024) return `${(size / 1024).toFixed(2)} KB`;
- return `${(size / (1024 * 1024)).toFixed(2)} MB`;
- },
- },
- {
- accessorKey: "CreateDt",
- header: lng === "ko" ? "생성일시" : "Created Date",
- minSize: 200,
- cell: ({ row }) => {
- const date = row.getValue("CreateDt") as string;
- return <div className="text-sm text-muted-foreground">{formatDolceDateTime(date)}</div>;
- },
- },
- {
id: "actions",
header: "Action",
- minSize: 160,
+ minSize: 50,
cell: ({ row }) => {
const isLocal = row.original.FileServerId === "LOCAL";
const isDownloading = downloadingFileId === row.original.FileId;
@@ -84,7 +54,6 @@ export const createFileListColumns = ({
) : (
<Download className="h-4 w-4 mr-2" />
)}
- {lng === "ko" ? "다운로드" : "Download"}
</Button>
{isLocal && onDelete && (
<Button
@@ -103,5 +72,36 @@ export const createFileListColumns = ({
);
},
},
+ {
+ accessorKey: "FileName",
+ header: lng === "ko" ? "파일명" : "File Name",
+ minSize: 300,
+ cell: ({ row }) => {
+ return <div className="font-medium">{row.getValue("FileName")}</div>;
+ },
+ },
+ {
+ accessorKey: "FileSize",
+ header: lng === "ko" ? "파일크기" : "File Size",
+ minSize: 100,
+ cell: ({ row }) => {
+ const size = parseInt(row.getValue("FileSize") as string);
+ if (isNaN(size) || size === 0) return "-";
+
+ if (size < 1024) return `${size} B`;
+ if (size < 1024 * 1024) return `${(size / 1024).toFixed(2)} KB`;
+ return `${(size / (1024 * 1024)).toFixed(2)} MB`;
+ },
+ },
+ {
+ accessorKey: "CreateDt",
+ header: lng === "ko" ? "생성일시" : "Created Date",
+ minSize: 250,
+ cell: ({ row }) => {
+ const date = row.getValue("CreateDt") as string;
+ return <div className="text-sm text-muted-foreground">{formatDolceDateTime(date)}</div>;
+ },
+ },
+
];