From 397050fffb14cf2f88ad7610fbbce96cf0cb797c Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Sun, 2 Nov 2025 17:17:56 +0900
Subject: (김준회) po: 서명요청 버튼 및 관련 코드 제거
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
lib/po/vendor-table/shi-vendor-po-columns.tsx | 39 +++--------------------
lib/po/vendor-table/shi-vendor-po-table.tsx | 46 ++-------------------------
2 files changed, 7 insertions(+), 78 deletions(-)
diff --git a/lib/po/vendor-table/shi-vendor-po-columns.tsx b/lib/po/vendor-table/shi-vendor-po-columns.tsx
index 356b3dab..2aa7996b 100644
--- a/lib/po/vendor-table/shi-vendor-po-columns.tsx
+++ b/lib/po/vendor-table/shi-vendor-po-columns.tsx
@@ -2,10 +2,8 @@
import * as React from "react"
import { type ColumnDef } from "@tanstack/react-table"
-import {
- SendIcon,
+import {
FileTextIcon,
- MoreHorizontalIcon,
EyeIcon,
} from "lucide-react"
import { useRouter, useParams } from "next/navigation"
@@ -13,14 +11,6 @@ import { useRouter, useParams } from "next/navigation"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
import { Checkbox } from "@/components/ui/checkbox"
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu"
import {
Tooltip,
TooltipContent,
@@ -31,10 +21,10 @@ import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-
import { VendorPO } from "./types"
-// 서명 요청 전용 액션 타입
-type ShiVendorPORowAction = {
+// 액션 타입
+export type ShiVendorPORowAction = {
row: { original: VendorPO }
- type: "view-items" | "signature-request"
+ type: "view-items"
}
interface GetShiVendorColumnsProps {
@@ -410,7 +400,7 @@ export function getShiVendorColumns({
const router = useRouter()
// eslint-disable-next-line react-hooks/rules-of-hooks
const params = useParams()
- const lng = params.lng as string
+ const lng = (params?.lng as string) || 'ko'
return (
@@ -434,25 +424,6 @@ export function getShiVendorColumns({
- {/* 서명 요청 버튼 */}
-
-
-
-
-
-
- 벤더에게 전자서명 요청
-
-
-
)
},
diff --git a/lib/po/vendor-table/shi-vendor-po-table.tsx b/lib/po/vendor-table/shi-vendor-po-table.tsx
index 851f831e..6c5f62ef 100644
--- a/lib/po/vendor-table/shi-vendor-po-table.tsx
+++ b/lib/po/vendor-table/shi-vendor-po-table.tsx
@@ -4,7 +4,6 @@ import * as React from "react"
import type {
DataTableAdvancedFilterField,
DataTableFilterField,
- DataTableRowAction,
} from "@/types/table"
import { useDataTable } from "@/hooks/use-data-table"
@@ -13,11 +12,10 @@ import { DataTableAdvancedToolbar } from "@/components/data-table/data-table-adv
import { toast } from "sonner"
import { getVendorPOs, handleVendorPOAction } from "./service"
-import { getShiVendorColumns } from "./shi-vendor-po-columns"
+import { getShiVendorColumns, type ShiVendorPORowAction } from "./shi-vendor-po-columns"
import { VendorPO, VendorPOActionType } from "./types"
import { VendorPOItemsDialog } from "./vendor-po-items-dialog"
import { ShiVendorPOToolbarActions } from "./shi-vendor-po-toolbar-actions"
-import { SignatureRequestModal } from "@/lib/po/table/sign-request-dialog"
interface ShiVendorPoTableProps {
promises: Promise<
@@ -27,14 +25,6 @@ interface ShiVendorPoTableProps {
>
}
-// Interface for signing party (서명 요청에 사용)
-interface SigningParty {
- signerEmail: string;
- signerName: string;
- signerPosition: string;
- signerType: "REQUESTER" | "VENDOR";
- vendorContactId?: number;
-}
export function ShiVendorPoTable({ promises }: ShiVendorPoTableProps) {
const [data, setData] = React.useState<{
@@ -53,11 +43,10 @@ export function ShiVendorPoTable({ promises }: ShiVendorPoTableProps) {
}, [promises]);
const [rowAction, setRowAction] =
- React.useState | null>(null)
+ React.useState(null)
// 다이얼로그 상태
const [itemsDialogOpen, setItemsDialogOpen] = React.useState(false)
- const [signatureModalOpen, setSignatureModalOpen] = React.useState(false)
const [selectedPO, setSelectedPO] = React.useState(null)
// 행 선택 처리 (1개만 선택 가능)
@@ -80,9 +69,6 @@ export function ShiVendorPoTable({ promises }: ShiVendorPoTableProps) {
case "view-items":
setItemsDialogOpen(true)
break
- case "signature-request":
- setSignatureModalOpen(true)
- break
case "item-status":
setItemsDialogOpen(true)
break
@@ -109,20 +95,6 @@ export function ShiVendorPoTable({ promises }: ShiVendorPoTableProps) {
}
}
- // 서명 요청 처리 함수
- const handleSignatureRequest = async (
- values: { signers: SigningParty[] },
- contractId: number
- ): Promise => {
- try {
- // TODO: 실제 서명 요청 API 호출
- console.log("Signature request for contract:", contractId, values);
- toast.success("서명 요청이 성공적으로 전송되었습니다.");
- } catch (error) {
- console.error("Error sending signature requests:", error);
- toast.error("서명 요청 전송 중 오류가 발생했습니다.");
- }
- }
const columns = React.useMemo(
() => getShiVendorColumns({
@@ -248,20 +220,6 @@ export function ShiVendorPoTable({ promises }: ShiVendorPoTableProps) {
po={selectedPO}
/>
- {/* 서명 요청 모달 */}
- {selectedPO && (
-
- )}
>
)
}
--
cgit v1.2.3