diff --git a/apps/as/src/entities/fnrs-cnsltn/index.ts b/apps/as/src/entities/fnrs-cnsltn/index.ts index 31bc2f528..176101dbe 100644 --- a/apps/as/src/entities/fnrs-cnsltn/index.ts +++ b/apps/as/src/entities/fnrs-cnsltn/index.ts @@ -40,6 +40,7 @@ export type { FnrsCnsltnSplmntDmndItem, FnrsCnsltnSplmntDmndResponseDto, FnrsSharItem, + RagIndexingInfoDto, } from "./model/fnrs-cnsltn-interface"; export type { EnvoActnReviewReqDto, diff --git a/apps/as/src/entities/fnrs-cnsltn/model/fnrs-cnsltn-interface.ts b/apps/as/src/entities/fnrs-cnsltn/model/fnrs-cnsltn-interface.ts index 8e50d5d79..2165ff49e 100644 --- a/apps/as/src/entities/fnrs-cnsltn/model/fnrs-cnsltn-interface.ts +++ b/apps/as/src/entities/fnrs-cnsltn/model/fnrs-cnsltn-interface.ts @@ -151,6 +151,14 @@ export type FnrsCnsltnSplmntDmndResponseDto = FnrsCnsltnSplmntDmndItem & fnrsCnsltnDocNo?: string; }; +/** 백엔드 RagIndexingInfoDto */ +export interface RagIndexingInfoDto { + isInProgress: boolean; + elapsedSeconds?: number; + estimatedRemainingSeconds?: number; + message?: string; +} + /** 백엔드 FnrsCnsltnMngDetResponseDto */ export type FnrsCnsltnMngDetResponseDto = PbadmsMngDetResponseBase< FnrsCnsltnMngResponseDto, @@ -159,6 +167,7 @@ export type FnrsCnsltnMngDetResponseDto = PbadmsMngDetResponseBase< > & { fnrsSharList?: FnrsSharBizCstTreeDto[]; sharAtchFileList?: AtflMngClientResponseDto[]; + ragIndexingInfo?: RagIndexingInfoDto | null; }; /** 백엔드 FnrsCnsltnApplySaveRequestDto */ diff --git a/apps/as/src/pages/fnrs-cnsltn/lib/ai-pending-utils.ts b/apps/as/src/pages/fnrs-cnsltn/lib/ai-pending-utils.ts index 1ac079216..99b1b29ab 100644 --- a/apps/as/src/pages/fnrs-cnsltn/lib/ai-pending-utils.ts +++ b/apps/as/src/pages/fnrs-cnsltn/lib/ai-pending-utils.ts @@ -1,3 +1,5 @@ +import type { RagIndexingInfoDto } from "@/entities/fnrs-cnsltn"; + const AI_PENDING_STATUS_CODES = ["FV", "AC", "AV"] as const; type AiPendingStatusCode = (typeof AI_PENDING_STATUS_CODES)[number]; @@ -17,5 +19,17 @@ function getAiPendingMessage(prgrsSttsComCd: string): string { return AI_PENDING_MESSAGES[prgrsSttsComCd as AiPendingStatusCode]; } -export { AI_PENDING_STATUS_CODES, getAiPendingMessage, isAiPendingStatus }; +function isRagIndexingInProgress( + prgrsSttsComCd: string, + ragIndexingInfo?: RagIndexingInfoDto | null, +): boolean { + return prgrsSttsComCd === "ER" && ragIndexingInfo?.isInProgress === true; +} + +export { + AI_PENDING_STATUS_CODES, + getAiPendingMessage, + isAiPendingStatus, + isRagIndexingInProgress, +}; export type { AiPendingStatusCode }; diff --git a/apps/as/src/pages/fnrs-cnsltn/ui/components/floating-action-buttons.tsx b/apps/as/src/pages/fnrs-cnsltn/ui/components/floating-action-buttons.tsx index b3d59f79c..f23e4c521 100644 --- a/apps/as/src/pages/fnrs-cnsltn/ui/components/floating-action-buttons.tsx +++ b/apps/as/src/pages/fnrs-cnsltn/ui/components/floating-action-buttons.tsx @@ -41,6 +41,7 @@ import { import { SplmntDmndDialog, type SplmntDmndDialogConfirmPayload } from "@/widgets/pbadms-sprt"; import { Button } from "@common/components"; +import { isRagIndexingInProgress } from "../../lib/ai-pending-utils"; import { FNRS_CNSLTN_VIEW_BUTTON_ACTION, type FnrsCnsltnViewButtonAction, @@ -627,16 +628,17 @@ function FloatingActionButtons({ 파일 보완 요청 )} - {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.dsgntRvwr) && ( - - )} + {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.dsgntRvwr) && + !isRagIndexingInProgress(prgrsSttsComCd, data.ragIndexingInfo) && ( + + )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.actnCmptn) && (