fix(backend): 테이블 설정 변경 시 screen_layouts의 webType 동기화 누락 수정

테이블 설정에서 input_type을 변경할 때 screen_layouts의
componentConfig.webType이 업데이트되지 않는 버그 수정

문제:
- syncScreenLayoutsInputType 함수에서 widgetType, inputType은 업데이트하지만
  componentConfig.webType은 누락되어 기존 값(예: "text")이 유지됨
- 프론트엔드 SelectBasicComponent는 webType을 기준으로 카테고리 로딩 여부를
  판단하므로, input_type을 category로 변경해도 옵션이 표시되지 않음

수정:
- componentConfig 업데이트 시 webType도 inputType과 동일하게 설정
- 로그 메시지에 webType 정보 추가

품목정보에서 동일하게 발생하는 문제
화면 레이아웃(screen_layouts)의 componentConfig.webType이 text로 설정되어 있어서 카테고리 API를 호출하지 않습니다
This commit is contained in:
SeongHyun Kim 2026-01-21 16:47:40 +09:00
parent 055094308d
commit 3fd7fdcb58
1 changed files with 3 additions and 2 deletions

View File

@ -921,11 +921,12 @@ export class TableManagementService {
...layout.properties,
widgetType: inputType,
inputType: inputType,
// componentConfig 내부의 type 업데이트
// componentConfig 내부의 type, inputType, webType 모두 업데이트
componentConfig: {
...layout.properties?.componentConfig,
type: newComponentType,
inputType: inputType,
webType: inputType, // 프론트엔드 SelectBasicComponent에서 카테고리 로딩 여부 판단에 사용
},
};
@ -941,7 +942,7 @@ export class TableManagementService {
);
logger.info(
`화면 레이아웃 업데이트: screen_id=${layout.screen_id}, component_id=${layout.component_id}, widgetType=${inputType}, componentType=${newComponentType}`
`화면 레이아웃 업데이트: screen_id=${layout.screen_id}, component_id=${layout.component_id}, widgetType=${inputType}, webType=${inputType}, componentType=${newComponentType}`
);
}