feat(WEB): 근태 설정 및 관리 시스템 개선
- AttendanceSettingsManagement: 근무시간/휴식시간 설정 API 연동 - AttendanceManagement: 출퇴근 기록 조회/수정 기능 강화 - 근태 상태 필터링 및 검색 기능 개선 - 근태 actions 공통 로직 정리
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user