[agent-pipeline] pipe-20260305181927-h4x5 round-3

This commit is contained in:
DDD1542 2026-03-06 03:40:54 +09:00
parent 0788962273
commit 182634f852
1 changed files with 14 additions and 2 deletions

View File

@ -35,6 +35,7 @@ import {
type ApprovalProxySetting,
} from "@/lib/api/approval";
import { getUserList } from "@/lib/api/user";
import { getCurrentUser } from "@/lib/api/client";
const STATUS_MAP: Record<string, { label: string; variant: "default" | "secondary" | "destructive" | "outline" }> = {
requested: { label: "요청", variant: "outline" },
@ -72,8 +73,19 @@ function SentTab() {
const fetchRequests = useCallback(async () => {
setLoading(true);
const res = await getApprovalRequests({ my_approvals: false });
if (res.success && res.data) setRequests(res.data);
try {
// 현재 로그인 사용자 ID를 기반으로 내가 올린 결재만 조회
const userRes = await getCurrentUser();
if (userRes.success && userRes.data) {
const res = await getApprovalRequests({ requester_id: userRes.data.userId });
if (res.success && res.data) setRequests(res.data);
} else {
// 사용자 정보 없으면 빈 목록 표시
setRequests([]);
}
} catch {
setRequests([]);
}
setLoading(false);
}, []);