[as] feat: 보완요청 파일 첨부 로직 수정
This commit is contained in:
@@ -3,9 +3,9 @@ const AI_PENDING_STATUS_CODES = ["FV", "AC", "AV"] as const;
|
||||
type AiPendingStatusCode = (typeof AI_PENDING_STATUS_CODES)[number];
|
||||
|
||||
const AI_PENDING_MESSAGES: Record<AiPendingStatusCode, string> = {
|
||||
FV: "파일 검증이 진행 중입니다",
|
||||
AC: "실무협의서 초안 생성이 진행 중입니다",
|
||||
AV: "금액 검증이 진행 중입니다",
|
||||
FV: "AI 파일 검증이 진행 중입니다",
|
||||
AC: "AI 실무협의서 초안 생성이 진행 중입니다",
|
||||
AV: "AI 금액 검증이 진행 중입니다",
|
||||
};
|
||||
|
||||
function isAiPendingStatus(prgrsSttsComCd: string): boolean {
|
||||
|
||||
@@ -322,7 +322,7 @@ function FloatingActionButtons({
|
||||
dmndTtl: data.detDto?.bizNm ?? "",
|
||||
dmndCn: data.detDto?.bizCn ?? "",
|
||||
elaprCycl: data.detDto?.prgrsSttsComCd === "RK" ? 2 : 1,
|
||||
docPrgrsSttsComCd: data.detDto?.prgrsSttsComCd,
|
||||
docPrgrsSttsComCd: "AC",
|
||||
elaprPrgrsSttsList: buildElaprPrgrsSttsListFromAplnRows(aplnRows),
|
||||
};
|
||||
await executeAction({
|
||||
|
||||
@@ -88,7 +88,7 @@ function FnrsFormPage({ mode, initialData, createDefaults }: FnrsFormPageProps)
|
||||
|
||||
function buildFormPayload(
|
||||
data: FnrsCnsltnRegistFormData,
|
||||
prgrsSttsComCd: "SV" | "ST" | "TE",
|
||||
prgrsSttsComCd: string,
|
||||
): FnrsCnsltnApplySaveRequestDto | undefined {
|
||||
const withTotals = recalculateFnrsSharTotals(data.fnrsSharList, sharItems);
|
||||
const validationMessage = validateBizCstSharBalance(
|
||||
@@ -123,7 +123,7 @@ function FnrsFormPage({ mode, initialData, createDefaults }: FnrsFormPageProps)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
({ splmntAtchFileNm, splmntAtchFileAtflId, splmntDmndAtchFileNm, ...item }) => ({
|
||||
...item,
|
||||
...(prgrsSttsComCd === "TE" ? { cmptnYn: "Y" } : null),
|
||||
...(prgrsSttsComCd !== "SV" && prgrsSttsComCd !== "ST" && { cmptnYn: "Y" }),
|
||||
}),
|
||||
),
|
||||
};
|
||||
@@ -139,12 +139,13 @@ function FnrsFormPage({ mode, initialData, createDefaults }: FnrsFormPageProps)
|
||||
}
|
||||
|
||||
async function submitSupplementForm(data: FnrsCnsltnRegistFormData): Promise<string | undefined> {
|
||||
const beforePrgrsSttsComCd = initialData?.detDto?.beforePrgrsSttsComCd;
|
||||
if (!beforePrgrsSttsComCd) return undefined;
|
||||
|
||||
const docNo = initialData?.detDto?.fnrsCnsltnDocNo;
|
||||
if (!docNo) return undefined;
|
||||
|
||||
const payload = buildFormPayload(data, "TE");
|
||||
if (!payload) return undefined;
|
||||
|
||||
const payload = buildFormPayload(data, beforePrgrsSttsComCd);
|
||||
if (!docNo || !payload) return undefined;
|
||||
debugger;
|
||||
return fnrsCnsltnMngService.submitSupplement(docNo, payload);
|
||||
}
|
||||
|
||||
|
||||
@@ -102,9 +102,15 @@ function FnrsViewPage({ id }: FnrsViewPageProps) {
|
||||
<div className="sticky top-[6rem] z-30 flex items-center gap-4 bg-container px-4 py-2">
|
||||
<SectionCollapsibleToggle />
|
||||
{isAiPending && (
|
||||
<TextShimmer active className="text-xl">
|
||||
{getAiPendingMessage(detDto.prgrsSttsComCd || "")}
|
||||
</TextShimmer>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="relative flex size-3">
|
||||
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-75"></span>
|
||||
<span className="relative inline-flex size-3 rounded-full bg-primary"></span>
|
||||
</span>
|
||||
<TextShimmer active className="text-xl">
|
||||
{getAiPendingMessage(detDto.prgrsSttsComCd || "")}
|
||||
</TextShimmer>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="space-y-4">
|
||||
|
||||
Reference in New Issue
Block a user