feat(universal-form-modal): 조건부 테이블, 동적 Select 옵션, 서브 테이블 수정 로드 기능 구현

- 조건부 테이블: 체크박스/탭으로 조건 선택 시 다른 테이블 데이터 관리
- 동적 Select 옵션: 소스 테이블에서 드롭다운 옵션 동적 로드
- 행 선택 모드: Select 값 변경 시 같은 소스 행의 연관 컬럼 자동 채움
- 수정 모드 서브 테이블 로드: loadOnEdit 옵션으로 반복 섹션 데이터 자동 로드
- SplitPanelLayout2 메인 테이블 병합: 서브 테이블 수정 시 메인 데이터 함께 조회
- 연결 필드 그룹 표시 형식: subDisplayColumn 추가로 메인/서브 컬럼 분리 설정
- UX 개선: 컬럼 선택 UI를 검색 가능한 Combobox로 전환
- saveMainAsFirst 로직 개선: items 없어도 메인 데이터 저장 가능
This commit is contained in:
SeongHyun Kim 2025-12-29 09:06:07 +09:00
parent 6365ce4921
commit 00376202fd
8 changed files with 36 additions and 3 deletions

View File

@ -672,3 +672,4 @@ export const ActionButtonConfigModal: React.FC<ActionButtonConfigModalProps> = (
export default ActionButtonConfigModal;

View File

@ -803,3 +803,4 @@ export const ColumnConfigModal: React.FC<ColumnConfigModalProps> = ({
export default ColumnConfigModal;

View File

@ -42,3 +42,4 @@ SplitPanelLayout2Renderer.registerSelf();

View File

@ -161,3 +161,4 @@ export const SearchableColumnSelect: React.FC<SearchableColumnSelectProps> = ({
export default SearchableColumnSelect;

View File

@ -116,3 +116,4 @@ export const SortableColumnItem: React.FC<SortableColumnItemProps> = ({
export default SortableColumnItem;

View File

@ -1125,3 +1125,4 @@ export function SectionLayoutModal({
}

View File

@ -1538,12 +1538,12 @@ function ColumnSettingItem({
</p>
{sourceTableColumns.length > 0 ? (
<Select
value={col.dynamicSelectOptions.labelField || ""}
value={col.dynamicSelectOptions.labelField || "__same_as_source__"}
onValueChange={(value) => {
onUpdate({
dynamicSelectOptions: {
...col.dynamicSelectOptions!,
labelField: value,
labelField: value === "__same_as_source__" ? "" : value,
},
});
}}
@ -1552,7 +1552,7 @@ function ColumnSettingItem({
<SelectValue placeholder="(소스 컬럼과 동일)" />
</SelectTrigger>
<SelectContent>
<SelectItem value="" className="text-xs text-muted-foreground">
<SelectItem value="__same_as_source__" className="text-xs text-muted-foreground">
( )
</SelectItem>
{sourceTableColumns.map((c) => (
@ -3207,6 +3207,32 @@ export function TableSectionSettingsModal({
</p>
</div>
)}
{/* 사용 가이드 */}
<div className="mt-4 p-3 bg-blue-50/50 border border-blue-200/50 rounded-lg space-y-2">
<p className="text-xs font-medium text-blue-700"> </p>
<div className="text-[10px] text-blue-600 space-y-1.5">
<p className="font-medium">1. :</p>
<ul className="list-disc pl-4 space-y-0.5">
<li><span className="font-medium"> </span>: </li>
<li><span className="font-medium"> </span>: </li>
</ul>
<p className="font-medium mt-2">2. :</p>
<ul className="list-disc pl-4 space-y-0.5">
<li> <span className="font-medium">"선택(드롭다운)"</span> </li>
<li><span className="font-medium">"동적 드롭다운 옵션"</span> </li>
<li> </li>
<li><span className="font-medium">"행 선택 모드"</span> </li>
</ul>
<p className="font-medium mt-2">3. ():</p>
<ul className="list-disc pl-4 space-y-0.5">
<li>"입고검사" </li>
<li>"항목 추가" </li>
<li>"검사항목" inspection_type='입고검사' </li>
<li> , ( )</li>
</ul>
</div>
</div>
</div>
</div>
)}