diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-02 14:03:34 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-02 14:03:34 +0900 |
| commit | de4c6593f0cc91c6e0c1a4e2bf9581f11f4f5c98 (patch) | |
| tree | 8b3d88637309ac9fb67f79606d834364d784105b /lib/swp/table | |
| parent | fd5ff7a9eaea4baeacc3f4bec8254925d63bf255 (diff) | |
(김준회) SWP 리스트 관리 파트 오류 수정 및 요구사항 반영, 동적 상태 리스트 필터링 변경, null은 동기화 전(전송 전)으로 간주, 선택된 것만 보내도록 변경
Diffstat (limited to 'lib/swp/table')
| -rw-r--r-- | lib/swp/table/swp-uploaded-files-dialog.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
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 ( <Dialog open={open} onOpenChange={handleOpenChange}> <DialogTrigger asChild> - <Button variant="outline" size="sm" disabled={!projNo || !vndrCd}> + <Button variant="outline" size="sm" disabled={!projNo}> <FileText className="h-4 w-4 mr-2" /> 업로드 파일 관리 </Button> |
