공통코드 수정중
This commit is contained in:
@@ -25,6 +25,9 @@ export interface CodeInfo {
|
||||
sortOrder?: number;
|
||||
isActive?: string | boolean;
|
||||
useYn?: string;
|
||||
// 계층 구조 필드
|
||||
parentCodeValue?: string | null;
|
||||
depth?: number;
|
||||
|
||||
// 기존 필드 (하위 호환성을 위해 유지)
|
||||
code_category?: string;
|
||||
@@ -33,6 +36,7 @@ export interface CodeInfo {
|
||||
code_name_eng?: string | null;
|
||||
sort_order?: number;
|
||||
is_active?: string;
|
||||
parent_code_value?: string | null;
|
||||
created_date?: string | null;
|
||||
created_by?: string | null;
|
||||
updated_date?: string | null;
|
||||
@@ -61,6 +65,9 @@ export interface CreateCodeRequest {
|
||||
codeNameEng?: string;
|
||||
description?: string;
|
||||
sortOrder?: number;
|
||||
// 계층 구조 필드
|
||||
parentCodeValue?: string;
|
||||
depth?: number;
|
||||
}
|
||||
|
||||
export interface UpdateCodeRequest {
|
||||
@@ -69,6 +76,8 @@ export interface UpdateCodeRequest {
|
||||
description?: string;
|
||||
sortOrder?: number;
|
||||
isActive?: "Y" | "N"; // 백엔드에서 기대하는 문자열 타입
|
||||
// 계층 구조 필드
|
||||
parentCodeValue?: string;
|
||||
}
|
||||
|
||||
export interface CodeOption {
|
||||
@@ -77,6 +86,24 @@ export interface CodeOption {
|
||||
labelEng?: string | null;
|
||||
}
|
||||
|
||||
// 계층 구조 트리 노드
|
||||
export interface CodeHierarchyNode {
|
||||
value: string;
|
||||
label: string;
|
||||
labelEng?: string | null;
|
||||
description?: string | null;
|
||||
depth: number;
|
||||
parentValue?: string | null;
|
||||
children: CodeHierarchyNode[];
|
||||
}
|
||||
|
||||
// 자식 코드 (연쇄 선택용)
|
||||
export interface CodeChildOption {
|
||||
value: string;
|
||||
label: string;
|
||||
hasChildren: boolean;
|
||||
}
|
||||
|
||||
export interface ReorderCodesRequest {
|
||||
codes: Array<{
|
||||
codeValue: string;
|
||||
|
||||
@@ -127,7 +127,7 @@ export interface UnifiedInputProps extends UnifiedBaseProps {
|
||||
// ===== UnifiedSelect =====
|
||||
|
||||
export type UnifiedSelectMode = "dropdown" | "radio" | "check" | "tag" | "toggle" | "swap";
|
||||
export type UnifiedSelectSource = "static" | "code" | "db" | "api" | "entity";
|
||||
export type UnifiedSelectSource = "static" | "code" | "db" | "api" | "entity" | "category";
|
||||
|
||||
export interface SelectOption {
|
||||
value: string;
|
||||
@@ -150,8 +150,13 @@ export interface UnifiedSelectConfig {
|
||||
entityTable?: string;
|
||||
entityValueField?: string;
|
||||
entityLabelField?: string;
|
||||
entityValueColumn?: string; // alias for entityValueField
|
||||
entityLabelColumn?: string; // alias for entityLabelField
|
||||
// API 연결 (source: api)
|
||||
apiEndpoint?: string;
|
||||
// 카테고리 연결 (source: category) - 레거시, code로 자동 변환됨
|
||||
categoryTable?: string;
|
||||
categoryColumn?: string;
|
||||
// 공통 옵션
|
||||
searchable?: boolean;
|
||||
multiple?: boolean;
|
||||
@@ -161,6 +166,9 @@ export interface UnifiedSelectConfig {
|
||||
cascading?: CascadingConfig;
|
||||
// 상호 배제
|
||||
mutualExclusion?: MutualExclusionConfig;
|
||||
// 계층 코드 연쇄 선택 (source: code일 때 계층 구조 사용)
|
||||
hierarchical?: boolean; // 계층 구조 사용 여부
|
||||
parentField?: string; // 부모 값을 참조할 필드 (다른 컴포넌트의 columnName)
|
||||
}
|
||||
|
||||
export interface UnifiedSelectProps extends UnifiedBaseProps {
|
||||
|
||||
Reference in New Issue
Block a user