최초커밋

This commit is contained in:
kjs
2025-08-21 09:41:46 +09:00
commit a0e5b57a24
2454 changed files with 1476904 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
/**
* 인증 관련 상수 정의
*/
export const AUTH_CONFIG = {
API_BASE_URL: process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080",
ENDPOINTS: {
LOGIN: "/auth/login",
STATUS: "/auth/status",
TEST: "/auth/test",
},
ROUTES: {
MAIN: "/main",
LOGIN: "/login",
},
} as const;
export const FORM_VALIDATION = {
MESSAGES: {
USER_ID_REQUIRED: "사용자 ID를 입력해주세요.",
PASSWORD_REQUIRED: "비밀번호를 입력해주세요.",
LOGIN_FAILED: "로그인에 실패했습니다.",
CONNECTION_FAILED: "서버 연결에 실패했습니다. 잠시 후 다시 시도해주세요.",
BACKEND_CONNECTION_FAILED: "백엔드 서버에 연결할 수 없습니다.",
},
} as const;
export const UI_CONFIG = {
COMPANY_NAME: "PLM 솔루션",
COPYRIGHT: "© 2025 WACE PLM Solution. All rights reserved.",
POWERED_BY: "Powered by Spring Boot + Next.js",
} as const;
+83
View File
@@ -0,0 +1,83 @@
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[] = [
{ key: "company_code", label: "회사코드", sortable: true, width: "200px" },
{ key: "company_name", label: "회사명", sortable: true },
{ key: "writer", label: "등록자", sortable: true, width: "400px" },
];
// 하드코딩된 회사 목록 데이터 (백엔드 구현 전까지 사용)
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: "",
};
// 페이징 관련 상수
export const COMPANY_PAGINATION = {
DEFAULT_PAGE_SIZE: 10,
PAGE_SIZE_OPTIONS: [10, 20, 50, 100],
} as const;
+41
View File
@@ -0,0 +1,41 @@
/**
* 레이아웃 관련 상수 정의
*/
export const LAYOUT_CONFIG = {
COMPANY_NAME: "PLM 솔루션",
API_BASE_URL: process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080",
ENDPOINTS: {
USER_MENUS: "/admin/user-menus",
USER_SAVE: "/admin/user/save",
},
SIDEBAR: {
WIDTH: "w-64",
MOBILE_WIDTH: "w-64",
},
FILE_UPLOAD: {
MAX_SIZE: 5 * 1024 * 1024, // 5MB
ACCEPTED_TYPES: ["image/"],
},
} as const;
export const MESSAGES = {
LOADING: "로딩 중...",
NO_MENUS: "메뉴가 없습니다.",
PROFILE_SAVE_SUCCESS: "프로필이 성공적으로 저장되었습니다.",
PROFILE_SAVE_ERROR: "프로필 저장 중 오류가 발생했습니다.",
FILE_SIZE_ERROR: "파일 크기는 5MB를 초과할 수 없습니다.",
FILE_TYPE_ERROR: "이미지 파일만 업로드 가능합니다.",
} as const;
export const MENU_ICONS = {
DEFAULT: "FileText",
HOME: ["홈", "메인"],
DOCUMENT: ["문서", "게시"],
USERS: ["사용자", "회원"],
STATISTICS: ["통계", "현황"],
SETTINGS: ["설정", "관리"],
} as const;
+67
View File
@@ -0,0 +1,67 @@
import { User, UserTableColumn } from "@/types/user";
/**
* 사용자 관리 관련 상수 정의
*/
// 사용자 상태 코드 정의
export const USER_STATUS = {
ACTIVE: "active",
INACTIVE: "inactive",
} as const;
// 사용자 상태 라벨 매핑
export const USER_STATUS_LABELS = {
[USER_STATUS.ACTIVE]: "활성",
[USER_STATUS.INACTIVE]: "비활성",
} as const;
// 사용자 목록 테이블 컬럼 정의 (camelCase)
// 검색 가능한 컬럼 정의 (등록일, 상태, 작업 제외)
export const SEARCH_OPTIONS = [
{ value: "all", label: "전체" },
{ value: "sabun", label: "사번" },
{ value: "company_name", label: "회사" },
{ value: "dept_name", label: "부서명" },
{ value: "position_name", label: "직책" },
{ value: "user_id", label: "사용자 ID" },
{ value: "user_name", label: "사용자명" },
{ value: "tel", label: "전화번호" },
{ value: "email", label: "이메일" },
] as const;
export const USER_TABLE_COLUMNS: UserTableColumn[] = [
{ key: "no", label: "No", sortable: false, width: "60px" },
{ key: "sabun", label: "사번", sortable: true, width: "80px" },
{ key: "company_name", label: "회사", sortable: true, width: "120px" },
{ key: "dept_name", label: "부서명", sortable: true, width: "120px" },
{ key: "position_name", label: "직책", sortable: true, width: "100px" },
{ key: "user_id", label: "사용자 ID", sortable: true, width: "120px" },
{ key: "user_name", label: "사용자명", sortable: true, width: "100px" },
{ key: "tel", label: "전화번호", sortable: false, width: "120px" },
{ key: "email", label: "이메일", sortable: true, width: "200px" },
{ key: "regdate", label: "등록일", sortable: true, width: "100px" },
{ key: "status", label: "상태", sortable: true, width: "120px" },
];
// MOCK_USERS 제거 - 이제 실제 백엔드 데이터 사용
// 새 사용자 등록 시 기본값 (camelCase)
export const DEFAULT_USER_FORM_DATA = {
user_id: "",
user_name: "",
dept_code: "",
dept_name: "",
position_name: "",
email: "",
tel: "",
cell_phone: "",
user_type_name: "",
status: USER_STATUS.ACTIVE,
};
// 페이징 관련 상수
export const USER_PAGINATION = {
DEFAULT_PAGE_SIZE: 20,
PAGE_SIZE_OPTIONS: [10, 20, 50, 100],
} as const;
+32
View File
@@ -0,0 +1,32 @@
// 사용자 변경이력 관련 상수 정의 (원본 JSP 기반)
export const USER_HISTORY_TABLE_COLUMNS = [
{ key: "no", label: "No", width: "10%", align: "center" },
{ key: "SABUN", label: "사번", width: "*", align: "center" },
{ key: "USER_ID", label: "사용자 ID", width: "*", align: "center" },
{ key: "USER_NAME", label: "사용자 이름", width: "*", align: "center" },
{ key: "DEPT_NAME", label: "부서명", width: "*", align: "center" },
{ key: "STATUS", label: "상태", width: "*", align: "center" },
{ key: "HISTORY_TYPE", label: "이력유형", width: "*", align: "center" },
{ key: "WRITER_NAME", label: "작성자", width: "*", align: "center" },
{ key: "REG_DATE_TITLE", label: "작성일", width: "*", align: "center" },
] as const;
// 상태 배지 색상 매핑
export const STATUS_BADGE_VARIANTS = {
: "default",
: "secondary",
active: "default",
inactive: "secondary",
Y: "default",
N: "secondary",
} as const;
// 변경 유형 배지 색상 매핑
export const CHANGE_TYPE_BADGE_VARIANTS = {
"사용자 정보 저장": "default",
: "default",
: "secondary",
: "destructive",
: "outline",
} as const;