feat: ESLint 정리 및 전체 코드 품질 개선

- eslint.config.mjs 규칙 강화 및 정리
- 전역 unused import/변수 제거 (312개 파일)
- next.config.ts, middleware, proxy route 개선
- CopyableCell molecule 추가
- 회계/결재/HR/생산/건설/품질/영업 등 전 도메인 lint 정리
- IntegratedListTemplateV2, DataTable, MobileCard 등 공통 컴포넌트 개선
- execute-server-action 에러 핸들링 보강
This commit is contained in:
유병철
2026-03-11 10:27:10 +09:00
parent 924726cba1
commit 81affdc441
315 changed files with 1977 additions and 1344 deletions

View File

@@ -22,7 +22,6 @@ import { Button } from "@/components/ui/button";
import { QuantityInput } from "@/components/ui/quantity-input";
import { NumberInput } from "@/components/ui/number-input";
import { PhoneInput } from "@/components/ui/phone-input";
import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";
import { Badge } from "@/components/ui/badge";
import { getPresetStyle } from "@/lib/utils/status-config";
@@ -187,7 +186,7 @@ export function OrderRegistration({
});
const [isQuotationDialogOpen, setIsQuotationDialogOpen] = useState(false);
const [isItemDialogOpen, setIsItemDialogOpen] = useState(false);
const [isSaving, setIsSaving] = useState(false);
const [, setIsSaving] = useState(false);
const [fieldErrors, setFieldErrors] = useState<FieldErrors>({});
// Config 선택

View File

@@ -15,8 +15,6 @@ import { useRouter } from "next/navigation";
import { Input } from "@/components/ui/input";
import { DatePicker } from "@/components/ui/date-picker";
import { Textarea } from "@/components/ui/textarea";
import { PhoneInput } from "@/components/ui/phone-input";
import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import {
@@ -39,7 +37,7 @@ import { toast } from "sonner";
import { IntegratedDetailTemplate } from "@/components/templates/IntegratedDetailTemplate";
import { orderSalesConfig } from "./orderSalesConfig";
import { BadgeSm } from "@/components/atoms/BadgeSm";
import { formatAmount, formatNumber } from "@/lib/utils/amount";
import { formatNumber } from "@/lib/utils/amount";
import {
OrderItem,
getOrderById,
@@ -91,7 +89,7 @@ interface EditFormData {
}
// 옵션 타입 정의
interface SelectOption {
interface _SelectOption {
value: string;
label: string;
}
@@ -129,7 +127,7 @@ export function OrderSalesDetailEdit({ orderId }: OrderSalesDetailEditProps) {
const [form, setForm] = useState<EditFormData | null>(null);
const [loading, setLoading] = useState(true);
const [isSaving, setIsSaving] = useState(false);
const [, _setIsSaving] = useState(false);
const [expandedProducts, setExpandedProducts] = useState<Set<string>>(new Set());
// 공통코드 옵션 (useCommonCodes 훅)
@@ -261,7 +259,7 @@ export function OrderSalesDetailEdit({ orderId }: OrderSalesDetailEditProps) {
}, [orderId, router]);
const handleCancel = () => {
const _handleCancel = () => {
// V2 패턴: ?mode=view로 이동
router.push(`/sales/order-management-sales/${orderId}?mode=view`);
};

View File

@@ -23,7 +23,6 @@ import {
TableRow,
} from "@/components/ui/table";
import {
FileText,
Factory,
XCircle,
FileSpreadsheet,
@@ -259,11 +258,11 @@ export function OrderSalesDetailView({ orderId }: OrderSalesDetailViewProps) {
loadOrder();
}, [orderId]);
const handleBack = () => {
const _handleBack = () => {
router.push("/sales/order-management-sales");
};
const handleEdit = () => {
const _handleEdit = () => {
// V2 패턴: ?mode=edit로 이동
router.push(`/sales/order-management-sales/${orderId}?mode=edit`);
};
@@ -273,7 +272,7 @@ export function OrderSalesDetailView({ orderId }: OrderSalesDetailViewProps) {
router.push(`/sales/order-management-sales/${orderId}/production-order`);
};
const handleViewProductionOrder = () => {
const _handleViewProductionOrder = () => {
// 생산지시 목록 페이지로 이동 (수주관리 내부)
router.push(`/sales/order-management-sales/production-orders`);
};

View File

@@ -218,7 +218,7 @@ interface ApiOrderStats {
confirmed_amount: number;
}
interface ApiResponse<T> {
interface _ApiResponse<T> {
success: boolean;
message: string;
data: T;

View File

@@ -61,11 +61,11 @@ export function ContractDocument({
companyBusinessNumber,
companyContact,
companyAddress,
items = [],
items: _items = [],
products,
subtotal = 0,
discountRate = 0,
totalAmount = 0,
totalAmount: _totalAmount = 0,
remarks,
}: ContractDocumentProps) {
const discountAmount = Math.round(subtotal * (discountRate / 100));

View File

@@ -111,7 +111,7 @@ export function SalesOrderDocument({
recipientName = "-",
recipientContact = "-",
shutterCount = 0,
items = [],
items: _items = [],
products = [],
remarks,
}: SalesOrderDocumentProps) {

View File

@@ -55,20 +55,20 @@ export function TransactionDocument({
orderNumber,
orderDate,
client,
clientBusinessNumber = "123-45-67890",
clientBusinessNumber: _clientBusinessNumber = "123-45-67890",
clientCeo = "대표자",
clientContact = "010-0123-4567",
clientAddress = "서울시 강남구",
clientAddress: _clientAddress = "서울시 강남구",
clientSiteName = "-",
companyName = "(주)케이디산업",
companyCeo = "홍길동",
companyBusinessNumber = "123-45-67890",
companyContact = "02-1234-5678",
companyContact: _companyContact = "02-1234-5678",
companyAddress = "서울 강남구 테헤란로 123",
items = [],
subtotal = 0,
discountRate = 0,
totalAmount = 0,
totalAmount: _totalAmount = 0,
}: TransactionDocumentProps) {
const discountAmount = Math.round(subtotal * (discountRate / 100));
const afterDiscount = subtotal - discountAmount;