From 3f0a3584ec3bed2af6842b87c1374b0814b9b5e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Thu, 26 Feb 2026 20:19:39 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=20[employee]=20=EC=82=AC?= =?UTF-8?q?=EC=9B=90=EA=B4=80=EB=A6=AC=20=EC=A0=95=EB=A0=AC=20=EC=98=B5?= =?UTF-8?q?=EC=85=98=EC=97=90=20=ED=87=B4=EC=A7=81=EC=9D=BC=EC=9E=90=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EA=B8=B0=EB=B3=B8=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC=EC=9D=84=20=EC=9E=85=EC=82=AC=EC=9D=BC=20=EB=B9=A0?= =?UTF-8?q?=EB=A5=B8=EC=88=9C=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit dcec94278cecfa76f6d797841b4920da6e302a8e. --- src/components/hr/EmployeeManagement/index.tsx | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/components/hr/EmployeeManagement/index.tsx b/src/components/hr/EmployeeManagement/index.tsx index 08dc94a5..bd621516 100644 --- a/src/components/hr/EmployeeManagement/index.tsx +++ b/src/components/hr/EmployeeManagement/index.tsx @@ -39,7 +39,7 @@ import { isNextRedirectError } from '@/lib/utils/redirect-error'; type FilterOption = 'all' | 'hasUserId' | 'noUserId' | 'active' | 'leave' | 'resigned'; // 정렬 옵션 타입 -type SortOption = 'rank' | 'hireDateAsc' | 'hireDateDesc' | 'resignDateAsc' | 'resignDateDesc' | 'departmentAsc' | 'departmentDesc' | 'nameAsc' | 'nameDesc'; +type SortOption = 'rank' | 'hireDateDesc' | 'hireDateAsc' | 'departmentAsc' | 'departmentDesc' | 'nameAsc' | 'nameDesc'; // 필터 옵션 레이블 const FILTER_OPTIONS: { value: FilterOption; label: string }[] = [ @@ -53,11 +53,9 @@ const FILTER_OPTIONS: { value: FilterOption; label: string }[] = [ // 정렬 옵션 레이블 const SORT_OPTIONS: { value: SortOption; label: string }[] = [ - { value: 'hireDateAsc', label: '입사일 빠른순' }, - { value: 'hireDateDesc', label: '입사일 최신순' }, - { value: 'resignDateDesc', label: '퇴직일 최신순' }, - { value: 'resignDateAsc', label: '퇴직일 빠른순' }, { value: 'rank', label: '직급순' }, + { value: 'hireDateDesc', label: '입사일 최신순' }, + { value: 'hireDateAsc', label: '입사일 등록순' }, { value: 'departmentAsc', label: '부서 오름차순' }, { value: 'departmentDesc', label: '부서 내림차순' }, { value: 'nameAsc', label: '이름 오름차순' }, @@ -85,7 +83,7 @@ export function EmployeeManagement() { // 필터 및 정렬 상태 const [filterOption, setFilterOption] = useState('all'); - const [sortOption, setSortOption] = useState('hireDateAsc'); + const [sortOption, setSortOption] = useState('rank'); // 다이얼로그 상태 const [fieldSettingsOpen, setFieldSettingsOpen] = useState(false); @@ -168,14 +166,10 @@ export function EmployeeManagement() { // 직급 순서 정의 (높은 직급이 먼저) const rankOrder: Record = { '회장': 1, '사장': 2, '부사장': 3, '전무': 4, '상무': 5, '이사': 6, '부장': 7, '차장': 8, '과장': 9, '대리': 10, '주임': 11, '사원': 12 }; return (rankOrder[a.rank || ''] || 99) - (rankOrder[b.rank || ''] || 99); - case 'hireDateAsc': - return new Date(a.hireDate || 0).getTime() - new Date(b.hireDate || 0).getTime(); case 'hireDateDesc': return new Date(b.hireDate || 0).getTime() - new Date(a.hireDate || 0).getTime(); - case 'resignDateAsc': - return new Date(a.resignationDate || 0).getTime() - new Date(b.resignationDate || 0).getTime(); - case 'resignDateDesc': - return new Date(b.resignationDate || 0).getTime() - new Date(a.resignationDate || 0).getTime(); + case 'hireDateAsc': + return new Date(a.hireDate || 0).getTime() - new Date(b.hireDate || 0).getTime(); case 'departmentAsc': const deptA = a.departmentPositions?.[0]?.departmentName || ''; const deptB = b.departmentPositions?.[0]?.departmentName || '';