summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/document-lists/vendor-doc-list-client.tsx16
1 files changed, 11 insertions, 5 deletions
diff --git a/components/document-lists/vendor-doc-list-client.tsx b/components/document-lists/vendor-doc-list-client.tsx
index 17137650..6ba155a7 100644
--- a/components/document-lists/vendor-doc-list-client.tsx
+++ b/components/document-lists/vendor-doc-list-client.tsx
@@ -1,5 +1,4 @@
"use client"
-
import * as React from "react"
import { useRouter, useParams } from "next/navigation"
@@ -34,6 +33,9 @@ export default function VendorDocumentListClient({
contractIdFromUrl
)
+ // projectType 상태 추가
+ const [projectType, setProjectType] = React.useState<string>("ship")
+
// Update selectedContractId when URL changes
React.useEffect(() => {
if (contractIdFromUrl) {
@@ -41,14 +43,15 @@ export default function VendorDocumentListClient({
}
}, [contractIdFromUrl])
-
// Handle contract selection
function handleSelectContract(projectId: number, contractId: number) {
- const projectType = projects.find(v=>v.projectId === projectId)?.projectType || "ship"
+ const foundProjectType = projects.find(v => v.projectId === projectId)?.projectType || "ship"
+
setSelectedContractId(contractId)
+ setProjectType(foundProjectType)
// Navigate to the contract's documents page
- router.push(`/partners/document-list/${contractId}?projectType=${projectType}`)
+ router.push(`/partners/document-list/${contractId}?projectType=${foundProjectType}`)
}
return (
@@ -59,7 +62,10 @@ export default function VendorDocumentListClient({
<div>
<h2 className="text-2xl font-bold tracking-tight">Vendor Document List</h2>
<p className="text-muted-foreground">
- 문서리스트와 이슈스테이지를 생성하고 관리할 수 있으며 삼성중공업으로 전달할 수 있습니다.
+ {projectType === "ship"
+ ? "삼성중공업 문서시스템으로부터 목록을 가져오고 문서 파일을 등록하여 삼성중공업으로 전달할 수 있습니다."
+ : "문서리스트와 이슈스테이지를 생성하고 관리할 수 있으며 문서 파일을 등록하여 삼성중공업으로 전달할 수 있습니다."
+ }
</p>
</div>