diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-22 08:54:41 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-22 08:54:41 +0000 |
| commit | 06d4753d61a803e2f8447bc3167dced3434107d4 (patch) | |
| tree | cb5552768a390a5033d4f0d5922947f19229cdf8 /components/pq-input | |
| parent | a1e2aae9b68b7d6f998e40e801822f1385c3c1ab (diff) | |
(최겸) 구매 협력업체 관리 피드백 반영(PQ, 실사, QM 담당자 등)
Diffstat (limited to 'components/pq-input')
| -rw-r--r-- | components/pq-input/pq-input-tabs.tsx | 17 | ||||
| -rw-r--r-- | components/pq-input/pq-review-wrapper.tsx | 14 |
2 files changed, 20 insertions, 11 deletions
diff --git a/components/pq-input/pq-input-tabs.tsx b/components/pq-input/pq-input-tabs.tsx index 534e1a05..4e5272f5 100644 --- a/components/pq-input/pq-input-tabs.tsx +++ b/components/pq-input/pq-input-tabs.tsx @@ -315,12 +315,11 @@ export function PQInputTabs({ return } } else if (inputFormat === "TEXT_FILE") { - // 텍스트+파일 항목의 경우 텍스트 답변과 파일이 모두 있어야 함 - const hasFiles = answerData.uploadedFiles.length > 0 || answerData.newUploads.length > 0 - if (!answerData.answer || !hasFiles) { + // 텍스트+파일 항목의 경우 텍스트 답변만 있어야 함 (파일은 선택적) + if (!answerData.answer) { toast({ title: "필수 항목", - description: "필수 항목입니다. 텍스트 답변과 파일을 모두 입력해주세요.", + description: "필수 항목입니다. 텍스트 답변을 입력해주세요.", variant: "destructive", }) return @@ -671,7 +670,7 @@ export function PQInputTabs({ {/* 2-column grid */} <div className="grid grid-cols-1 md:grid-cols-2 gap-4 pb-4"> {sortByCode(group.items).map((item) => { - const { criteriaId, code, checkPoint, description, contractInfo, additionalRequirement } = item + const { criteriaId, code, checkPoint, remarks, description, contractInfo, additionalRequirement } = item const answerIndex = getAnswerIndex(criteriaId) if (answerIndex === -1) return null @@ -707,6 +706,14 @@ export function PQInputTabs({ {description} </CardDescription> )} + {item.remarks && ( + <div className="mt-2 p-2 rounded-md"> + <p className="text-sm font-medium text-muted-foreground mb-1">Remark:</p> + <p className="text-sm whitespace-pre-wrap"> + {item.remarks} + </p> + </div> + )} </div> {/* Save Status & Button */} diff --git a/components/pq-input/pq-review-wrapper.tsx b/components/pq-input/pq-review-wrapper.tsx index cc0f1b40..ca5f314f 100644 --- a/components/pq-input/pq-review-wrapper.tsx +++ b/components/pq-input/pq-review-wrapper.tsx @@ -380,12 +380,14 @@ export function PQReviewWrapper({ {item.description} </CardDescription> )} - {/* <div className="text-sm text-muted-foreground"> - 생성일: {item.createdAt?.toLocaleString('ko-KR')} - </div> - <div className="text-sm text-muted-foreground"> - 수정일: {item.updatedAt?.toLocaleString('ko-KR')} - </div> */} + {item.remarks && ( + <div className="mt-2 p-2 rounded-md"> + <p className="text-sm font-medium text-muted-foreground mb-1">Remark:</p> + <p className="text-sm whitespace-pre-wrap"> + {item.remarks} + </p> + </div> + )} </div> {/* 항목 상태 표시 */} {!!item.answer || item.attachments.length > 0 ? ( |
