refactor: [stocks] 재고생산 상세에서 상태 필드 제거
- 목록에서 이미 상태 확인 가능하므로 상세 화면에서 제거 - 기본 정보 4칼럼 → 3칼럼 (생산번호, 등록일, 수량)
This commit is contained in:
@@ -22,7 +22,6 @@ import {
|
||||
import { toast } from 'sonner';
|
||||
import { IntegratedDetailTemplate } from '@/components/templates/IntegratedDetailTemplate';
|
||||
import { FormSection } from '@/components/organisms/FormSection';
|
||||
import { BadgeSm } from '@/components/atoms/BadgeSm';
|
||||
import {
|
||||
getStockOrderById,
|
||||
getBendingCodeMap,
|
||||
@@ -50,25 +49,6 @@ const stockDetailConfig: DetailConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// 상태 뱃지
|
||||
// ============================================================================
|
||||
|
||||
const STATUS_CONFIG: Record<string, { label: string; className: string }> = {
|
||||
draft: { label: '등록', className: 'bg-gray-100 text-gray-700 border-gray-200' },
|
||||
confirmed: { label: '확정', className: 'bg-blue-100 text-blue-700 border-blue-200' },
|
||||
in_progress: { label: '진행중', className: 'bg-green-100 text-green-700 border-green-200' },
|
||||
in_production: { label: '생산중', className: 'bg-green-100 text-green-700 border-green-200' },
|
||||
produced: { label: '생산완료', className: 'bg-blue-600 text-white border-blue-600' },
|
||||
completed: { label: '완료', className: 'bg-gray-500 text-white border-gray-500' },
|
||||
cancelled: { label: '취소', className: 'bg-red-100 text-red-700 border-red-200' },
|
||||
};
|
||||
|
||||
function getStatusBadge(status: string) {
|
||||
const config = STATUS_CONFIG[status] || { label: status, className: 'bg-gray-100 text-gray-700 border-gray-200' };
|
||||
return <BadgeSm className={config.className}>{config.label}</BadgeSm>;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Props
|
||||
// ============================================================================
|
||||
@@ -154,17 +134,11 @@ export function StockProductionDetail({ orderId }: StockProductionDetailProps) {
|
||||
<div className="space-y-6">
|
||||
{/* 기본 정보 */}
|
||||
<FormSection title="기본 정보" icon={ClipboardList}>
|
||||
<div className="grid grid-cols-1 md:grid-cols-4 gap-4">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div className="space-y-2">
|
||||
<Label>생산번호</Label>
|
||||
<Input value={data.orderNo} disabled />
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label>상태</Label>
|
||||
<div className="h-10 flex items-center">
|
||||
{getStatusBadge(data.status)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label>등록일</Label>
|
||||
<Input value={data.createdAt} disabled />
|
||||
|
||||
Reference in New Issue
Block a user