feat(WEB): 근태 설정 및 관리 시스템 개선

- AttendanceSettingsManagement: 근무시간/휴식시간 설정 API 연동
- AttendanceManagement: 출퇴근 기록 조회/수정 기능 강화
- 근태 상태 필터링 및 검색 기능 개선
- 근태 actions 공통 로직 정리
This commit is contained in:
2025-12-30 17:20:04 +09:00
parent a45ff9af28
commit 2443c0dc63
8 changed files with 150 additions and 113 deletions

View File

@@ -9,7 +9,7 @@
'use server';
import { serverFetch } from '@/lib/api/fetch-wrapper';
import { cookies } from 'next/headers';
// ============================================
// 타입 정의
@@ -155,10 +155,12 @@ export async function checkIn(
*/
export async function checkOut(
data: CheckOutRequest
): Promise<{ success: boolean; data?: AttendanceRecord; error?: string; __authError?: boolean }> {
): Promise<{ success: boolean; data?: AttendanceRecord; error?: string }> {
try {
const { response, error } = await serverFetch(`${process.env.API_URL}/v1/attendances/check-out`, {
const headers = await getApiHeaders();
const response = await fetch(`${process.env.API_URL}/v1/attendances/check-out`, {
method: 'POST',
headers,
body: JSON.stringify({
user_id: data.userId,
check_out: data.checkOut,