창고코드 같이 올라가게 수정

This commit is contained in:
kjs
2026-01-06 15:33:44 +09:00
parent f0322a49ad
commit c1425be57f
3 changed files with 20 additions and 8 deletions

View File

@@ -605,7 +605,7 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
location_type: context?.locationType || "선반",
status: context?.status || "사용",
// 추가 필드 (테이블 컬럼명과 동일)
warehouse_id: context?.warehouseCode,
warehouse_code: context?.warehouseCode,
warehouse_name: context?.warehouseName,
floor: context?.floor,
zone: context?.zone,
@@ -623,6 +623,18 @@ export const RackStructureComponent: React.FC<RackStructureComponentProps> = ({
setPreviewData(locations);
setIsPreviewGenerated(true);
console.log("🏗️ [RackStructure] 생성된 위치 데이터:", {
locationsCount: locations.length,
firstLocation: locations[0],
context: {
warehouseCode: context?.warehouseCode,
warehouseName: context?.warehouseName,
floor: context?.floor,
zone: context?.zone,
},
});
onChange?.(locations);
}, [conditions, context, generateLocationCode, onChange, missingFields, hasRowOverlap, duplicateErrors, existingLocations, rowOverlapErrors]);

View File

@@ -27,7 +27,7 @@ export interface GeneratedLocation {
location_type?: string; // 위치 유형
status?: string; // 사용 여부
// 추가 필드 (상위 폼에서 매핑된 값)
warehouse_id?: string; // 창고 ID/코드
warehouse_code?: string; // 창고 코드 (DB 컬럼명과 동일)
warehouse_name?: string; // 창고명
floor?: string; // 층
zone?: string; // 구역