summaryrefslogtreecommitdiff
path: root/lib/swp/table
diff options
context:
space:
mode:
Diffstat (limited to 'lib/swp/table')
-rw-r--r--lib/swp/table/swp-uploaded-files-dialog.tsx13
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>