diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-12-09 05:31:04 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-12-09 05:31:04 +0000 |
| commit | 3462d754574e2558c791c7958d3e5da013a7a573 (patch) | |
| tree | 6eb26fddda5e4081fdead977c0ec6b152286d164 /lib/pq/pq-review-table-new/vendors-table-toolbar-actions.tsx | |
| parent | 3f11179b2c50d7ee56b0cea38778191e3259b941 (diff) | |
(최겸) 구매 pq 내 안전 담당자 평가 기능 추가, vendor 안전적격성 평가 컬럼 추가
Diffstat (limited to 'lib/pq/pq-review-table-new/vendors-table-toolbar-actions.tsx')
| -rw-r--r-- | lib/pq/pq-review-table-new/vendors-table-toolbar-actions.tsx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/pq/pq-review-table-new/vendors-table-toolbar-actions.tsx b/lib/pq/pq-review-table-new/vendors-table-toolbar-actions.tsx index a9d37a4b..b7e54f3d 100644 --- a/lib/pq/pq-review-table-new/vendors-table-toolbar-actions.tsx +++ b/lib/pq/pq-review-table-new/vendors-table-toolbar-actions.tsx @@ -572,6 +572,11 @@ const handleOpenRequestDialog = async () => { row.original.type === "NON_INSPECTION" ) + // 승인되지 않은 PQ가 포함되었는지 확인 + const hasNonApprovedStatus = selectedRows.some(row => + row.original.status !== "APPROVED" + ) + // 실사 방법 라벨 변환 함수 const getInvestigationMethodLabel = (method: string): string => { switch (method) { @@ -676,9 +681,20 @@ const handleOpenRequestDialog = async () => { variant="outline" size="sm" onClick={handleOpenRequestDialog} // 여기를 수정: 새로운 핸들러 함수 사용 - disabled={isLoading || selectedRows.length === 0 || hasNonInspectionPQ} + disabled={ + isLoading || + selectedRows.length === 0 || + hasNonInspectionPQ || + hasNonApprovedStatus + } className="gap-2" - title={hasNonInspectionPQ ? "미실사 PQ는 실사 의뢰할 수 없습니다." : undefined} + title={ + hasNonInspectionPQ + ? "미실사 PQ는 실사 의뢰할 수 없습니다." + : hasNonApprovedStatus + ? "승인된 PQ만 실사 의뢰할 수 있습니다." + : undefined + } > <ClipboardCheck className="size-4" aria-hidden="true" /> <span className="hidden sm:inline">실사 의뢰</span> |
