fix: 프로젝트 전체 TypeScript 타입에러 408개 수정 (tsc --noEmit 0 errors)
- 공통 템플릿 타입 수정 (IntegratedDetailTemplate, UniversalListPage) - 페이지(app/[locale]) 타입 호환성 수정 (80개) - 재고/자재 모듈 타입 수정 (StockStatus, ReceivingManagement) - 생산 모듈 타입 수정 (WorkOrders, WorkerScreen, WorkResults) - 주문/출고 모듈 타입 수정 (ShipmentManagement, Orders) - 견적/단가 모듈 타입 수정 (Quotes, Pricing) - 건설 모듈 타입 수정 (49개, 17개 하위 모듈) - HR 모듈 타입 수정 (CardManagement, VacationManagement 등) - 설정 모듈 타입 수정 (PermissionManagement, AccountManagement 등) - 게시판 모듈 타입 수정 (BoardManagement, BoardList 등) - 회계 모듈 타입 수정 (VendorManagement, BadDebtCollection 등) - 기타 모듈 타입 수정 (CEODashboard, clients, vehicle 등) - 유틸/훅/API 타입 수정 (hooks, contexts, lib) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,4 +54,9 @@ const Button = React.forwardRef<
|
||||
});
|
||||
Button.displayName = "Button";
|
||||
|
||||
export { Button, buttonVariants };
|
||||
type ButtonProps = React.ComponentProps<"button"> &
|
||||
VariantProps<typeof buttonVariants> & {
|
||||
asChild?: boolean;
|
||||
};
|
||||
|
||||
export { Button, buttonVariants, type ButtonProps };
|
||||
@@ -40,7 +40,7 @@ export interface ConfirmDialogProps {
|
||||
/** 열림 상태 변경 핸들러 */
|
||||
onOpenChange: (open: boolean) => void;
|
||||
/** 다이얼로그 제목 */
|
||||
title: string;
|
||||
title: ReactNode;
|
||||
/** 다이얼로그 설명 (문자열 또는 ReactNode) */
|
||||
description: ReactNode;
|
||||
/** 확인 버튼 텍스트 (기본값: '확인') */
|
||||
@@ -178,15 +178,21 @@ export function DeleteConfirmDialog({
|
||||
* 저장 확인 다이얼로그 프리셋
|
||||
*/
|
||||
export interface SaveConfirmDialogProps
|
||||
extends Omit<ConfirmDialogProps, 'title' | 'confirmText' | 'variant'> {}
|
||||
extends Omit<ConfirmDialogProps, 'title' | 'confirmText' | 'variant' | 'description'> {
|
||||
/** 커스텀 제목 (기본: '저장 확인') */
|
||||
title?: string;
|
||||
/** 커스텀 설명 (기본: '변경사항을 저장하시겠습니까?') */
|
||||
description?: ReactNode;
|
||||
}
|
||||
|
||||
export function SaveConfirmDialog({
|
||||
description = '변경사항을 저장하시겠습니까?',
|
||||
title,
|
||||
...props
|
||||
}: SaveConfirmDialogProps) {
|
||||
return (
|
||||
<ConfirmDialog
|
||||
title="저장 확인"
|
||||
title={title || '저장 확인'}
|
||||
description={description}
|
||||
confirmText="저장"
|
||||
variant="default"
|
||||
|
||||
@@ -12,6 +12,8 @@ interface ErrorCardProps {
|
||||
type?: ErrorType;
|
||||
title?: string;
|
||||
description?: string;
|
||||
/** description의 별칭 */
|
||||
message?: string;
|
||||
tips?: string[];
|
||||
showBackButton?: boolean;
|
||||
showHomeButton?: boolean;
|
||||
@@ -19,6 +21,10 @@ interface ErrorCardProps {
|
||||
homeButtonLabel?: string;
|
||||
homeButtonHref?: string;
|
||||
onBack?: () => void;
|
||||
/** 커스텀 액션 버튼 라벨 */
|
||||
actionLabel?: string;
|
||||
/** 커스텀 액션 버튼 클릭 핸들러 */
|
||||
onAction?: () => void;
|
||||
}
|
||||
|
||||
const ERROR_CONFIG: Record<ErrorType, {
|
||||
@@ -75,6 +81,7 @@ export function ErrorCard({
|
||||
type = 'not-found',
|
||||
title,
|
||||
description,
|
||||
message,
|
||||
tips,
|
||||
showBackButton = true,
|
||||
showHomeButton = true,
|
||||
@@ -82,6 +89,8 @@ export function ErrorCard({
|
||||
homeButtonLabel = '목록으로 이동',
|
||||
homeButtonHref,
|
||||
onBack,
|
||||
actionLabel,
|
||||
onAction,
|
||||
}: ErrorCardProps) {
|
||||
const router = useRouter();
|
||||
const config = ERROR_CONFIG[type];
|
||||
@@ -113,7 +122,7 @@ export function ErrorCard({
|
||||
{title || config.defaultTitle}
|
||||
</CardTitle>
|
||||
<p className="text-muted-foreground">
|
||||
{description || config.defaultDescription}
|
||||
{description || message || config.defaultDescription}
|
||||
</p>
|
||||
</CardHeader>
|
||||
|
||||
@@ -137,27 +146,39 @@ export function ErrorCard({
|
||||
|
||||
{/* 액션 버튼 */}
|
||||
<div className="flex flex-col sm:flex-row gap-3 pt-4">
|
||||
{showBackButton && (
|
||||
{actionLabel && onAction ? (
|
||||
<Button
|
||||
variant="outline"
|
||||
className="flex-1 rounded-xl"
|
||||
onClick={handleBack}
|
||||
onClick={onAction}
|
||||
>
|
||||
<ArrowLeft className="w-4 h-4 mr-2" />
|
||||
{backButtonLabel}
|
||||
{actionLabel}
|
||||
</Button>
|
||||
)}
|
||||
) : (
|
||||
<>
|
||||
{showBackButton && (
|
||||
<Button
|
||||
variant="outline"
|
||||
className="flex-1 rounded-xl"
|
||||
onClick={handleBack}
|
||||
>
|
||||
<ArrowLeft className="w-4 h-4 mr-2" />
|
||||
{backButtonLabel}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{showHomeButton && homeButtonHref && (
|
||||
<Button
|
||||
asChild
|
||||
className="flex-1 rounded-xl bg-primary hover:bg-primary/90"
|
||||
>
|
||||
<Link href={homeButtonHref}>
|
||||
<Home className="w-4 h-4 mr-2" />
|
||||
{homeButtonLabel}
|
||||
</Link>
|
||||
</Button>
|
||||
{showHomeButton && homeButtonHref && (
|
||||
<Button
|
||||
asChild
|
||||
className="flex-1 rounded-xl bg-primary hover:bg-primary/90"
|
||||
>
|
||||
<Link href={homeButtonHref}>
|
||||
<Home className="w-4 h-4 mr-2" />
|
||||
{homeButtonLabel}
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ export interface FileListProps {
|
||||
onDownload?: (file: ExistingFile) => void;
|
||||
/** 읽기 전용 */
|
||||
readOnly?: boolean;
|
||||
/** 삭제 버튼 표시 여부 (readOnly의 반대 개념) */
|
||||
showRemove?: boolean;
|
||||
/** 추가 클래스 */
|
||||
className?: string;
|
||||
/** 파일 없을 때 메시지 */
|
||||
|
||||
Reference in New Issue
Block a user