diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-08-26 01:17:56 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-08-26 01:17:56 +0000 |
| commit | 12e936c0b45ffa1c8f3c02ff77961212767be9a7 (patch) | |
| tree | 34f31b9a64c6d30e187c1114530c4d47b95d30a9 /components | |
| parent | 83f67ed333f0237b434a41d1eceef417c0d48313 (diff) | |
(대표님) 가입, 기본계약, 벤더
(최겸) 기술영업 아이템 관련
Diffstat (limited to 'components')
| -rw-r--r-- | components/additional-info/join-form.tsx | 209 | ||||
| -rw-r--r-- | components/layout/Header.tsx | 1 | ||||
| -rw-r--r-- | components/signup/join-form.tsx | 4 | ||||
| -rw-r--r-- | components/vendor-regular-registrations/registration-request-dialog.tsx | 16 |
4 files changed, 120 insertions, 110 deletions
diff --git a/components/additional-info/join-form.tsx b/components/additional-info/join-form.tsx index 90effddb..4f3998e3 100644 --- a/components/additional-info/join-form.tsx +++ b/components/additional-info/join-form.tsx @@ -755,6 +755,113 @@ export function InfoForm() { <Separator /> + {/* 서명/직인 등록 섹션 - 독립적으로 사용 가능 */} + <Card> + <CardHeader> + <CardTitle className="flex items-center gap-2"> + <CheckCircle className="w-5 h-5" /> + 회사 서명/직인 등록 (선택사항) + </CardTitle> + <CardDescription> + 회사의 공식 서명이나 직인을 등록하여 계약서 및 공식 문서에 사용할 수 있습니다. + </CardDescription> + </CardHeader> + <CardContent className="space-y-4"> + {/* 현재 등록된 서명/직인 파일 표시 (한 개만) */} + {(existingSignatureFiles.length > 0 || signatureFiles.length > 0) && ( + <div className="space-y-2"> + <div className="flex items-center gap-2 p-2 border rounded-lg bg-green-50"> + <CheckCircle className="w-4 h-4 text-green-600" /> + <span className="text-sm text-green-800">서명/직인 등록됨</span> + </div> + + {/* 기존 등록된 서명/직인 (첫 번째만 표시) */} + {existingSignatureFiles.length > 0 && signatureFiles.length === 0 && ( + <div className="p-2 border rounded-lg"> + {(() => { + const file = existingSignatureFiles[0]; + const fileInfo = getFileInfo(file.fileName); + return ( + <div className="flex items-center gap-2"> + <FileListIcon /> + <div className="flex-1"> + <div className="text-xs font-medium">{fileInfo.icon} {file.fileName}</div> + <div className="text-xs text-muted-foreground"> + {getAttachmentTypeLabel(file.attachmentType)} | {file.fileSize ? formatFileSize(file.fileSize) : '크기 정보 없음'} + </div> + </div> + <div className="flex items-center space-x-1"> + <FileListAction + onClick={() => handleDownloadFile(file)} + disabled={isDownloading} + > + {isDownloading ? <Loader2 className="h-3 w-3 animate-spin" /> : <Download className="h-3 w-3" />} + </FileListAction> + <FileListAction onClick={() => handleDeleteExistingFile(file.id)}> + <X className="h-3 w-3" /> + </FileListAction> + </div> + </div> + ); + })()} + </div> + )} + + {/* 새로 업로드된 서명/직인 */} + {signatureFiles.length > 0 && ( + <div className="p-2 border rounded-lg bg-blue-50"> + {(() => { + const file = signatureFiles[0]; + return ( + <div className="flex items-center gap-2"> + <FileListIcon /> + <div className="flex-1"> + <div className="text-xs font-medium">{file.name}</div> + <div className="text-xs text-muted-foreground"> + 서명/직인 (새 파일) | {prettyBytes(file.size)} + </div> + </div> + <FileListAction onClick={removeSignatureFile}> + <X className="h-3 w-3" /> + </FileListAction> + </div> + ); + })()} + </div> + )} + </div> + )} + + {/* 서명/직인 업로드 드롭존 */} + <Dropzone + maxSize={MAX_FILE_SIZE} + onDropAccepted={handleSignatureDropAccepted} + onDropRejected={handleSignatureDropRejected} + disabled={isSubmitting} + > + {({ maxSize }) => ( + <DropzoneZone className="flex justify-center min-h-[50px]"> + <DropzoneInput /> + <div className="flex items-center gap-2"> + <Upload className="w-4 h-4" /> + <div className="text-sm"> + <DropzoneTitle> + {existingSignatureFiles.length > 0 || signatureFiles.length > 0 + ? "서명/직인 교체" + : "서명/직인 업로드" + } + </DropzoneTitle> + <DropzoneDescription> + 한 개 파일만 업로드 가능 {maxSize ? ` | 최대: ${prettyBytes(maxSize)}` : ""} + </DropzoneDescription> + </div> + </div> + </DropzoneZone> + )} + </Dropzone> + </CardContent> + </Card> + {/* 정규업체 등록 현황 섹션 */} {registrationData ? ( <Card> @@ -781,104 +888,6 @@ export function InfoForm() { </div> )} - {/* 서명/직인 등록 */} - <div className="space-y-2"> - <h4 className="font-medium text-sm">회사 서명/직인 등록</h4> - - {/* 현재 등록된 서명/직인 파일 표시 (한 개만) */} - {(existingSignatureFiles.length > 0 || signatureFiles.length > 0) && ( - <div className="space-y-2"> - <div className="flex items-center gap-2 p-2 border rounded-lg bg-green-50"> - <CheckCircle className="w-4 h-4 text-green-600" /> - <span className="text-sm text-green-800">서명/직인 등록됨</span> - </div> - - {/* 기존 등록된 서명/직인 (첫 번째만 표시) */} - {existingSignatureFiles.length > 0 && signatureFiles.length === 0 && ( - <div className="p-2 border rounded-lg"> - {(() => { - const file = existingSignatureFiles[0]; - const fileInfo = getFileInfo(file.fileName); - return ( - <div className="flex items-center gap-2"> - <FileListIcon /> - <div className="flex-1"> - <div className="text-xs font-medium">{fileInfo.icon} {file.fileName}</div> - <div className="text-xs text-muted-foreground"> - {getAttachmentTypeLabel(file.attachmentType)} | {file.fileSize ? formatFileSize(file.fileSize) : '크기 정보 없음'} - </div> - </div> - <div className="flex items-center space-x-1"> - <FileListAction - onClick={() => handleDownloadFile(file)} - disabled={isDownloading} - > - {isDownloading ? <Loader2 className="h-3 w-3 animate-spin" /> : <Download className="h-3 w-3" />} - </FileListAction> - <FileListAction onClick={() => handleDeleteExistingFile(file.id)}> - <X className="h-3 w-3" /> - </FileListAction> - </div> - </div> - ); - })()} - </div> - )} - - {/* 새로 업로드된 서명/직인 */} - {signatureFiles.length > 0 && ( - <div className="p-2 border rounded-lg bg-blue-50"> - {(() => { - const file = signatureFiles[0]; - return ( - <div className="flex items-center gap-2"> - <FileListIcon /> - <div className="flex-1"> - <div className="text-xs font-medium">{file.name}</div> - <div className="text-xs text-muted-foreground"> - 서명/직인 (새 파일) | {prettyBytes(file.size)} - </div> - </div> - <FileListAction onClick={removeSignatureFile}> - <X className="h-3 w-3" /> - </FileListAction> - </div> - ); - })()} - </div> - )} - </div> - )} - - {/* 서명/직인 업로드 드롭존 */} - <Dropzone - maxSize={MAX_FILE_SIZE} - onDropAccepted={handleSignatureDropAccepted} - onDropRejected={handleSignatureDropRejected} - disabled={isSubmitting} - > - {({ maxSize }) => ( - <DropzoneZone className="flex justify-center min-h-[50px]"> - <DropzoneInput /> - <div className="flex items-center gap-2"> - <Upload className="w-4 h-4" /> - <div className="text-sm"> - <DropzoneTitle> - {existingSignatureFiles.length > 0 || signatureFiles.length > 0 - ? "서명/직인 교체" - : "서명/직인 업로드" - } - </DropzoneTitle> - <DropzoneDescription> - 한 개 파일만 업로드 가능 {maxSize ? ` | 최대: ${prettyBytes(maxSize)}` : ""} - </DropzoneDescription> - </div> - </div> - </DropzoneZone> - )} - </Dropzone> - </div> - {/* 액션 버튼들 */} <div className="grid grid-cols-1 md:grid-cols-2 gap-3"> <Button @@ -912,12 +921,12 @@ export function InfoForm() { 현재 정규업체 등록 진행 상황이 없습니다. </CardDescription> </CardHeader> - <CardContent> + {/* <CardContent> <div className="text-center py-4 text-muted-foreground"> <p>이미 정규업체로 등록되어 있거나, 아직 정규업체 등록을 진행하지 않았습니다.</p> <p className="text-sm mt-1">정규업체 등록이 필요한 경우 담당자에게 문의하세요.</p> </div> - </CardContent> + </CardContent> */} </Card> )} diff --git a/components/layout/Header.tsx b/components/layout/Header.tsx index 68db1426..70e26212 100644 --- a/components/layout/Header.tsx +++ b/components/layout/Header.tsx @@ -127,6 +127,7 @@ export function Header() { const main = isLoading ? originalMain : filterActiveMenus(originalMain, activeMenus); const additional = isLoading ? originalAdditional : filterActiveAdditionalMenus(originalAdditional, activeMenus); + return ( <> <header className="border-grid sticky top-0 z-40 w-full border-b bg-slate-100 backdrop-blur supports-[backdrop-filter]:bg-background/60"> diff --git a/components/signup/join-form.tsx b/components/signup/join-form.tsx index 999b87dc..9eda1a7d 100644 --- a/components/signup/join-form.tsx +++ b/components/signup/join-form.tsx @@ -1002,9 +1002,9 @@ function CompleteVendorForm({ data.contacts.every(contact => contact.contactPhone ? validatePhoneNumber(contact.contactPhone, data.country, t).isValid : true ); - + // 대표자 이메일 검증, 비워두면 계정 이메일({{email}})을 사용합니다.(0825최겸수정) const isFormValid = data.vendorName && data.vendorTypeId && data.items && - data.country && data.phone && vendorPhoneValidation.isValid && data.email && + data.country && data.phone && vendorPhoneValidation.isValid && contactsValid && validateRequiredFiles().length === 0 diff --git a/components/vendor-regular-registrations/registration-request-dialog.tsx b/components/vendor-regular-registrations/registration-request-dialog.tsx index 2a79189a..cf79bd02 100644 --- a/components/vendor-regular-registrations/registration-request-dialog.tsx +++ b/components/vendor-regular-registrations/registration-request-dialog.tsx @@ -398,15 +398,15 @@ export function RegistrationRequestDialog({ onChange={(e) => handleInputChange('corporateNumber', e.target.value)} /> </div> - <div> + {/* <div> <Label htmlFor="majorItems">주요품목</Label> <Input id="majorItems" value={formData.majorItems} onChange={(e) => handleInputChange('majorItems', e.target.value)} /> - </div> - <div> + </div> */} + {/* <div> <Label htmlFor="establishmentDate">설립일자</Label> <Input id="establishmentDate" @@ -414,7 +414,7 @@ export function RegistrationRequestDialog({ value={formData.establishmentDate} onChange={(e) => handleInputChange('establishmentDate', e.target.value)} /> - </div> + </div> */} </div> </div> @@ -442,7 +442,7 @@ export function RegistrationRequestDialog({ /> </div> </div> - <div className="grid grid-cols-1 md:grid-cols-2 gap-4"> + {/* <div className="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <Label htmlFor="factoryAddress">공장 주소</Label> <Input @@ -481,7 +481,7 @@ export function RegistrationRequestDialog({ placeholder="필요시 입력" /> </div> - </div> + </div> */} </div> </div> @@ -538,7 +538,7 @@ export function RegistrationRequestDialog({ </div> </div> - <div className="mt-4 space-y-3"> + {/* <div className="mt-4 space-y-3"> <div className="flex items-center space-x-2"> <Checkbox id="isWorkingAtCompany" @@ -555,7 +555,7 @@ export function RegistrationRequestDialog({ /> <Label htmlFor="isInternalPartner">사내협력사 <span className="text-red-500">*</span></Label> </div> - </div> + </div> */} </div> {/* 대표자 경력 */} |
