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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
"use client";
import { HelpCircle } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import { Badge } from "@/components/ui/badge";
export function SwpUploadHelpDialog() {
return (
<Dialog>
<DialogTrigger asChild>
<Button variant="outline" size="sm" className="gap-2">
<HelpCircle className="h-4 w-4" />
SWP Submission Menu Guide
</Button>
</DialogTrigger>
<DialogContent className="max-w-2xl max-h-[80vh] overflow-y-auto">
<DialogHeader>
<DialogTitle>File Upload Guide</DialogTitle>
<DialogDescription>
Please upload with the correct file name format
</DialogDescription>
</DialogHeader>
<div className="space-y-6">
{/* 탭 설명 */}
<div className="space-y-3">
<h3 className="text-sm font-semibold">Tab Description</h3>
<div className="rounded-lg border p-4 space-y-3">
<div>
<Badge variant="default" className="mb-2">
DOCUMENT REGISTRATION TAB
</Badge>
<p className="text-sm text-muted-foreground">
This shows the status of uploaded files. SHI will respond with file acceptance status.
You can check the acceptance status of uploaded files, and cancel uploads in Standby status before acceptance.
</p>
</div>
<div className="border-t pt-3">
<Badge variant="default" className="mb-2">
DOCUMENT LIST TAB
</Badge>
<p className="text-sm text-muted-foreground">
After uploading a file, if SHI accepts the uploaded file, Rev and Activity No are created and added to this table.
Activity No is assigned upon acceptance.
</p>
</div>
</div>
</div>
{/* 파일명 형식 */}
<div className="space-y-2">
<h3 className="text-sm font-semibold">File Name Format</h3>
<div className="rounded-lg bg-muted p-4 font-mono text-sm">
[DOC_NO]_[REV_NO]_[STAGE].[Extension]
</div>
<p className="text-xs text-muted-foreground">
[Note] Must contain at least 2 underscores (_)
</p>
<p className="text-xs text-muted-foreground">
[Optional] You can add a file name as the 4th item (e.g. [DOC_NO]_[REV_NO]_[STAGE]_[FileName].[Extension])
</p>
</div>
{/* 각 항목 설명 - 1라인 형태 */}
<div className="space-y-3">
<h3 className="text-sm font-semibold">Item Description</h3>
<div className="flex items-center gap-3 rounded-lg border p-3">
<Badge variant="secondary" className="font-mono shrink-0">
DOC_NO
</Badge>
<div className="text-sm">
<span className="font-medium">Vendor Document Number</span>
<span className="text-muted-foreground"> - Must be unique per project</span>
</div>
</div>
<div className="flex items-center gap-3 rounded-lg border p-3">
<Badge variant="secondary" className="font-mono shrink-0">
REV_NO
</Badge>
<div className="text-sm">
<span className="font-medium">Revision Number</span>
<span className="text-muted-foreground"> - Usually increments like 01, 02 based on feedback</span>
</div>
</div>
<div className="flex items-center gap-3 rounded-lg border p-3">
<Badge variant="secondary" className="font-mono shrink-0">
STAGE
</Badge>
<div className="text-sm">
<span className="font-medium">Stage</span>
<span className="text-muted-foreground"> - Please enter stage information. (e.g. IFA, IFC)</span>
</div>
</div>
<div className="flex items-center gap-3 rounded-lg border p-3">
<Badge variant="secondary" className="font-mono shrink-0">
File Name
</Badge>
<div className="text-sm">
<span className="font-medium">Free File Name (Optional)</span>
<span className="text-muted-foreground"> - Name to identify the document (Underscores allowed, optional)</span>
</div>
</div>
</div>
{/* 예시 */}
<div className="space-y-2">
<h3 className="text-sm font-semibold">Correct Examples</h3>
<div className="space-y-2">
<div className="rounded-lg bg-green-50 dark:bg-green-950/30 border border-green-200 dark:border-green-800 p-3">
<code className="text-xs font-mono text-green-700 dark:text-green-300">
VD-DOC-001_01_IFA.pdf
</code>
<p className="text-xs text-green-600 dark:text-green-400 mt-1">
[O] Basic Format (File Name Omitted)
</p>
</div>
<div className="rounded-lg bg-green-50 dark:bg-green-950/30 border border-green-200 dark:border-green-800 p-3">
<code className="text-xs font-mono text-green-700 dark:text-green-300">
VD-DOC-001_01_IFA_drawing_final.pdf
</code>
<p className="text-xs text-green-600 dark:text-green-400 mt-1">
[O] File Name Added (Underscores allowed in file name)
</p>
</div>
<div className="rounded-lg bg-green-50 dark:bg-green-950/30 border border-green-200 dark:border-green-800 p-3">
<code className="text-xs font-mono text-green-700 dark:text-green-300">
TECH-SPEC-002_02_IFC.dwg
</code>
<p className="text-xs text-green-600 dark:text-green-400 mt-1">
[O] Basic Format Used
</p>
</div>
<div className="rounded-lg bg-green-50 dark:bg-green-950/30 border border-green-200 dark:border-green-800 p-3">
<code className="text-xs font-mono text-green-700 dark:text-green-300">
DOC-003_03_IFA_test_result_data.xlsx
</code>
<p className="text-xs text-green-600 dark:text-green-400 mt-1">
[O] File Name Added (Multiple words allowed)
</p>
</div>
</div>
</div>
{/* 잘못된 예시 */}
<div className="space-y-2">
<h3 className="text-sm font-semibold">Incorrect Examples</h3>
<div className="space-y-2">
<div className="rounded-lg bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 p-3">
<code className="text-xs font-mono text-red-700 dark:text-red-300">
VD-DOC-001-01-IFA.pdf
</code>
<p className="text-xs text-red-600 dark:text-red-400 mt-1">
[X] Hyphen (-) used instead of Underscore (_)
</p>
</div>
<div className="rounded-lg bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 p-3">
<code className="text-xs font-mono text-red-700 dark:text-red-300">
VD-DOC-001_01.pdf
</code>
<p className="text-xs text-red-600 dark:text-red-400 mt-1">
[X] STAGE info missing (Minimum 3 items required)
</p>
</div>
<div className="rounded-lg bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 p-3">
<code className="text-xs font-mono text-red-700 dark:text-red-300">
VD DOC 001_01_IFA.pdf
</code>
<p className="text-xs text-red-600 dark:text-red-400 mt-1">
[X] Contains spaces (Use underscores)
</p>
</div>
<div className="rounded-lg bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 p-3">
<code className="text-xs font-mono text-red-700 dark:text-red-300">
VD-DOC-001__IFA.pdf
</code>
<p className="text-xs text-red-600 dark:text-red-400 mt-1">
[X] REV_NO empty (Cannot be empty)
</p>
</div>
</div>
</div>
{/* 주의사항 */}
<div className="rounded-lg bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-800 p-4">
<h3 className="text-sm font-semibold text-amber-900 dark:text-amber-100 mb-2">
[Precautions]
</h3>
<ul className="text-xs text-amber-800 dark:text-amber-200 space-y-1 list-disc list-inside">
<li>File name must be at least in [DOC_NO]_[REV_NO]_[STAGE].[Extension] format</li>
<li>DOC_NO must be a document number assigned to the current project</li>
<li>The 4th item (File Name) is optional and can be omitted</li>
<li>Upload date/time is automatically generated by the system</li>
<li>If a file with the same name is already uploaded, it will not be overwritten and will be treated as an error</li>
<li>You must select a project first to enable the upload button</li>
</ul>
</div>
</div>
</DialogContent>
</Dialog>
);
}
|