ERP-node/frontend/constants/company.ts

90 lines
2.2 KiB
TypeScript
Raw Permalink Normal View History

2025-08-21 09:41:46 +09:00
import { Company, CompanyTableColumn } from "@/types/company";
/**
*
*/
// 회사 상태 코드 정의
export const COMPANY_STATUS = {
ACTIVE: "active",
INACTIVE: "inactive",
PENDING: "pending",
} as const;
// 회사 상태 라벨 매핑
export const COMPANY_STATUS_LABELS = {
[COMPANY_STATUS.ACTIVE]: "활성",
[COMPANY_STATUS.INACTIVE]: "비활성",
[COMPANY_STATUS.PENDING]: "대기",
} as const;
// 회사 목록 테이블 컬럼 정의
export const COMPANY_TABLE_COLUMNS: CompanyTableColumn[] = [
2025-09-05 14:52:10 +09:00
{ key: "company_code", label: "회사코드", sortable: true, width: "150px" },
2025-08-21 09:41:46 +09:00
{ key: "company_name", label: "회사명", sortable: true },
2025-09-05 14:52:10 +09:00
{ key: "writer", label: "등록자", sortable: true, width: "200px" },
2025-08-21 09:41:46 +09:00
];
// 하드코딩된 회사 목록 데이터 (백엔드 구현 전까지 사용)
export const MOCK_COMPANIES: Company[] = [
{
company_code: "ILSHIN001",
company_name: "일신오토클레이브",
writer: "admin",
regdate: "2024-01-15T09:30:00Z",
status: COMPANY_STATUS.ACTIVE,
},
{
company_code: "HUTECH001",
company_name: "휴텍",
writer: "manager",
regdate: "2024-01-20T14:15:00Z",
status: COMPANY_STATUS.ACTIVE,
},
{
company_code: "DAIN001",
company_name: "다인",
writer: "admin",
regdate: "2024-02-01T11:00:00Z",
status: COMPANY_STATUS.ACTIVE,
},
{
company_code: "ACME001",
company_name: "ACME Corporation",
writer: "operator",
regdate: "2024-02-10T16:45:00Z",
status: COMPANY_STATUS.INACTIVE,
},
{
company_code: "TECH001",
company_name: "TechFlow Inc",
writer: "admin",
regdate: "2024-02-15T10:20:00Z",
status: COMPANY_STATUS.PENDING,
},
{
company_code: "GLOBAL001",
company_name: "Global Solutions",
writer: "test_user",
regdate: "2024-03-01T13:30:00Z",
status: COMPANY_STATUS.ACTIVE,
},
];
// 새 회사 등록 시 기본값
export const DEFAULT_COMPANY_FORM_DATA = {
company_name: "",
business_registration_number: "",
representative_name: "",
representative_phone: "",
email: "",
website: "",
address: "",
2025-08-21 09:41:46 +09:00
};
// 페이징 관련 상수
export const COMPANY_PAGINATION = {
DEFAULT_PAGE_SIZE: 10,
PAGE_SIZE_OPTIONS: [10, 20, 50, 100],
} as const;