refactor: Remove password masking functionality from data services
- Deleted the `maskPasswordColumns` function from `dataService.ts` and its usage in data responses, simplifying the data handling process. - Removed password handling logic from `DynamicFormService`, ensuring that password management is streamlined and centralized. - Updated related components to reflect the removal of password masking, improving code clarity and maintainability.
This commit is contained in:
@@ -1183,31 +1183,15 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
|
||||
}
|
||||
|
||||
// leftItem이 null이면 join 모드 이외에는 데이터 로드 불가
|
||||
// detail 모드: 선택 안 하면 아무것도 안 뜸, 선택하면 필터링
|
||||
// join 모드: 선택 안 하면 전체, 선택하면 필터링
|
||||
if (!leftItem) return;
|
||||
|
||||
setIsLoadingRight(true);
|
||||
try {
|
||||
if (relationshipType === "detail") {
|
||||
// 상세 모드: 동일 테이블의 상세 정보 (엔티티 조인 활성화)
|
||||
const primaryKey = leftItem.id || leftItem.ID || Object.values(leftItem)[0];
|
||||
|
||||
// 🆕 엔티티 조인 API 사용
|
||||
const { entityJoinApi } = await import("@/lib/api/entityJoin");
|
||||
const rightDetailJoinColumns = extractAdditionalJoinColumns(
|
||||
componentConfig.rightPanel?.columns,
|
||||
rightTableName,
|
||||
);
|
||||
const result = await entityJoinApi.getTableDataWithJoins(rightTableName, {
|
||||
search: { id: primaryKey },
|
||||
enableEntityJoin: true,
|
||||
size: 1,
|
||||
companyCodeOverride: companyCode,
|
||||
additionalJoinColumns: rightDetailJoinColumns, // 🆕 Entity 조인 컬럼 전달
|
||||
});
|
||||
|
||||
const detail = result.items && result.items.length > 0 ? result.items[0] : null;
|
||||
setRightData(detail);
|
||||
} else if (relationshipType === "join") {
|
||||
// detail / join 모두 동일한 필터링 로직 사용
|
||||
// (차이점: 초기 로드 여부만 다름 - detail은 초기 로드 안 함)
|
||||
{
|
||||
// 조인 모드: 다른 테이블의 관련 데이터 (여러 개)
|
||||
const keys = componentConfig.rightPanel?.relation?.keys;
|
||||
const leftTable = componentConfig.leftPanel?.tableName;
|
||||
@@ -1443,16 +1427,24 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
|
||||
// 탭의 dataFilter (API 전달용)
|
||||
const tabDataFilterForApi = (tabConfig as any).dataFilter;
|
||||
|
||||
// 탭의 relation type 확인 (detail이면 초기 전체 로드 안 함)
|
||||
const tabRelationType = tabConfig.relation?.type || "join";
|
||||
|
||||
if (!leftItem) {
|
||||
// 좌측 미선택: 전체 데이터 로드 (dataFilter는 API에 전달)
|
||||
const result = await entityJoinApi.getTableDataWithJoins(tabTableName, {
|
||||
enableEntityJoin: true,
|
||||
size: 1000,
|
||||
companyCodeOverride: companyCode,
|
||||
additionalJoinColumns: tabJoinColumns,
|
||||
dataFilter: tabDataFilterForApi,
|
||||
});
|
||||
resultData = result.data || [];
|
||||
if (tabRelationType === "detail") {
|
||||
// detail 모드: 선택 안 하면 아무것도 안 뜸
|
||||
resultData = [];
|
||||
} else {
|
||||
// join 모드: 좌측 미선택 시 전체 데이터 로드 (dataFilter는 API에 전달)
|
||||
const result = await entityJoinApi.getTableDataWithJoins(tabTableName, {
|
||||
enableEntityJoin: true,
|
||||
size: 1000,
|
||||
companyCodeOverride: companyCode,
|
||||
additionalJoinColumns: tabJoinColumns,
|
||||
dataFilter: tabDataFilterForApi,
|
||||
});
|
||||
resultData = result.data || [];
|
||||
}
|
||||
} else if (leftColumn && rightColumn) {
|
||||
const searchConditions: Record<string, any> = {};
|
||||
|
||||
@@ -2781,16 +2773,20 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
|
||||
if (!isDesignMode && componentConfig.autoLoad !== false) {
|
||||
loadLeftData();
|
||||
// 좌측 미선택 상태에서 우측 전체 데이터 기본 로드
|
||||
// join 모드: 초기 전체 로드 / detail 모드: 초기 로드 안 함
|
||||
const relationshipType = componentConfig.rightPanel?.relation?.type || "detail";
|
||||
if (relationshipType === "join") {
|
||||
loadRightData(null);
|
||||
// 추가 탭도 전체 데이터 로드
|
||||
const tabs = componentConfig.rightPanel?.additionalTabs;
|
||||
if (tabs && tabs.length > 0) {
|
||||
tabs.forEach((_: any, idx: number) => {
|
||||
}
|
||||
// 추가 탭: 각 탭의 relation.type에 따라 초기 로드 결정
|
||||
const tabs = componentConfig.rightPanel?.additionalTabs;
|
||||
if (tabs && tabs.length > 0) {
|
||||
tabs.forEach((tab: any, idx: number) => {
|
||||
const tabRelType = tab.relation?.type || "join";
|
||||
if (tabRelType === "join") {
|
||||
loadTabData(idx + 1, null);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
@@ -4645,7 +4641,7 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
|
||||
) : (
|
||||
<>
|
||||
<p className="mb-2">좌측에서 항목을 선택하세요</p>
|
||||
<p className="text-xs">선택한 항목의 상세 정보가 여기에 표시됩니다</p>
|
||||
<p className="text-xs">선택한 항목의 관련 데이터가 여기에 표시됩니다</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user