[as fr] 2차 결재 진행시 버튼 2차결재시 검토의견 팝업 뜨지 못하도록 수정함

This commit is contained in:
2026-10-21 11:42:30 +09:00
parent 7df6f40bc4
commit 4be56402d8
3 changed files with 24 additions and 5 deletions
@@ -3,6 +3,7 @@
본 문서는 ONA 프론트엔드 모노레포 프로젝트(`frontend_as`)에서 **PM2를 활용한 애플리케이션 배포, 실행, 중지 및 모니터링 명령**을 체계적으로 정리한 가이드입니다.
---
pnpm --filter=as... build
## 1. 개요 및 아키텍처
@@ -330,6 +330,7 @@ export interface GetButtonConfigsOptions {
isForkJoin?: boolean;
branchSeCd?: "SP" | "SF" | "TOTAL_AGG" | "MAIN" | string;
branchSttsCd?: "WAITING" | "IN_PROGRESS" | "COMPLETED" | "SUPPLEMENT" | "REJECTED" | string;
isSecondApproval?: boolean;
}
const PENDING_APPROVAL_ACTIONS = new Set<FnrsCnsltnViewButtonAction>([
@@ -354,14 +355,19 @@ function resolveRoleUser01AtrzButtonActions(
// 본인 브랜치가 보완요청 중이면 'SL' 맵핑 적용 (검토/승인 버튼 숨김, 실무협의서관리만 노출)
effectiveStatus = "SL";
break;
case "IN_PROGRESS":
case "IN_PROGRESS": {
// 본인 브랜치가 정상 진행 중이면 원천 상태('TE' 또는 'RK') 정상 적용!
effectiveStatus = prgrsSttsComCd === "RK" ? "RK" : "TE";
// 2차 결재 중이거나(isSecondApproval) 원천 상태가 'RK'이면 'RK', 1차 검토이면 'TE'
const isSecondReview = Boolean(options?.isSecondApproval || prgrsSttsComCd === "RK");
effectiveStatus = isSecondReview ? "RK" : "TE";
break;
case "COMPLETED":
}
case "COMPLETED": {
// 본인 브랜치 승인 완료 후 타 브랜치 대기 중이면 조회 전용 맵 적용
effectiveStatus = prgrsSttsComCd === "RK" ? "RR" : "TP";
const isSecondReview = Boolean(options?.isSecondApproval || prgrsSttsComCd === "RK");
effectiveStatus = isSecondReview ? "RR" : "TP";
break;
}
case "WAITING":
return [FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocMng];
}
@@ -387,6 +393,11 @@ function resolveRoleUser01AtrzButtonActions(
}
return actions.filter((action) => {
// 2차 결재(조치결과서 검토) 단계에서는 '검토 결과 조회' 버튼 비활성화 (1차 기술검토 전용)
if (options?.isSecondApproval && action === FNRS_CNSLTN_VIEW_BUTTON_ACTION.rvwRsltInq) {
return false;
}
const needsPendingApproval = PENDING_APPROVAL_ACTIONS.has(action);
if (needsPendingApproval && options?.hasPendingApprovalRequest === false) return false;
@@ -192,8 +192,12 @@ function FloatingActionButtons({
draftGenLatest?.pwrkCnsltnDocNo ??
costVrfcLatest?.pwrkCnsltnDocNo;
const isSecondApproval = useMemo(() => {
return elaprDocPrgrsList.some((row) => Number(row.elaprCycl) === 2);
}, [elaprDocPrgrsList]);
const elaprPrgrsForPending =
prgrsSttsComCd === "RK"
isSecondApproval || prgrsSttsComCd === "RK"
? elaprDocPrgrsList.filter((row) => Number(row.elaprCycl) === 2)
: elaprDocPrgrsList;
const hasPendingApprovalRequest = hasCurrentUserPendingApprovalRequest(
@@ -318,6 +322,7 @@ function FloatingActionButtons({
isForkJoin,
branchSeCd: userBranchSeCd,
branchSttsCd: userBranchSttsCd,
isSecondApproval,
});
}, [
canRetryCostVrfc,
@@ -333,6 +338,7 @@ function FloatingActionButtons({
isForkJoin,
isPwrkCnsltnLoading,
isRvwLoginUserLoading,
isSecondApproval,
needsAiAutoLatest,
needsAtrzResolve,
needsElaprPrgrsCheck,
@@ -924,6 +930,7 @@ function FloatingActionButtons({
</Button>
)}
{shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.rvwRsltInq) &&
!isSecondApproval &&
!(
isForkJoin &&
(userPendingBranchSeCd === "TOTAL_AGG" || userPendingAtrzSeComCd === "ATRZ04")