30ab45a3c6
Build & Deploy to K8s / build-and-deploy (push) Successful in 4m27s
화면 폭: - 4개 페이지(사용자/권한 그룹/권한/부서) max-w 제거 → 화면 전체 사용 - 헤더 텍스트 컴팩트화 (text-xl + 작은 설명문) 부서관리 dept_info 스키마 1:1 매핑: - 누락 필드 6개 추가: master_sabun, master_user_id, location, location_name, data_type, sales_yn - frontend types/department.ts: Department / DepartmentFormData 확장 - frontend deptMngList: 폼 추가 + handleSelectDepartment / payload 매핑 - backend mapper: INSERT/UPDATE에 6개 컬럼 추가 - backend DepartmentService: insertParams/updateParams에 6개 필드 추가 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
115 lines
3.5 KiB
TypeScript
115 lines
3.5 KiB
TypeScript
/**
|
|
* 부서 관리 관련 타입 정의
|
|
*/
|
|
|
|
// 부서 정보 (dept_info 테이블 1:1 매핑)
|
|
export interface Department {
|
|
dept_code: string; // 부서 코드 (PK)
|
|
parent_dept_code?: string | null; // 상위 부서 코드
|
|
dept_name: string; // 부서명
|
|
master_sabun?: string | null; // 부서장 사번
|
|
master_user_id?: string | null; // 부서장 사용자ID
|
|
location?: string | null; // 위치코드
|
|
location_name?: string | null; // 위치명
|
|
created_date?: string | null; // 생성일시
|
|
data_type?: string | null; // 데이터 구분 (real/temp)
|
|
status?: "active" | "inactive" | null; // 사용여부
|
|
sales_yn?: "Y" | "N" | null; // 영업조직 여부
|
|
company_name?: string | null; // 회사명
|
|
company_code: string; // 회사 코드
|
|
short_name?: string | null; // 부서약칭
|
|
dept_type?: string | null; // 부서유형 (dept/team/temp)
|
|
org_system?: string | null; // 조직체계
|
|
approval_manager?: string | null; // 결재관리자 user_id
|
|
dept_manager?: string | null; // 부서관리자 user_id
|
|
org_head?: string | null; // 조직장 user_id
|
|
zipcode?: string | null;
|
|
address1?: string | null;
|
|
address2?: string | null;
|
|
start_date?: string | null; // YYYY-MM-DD
|
|
end_date?: string | null; // YYYY-MM-DD
|
|
erp_managed?: "Y" | "N" | null;
|
|
show_in_chart?: "Y" | "N" | null;
|
|
sort_order?: number | null;
|
|
created_at?: string;
|
|
updated_at?: string;
|
|
// UI용 추가 필드
|
|
children?: Department[];
|
|
member_count?: number;
|
|
}
|
|
|
|
// 부서원 정보
|
|
export interface DepartmentMember {
|
|
user_id: string; // 사용자 ID
|
|
user_name: string; // 사용자명
|
|
dept_code: string; // 부서 코드
|
|
dept_name: string; // 부서명
|
|
is_primary: boolean; // 주 부서 여부
|
|
position_name?: string; // 직책명
|
|
email?: string; // 이메일
|
|
phone?: string; // 전화번호
|
|
cell_phone?: string; // 휴대폰
|
|
}
|
|
|
|
// 사용자-부서 매핑 (겸직 지원)
|
|
export interface UserDepartmentMapping {
|
|
user_id: string;
|
|
dept_code: string;
|
|
is_primary: boolean; // 주 부서 여부
|
|
created_at?: string;
|
|
}
|
|
|
|
// 부서 등록/수정 폼 데이터 — dept_info 스키마 1:1
|
|
export interface DepartmentFormData {
|
|
dept_name: string; // 부서명 (필수)
|
|
parent_dept_code?: string | null;
|
|
short_name?: string | null;
|
|
dept_type?: string | null;
|
|
org_system?: string | null;
|
|
approval_manager?: string | null;
|
|
dept_manager?: string | null;
|
|
org_head?: string | null;
|
|
zipcode?: string | null;
|
|
address1?: string | null;
|
|
address2?: string | null;
|
|
start_date?: string | null;
|
|
end_date?: string | null;
|
|
erp_managed?: "Y" | "N" | null;
|
|
show_in_chart?: "Y" | "N" | null;
|
|
sort_order?: number | null;
|
|
status?: "active" | "inactive" | null;
|
|
// dept_info 추가 필드
|
|
master_sabun?: string | null;
|
|
master_user_id?: string | null;
|
|
location?: string | null;
|
|
location_name?: string | null;
|
|
data_type?: string | null;
|
|
sales_yn?: "Y" | "N" | null;
|
|
dept_code?: string | null; // 일괄등록용 (자동 부여 시 미전달)
|
|
}
|
|
|
|
// 부서 트리 노드 (UI용)
|
|
export interface DepartmentTreeNode {
|
|
dept_code: string;
|
|
dept_name: string;
|
|
parent_dept_code?: string | null;
|
|
children: DepartmentTreeNode[];
|
|
member_count: number;
|
|
isExpanded: boolean;
|
|
}
|
|
|
|
// 부서 API 응답
|
|
export interface DepartmentApiResponse {
|
|
success: boolean;
|
|
message: string;
|
|
data?: Department | Department[];
|
|
}
|
|
|
|
// 부서원 API 응답
|
|
export interface DepartmentMemberApiResponse {
|
|
success: boolean;
|
|
message: string;
|
|
data?: DepartmentMember | DepartmentMember[];
|
|
}
|
|
|