feat: Add express-async-errors for improved error handling

- Integrated express-async-errors to automatically handle errors in async route handlers, enhancing the overall error management in the application.
- Updated app.ts to include the express-async-errors import for global error handling.
- Removed redundant logging statements in admin and user menu retrieval functions to streamline the code and improve readability.
- Adjusted logging levels from info to debug for less critical logs, ensuring that important information is logged appropriately without cluttering the logs.
This commit is contained in:
DDD1542
2026-02-12 11:42:52 +09:00
parent 0512a3214c
commit 4294e6206b
20 changed files with 555 additions and 481 deletions

View File

@@ -28,10 +28,10 @@ import { CSS } from "@dnd-kit/utilities";
// 드래그 가능한 컬럼 아이템
function SortableColumnRow({
id, col, index, isNumeric, isEntityJoin, onLabelChange, onWidthChange, onFormatChange, onRemove,
id, col, index, isNumeric, isEntityJoin, onLabelChange, onWidthChange, onFormatChange, onRemove, onShowInSummaryChange, onShowInDetailChange,
}: {
id: string;
col: { name: string; label: string; width?: number; format?: any };
col: { name: string; label: string; width?: number; format?: any; showInSummary?: boolean; showInDetail?: boolean };
index: number;
isNumeric: boolean;
isEntityJoin?: boolean;
@@ -39,6 +39,8 @@ function SortableColumnRow({
onWidthChange: (value: number) => void;
onFormatChange: (checked: boolean) => void;
onRemove: () => void;
onShowInSummaryChange?: (checked: boolean) => void;
onShowInDetailChange?: (checked: boolean) => void;
}) {
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id });
const style = { transform: CSS.Transform.toString(transform), transition };
@@ -84,6 +86,29 @@ function SortableColumnRow({
,
</label>
)}
{/* 헤더/상세 표시 토글 */}
{onShowInSummaryChange && (
<label className="flex shrink-0 cursor-pointer items-center gap-0.5 text-[10px]" title="테이블 헤더에 표시">
<input
type="checkbox"
checked={col.showInSummary !== false}
onChange={(e) => onShowInSummaryChange(e.target.checked)}
className="h-3 w-3"
/>
</label>
)}
{onShowInDetailChange && (
<label className="flex shrink-0 cursor-pointer items-center gap-0.5 text-[10px]" title="행 클릭 시 상세 정보에 표시">
<input
type="checkbox"
checked={col.showInDetail !== false}
onChange={(e) => onShowInDetailChange(e.target.checked)}
className="h-3 w-3"
/>
</label>
)}
<Button type="button" variant="ghost" size="sm" onClick={onRemove} className="text-muted-foreground hover:text-destructive h-5 w-5 shrink-0 p-0">
<X className="h-3 w-3" />
</Button>
@@ -621,6 +646,16 @@ const AdditionalTabConfigPanel: React.FC<AdditionalTabConfigPanelProps> = ({
updateTab({ columns: newColumns });
}}
onRemove={() => updateTab({ columns: selectedColumns.filter((_, i) => i !== index) })}
onShowInSummaryChange={(checked) => {
const newColumns = [...selectedColumns];
newColumns[index] = { ...newColumns[index], showInSummary: checked };
updateTab({ columns: newColumns });
}}
onShowInDetailChange={(checked) => {
const newColumns = [...selectedColumns];
newColumns[index] = { ...newColumns[index], showInDetail: checked };
updateTab({ columns: newColumns });
}}
/>
);
})}
@@ -2332,6 +2367,16 @@ export const SplitPanelLayoutConfigPanel: React.FC<SplitPanelLayoutConfigPanelPr
updateRightPanel({ columns: newColumns });
}}
onRemove={() => updateRightPanel({ columns: selectedColumns.filter((_, i) => i !== index) })}
onShowInSummaryChange={(checked) => {
const newColumns = [...selectedColumns];
newColumns[index] = { ...newColumns[index], showInSummary: checked };
updateRightPanel({ columns: newColumns });
}}
onShowInDetailChange={(checked) => {
const newColumns = [...selectedColumns];
newColumns[index] = { ...newColumns[index], showInDetail: checked };
updateRightPanel({ columns: newColumns });
}}
/>
);
})}