fix(WEB): 입고 신규 등록 시 상태 선택자 제거 - 입고대기 자동 설정
- 신규 등록: 상태를 receiving_pending 읽기전용 표시 - 수정 모드에서만 상태 셀렉트 표시
This commit is contained in:
@@ -637,28 +637,32 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) {
|
||||
{/* 작성자 - 읽기전용 */}
|
||||
{renderReadOnlyField('작성자', formData.createdBy, true)}
|
||||
|
||||
{/* 상태 - 수정가능 (셀렉트) */}
|
||||
<div>
|
||||
<Label htmlFor="status" className="text-sm text-muted-foreground">
|
||||
상태 <span className="text-red-500">*</span>
|
||||
</Label>
|
||||
<Select
|
||||
key={`status-${formData.status}`}
|
||||
value={formData.status}
|
||||
onValueChange={(value) => handleInputChange('status', value as ReceivingStatus)}
|
||||
>
|
||||
<SelectTrigger className="mt-1.5">
|
||||
<SelectValue placeholder="상태 선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{RECEIVING_STATUS_OPTIONS.map((option) => (
|
||||
<SelectItem key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
{/* 상태 - 신규: 입고대기 고정 / 수정: 셀렉트 */}
|
||||
{isNewMode ? (
|
||||
renderReadOnlyField('상태', '입고대기', true)
|
||||
) : (
|
||||
<div>
|
||||
<Label htmlFor="status" className="text-sm text-muted-foreground">
|
||||
상태 <span className="text-red-500">*</span>
|
||||
</Label>
|
||||
<Select
|
||||
key={`status-${formData.status}`}
|
||||
value={formData.status}
|
||||
onValueChange={(value) => handleInputChange('status', value as ReceivingStatus)}
|
||||
>
|
||||
<SelectTrigger className="mt-1.5">
|
||||
<SelectValue placeholder="상태 선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{RECEIVING_STATUS_OPTIONS.map((option) => (
|
||||
<SelectItem key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 비고 - 수정가능 */}
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user