blob: 52faea3cb0313d684204dd17e26c59e63fb4e4df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
"use client"
import * as React from "react"
import { useRouter } from "next/navigation"
import { Button } from "@/components/ui/button"
import { Badge } from "@/components/ui/badge"
import { ArrowLeft, Eye, Download, Settings } from "lucide-react"
import { InformationButton } from "@/components/information/information-button"
interface GtcClausesPageHeaderProps {
document: any // GtcDocumentWithRelations 타입
}
export function GtcClausesPageHeader({ document }: GtcClausesPageHeaderProps) {
const router = useRouter()
const handleBack = () => {
router.push('/evcp/basic-contract-template/gtc')
}
const handlePreview = () => {
// PDFTron 미리보기 기능
console.log("PDF Preview for document:", document.id)
}
const handleDownload = () => {
// 문서 다운로드 기능
console.log("Download document:", document.id)
}
const handleSettings = () => {
// 문서 설정 (템플릿 관리 등)
console.log("Document settings:", document.id)
}
return (
<div className="flex items-center justify-between">
{/* 헤더 왼쪽 */}
<div className="flex items-center gap-4">
<Button
variant="ghost"
size="sm"
onClick={handleBack}
className="gap-2"
>
<ArrowLeft className="h-4 w-4" />
목록으로
</Button>
<div className="border-l border-border pl-4">
<div className="flex items-center gap-2 mb-1">
<h1 className="text-2xl font-bold tracking-tight">
GTC 조항 관리
</h1>
<InformationButton pagePath="evcp/basic-contract-template/gtc/clauses" />
</div>
<div className="flex items-center gap-3 text-sm text-muted-foreground">
<Badge variant={document.type === "standard" ? "default" : "secondary"}>
{document.type === "standard" ? "표준" : "프로젝트"}
</Badge>
{document.project && (
<>
<span>•</span>
<span>{document.project.name} ({document.project.code})</span>
</>
)}
<span>•</span>
<span>v{document.revision}</span>
{document.fileName && (
<>
<span>•</span>
<span>{document.fileName}</span>
</>
)}
</div>
</div>
</div>
{/* 헤더 오른쪽 - 액션 버튼들 */}
<div className="flex items-center gap-2">
{/* <Button variant="outline" size="sm" onClick={handlePreview}>
<Eye className="mr-2 h-4 w-4" />
미리보기
</Button>
<Button variant="outline" size="sm" onClick={handleDownload}>
<Download className="mr-2 h-4 w-4" />
다운로드
</Button>
<Button variant="outline" size="sm" onClick={handleSettings}>
<Settings className="mr-2 h-4 w-4" />
설정
</Button> */}
</div>
</div>
)
}
|