From de4c6593f0cc91c6e0c1a4e2bf9581f11f4f5c98 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Sun, 2 Nov 2025 14:03:34 +0900 Subject: (김준회) SWP 리스트 관리 파트 오류 수정 및 요구사항 반영, 동적 상태 리스트 필터링 변경, null은 동기화 전(전송 전)으로 간주, 선택된 것만 보내도록 변경 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/swp/table/swp-uploaded-files-dialog.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib/swp/table/swp-uploaded-files-dialog.tsx') diff --git a/lib/swp/table/swp-uploaded-files-dialog.tsx b/lib/swp/table/swp-uploaded-files-dialog.tsx index 25a798b6..14d69df4 100644 --- a/lib/swp/table/swp-uploaded-files-dialog.tsx +++ b/lib/swp/table/swp-uploaded-files-dialog.tsx @@ -14,12 +14,12 @@ import { ScrollArea } from "@/components/ui/scroll-area"; import { Badge } from "@/components/ui/badge"; import { useToast } from "@/hooks/use-toast"; import { FileText, ChevronRight, ChevronDown, X, Loader2, RefreshCw } from "lucide-react"; -import { fetchVendorUploadedFiles, cancelVendorUploadedFile } from "../actions"; +import { fetchVendorUploadedFiles, cancelVendorUploadedFile } from "../vendor-actions"; import type { SwpFileApiResponse } from "../api-client"; interface SwpUploadedFilesDialogProps { projNo: string; - vndrCd: string; + vndrCd: string; // UI 표시용으로만 사용 userId: string; } @@ -87,18 +87,19 @@ export function SwpUploadedFilesDialog({ projNo, vndrCd, userId }: SwpUploadedFi // 파일 목록 조회 const loadFiles = () => { - if (!projNo || !vndrCd) { + if (!projNo) { toast({ variant: "destructive", title: "조회 불가", - description: "프로젝트와 업체 정보가 필요합니다.", + description: "프로젝트 정보가 필요합니다.", }); return; } startLoading(async () => { try { - const result = await fetchVendorUploadedFiles(projNo, vndrCd); + // vndrCd는 서버에서 세션으로 자동 조회 + const result = await fetchVendorUploadedFiles(projNo); setFiles(result); toast({ title: "조회 완료", @@ -189,7 +190,7 @@ export function SwpUploadedFilesDialog({ projNo, vndrCd, userId }: SwpUploadedFi return ( - -- cgit v1.2.3