260812_01_ENH: 배정·진행 현황 개선 및 예약/이벤트 이력 기능 추가

- 프로젝트별 외주사·필드워커 배정 현황 및 미배정 건수 UI 추가
- 현장 면접 진행 여부와 사용자 권한에 따른 배정 탭·필터·컬럼 노출 제어
- 컨택 마지막 이벤트 일자 필터·정렬 및 결과/일자 컬럼 분리
- 컨택·면접·발송 현황의 날짜 범위 선택 optional 처리
- 진행 현황의 미배정 표시 및 일자별 미사용 결과 제외
- 전역 예약 기간 조회·이동 및 5분 단위 예약 알림 추가
- 내부 관리자용 이벤트 이력 단건 삭제 기능 추가
- 리스트 필터 UI 및 일반 헤더 정렬 기준 개선
- 프로젝트 저장 시 선택 프로젝트 정보 동기화
This commit is contained in:
2026-08-12 08:41:27 +09:00
parent e8f3308814
commit 081b53945a
34 changed files with 852 additions and 331 deletions

View File

@@ -17,11 +17,31 @@ export const GET = async (req: NextRequest, context: RouteContext) => {
return NextResponse.json(result, { status: 200 });
}
if (action === "user" && slug.length === 3 && slug[2] === "search") {
const fromDt = req.nextUrl.searchParams.get("fromDt");
const toDt = req.nextUrl.searchParams.get("toDt");
if (!fromDt || !toDt) {
return NextResponse.json({ message: "fromDt, toDt가 필요합니다." }, { status: 400 });
}
const result = await contactApi.get<ListReserve[]>(
`/reserve/user/${encodeURIComponent(slug[1])}/search?fromDt=${fromDt}&toDt=${toDt}`,
);
return NextResponse.json(result, { status: 200 });
}
if (action === "user" && slug.length === 3) {
const result = await contactApi.get<ListReserve[]>(`/reserve/${slug[1]}/user/${slug[2]}`);
return NextResponse.json(result, { status: 200 });
}
if (action === "user" && slug.length === 2) {
const requestPast = req.nextUrl.searchParams.get("requestPast");
const query = requestPast !== null ? `?requestPast=${requestPast}` : "";
const result = await contactApi.get<ListReserve[]>(`/reserve/user/${encodeURIComponent(slug[1])}${query}`);
return NextResponse.json(result, { status: 200 });
}
return NextResponse.json({ message: "Not found" }, { status: 404 });
} catch (error: unknown) {
return errorToResponse(error);