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

@@ -14,7 +14,6 @@ import {
import { toast } from 'sonner';
import {
getInbox,
getInboxSummary,
approveDocument,
rejectDocument,
approveDocumentsBulk,
@@ -80,17 +79,9 @@ import { isNextRedirectError } from '@/lib/utils/redirect-error';
import { usePermission } from '@/hooks/usePermission';
import { InspectionReportModal } from '@/components/production/WorkOrders/documents/InspectionReportModal';
// ===== 통계 타입 =====
interface InboxSummary {
total: number;
pending: number;
approved: number;
rejected: number;
}
export function ApprovalBox() {
const router = useRouter();
const [isPending, startTransition] = useTransition();
const [, startTransition] = useTransition();
const { canApprove } = usePermission();
// ===== 상태 관리 =====
@@ -115,7 +106,7 @@ export function ApprovalBox() {
const [isModalOpen, setIsModalOpen] = useState(false);
const [selectedDocument, setSelectedDocument] = useState<ApprovalRecord | null>(null);
const [modalData, setModalData] = useState<ProposalDocumentData | ExpenseReportDocumentData | ExpenseEstimateDocumentData | LinkedDocumentData | null>(null);
const [isModalLoading, setIsModalLoading] = useState(false);
const [, setIsModalLoading] = useState(false);
// ===== 검사성적서 모달 상태 (work_order 연결 문서용) =====
const [isInspectionModalOpen, setIsInspectionModalOpen] = useState(false);
@@ -390,7 +381,7 @@ export function ApprovalBox() {
drafter,
};
break;
default:
default: {
// 품의서
const uploadedFileUrls = (formData.proposalData?.uploadedFiles || []).map(f =>
`/api/proxy/files/${f.id}/download`
@@ -409,6 +400,7 @@ export function ApprovalBox() {
drafter,
};
break;
}
}
setModalData(convertedData);
@@ -527,12 +519,12 @@ export function ApprovalBox() {
columns: [
{ key: 'no', label: '번호', className: 'w-[60px] text-center' },
{ key: 'documentNo', label: '문서번호' },
{ key: 'approvalType', label: '문서유형' },
{ key: 'title', label: '제목' },
{ key: 'drafter', label: '기안자' },
{ key: 'approver', label: '결재자' },
{ key: 'draftDate', label: '기안일시' },
{ key: 'documentNo', label: '문서번호', copyable: true },
{ key: 'approvalType', label: '문서유형', copyable: true },
{ key: 'title', label: '제목', copyable: true },
{ key: 'drafter', label: '기안자', copyable: true },
{ key: 'approver', label: '결재자', copyable: true },
{ key: 'draftDate', label: '기안일시', copyable: true },
{ key: 'status', label: '상태', className: 'text-center' },
],