export interface VendorRegularRegistration { id: number; vendorId: number; status: string; potentialCode: string | null; businessNumber: string; companyName: string; majorItems: string | null; establishmentDate: string | null; representative: string | null; country: string | null; documentSubmissions: { businessRegistration: boolean; creditEvaluation: boolean; bankCopy: boolean; auditResult: boolean; }; documentFiles: { businessRegistration: any[]; creditEvaluation: any[]; bankCopy: any[]; auditResult: any[]; }; contractAgreements: { cp: string; // not_submitted, reviewing, completed gtc: string; standardSubcontract: string; safetyHealth: string; ethics: string; domesticCredit: string; }; // 안전적격성 평가는 별도 필드로 분리 safetyQualificationContent: string | null; gtcSkipped: boolean; additionalInfo: boolean; // 기본계약 정보 추가 basicContracts: Array<{ templateId: number | null; templateName: string | null; status: string; createdAt: Date | null; filePath: string | null; fileName: string | null; }>; registrationRequestDate: string | null; assignedDepartment: string | null; assignedUser: string | null; remarks: string | null; } export interface VendorRegularRegistrationColumnConfig { id: keyof VendorRegularRegistration | string; label: string; group?: string; excelHeader?: string; type?: string; } export const vendorRegularRegistrationsColumnsConfig: VendorRegularRegistrationColumnConfig[] = [ { id: "status", label: "Status", type: "select", group: "기본 정보", excelHeader: "상태", }, { id: "potentialCode", label: "잠재코드", type: "text", group: "기본 정보", excelHeader: "잠재코드", }, { id: "businessNumber", label: "사업자번호", type: "text", group: "기본 정보", excelHeader: "사업자번호", }, { id: "companyName", label: "업체명", type: "text", group: "기본 정보", excelHeader: "업체명", }, { id: "majorItems", label: "주요품목", type: "text", group: "기본 정보", excelHeader: "주요품목", }, { id: "establishmentDate", label: "설립일자", type: "date", group: "기본 정보", excelHeader: "설립일자", }, { id: "representative", label: "대표자명", type: "text", group: "기본 정보", excelHeader: "대표자명", }, { id: "registrationRequestDate", label: "등록요청일", type: "date", group: "관리 정보", excelHeader: "등록요청일", }, { id: "assignedDepartment", label: "담당부서", type: "text", group: "관리 정보", excelHeader: "담당부서", }, { id: "assignedUser", label: "담당자", type: "text", group: "관리 정보", excelHeader: "담당자", }, { id: "remarks", label: "비고", type: "text", group: "관리 정보", excelHeader: "비고", }, ]; export const statusLabels: Record = { audit_pass: "실사통과", cp_submitted: "CP등록", cp_review: "CP검토", cp_finished: "CP완료", approval_ready: "조건충족", registration_requested: "등록요청됨", in_review: "정규등록검토", pending_approval: "장기미등록", }; export const statusColors: Record = { audit_pass: "bg-blue-100 text-blue-800", cp_submitted: "bg-green-100 text-green-800", cp_review: "bg-yellow-100 text-yellow-800", cp_finished: "bg-purple-100 text-purple-800", approval_ready: "bg-emerald-100 text-emerald-800", registration_requested: "bg-indigo-100 text-indigo-800", in_review: "bg-orange-100 text-orange-800", pending_approval: "bg-red-100 text-red-800", }; export const documentStatusColumns: { key: keyof VendorRegularRegistration["documentSubmissions"]; label: string }[] = [ { key: "businessRegistration", label: "사업자등록증" }, { key: "creditEvaluation", label: "신용평가서" }, { key: "bankCopy", label: "통장사본" }, { key: "auditResult", label: "실사결과" }, ]; export const contractAgreementColumns: { key: keyof VendorRegularRegistration["contractAgreements"]; label: string }[] = [ { key: "cp", label: "CP문서" }, { key: "gtc", label: "GTC" }, { key: "standardSubcontract", label: "표준하도급" }, { key: "safetyHealth", label: "안전보건관리" }, { key: "ethics", label: "윤리규범준수" }, { key: "domesticCredit", label: "내국신용장" }, ];