[] = [
+ {
+ id: "index",
+ header: "No",
+ cell: ({ row }) => row.original.index,
+ meta: {
+ width: "60px",
+ textAlign: "center",
+ },
+ },
+ {
+ accessorKey: "oem.oem_name", // 중첩 객체 접근 방식 확인
+ header: "고객사",
+ meta: {
+ width: "120px",
+ textAlign: "center",
+ },
+ },
+ {
+ accessorKey: "productgroup.product_group_name", // 제품군 정보 표시
+ header: "제품군",
+ meta: {
+ width: "120px",
+ textAlign: "center",
+ },
+ },
+ {
+ accessorKey: "car_code",
+ header: "WBS",
+ meta: {
+ width: "120px",
+ textAlign: "center",
+ },
+ },
+ {
+ accessorKey: "writer",
+ header: "등록자",
+ meta: {
+ width: "120px",
+ textAlign: "center",
+ },
+ },
+ {
+ accessorKey: "updatedAt",
+ header: "등록일",
+ meta: {
+ width: "200px",
+ textAlign: "center",
+ },
+ cell: ({ row }) => {
+ const date = new Date(row.original.updatedAt);
+ return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')} ${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`;
+ }
+ },
+ {
+ accessorKey: "isActive",
+ header: "상태",
+ meta: {
+ width: "100px",
+ textAlign: "center",
+ },
+ cell: ({ row }) => (
+
+ {
+ updateMutation.mutate({ id: row.original.id, isActive: value });
+ }}
+ />
+
+ ),
+ },
+ {
+ id: "actions",
+ header: "액션",
+ meta: {
+ width: "100px",
+ textAlign: "center",
+ },
+ cell: ({ row }) => (
+
+
+
+
+ ),
+ },
+ ];
+
+ if (isLoading) return Loading...
;
+
+ return (
+
+
+
+
+
+
영업 WBS관리
+
+ 영업 WBS를 관리합니다.
+
+
+
+
+
+
+ setSearchQuery(e.target.value)}
+ className="pl-8 w-full"
+ />
+
+
+
+
+
+ {data?.resultData && data.resultData.length > 0 ? (
+ <>
+
{
+ setEditingUser(row);
+ setIsOpen(true);
+ }}
+ enableCheckbox={true}
+ isTreeTable={false}
+ />
+ >
+ ) : (
+
+ 등록된 영업 WBS가 없습니다.
+
+ )}
+
+
+
+
+ {/* User Create/Edit Dialog */}
+
+
+ );
+};
+
+export default Page;
diff --git a/plm-app/src/types/salesmgmt/contractwbs.ts b/plm-app/src/types/salesmgmt/contractwbs.ts
new file mode 100644
index 0000000..4b257bb
--- /dev/null
+++ b/plm-app/src/types/salesmgmt/contractwbs.ts
@@ -0,0 +1,22 @@
+export interface contractWbs {
+ id: string;
+ index: number;
+ oem_id?: string | null;
+ product_group_id?: string | null;
+ writer?: string | null;
+ regdate?: Date | null;
+ isActive: boolean;
+ companyId: string;
+ count?: number;
+}
+
+export interface contractWbsResponse {
+ success: boolean;
+ data: contractWbs[];
+}
+
+export interface PaginatedResponse {
+ total: number;
+ totalPages: number;
+ currentPage: number;
+ resultData: contractWbs[];
\ No newline at end of file