diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-18 20:50:39 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-18 20:50:39 +0900 |
| commit | 8070b9428918d9ae5e03ad17eef6d403d2a7aaba (patch) | |
| tree | ae61ea52ae3dae5f2d084a16986b9733a4140047 /components/vendor-regular-registrations/registration-request-dialog.tsx | |
| parent | 8dba4d53d763bf9e1302a84a8fc65727425219ee (diff) | |
| parent | be5d5ab488ae875e7c56306403aba923e1784021 (diff) | |
Merge branch 'dujinkim' of https://github.com/DTS-Development/SHI_EVCP into dujinkim
Diffstat (limited to 'components/vendor-regular-registrations/registration-request-dialog.tsx')
| -rw-r--r-- | components/vendor-regular-registrations/registration-request-dialog.tsx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/components/vendor-regular-registrations/registration-request-dialog.tsx b/components/vendor-regular-registrations/registration-request-dialog.tsx index 99599ce5..d3aeb812 100644 --- a/components/vendor-regular-registrations/registration-request-dialog.tsx +++ b/components/vendor-regular-registrations/registration-request-dialog.tsx @@ -313,6 +313,16 @@ export function RegistrationRequestDialog({ return; } + // 업무담당자 검증 (최소 하나의 담당자라도 이름과 이메일이 있어야 함) + const hasValidBusinessContact = Object.values(formData.businessContacts).some(contact => + contact.name?.trim() && contact.email?.trim() + ); + + if (!hasValidBusinessContact) { + toast.error("업무담당자 정보를 최소 하나 이상 입력해주세요. (담당자명과 이메일 필수)"); + return; + } + if (onSubmit) { await onSubmit(formData); } @@ -599,7 +609,8 @@ export function RegistrationRequestDialog({ {/* 업무담당자 */} <div> - <h4 className="font-semibold mb-3">업무담당자</h4> + <h4 className="font-semibold mb-3">업무담당자 <span className="text-red-500">*</span></h4> + <p className="text-sm text-muted-foreground mb-4">최소 하나의 업무담당자 정보를 입력해주세요.</p> <div className="space-y-4"> {Object.entries(formData.businessContacts).map(([type, contact]) => { const labels = { @@ -615,7 +626,7 @@ export function RegistrationRequestDialog({ <h5 className="font-medium text-sm">{labels[type as keyof typeof labels]} 담당자</h5> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> <div> - <Label>담당자명</Label> + <Label>담당자명 <span className="text-red-500">*</span></Label> <Input value={contact.name} onChange={(e) => handleBusinessContactChange(type as keyof typeof formData.businessContacts, 'name', e.target.value)} @@ -646,7 +657,7 @@ export function RegistrationRequestDialog({ /> </div> <div> - <Label>이메일</Label> + <Label>이메일 <span className="text-red-500">*</span></Label> <Input type="email" value={contact.email} |
