docs: [HR] 휴가관리 목록 정렬 변경 이력 추가

This commit is contained in:
김보곤
2026-03-20 10:42:52 +09:00
parent 3b43099fbf
commit 2be6da8ab4
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
# 휴가관리 목록 정렬 기준 변경 (기간 최신순)
**날짜:** 2026-03-20
**작업자:** Claude Code
## 변경 개요
휴가관리 목록의 정렬 기준을 `created_at`(등록일) → `start_date`(시작일) 내림차순으로 변경하여, 기간이 최신인 휴가가 상단에 표시되도록 수정.
## 수정된 파일
| 파일 | 변경 내용 |
|------|----------|
| `mng/app/Services/HR/LeaveService.php` | `getLeaves()` 메서드의 `orderBy('created_at', 'desc')``orderBy('start_date', 'desc')` |
## 상세 변경 사항
### 변경 전
```php
return $query
->orderByRaw("FIELD(status, 'pending', 'approved', 'rejected', 'cancelled')")
->orderBy('created_at', 'desc')
->paginate($perPage);
```
### 변경 후
```php
return $query
->orderByRaw("FIELD(status, 'pending', 'approved', 'rejected', 'cancelled')")
->orderBy('start_date', 'desc')
->paginate($perPage);
```
### 정렬 우선순위
1. **상태 우선**: 대기(pending) → 승인(approved) → 반려(rejected) → 취소(cancelled)
2. **기간 최신순**: `start_date` 내림차순 (최신 기간이 위)
## 관련 문서
- 없음