diff --git a/apps/as/src/entities/ai-auto-prcs-mng/api/ai-auto-prcs-mng-service.ts b/apps/as/src/entities/ai-auto-prcs-mng/api/ai-auto-prcs-mng-service.ts new file mode 100644 index 000000000..124dde1dd --- /dev/null +++ b/apps/as/src/entities/ai-auto-prcs-mng/api/ai-auto-prcs-mng-service.ts @@ -0,0 +1,24 @@ +import { client } from "@/shared/api"; +import { ENDPOINT } from "@/shared/config"; + +import type { + AiAutoPrcsLatestResponseDto, + AiAutoPrcsMngService, +} from "../model/ai-auto-prcs-mng-interface"; + +const BASE = ENDPOINT.AS_SERVICE.AI_AUTO_PRCS_MNG; + +async function findLatestPerAutoSeByFnrsDocNo( + fnrsCnsltnDocNo: string, + atmtnSeComCd?: string, +): Promise { + const response = await client.get( + `${BASE}/fnrs/${fnrsCnsltnDocNo}/latest`, + { params: atmtnSeComCd ? { atmtnSeComCd } : undefined }, + ); + return response.data; +} + +export const aiAutoPrcsMngService = { + findLatestPerAutoSeByFnrsDocNo, +} satisfies AiAutoPrcsMngService; diff --git a/apps/as/src/entities/ai-auto-prcs-mng/api/queries.ts b/apps/as/src/entities/ai-auto-prcs-mng/api/queries.ts new file mode 100644 index 000000000..fe97be2db --- /dev/null +++ b/apps/as/src/entities/ai-auto-prcs-mng/api/queries.ts @@ -0,0 +1,30 @@ +import { useQuery } from "@tanstack/react-query"; + +import { ENDPOINT } from "@/shared/config"; + +import { aiAutoPrcsMngService } from "./ai-auto-prcs-mng-service"; + +export const aiAutoPrcsMngKeys = { + all: [ENDPOINT.AS_SERVICE.AI_AUTO_PRCS_MNG] as const, + latest: (fnrsCnsltnDocNo: string, atmtnSeComCd?: string) => + [...aiAutoPrcsMngKeys.all, "latest", fnrsCnsltnDocNo, atmtnSeComCd ?? "all"] as const, +}; + +interface UseAiAutoPrcsLatestOptions { + enabled?: boolean; + atmtnSeComCd?: string; +} + +export function useAiAutoPrcsLatest( + fnrsCnsltnDocNo: string | null | undefined, + options: UseAiAutoPrcsLatestOptions = {}, +) { + const { enabled = true, atmtnSeComCd } = options; + + return useQuery({ + queryKey: aiAutoPrcsMngKeys.latest(fnrsCnsltnDocNo!, atmtnSeComCd), + queryFn: () => + aiAutoPrcsMngService.findLatestPerAutoSeByFnrsDocNo(fnrsCnsltnDocNo!, atmtnSeComCd), + enabled: Boolean(fnrsCnsltnDocNo) && enabled, + }); +} diff --git a/apps/as/src/entities/ai-auto-prcs-mng/index.ts b/apps/as/src/entities/ai-auto-prcs-mng/index.ts new file mode 100644 index 000000000..0668a4e0c --- /dev/null +++ b/apps/as/src/entities/ai-auto-prcs-mng/index.ts @@ -0,0 +1,8 @@ +export { aiAutoPrcsMngService } from "./api/ai-auto-prcs-mng-service"; +export { aiAutoPrcsMngKeys, useAiAutoPrcsLatest } from "./api/queries"; +export type { + AiAutoPrcsLatestResponseDto, + AiAutoPrcsMngService, + AiAutoSeComCd, +} from "./model/ai-auto-prcs-mng-interface"; +export { AI_AUTO_SE } from "./model/ai-auto-prcs-mng-interface"; diff --git a/apps/as/src/entities/ai-auto-prcs-mng/model/ai-auto-prcs-mng-interface.ts b/apps/as/src/entities/ai-auto-prcs-mng/model/ai-auto-prcs-mng-interface.ts new file mode 100644 index 000000000..ad833b3c6 --- /dev/null +++ b/apps/as/src/entities/ai-auto-prcs-mng/model/ai-auto-prcs-mng-interface.ts @@ -0,0 +1,44 @@ +/** 자동화구분 공통코드 (AIAUTOSE) */ +export const AI_AUTO_SE = { + FILE_VRFC: "FILE_VRFC", + DRAFT_GEN: "DRAFT_GEN", + COST_VRFC: "COST_VRFC", +} as const; + +export type AiAutoSeComCd = (typeof AI_AUTO_SE)[keyof typeof AI_AUTO_SE]; + +/** 백엔드 AiAutoPrcsLatestResponseDto */ +export interface AiAutoPrcsLatestResponseDto { + atmtnPrcsUuid?: string; + fnrsCnsltnDocNo?: string; + pwrkCnsltnDocNo?: string; + crtDmndUuid?: string; + atmtnSeComCd?: string; + atmtnSeComNm?: string; + bfrDocSttsComCd?: string; + bfrDocSttsComNm?: string; + aftrDocSttsComCd?: string; + aftrDocSttsComNm?: string; + atmtnPrcsSttsComCd?: string; + atmtnPrcsSttsComNm?: string; + dmndDt?: string; + dmndSysId?: string; + rplyDt?: string; + rplyRsltComCd?: string; + prcsErrCn?: string | null; + lastSttsInqDt?: string; + sttsInqRsltComCd?: string; + rtrsmCtpvNmtm?: number; + lastRtrsmDt?: string; + lastFrcSttsChgYn?: string; + isFailed?: boolean; + isRetryable?: boolean; +} + +/** Controller public 메서드명·시그니처와 동일 */ +export interface AiAutoPrcsMngService { + findLatestPerAutoSeByFnrsDocNo( + fnrsCnsltnDocNo: string, + atmtnSeComCd?: string, + ): Promise; +} diff --git a/apps/as/src/entities/dcrag-to/api/dcrag-to-service.ts b/apps/as/src/entities/dcrag-to/api/dcrag-to-service.ts index 16c2ccdbd..6643972e5 100644 --- a/apps/as/src/entities/dcrag-to/api/dcrag-to-service.ts +++ b/apps/as/src/entities/dcrag-to/api/dcrag-to-service.ts @@ -46,9 +46,40 @@ async function requestCostVerification( return response.data; } +async function reTransferDocument( + body: DcRagDocumentTransferRequestDto, +): Promise { + const response = await client.post( + `${BASE}/documents/re-transfer`, + body, + ); + return response.data; +} + +async function reGenerateDraft( + body: DcRagDraftGenerateRequestDto, +): Promise { + const response = await client.post( + `${BASE}/documents/draft/re-generate`, + body, + ); + return response.data; +} + +async function reVerifyCost(body: DcRagCostVerifyRequestDto): Promise { + const response = await client.post( + `${BASE}/documents/cost/re-verify`, + body, + ); + return response.data; +} + export const dcRagApiToService = { requestDocumentTransfer, requestDraftGeneration, getDraftGenerationStatus, requestCostVerification, + reTransferDocument, + reGenerateDraft, + reVerifyCost, } satisfies DcRagApiToService; diff --git a/apps/as/src/entities/dcrag-to/api/queries.ts b/apps/as/src/entities/dcrag-to/api/queries.ts index 4e9fc4483..bc14d9f7f 100644 --- a/apps/as/src/entities/dcrag-to/api/queries.ts +++ b/apps/as/src/entities/dcrag-to/api/queries.ts @@ -1,6 +1,9 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { ENDPOINT } from "@/shared/config"; +import { useMutationWrapper } from "@/shared/lib"; +import { aiAutoPrcsMngKeys } from "@/entities/ai-auto-prcs-mng"; +import { fnrsCnsltnKeys } from "@/entities/fnrs-cnsltn"; import type { DcRagDraftStatusResponseDto } from "../model/dcrag-to-interface"; import type { @@ -21,6 +24,18 @@ function isDraftGenerationSettled(data: DcRagDraftStatusResponseDto | undefined) return data.events?.some((event) => event.eventType === "COMPLETED") ?? false; } +function invalidateAfterAiRetry( + queryClient: ReturnType, + fnrsCnsltnDocNo?: string, +) { + queryClient.invalidateQueries({ queryKey: dcRagApiToBaseKey }); + queryClient.invalidateQueries({ queryKey: aiAutoPrcsMngKeys.all }); + if (fnrsCnsltnDocNo) { + queryClient.invalidateQueries({ queryKey: fnrsCnsltnKeys.detail(fnrsCnsltnDocNo) }); + queryClient.invalidateQueries({ queryKey: fnrsCnsltnKeys.all }); + } +} + export function useDraftGenerationStatus(crtDmndUuid: string | null | undefined) { return useQuery({ queryKey: [...dcRagApiToBaseKey, "getDraftGenerationStatus", crtDmndUuid], @@ -68,3 +83,39 @@ export function useRequestCostVerification() { }, }); } + +export function useReTransferDocument() { + const queryClient = useQueryClient(); + return useMutationWrapper({ + mutationFn: (body: DcRagDocumentTransferRequestDto) => + dcRagApiToService.reTransferDocument(body), + onSuccess: (_data, body) => { + invalidateAfterAiRetry(queryClient, body.fnrsCnsltnDocNo); + }, + }); +} + +export function useReGenerateDraft() { + const queryClient = useQueryClient(); + return useMutationWrapper({ + mutationFn: (body: DcRagDraftGenerateRequestDto) => dcRagApiToService.reGenerateDraft(body), + onSuccess: (_data, body) => { + invalidateAfterAiRetry(queryClient, body.fnrsCnsltnDocNo); + if (body.crtDmndUuid) { + queryClient.invalidateQueries({ + queryKey: [...dcRagApiToBaseKey, "getDraftGenerationStatus", body.crtDmndUuid], + }); + } + }, + }); +} + +export function useReVerifyCost() { + const queryClient = useQueryClient(); + return useMutationWrapper({ + mutationFn: (body: DcRagCostVerifyRequestDto) => dcRagApiToService.reVerifyCost(body), + onSuccess: (_data, body) => { + invalidateAfterAiRetry(queryClient, body.fnrsCnsltnDocNo); + }, + }); +} diff --git a/apps/as/src/entities/dcrag-to/index.ts b/apps/as/src/entities/dcrag-to/index.ts index 2944e98c6..2e496f7cf 100644 --- a/apps/as/src/entities/dcrag-to/index.ts +++ b/apps/as/src/entities/dcrag-to/index.ts @@ -2,9 +2,12 @@ export { dcRagApiToService } from "./api/dcrag-to-service"; export { dcRagApiToBaseKey } from "./api/queries"; export { useDraftGenerationStatus, + useReGenerateDraft, useRequestCostVerification, useRequestDocumentTransfer, useRequestDraftGeneration, + useReTransferDocument, + useReVerifyCost, } from "./api/queries"; export type { DcRagApiToService, diff --git a/apps/as/src/entities/dcrag-to/model/dcrag-to-interface.ts b/apps/as/src/entities/dcrag-to/model/dcrag-to-interface.ts index d80f91049..5896ee546 100644 --- a/apps/as/src/entities/dcrag-to/model/dcrag-to-interface.ts +++ b/apps/as/src/entities/dcrag-to/model/dcrag-to-interface.ts @@ -49,4 +49,7 @@ export interface DcRagApiToService { ): Promise; getDraftGenerationStatus(crtDmndUuid: string): Promise; requestCostVerification(body: DcRagCostVerifyRequestDto): Promise; + reTransferDocument(body: DcRagDocumentTransferRequestDto): Promise; + reGenerateDraft(body: DcRagDraftGenerateRequestDto): Promise; + reVerifyCost(body: DcRagCostVerifyRequestDto): Promise; } diff --git a/apps/as/src/pages/fnrs-cnsltn/lib/button-config.ts b/apps/as/src/pages/fnrs-cnsltn/lib/button-config.ts index 22cf9c193..6f711405b 100644 --- a/apps/as/src/pages/fnrs-cnsltn/lib/button-config.ts +++ b/apps/as/src/pages/fnrs-cnsltn/lib/button-config.ts @@ -9,6 +9,7 @@ export const FNRS_CNSLTN_VIEW_BUTTON_ACTION = { rvwOpnnRply: "rvwOpnnRply", rqstTechRvw: "rqstTechRvw", fileSplmnt: "fileSplmnt", + fileVrfc: "fileVrfc", dsgntRvwr: "dsgntRvwr", pwrkCnsltnDocCrt: "pwrkCnsltnDocCrt", pwrkCnsltnDocMng: "pwrkCnsltnDocMng", @@ -20,6 +21,7 @@ export const FNRS_CNSLTN_VIEW_BUTTON_ACTION = { atrzRply: "atrzRply", actnCmptn: "actnCmptn", rqstActnRvw: "rqstActnRvw", + costVrfc: "costVrfc", } as const; export type FnrsCnsltnViewButtonAction = @@ -80,7 +82,11 @@ const ROLE_USER01_ATRZ_STATUS_ACTIONS: Record< Record > = { ER: { - ATRZ01: [FNRS_CNSLTN_VIEW_BUTTON_ACTION.fileSplmnt, FNRS_CNSLTN_VIEW_BUTTON_ACTION.dsgntRvwr], + ATRZ01: [ + FNRS_CNSLTN_VIEW_BUTTON_ACTION.fileSplmnt, + FNRS_CNSLTN_VIEW_BUTTON_ACTION.fileVrfc, + FNRS_CNSLTN_VIEW_BUTTON_ACTION.dsgntRvwr, + ], }, SL: { ATRZ01: [FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocMng], @@ -136,7 +142,10 @@ const ROLE_USER01_ATRZ_STATUS_ACTIONS: Record< FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocMng, FNRS_CNSLTN_VIEW_BUTTON_ACTION.dsgntRvwr, ], - ATRZ02: [FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocMng], + ATRZ02: [ + FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocMng, + FNRS_CNSLTN_VIEW_BUTTON_ACTION.costVrfc, + ], ATRZ03: [FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocMng], ATRZ99: [FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocMng], }, @@ -183,6 +192,9 @@ function resolveButtonConfigs(actions: FnrsCnsltnViewButtonAction[]): FnrsCnsltn interface GetButtonConfigsOptions { hasPendingApprovalRequest?: boolean; hasCompletedDraft?: boolean; + canRetryFileVrfc?: boolean; + canRetryDraftGen?: boolean; + canRetryCostVrfc?: boolean; } const PENDING_APPROVAL_ACTIONS = new Set([ @@ -220,6 +232,16 @@ function resolveRoleUser01AtrzButtonActions( const needsPendingApproval = PENDING_APPROVAL_ACTIONS.has(action); if (needsPendingApproval && options?.hasPendingApprovalRequest === false) return false; + if (action === FNRS_CNSLTN_VIEW_BUTTON_ACTION.fileVrfc) { + return options?.canRetryFileVrfc === true; + } + if (action === FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocCrt) { + return options?.canRetryDraftGen === true; + } + if (action === FNRS_CNSLTN_VIEW_BUTTON_ACTION.costVrfc) { + return options?.canRetryCostVrfc === true; + } + if (options?.hasCompletedDraft != null) { if (prgrsSttsComCd === "SL" || prgrsSttsComCd === "TE" || prgrsSttsComCd === "RK") { if (action === FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocMng) { @@ -230,9 +252,6 @@ function resolveRoleUser01AtrzButtonActions( if (action === FNRS_CNSLTN_VIEW_BUTTON_ACTION.rvwRsltInq) { return options.hasCompletedDraft; } - if (action === FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocCrt) { - return !options.hasCompletedDraft; - } } } 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 f23e4c521..b567a3b84 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 @@ -9,6 +9,12 @@ import { AxiosError } from "axios"; import { ENDPOINT } from "@/shared/config"; import { useAlertStore, useUserStore } from "@/shared/lib"; +import { + AI_AUTO_SE, + type AiAutoPrcsLatestResponseDto, + useAiAutoPrcsLatest, +} from "@/entities/ai-auto-prcs-mng"; +import { useReGenerateDraft, useReTransferDocument, useReVerifyCost } from "@/entities/dcrag-to"; import { buildElaprPrgrsSttsListFromAplnRows, ElaprApprovalDialog, @@ -64,6 +70,15 @@ import { FileVrfcSplmntDialog } from "./file-vrfc-splmnt-dialog"; import { PwrkCnsltnDocMngDialog } from "./pwrk-cnsltn-doc-mng-dialog"; import { PwrkCnsltnRvwRsltInqDialog } from "./pwrk-cnsltn-rvw-rslt-inq-dialog"; +const AI_RETRY_PRGRS_STTS = new Set(["ER", "TE", "EV"]); + +function findLatestByAutoSe( + list: AiAutoPrcsLatestResponseDto[] | undefined, + atmtnSeComCd: string, +): AiAutoPrcsLatestResponseDto | undefined { + return list?.find((item) => item.atmtnSeComCd === atmtnSeComCd); +} + interface FloatingActionButtonsProps { data: FnrsCnsltnMngDetResponseDto; docSeComCd: string; @@ -118,7 +133,9 @@ function FloatingActionButtons({ const needsPwrkDraftCheck = dtlInstCd === "ROLE_USER01" && ["SL", "TE", "RK"].includes(prgrsSttsComCd); const needsPwrkForRb = dtlInstCd === "ROLE_USER05" && prgrsSttsComCd === "RB"; - const needsPwrkLookup = needsPwrkDraftCheck || needsPwrkForRb; + const needsPwrkForAiRetry = dtlInstCd === "ROLE_USER01" && ["TE", "EV"].includes(prgrsSttsComCd); + const needsPwrkLookup = needsPwrkDraftCheck || needsPwrkForRb || needsPwrkForAiRetry; + const needsAiAutoLatest = dtlInstCd === "ROLE_USER01" && AI_RETRY_PRGRS_STTS.has(prgrsSttsComCd); const { data: elaprDocPrgrsList = [], isLoading: isElaprDocPrgrsLoading } = useElaprDocPrgrsByDocNo(needsElaprPrgrsCheck ? docNo : null); @@ -128,8 +145,31 @@ function FloatingActionButtons({ needsPwrkLookup, ); + const { data: aiAutoLatestList, isLoading: isAiAutoLatestLoading } = useAiAutoPrcsLatest(docNo, { + enabled: needsAiAutoLatest, + }); + + const fileVrfcLatest = findLatestByAutoSe(aiAutoLatestList, AI_AUTO_SE.FILE_VRFC); + const draftGenLatest = findLatestByAutoSe(aiAutoLatestList, AI_AUTO_SE.DRAFT_GEN); + const costVrfcLatest = findLatestByAutoSe(aiAutoLatestList, AI_AUTO_SE.COST_VRFC); + const canRetryFileVrfc = fileVrfcLatest?.isRetryable === true; + const canRetryDraftGen = draftGenLatest?.isRetryable === true; + const canRetryCostVrfc = costVrfcLatest?.isRetryable === true; + + const reTransferDocument = useReTransferDocument(); + const reGenerateDraft = useReGenerateDraft(); + const reVerifyCost = useReVerifyCost(); + const isBusy = + isProcessing || + reTransferDocument.isPending || + reGenerateDraft.isPending || + reVerifyCost.isPending; + const hasCompletedDraft = Boolean(findCompletedPwrkDraft(pwrkCnsltnData)); - const pwrkCnsltnDocNo = pwrkCnsltnData?.pwrkCnsltnDocNo; + const pwrkCnsltnDocNo = + pwrkCnsltnData?.pwrkCnsltnDocNo ?? + draftGenLatest?.pwrkCnsltnDocNo ?? + costVrfcLatest?.pwrkCnsltnDocNo; const elaprPrgrsForPending = prgrsSttsComCd === "RK" @@ -146,18 +186,27 @@ function FloatingActionButtons({ if (needsAtrzResolve && isRvwLoginUserLoading) return []; if (needsElaprPrgrsCheck && isElaprDocPrgrsLoading) return []; if (needsPwrkDraftCheck && isPwrkCnsltnLoading) return []; + if (needsAiAutoLatest && isAiAutoLatestLoading) return []; return getButtonConfigs(dtlInstCd, prgrsSttsComCd, atrzSeComCdList, { hasPendingApprovalRequest: needsElaprPrgrsCheck ? hasPendingApprovalRequest : undefined, hasCompletedDraft: needsPwrkDraftCheck ? hasCompletedDraft : undefined, + canRetryFileVrfc: needsAiAutoLatest ? canRetryFileVrfc : undefined, + canRetryDraftGen: needsAiAutoLatest ? canRetryDraftGen : undefined, + canRetryCostVrfc: needsAiAutoLatest ? canRetryCostVrfc : undefined, }); }, [ atrzSeComCdList, + canRetryCostVrfc, + canRetryDraftGen, + canRetryFileVrfc, dtlInstCd, hasCompletedDraft, hasPendingApprovalRequest, + isAiAutoLatestLoading, isElaprDocPrgrsLoading, isPwrkCnsltnLoading, isRvwLoginUserLoading, + needsAiAutoLatest, needsAtrzResolve, needsElaprPrgrsCheck, needsPwrkDraftCheck, @@ -544,17 +593,60 @@ function FloatingActionButtons({ }); } + function handleFileVrfcClick() { + reTransferDocument.mutate( + { fnrsCnsltnDocNo: docNo }, + { onSuccess: () => alert("파일 검증을 요청했습니다.") }, + ); + } + + function handlePwrkCnsltnDocCrtClick() { + if (!pwrkCnsltnDocNo) { + alert("실무협의 문서번호를 찾을 수 없습니다."); + return; + } + + reGenerateDraft.mutate( + { + fnrsCnsltnDocNo: docNo, + pwrkCnsltnDocNo, + crtDmndUuid: draftGenLatest?.crtDmndUuid, + }, + { onSuccess: () => alert("초안 생성을 요청했습니다.") }, + ); + } + + function handleCostVrfcClick() { + if (!pwrkCnsltnDocNo) { + alert("실무협의 문서번호를 찾을 수 없습니다."); + return; + } + + reVerifyCost.mutate( + { + fnrsCnsltnDocNo: docNo, + pwrkCnsltnDocNo, + }, + { onSuccess: () => alert("금액 검증을 요청했습니다.") }, + ); + } + return ( <>
- {!isAiPending && ( <> {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.pwrkCnsltnDocCrt) && ( - )} @@ -562,85 +654,103 @@ function FloatingActionButtons({ )} {canEdit && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.strg) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.aply) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.del) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.envoSbmsn) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.rjct) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.sncnAprv) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.rvwOpnnRply) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.rvwRply) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.rqstTechRvw) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.rqstActnRvw) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.fileSplmnt) && ( - )} + {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.fileVrfc) && ( + + )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.dsgntRvwr) && !isRagIndexingInProgress(prgrsSttsComCd, data.ragIndexingInfo) && ( )} + {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.costVrfc) && ( + + )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.actnCmptn) && ( - )} @@ -648,18 +758,18 @@ function FloatingActionButtons({ )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.rvwStrg) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.rvwCmptn) && ( - )} @@ -667,18 +777,18 @@ function FloatingActionButtons({ )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.atrzAprv) && ( - )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.atrzRply) && ( - )} @@ -707,14 +817,14 @@ function FloatingActionButtons({ splmntArtclUpCd="SPLMNTARTCL" open={activeDialog === "dmndSplmnt"} onOpenChange={() => setActiveDialog(null)} - isSubmitting={isProcessing} + isSubmitting={isBusy} onConfirm={handleDmndSplmntConfirm} /> setActiveDialog(null)} onConfirm={handleFileSplmntConfirm} /> @@ -748,7 +858,7 @@ function FloatingActionButtons({ setActiveDialog(null)} onConfirm={handleRvwRsltSplmntConfirm} /> @@ -883,6 +993,7 @@ const buttonActionHandlers: Record = rvwOpnnRply: handleTechReview, rqstTechRvw: handleRequestExamine, fileSplmnt: handleDmndSplmnt, + fileVrfc: () => Promise.resolve(), dsgntRvwr: handleDsgntRvwr, pwrkCnsltnDocCrt: () => Promise.resolve(), pwrkCnsltnDocMng: () => Promise.resolve(), @@ -894,6 +1005,7 @@ const buttonActionHandlers: Record = atrzRply: () => Promise.resolve(), actnCmptn: handleActnCmptn, rqstActnRvw: handleRequestActnReview, + costVrfc: () => Promise.resolve(), }; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/apps/as/src/shared/config/api.ts b/apps/as/src/shared/config/api.ts index a575822f2..c5005396c 100644 --- a/apps/as/src/shared/config/api.ts +++ b/apps/as/src/shared/config/api.ts @@ -26,6 +26,7 @@ export const ENDPOINT = { SEWER_BSC_PLAN: "/as-service/api/v1/sewer-bsc-plans", DASHBOARD: "/as-service/api/v1/dashboard", DCRAG_TO: "/as-service/api/v1/dcrag-to", + AI_AUTO_PRCS_MNG: "/as-service/api/v1/ai-auto-prcs-mng", PWRK_CNSLTN_MNG: "/as-service/api/v1/pwrk-cnsltn-mng", PWRK_CNSLTN_DOC_CRT_RSLT: "/as-service/api/v1/pwrk-cnsltn-doc-crt-rslt", PWRK_CNSLTN_DOC_PJTCO_AJMT_MNG: "/as-service/api/v1/pwrk-cnsltn-doc-pjtco-ajmt-mng",