Compare commits

..

No commits in common. "640351d812af9a0ca70c954cb15d4d6c56ee9f17" and "e3b78309faebf8a42a938966968defd968a3affb" have entirely different histories.

2 changed files with 15 additions and 21 deletions

View File

@ -1535,7 +1535,7 @@ export const SelectedItemsDetailInputComponent: React.FC<SelectedItemsDetailInpu
{/* 🆕 이미 입력된 상세 항목들 표시 */}
{editingItem.details.length > 0 && (
<div className="space-y-2">
<div className="text-xs font-medium"> ({editingItem.details.length})</div>
<div className="text-xs font-medium"> ({editingItem.details.length})</div>
{editingItem.details.map((detail, idx) => (
<div key={detail.id} className="flex items-center justify-between border rounded p-2 text-xs bg-muted/30">
<span>{idx + 1}. {detail[componentConfig.additionalFields?.[0]?.name] || "입력됨"}</span>
@ -1889,7 +1889,7 @@ export const SelectedItemsDetailInputComponent: React.FC<SelectedItemsDetailInpu
{/* 🆕 이미 입력된 상세 항목들 표시 */}
{editingItem.details.length > 0 && (
<div className="space-y-2">
<div className="text-xs font-medium"> ({editingItem.details.length})</div>
<div className="text-xs font-medium"> ({editingItem.details.length})</div>
{editingItem.details.map((detail, idx) => (
<div key={detail.id} className="flex items-center justify-between border rounded p-2 text-xs bg-muted/30">
<span>{idx + 1}. {detail[componentConfig.additionalFields?.[0]?.name] || "입력됨"}</span>
@ -1957,9 +1957,15 @@ export const SelectedItemsDetailInputComponent: React.FC<SelectedItemsDetailInpu
{index + 1}. {item.originalData[componentConfig.displayColumns?.[0]?.name] || "항목"}
</div>
<div className="text-xs text-muted-foreground">
{componentConfig.displayColumns?.map((col) => item.originalData[col.name]).filter(Boolean).join(" | ")}
{componentConfig.displayColumns?.map((col) => item.originalData[col.name]).filter(Boolean).join(" | ")}
</div>
{/* 입력된 값 표시 */}
{item.additionalData && Object.keys(item.additionalData).length > 0 && (
<div className="text-xs text-primary mt-1">
: {item.additionalData.customer_item_name} / : {item.additionalData.customer_item_code}
</div>
)}
</div>
</div>
<div className="flex items-center gap-2">
<Button
type="button"

View File

@ -60,18 +60,6 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
const resizable = componentConfig.resizable ?? true;
const minLeftWidth = componentConfig.minLeftWidth || 200;
const minRightWidth = componentConfig.minRightWidth || 300;
// 필드 표시 유틸리티 (하드코딩 제거, 동적으로 작동)
const shouldShowField = (fieldName: string): boolean => {
const lower = fieldName.toLowerCase();
// 기본 제외: id, 비밀번호, 토큰, 회사코드
if (lower === "id" || lower === "company_code" || lower === "company_name") return false;
if (lower.includes("password") || lower.includes("token")) return false;
// 나머지는 모두 표시!
return true;
};
// TableOptions Context
const { registerTable, unregisterTable } = useTableOptions();
@ -1702,13 +1690,13 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
value: item[leftColumn],
});
// 추가로 다른 의미있는 필드 1-2개 표시 (동적)
// 추가로 다른 의미있는 필드 1-2개 표시 (name, title 등)
const additionalKeys = Object.keys(item).filter(
(k) =>
k !== "id" &&
k !== "ID" &&
k !== leftColumn &&
shouldShowField(k),
(k.includes("name") || k.includes("title") || k.includes("desc")),
);
if (additionalKeys.length > 0) {
@ -1937,7 +1925,7 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
label: rightColumnLabels[col.name] || col.label || col.name,
}))
: Object.keys(filteredData[0] || {})
.filter((key) => shouldShowField(key))
.filter((key) => !key.toLowerCase().includes("password"))
.slice(0, 5)
.map((key) => ({
name: key,
@ -2549,9 +2537,9 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
</div>
));
} else {
// 설정이 없으면 모든 컬럼 표시 (민감한 필드 제외)
// 설정이 없으면 모든 컬럼 표시 (company_code, company_name 제외)
return Object.entries(editModalFormData)
.filter(([key]) => shouldShowField(key))
.filter(([key]) => key !== "company_code" && key !== "company_name")
.map(([key, value]) => (
<div key={key}>
<Label htmlFor={`edit-${key}`} className="text-xs sm:text-sm">