refactor: 코드 정리 및 불필요한 주석 제거
- EntityJoinController에서 중복 제거 설정 관련 주석 및 코드 삭제 - screenGroupController와 tableManagementController에서 AuthenticatedRequest 타입을 일반 Request로 변경 - 불필요한 로그 및 주석 제거로 코드 가독성 향상 - tableManagementController에서 에러 메시지 개선
This commit is contained in:
@@ -416,6 +416,10 @@ export function ScreenSettingModal({
|
||||
<Database className="h-3 w-3" />
|
||||
개요
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="table-setting" className="gap-1 text-xs px-2" disabled={!mainTable}>
|
||||
<Settings2 className="h-3 w-3" />
|
||||
테이블 설정
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="control-management" className="gap-1 text-xs px-2">
|
||||
<Zap className="h-3 w-3" />
|
||||
제어 관리
|
||||
@@ -466,7 +470,22 @@ export function ScreenSettingModal({
|
||||
/>
|
||||
</TabsContent>
|
||||
|
||||
{/* 탭 2: 제어 관리 */}
|
||||
{/* 탭 2: 테이블 설정 */}
|
||||
<TabsContent value="table-setting" className="mt-0 min-h-0 flex-1 overflow-hidden p-0">
|
||||
{mainTable && (
|
||||
<TableSettingModal
|
||||
isOpen={true}
|
||||
onClose={() => {}} // 탭에서는 닫기 불필요
|
||||
tableName={mainTable}
|
||||
tableLabel={mainTableLabel}
|
||||
screenId={currentScreenId}
|
||||
onSaveSuccess={handleRefresh}
|
||||
isEmbedded={true} // 임베드 모드
|
||||
/>
|
||||
)}
|
||||
</TabsContent>
|
||||
|
||||
{/* 탭 3: 제어 관리 */}
|
||||
<TabsContent value="control-management" className="mt-0 min-h-0 flex-1 overflow-auto p-3">
|
||||
<ControlManagementTab
|
||||
screenId={currentScreenId}
|
||||
@@ -2198,17 +2217,6 @@ function OverviewTab({
|
||||
<Database className="h-4 w-4 text-blue-500" />
|
||||
메인 테이블
|
||||
</h3>
|
||||
{mainTable && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="h-7 gap-1 text-xs"
|
||||
onClick={() => onOpenTableSetting?.(mainTable, mainTableLabel)}
|
||||
>
|
||||
<Settings2 className="h-3 w-3" />
|
||||
테이블 설정
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
{mainTable ? (
|
||||
<TableColumnAccordion
|
||||
@@ -3049,6 +3057,7 @@ interface ButtonControlInfo {
|
||||
// 버튼 스타일
|
||||
backgroundColor?: string;
|
||||
textColor?: string;
|
||||
borderRadius?: string;
|
||||
// 모달/네비게이션 관련
|
||||
modalScreenId?: number;
|
||||
navigateScreenId?: number;
|
||||
@@ -3215,6 +3224,7 @@ function ControlManagementTab({
|
||||
// 버튼 스타일 (webTypeConfig 우선)
|
||||
backgroundColor: webTypeConfig.backgroundColor || config.backgroundColor || style.backgroundColor,
|
||||
textColor: webTypeConfig.textColor || config.textColor || style.color || style.labelColor,
|
||||
borderRadius: webTypeConfig.borderRadius || config.borderRadius || style.borderRadius,
|
||||
// 모달/네비게이션 관련 (화면 디자이너는 targetScreenId 사용)
|
||||
modalScreenId: action.targetScreenId || action.modalScreenId,
|
||||
navigateScreenId: action.navigateScreenId || action.targetScreenId,
|
||||
@@ -3527,6 +3537,11 @@ function ControlManagementTab({
|
||||
comp.style.color = values.textColor;
|
||||
comp.style.labelColor = values.textColor;
|
||||
}
|
||||
if (values.borderRadius !== undefined) {
|
||||
comp.webTypeConfig.borderRadius = values.borderRadius;
|
||||
comp.componentConfig.borderRadius = values.borderRadius;
|
||||
comp.style.borderRadius = values.borderRadius;
|
||||
}
|
||||
|
||||
// 액션 타입 업데이트
|
||||
if (values.actionType) {
|
||||
@@ -3735,6 +3750,7 @@ function ControlManagementTab({
|
||||
const currentLabel = editedValues[btn.id]?.label ?? btn.label;
|
||||
const currentBgColor = editedValues[btn.id]?.backgroundColor ?? btn.backgroundColor ?? "#3b82f6";
|
||||
const currentTextColor = editedValues[btn.id]?.textColor ?? btn.textColor ?? "#ffffff";
|
||||
const currentBorderRadius = editedValues[btn.id]?.borderRadius ?? btn.borderRadius ?? "4px";
|
||||
|
||||
return (
|
||||
<div key={btn.id} className="py-3 px-1">
|
||||
@@ -3742,10 +3758,11 @@ function ControlManagementTab({
|
||||
<div className="flex items-center gap-3 mb-3">
|
||||
{/* 버튼 프리뷰 */}
|
||||
<div
|
||||
className="flex items-center justify-center px-3 py-1.5 rounded text-xs font-medium min-w-[60px] shrink-0"
|
||||
className="flex items-center justify-center px-3 py-1.5 text-xs font-medium min-w-[60px] shrink-0"
|
||||
style={{
|
||||
backgroundColor: currentBgColor,
|
||||
color: currentTextColor,
|
||||
borderRadius: currentBorderRadius,
|
||||
}}
|
||||
>
|
||||
{currentLabel || "버튼"}
|
||||
@@ -3870,6 +3887,34 @@ function ControlManagementTab({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 버튼 모서리 (borderRadius) */}
|
||||
<div className="grid grid-cols-[80px_1fr] items-center gap-2">
|
||||
<Label className="text-xs text-muted-foreground">모서리</Label>
|
||||
<div className="flex items-center gap-2">
|
||||
<Select
|
||||
value={editedValues[btn.id]?.borderRadius ?? btn.borderRadius ?? "4px"}
|
||||
onValueChange={(val) => setEditedValues(prev => ({
|
||||
...prev,
|
||||
[btn.id]: { ...prev[btn.id], borderRadius: val }
|
||||
}))}
|
||||
>
|
||||
<SelectTrigger className="h-7 w-[100px] text-xs">
|
||||
<SelectValue placeholder="선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="0px" className="text-xs">없음 (0px)</SelectItem>
|
||||
<SelectItem value="2px" className="text-xs">약간 (2px)</SelectItem>
|
||||
<SelectItem value="4px" className="text-xs">기본 (4px)</SelectItem>
|
||||
<SelectItem value="6px" className="text-xs">둥글게 (6px)</SelectItem>
|
||||
<SelectItem value="8px" className="text-xs">더 둥글게 (8px)</SelectItem>
|
||||
<SelectItem value="12px" className="text-xs">많이 (12px)</SelectItem>
|
||||
<SelectItem value="9999px" className="text-xs">원형</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<span className="text-[10px] text-muted-foreground">버튼 모서리 둥글기</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 확인 메시지 설정 (save/delete 액션에서만 표시) */}
|
||||
{((editedValues[btn.id]?.actionType || btn.actionType) === "save" ||
|
||||
(editedValues[btn.id]?.actionType || btn.actionType) === "delete") && (
|
||||
|
||||
Reference in New Issue
Block a user