## 품목관리 수정 버그 수정 - FG(제품) 수정 시 품목명 반영 안되는 문제 해결 - productName → name 필드 매핑 추가 - FG 품목코드 = 품목명 동기화 로직 추가 - Materials(SM, RM, CS) 수정페이지 진입 오류 해결 - UNIQUE 제약조건 위반 오류 해결 ## Sales 페이지 - 거래처관리 (client-management-sales-admin) 페이지 구현 - 견적관리 (quote-management) 페이지 구현 - 관련 컴포넌트 및 훅 추가 ## 기타 - 회원가입 페이지 차단 처리 - 디버깅용 콘솔 로그 추가 (PUT 요청/응답 확인용) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
74 lines
1.7 KiB
TypeScript
74 lines
1.7 KiB
TypeScript
/**
|
|
* FormActions - 폼 하단 액션 버튼 그룹
|
|
*/
|
|
|
|
import { ReactNode } from "react";
|
|
import { Button } from "../ui/button";
|
|
import { Save, X } from "lucide-react";
|
|
|
|
export interface FormActionsProps {
|
|
onSave?: () => void;
|
|
onCancel?: () => void;
|
|
saveLabel?: string;
|
|
cancelLabel?: string;
|
|
saveDisabled?: boolean;
|
|
cancelDisabled?: boolean;
|
|
saveLoading?: boolean;
|
|
children?: ReactNode;
|
|
className?: string;
|
|
align?: 'left' | 'center' | 'right';
|
|
}
|
|
|
|
export function FormActions({
|
|
onSave,
|
|
onCancel,
|
|
saveLabel = "저장",
|
|
cancelLabel = "취소",
|
|
saveDisabled = false,
|
|
cancelDisabled = false,
|
|
saveLoading = false,
|
|
children,
|
|
className = "",
|
|
align = 'right',
|
|
}: FormActionsProps) {
|
|
|
|
const alignClasses = {
|
|
left: "justify-start",
|
|
center: "justify-center",
|
|
right: "justify-end",
|
|
};
|
|
|
|
return (
|
|
<div className={`flex flex-col md:flex-row gap-3 ${alignClasses[align]} ${className}`}>
|
|
{children ? (
|
|
children
|
|
) : (
|
|
<>
|
|
{onCancel && (
|
|
<Button
|
|
type="button"
|
|
variant="outline"
|
|
onClick={onCancel}
|
|
disabled={cancelDisabled}
|
|
className="w-full md:w-auto"
|
|
>
|
|
<X className="h-4 w-4 mr-2" />
|
|
{cancelLabel}
|
|
</Button>
|
|
)}
|
|
{onSave && (
|
|
<Button
|
|
type="button"
|
|
onClick={onSave}
|
|
disabled={saveDisabled || saveLoading}
|
|
className="w-full md:w-auto"
|
|
>
|
|
<Save className="h-4 w-4 mr-2" />
|
|
{saveLoading ? "저장 중..." : saveLabel}
|
|
</Button>
|
|
)}
|
|
</>
|
|
)}
|
|
</div>
|
|
);
|
|
} |