[as] feat: 행정지원 업무별 상세페이지 내 진행상태 섹션 추가
This commit is contained in:
@@ -314,8 +314,8 @@ function ElaprApprovalDialog({
|
||||
<col width="10%" />
|
||||
<col width="30%" />
|
||||
<col width="10%" />
|
||||
<col width="10%" />
|
||||
<col width="24%" />
|
||||
<col width="14%" />
|
||||
<col width="20%" />
|
||||
</colgroup>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
|
||||
@@ -73,14 +73,14 @@ function SortablePrgrsSttsRow({
|
||||
const isDcarbable = isPrgrsSttsRowDcarbable(row);
|
||||
const rowDisabled = isLocked && !isEditing;
|
||||
const atrzSeLabel = row.atrzSeComNm || findCodeLabel(atrzSeCodes, row.atrzSeComCd);
|
||||
const status = getApproverStatus(row.atrzPrgrsSttsComCd);
|
||||
const status = getApproverStatus(row.atrzPrgrsSttsComCd, row.atrzSeComCd);
|
||||
const isRejectedRow = row.atrzPrgrsSttsComCd === "ATRZ_PRGRS_004";
|
||||
const rjctRsn = row.rjctRsn?.trim();
|
||||
|
||||
const statusBadge = (
|
||||
<span
|
||||
className={cn(
|
||||
"inline-flex items-center rounded-sm px-3 py-1.5 text-lg font-semibold",
|
||||
"inline-flex items-center whitespace-nowrap rounded-sm px-3 py-1.5 text-lg font-semibold",
|
||||
status.badgeClass,
|
||||
isRejectedRow && rjctRsn && "cursor-help underline decoration-dotted underline-offset-4",
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
AtflMngClientResponseDto,
|
||||
CklstRvwRsltTreeDto,
|
||||
DocSttsChgHstryResponseDto,
|
||||
EsntlAtchFileMngTreeResponseDto,
|
||||
PageableParams,
|
||||
PageResponse,
|
||||
@@ -200,6 +201,7 @@ export interface SewerBscPlanDetResponseDto {
|
||||
bizCstList?: SewerBscPlanBizCstResponseDto[];
|
||||
tmplntList?: SewerBscPlanTmplntResponseDto[];
|
||||
tmplntTmprStrgList?: SewerBscPlanTmplntTmprStrgResponseDto[];
|
||||
sttsChgHstryList?: DocSttsChgHstryResponseDto[];
|
||||
}
|
||||
|
||||
/** Controller public 메서드명·시그니처와 동일 */
|
||||
|
||||
@@ -16,6 +16,12 @@ const MAIN_STEP_LABELS = {
|
||||
reply: "검토결과 회신",
|
||||
} as const;
|
||||
|
||||
export const PROGRESS_STATUS_COLUMNS = [
|
||||
{ label: "설계자문 신청 (시군)", sttsComCd: "ER" },
|
||||
{ label: "기술검토", sttsComCd: "TE" },
|
||||
{ label: "기술검토 회신", sttsComCd: "CP" },
|
||||
];
|
||||
|
||||
type BadgeState = "completed" | "current" | "pending";
|
||||
|
||||
interface ProgressBadge {
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
ContactInfoFormSection,
|
||||
isFormEsntlAtchComplete,
|
||||
PrivacyConsentSection,
|
||||
ProgressStatusSection,
|
||||
} from "@/widgets/pbadms-sprt";
|
||||
import { Button } from "@common/components";
|
||||
|
||||
@@ -31,6 +32,7 @@ import {
|
||||
formatTaskSeComCdForApi,
|
||||
} from "../lib/design-cnstn-regist-schema";
|
||||
import { getCreateDefaultValues, mapDetailToFormData } from "../lib/form-data-mapper";
|
||||
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
||||
|
||||
import { BasicInfoFormSection } from "./sections/basic-info-form-section";
|
||||
|
||||
@@ -174,6 +176,13 @@ function DesignFormPage({ id, mode, initialData, createDefaults }: DesignFormPag
|
||||
return (
|
||||
<FormProvider {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSave)} className="mt-6 space-y-4">
|
||||
{initialData?.detDto?.designCnstnDocNo && (
|
||||
<ProgressStatusSection
|
||||
columns={PROGRESS_STATUS_COLUMNS}
|
||||
sttsChgHstryList={initialData?.sttsChgHstryList ?? []}
|
||||
elaprDocNo={initialData.detDto.designCnstnDocNo}
|
||||
/>
|
||||
)}
|
||||
<BasicInfoFormSection />
|
||||
<ContactInfoFormSection fieldPrefix="designCnstnMng" />
|
||||
<PrivacyConsentSection />
|
||||
|
||||
@@ -6,10 +6,12 @@ import { useUserStore } from "@/shared/lib";
|
||||
import { useDesignCnstnMng } from "@/entities/design-cnstn";
|
||||
import { ElaprDocPrgrsStatus } from "@/entities/elapr";
|
||||
import { useRvwMnpwMngLoginUserList } from "@/entities/rvw-mnpw";
|
||||
import { ProgressStatusSection } from "@/widgets/pbadms-sprt";
|
||||
import { Skeleton } from "@common/components";
|
||||
|
||||
import { needsRoleUser01AtrzResolve } from "../lib/button-config";
|
||||
import { getEditableReviewStep } from "../lib/review-step-utils";
|
||||
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
||||
|
||||
import { FloatingActionButtons } from "./components/floating-action-buttons";
|
||||
import { AttachmentsSection } from "./sections/attachments-section";
|
||||
@@ -64,11 +66,14 @@ function DesignViewPage({ id }: DesignViewPageProps) {
|
||||
return <div className="mt-6 text-[1.4rem]">상세 정보를 찾을 수 없습니다.</div>;
|
||||
}
|
||||
|
||||
const detDto = data.detDto;
|
||||
const bizSclList = data.bizSclList ?? [];
|
||||
const esntlFileList = data.esntlFileList ?? [];
|
||||
const etcFileList = data.etcFileList ?? [];
|
||||
const rvwList = data.rvwList ?? [];
|
||||
const {
|
||||
detDto,
|
||||
bizSclList = [],
|
||||
esntlFileList = [],
|
||||
etcFileList = [],
|
||||
rvwList = [],
|
||||
sttsChgHstryList = [],
|
||||
} = data;
|
||||
|
||||
const editableReviewStep = getEditableReviewStep(
|
||||
userInfo?.dtlInstCd,
|
||||
@@ -77,6 +82,11 @@ function DesignViewPage({ id }: DesignViewPageProps) {
|
||||
|
||||
return (
|
||||
<div className="mt-6 space-y-4">
|
||||
<ProgressStatusSection
|
||||
columns={PROGRESS_STATUS_COLUMNS}
|
||||
sttsChgHstryList={sttsChgHstryList}
|
||||
elaprDocNo={detDto.designCnstnDocNo}
|
||||
/>
|
||||
<BasicInfoSection det={detDto} />
|
||||
<ContactInfoSection det={detDto} />
|
||||
<ElaprDocPrgrsStatus elaprDocNo={detDto.designCnstnDocNo} />
|
||||
|
||||
@@ -17,6 +17,15 @@ const MAIN_STEP_LABELS = {
|
||||
reply: "검토결과 회신",
|
||||
} as const;
|
||||
|
||||
export const PROGRESS_STATUS_COLUMNS = [
|
||||
{ label: "재원협의 신청 (시군)", sttsComCd: "ST" },
|
||||
{ label: "재원협의 신청 (시도)", sttsComCd: "LE" },
|
||||
{ label: "환경청 검토", sttsComCd: "ER" },
|
||||
{ label: "기술검토", sttsComCd: "TE" },
|
||||
{ label: "기술검토 회신", sttsComCd: "TP" },
|
||||
{ label: "환경청 검토 결과 회신", sttsComCd: "EP" },
|
||||
];
|
||||
|
||||
type BadgeState = "completed" | "current" | "pending";
|
||||
|
||||
interface ProgressBadge {
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
isFormChecklistComplete,
|
||||
isFormEsntlAtchComplete,
|
||||
PrivacyConsentSection,
|
||||
ProgressStatusSection,
|
||||
recalculateFnrsSharTotals,
|
||||
SplmntDmndFormSection,
|
||||
toFnrsSharSaveList,
|
||||
@@ -43,6 +44,7 @@ import {
|
||||
formatTaskSeComCdForApi,
|
||||
} from "../lib/fnrs-cnsltn-regist-schema";
|
||||
import { getCreateDefaultValues, mapDetailToFormData } from "../lib/form-data-mapper";
|
||||
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
||||
|
||||
import { BasicInfoFormSection } from "./sections/basic-info-form-section";
|
||||
interface FnrsFormPageProps {
|
||||
@@ -270,6 +272,13 @@ function FnrsFormPage({ id, mode, initialData, createDefaults }: FnrsFormPagePro
|
||||
return (
|
||||
<FormProvider {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSave)} className="mt-6 space-y-4">
|
||||
{initialData?.detDto?.fnrsCnsltnDocNo && (
|
||||
<ProgressStatusSection
|
||||
columns={PROGRESS_STATUS_COLUMNS}
|
||||
sttsChgHstryList={initialData?.sttsChgHstryList ?? []}
|
||||
elaprDocNo={initialData.detDto.fnrsCnsltnDocNo}
|
||||
/>
|
||||
)}
|
||||
<BasicInfoFormSection />
|
||||
<ContactInfoFormSection fieldPrefix="fnrsCnsltnMng" />
|
||||
<PrivacyConsentSection />
|
||||
|
||||
@@ -6,12 +6,13 @@ import { useUserStore } from "@/shared/lib";
|
||||
import { ElaprDocPrgrsStatus } from "@/entities/elapr";
|
||||
import { useFnrsCnsltnMng } from "@/entities/fnrs-cnsltn";
|
||||
import { useRvwMnpwMngLoginUserList } from "@/entities/rvw-mnpw";
|
||||
import { SupplementDemandSection } from "@/widgets/pbadms-sprt";
|
||||
import { ProgressStatusSection, SupplementDemandSection } from "@/widgets/pbadms-sprt";
|
||||
import { Skeleton } from "@common/components";
|
||||
|
||||
import { needsRoleUser01AtrzResolve } from "../lib/button-config";
|
||||
import { getEditableReviewStep } from "../lib/review-step-utils";
|
||||
import { EMPTY_CKLST_RESULT_LIST, useChecklistFormState } from "../lib/use-checklist-form-state";
|
||||
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
||||
|
||||
import { FloatingActionButtons } from "./components/floating-action-buttons";
|
||||
import { AttachmentsSection } from "./sections/attachments-section";
|
||||
@@ -71,15 +72,18 @@ function FnrsViewPage({ id }: FnrsViewPageProps) {
|
||||
return <div className="mt-6 text-[1.4rem]">상세 정보를 찾을 수 없습니다.</div>;
|
||||
}
|
||||
|
||||
const detDto = data.detDto;
|
||||
const bizSclList = data.bizSclList ?? [];
|
||||
const bizCstList = data.bizCstList ?? [];
|
||||
const cklstResultList = data.cklstResultList ?? [];
|
||||
const esntlFileList = data.esntlFileList ?? [];
|
||||
const etcFileList = data.etcFileList ?? [];
|
||||
const rvwList = data.rvwList ?? [];
|
||||
const splmntDmndList = data.splmntDmndList ?? [];
|
||||
const fnrsSharList = data.fnrsSharList ?? [];
|
||||
const {
|
||||
detDto,
|
||||
bizSclList = [],
|
||||
bizCstList = [],
|
||||
cklstResultList = [],
|
||||
esntlFileList = [],
|
||||
etcFileList = [],
|
||||
rvwList = [],
|
||||
splmntDmndList = [],
|
||||
fnrsSharList = [],
|
||||
sttsChgHstryList = [],
|
||||
} = data;
|
||||
|
||||
const editableReviewStep = getEditableReviewStep(
|
||||
userInfo?.dtlInstCd,
|
||||
@@ -88,6 +92,11 @@ function FnrsViewPage({ id }: FnrsViewPageProps) {
|
||||
|
||||
return (
|
||||
<div className="mt-6 space-y-4">
|
||||
<ProgressStatusSection
|
||||
columns={PROGRESS_STATUS_COLUMNS}
|
||||
sttsChgHstryList={sttsChgHstryList}
|
||||
elaprDocNo={detDto.fnrsCnsltnDocNo}
|
||||
/>
|
||||
<BasicInfoSection det={detDto} />
|
||||
<ContactInfoSection det={detDto} />
|
||||
<ElaprDocPrgrsStatus elaprDocNo={detDto.fnrsCnsltnDocNo} />
|
||||
|
||||
@@ -17,6 +17,16 @@ const MAIN_STEP_LABELS = {
|
||||
reply: "검토결과 회신",
|
||||
} as const;
|
||||
|
||||
export const PROGRESS_STATUS_COLUMNS = [
|
||||
{ label: "설치인가 신청 (시군)", sttsComCd: "ST" },
|
||||
{ label: "설치인가 신청 (시도)", sttsComCd: "LE" },
|
||||
{ label: "환경청 검토", sttsComCd: "ER" },
|
||||
{ label: "기술검토", sttsComCd: "TE" },
|
||||
{ label: "기술검토 회신", sttsComCd: "TP" },
|
||||
{ label: "검토결과 회신", sttsComCd: "EP" },
|
||||
{ label: "설치인가 승인", sttsComCd: "TA" },
|
||||
];
|
||||
|
||||
type BadgeState = "completed" | "current" | "pending";
|
||||
|
||||
interface ProgressBadge {
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
isFormChecklistComplete,
|
||||
isFormEsntlAtchComplete,
|
||||
PrivacyConsentSection,
|
||||
ProgressStatusSection,
|
||||
SplmntDmndFormSection,
|
||||
} from "@/widgets/pbadms-sprt";
|
||||
import { Button } from "@common/components";
|
||||
@@ -35,6 +36,7 @@ import {
|
||||
type InstlSncnRegistFormData,
|
||||
instlSncnRegistSchema,
|
||||
} from "../lib/instl-sncn-regist-schema";
|
||||
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
||||
|
||||
import { BasicInfoFormSection } from "./sections/basic-info-form-section";
|
||||
interface InstlFormPageProps {
|
||||
@@ -228,6 +230,13 @@ function InstlFormPage({ id, mode, initialData, createDefaults }: InstlFormPageP
|
||||
return (
|
||||
<FormProvider {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSave)} className="mt-6 space-y-4">
|
||||
{initialData?.detDto.instlSncnDocNo && (
|
||||
<ProgressStatusSection
|
||||
columns={PROGRESS_STATUS_COLUMNS}
|
||||
sttsChgHstryList={initialData?.sttsChgHstryList ?? []}
|
||||
elaprDocNo={initialData.detDto.instlSncnDocNo}
|
||||
/>
|
||||
)}
|
||||
<BasicInfoFormSection />
|
||||
<ContactInfoFormSection fieldPrefix="instlSncnMng" />
|
||||
<PrivacyConsentSection />
|
||||
|
||||
@@ -6,12 +6,13 @@ import { useUserStore } from "@/shared/lib";
|
||||
import { ElaprDocPrgrsStatus } from "@/entities/elapr";
|
||||
import { useInstlSncnDetail } from "@/entities/instl-sncn";
|
||||
import { useRvwMnpwMngLoginUserList } from "@/entities/rvw-mnpw";
|
||||
import { SupplementDemandSection } from "@/widgets/pbadms-sprt";
|
||||
import { ProgressStatusSection, SupplementDemandSection } from "@/widgets/pbadms-sprt";
|
||||
import { Skeleton } from "@common/components";
|
||||
|
||||
import { needsRoleUser01AtrzResolve } from "../lib/button-config";
|
||||
import { getEditableReviewStep } from "../lib/review-step-utils";
|
||||
import { EMPTY_CKLST_RESULT_LIST, useChecklistFormState } from "../lib/use-checklist-form-state";
|
||||
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
||||
|
||||
import { FloatingActionButtons } from "./components/floating-action-buttons";
|
||||
import { AttachmentsSection } from "./sections/attachments-section";
|
||||
@@ -79,6 +80,7 @@ function InstlViewPage({ id }: InstlViewPageProps) {
|
||||
etcFileList,
|
||||
rvwList = [],
|
||||
splmntDmndList = [],
|
||||
sttsChgHstryList = [],
|
||||
} = data;
|
||||
|
||||
const editableReviewStep = getEditableReviewStep(
|
||||
@@ -88,6 +90,11 @@ function InstlViewPage({ id }: InstlViewPageProps) {
|
||||
|
||||
return (
|
||||
<div className="mt-6 space-y-4">
|
||||
<ProgressStatusSection
|
||||
columns={PROGRESS_STATUS_COLUMNS}
|
||||
sttsChgHstryList={sttsChgHstryList}
|
||||
elaprDocNo={detDto.instlSncnDocNo}
|
||||
/>
|
||||
<BasicInfoSection det={detDto} />
|
||||
<ContactInfoSection det={detDto} />
|
||||
<ElaprDocPrgrsStatus elaprDocNo={detDto.instlSncnDocNo} />
|
||||
|
||||
@@ -17,6 +17,14 @@ const MAIN_STEP_LABELS = {
|
||||
reply: "검토결과 회신",
|
||||
} as const;
|
||||
|
||||
export const PROGRESS_STATUS_COLUMNS = [
|
||||
{ label: "기본계획 신청 (시군)", sttsComCd: "LE" },
|
||||
{ label: "환경청 검토", sttsComCd: "ER" },
|
||||
{ label: "기술검토", sttsComCd: "TE" },
|
||||
{ label: "기술검토 회신", sttsComCd: "TP" },
|
||||
{ label: "횐경청 검토 결과 회신", sttsComCd: "EP" },
|
||||
];
|
||||
|
||||
type BadgeState = "completed" | "current" | "pending";
|
||||
|
||||
interface ProgressBadge {
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
isFormChecklistComplete,
|
||||
isFormEsntlAtchComplete,
|
||||
PrivacyConsentSection,
|
||||
ProgressStatusSection,
|
||||
SplmntDmndFormSection,
|
||||
} from "@/widgets/pbadms-sprt";
|
||||
import { Button } from "@common/components";
|
||||
@@ -39,6 +40,7 @@ import {
|
||||
type SewerBscPlanRegistFormData,
|
||||
sewerBscPlanRegistSchema,
|
||||
} from "../lib/sewer-bsc-plan-regist-schema";
|
||||
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
||||
|
||||
import { BasicInfoFormSection } from "./sections/basic-info-form-section";
|
||||
import { BizCstMatrixFormSection } from "./sections/biz-cst-matrix-form-section";
|
||||
@@ -242,6 +244,13 @@ function SewerBscPlanFormPage({
|
||||
return (
|
||||
<FormProvider {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSave)} className="mt-6 space-y-4">
|
||||
{initialData?.detDto?.sewerBscPlanDocNo && (
|
||||
<ProgressStatusSection
|
||||
columns={PROGRESS_STATUS_COLUMNS}
|
||||
sttsChgHstryList={initialData?.sttsChgHstryList ?? []}
|
||||
elaprDocNo={initialData.detDto.sewerBscPlanDocNo}
|
||||
/>
|
||||
)}
|
||||
<BasicInfoFormSection />
|
||||
<ContactInfoFormSection fieldPrefix="sewerBscPlanDtl" />
|
||||
<PrivacyConsentSection />
|
||||
|
||||
@@ -6,12 +6,13 @@ import { useUserStore } from "@/shared/lib";
|
||||
import { ElaprDocPrgrsStatus } from "@/entities/elapr";
|
||||
import { useRvwMnpwMngLoginUserList } from "@/entities/rvw-mnpw";
|
||||
import { useSewerBscPlanDetails } from "@/entities/sewer-bsc-plan";
|
||||
import { SupplementDemandSection } from "@/widgets/pbadms-sprt";
|
||||
import { ProgressStatusSection, SupplementDemandSection } from "@/widgets/pbadms-sprt";
|
||||
import { Skeleton } from "@common/components";
|
||||
|
||||
import { needsRoleUser01AtrzResolve } from "../lib/button-config";
|
||||
import { getEditableReviewStep } from "../lib/review-step-utils";
|
||||
import { EMPTY_CKLST_RESULT_LIST, useChecklistFormState } from "../lib/use-checklist-form-state";
|
||||
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
||||
|
||||
import { FloatingActionButtons } from "./components/floating-action-buttons";
|
||||
import { AttachmentsSection } from "./sections/attachments-section";
|
||||
@@ -74,17 +75,20 @@ function SewerBscPlanViewPage({ id, propChgCycl }: SewerBscPlanViewPageProps) {
|
||||
return <div className="mt-6 text-[1.4rem]">상세 정보를 찾을 수 없습니다.</div>;
|
||||
}
|
||||
|
||||
const detDto = data.detDto;
|
||||
const activeDtlDto = data.activeDtlDto;
|
||||
const otlnList = data.otlnList ?? [];
|
||||
const bizCstList = data.bizCstList ?? [];
|
||||
const fnrsCstList = data.fnrsCstList ?? [];
|
||||
const tmplntList = data.tmplntList ?? [];
|
||||
const cklstResultRows = data.cklstResultRows ?? [];
|
||||
const esntlFileList = data.esntlFileList ?? [];
|
||||
const etcFileList = data.etcFileList ?? [];
|
||||
const rvwOpnnList = data.rvwOpnnList ?? [];
|
||||
const splmntDmndList = data.splmntDmndList ?? [];
|
||||
const {
|
||||
detDto,
|
||||
activeDtlDto,
|
||||
otlnList = [],
|
||||
bizCstList = [],
|
||||
fnrsCstList = [],
|
||||
tmplntList = [],
|
||||
cklstResultRows = [],
|
||||
esntlFileList = [],
|
||||
etcFileList = [],
|
||||
rvwOpnnList = [],
|
||||
splmntDmndList = [],
|
||||
sttsChgHstryList = [],
|
||||
} = data;
|
||||
|
||||
const editableReviewStep = getEditableReviewStep(
|
||||
userInfo?.dtlInstCd,
|
||||
@@ -93,6 +97,11 @@ function SewerBscPlanViewPage({ id, propChgCycl }: SewerBscPlanViewPageProps) {
|
||||
|
||||
return (
|
||||
<div className="mt-6 space-y-4">
|
||||
<ProgressStatusSection
|
||||
columns={PROGRESS_STATUS_COLUMNS}
|
||||
sttsChgHstryList={sttsChgHstryList}
|
||||
elaprDocNo={detDto.sewerBscPlanDocNo}
|
||||
/>
|
||||
<BasicInfoSection det={detDto} dtl={activeDtlDto} />
|
||||
<ContactInfoSection dtl={activeDtlDto} />
|
||||
<ElaprDocPrgrsStatus elaprDocNo={detDto.sewerBscPlanDocNo} />
|
||||
|
||||
@@ -38,6 +38,7 @@ export type {
|
||||
CklstResultSaveBase,
|
||||
CklstRvwRsltTreeDto,
|
||||
DocPrgrsUpdateRequestDto,
|
||||
DocSttsChgHstryResponseDto,
|
||||
ElaprDocPrgrsClientResponseDto,
|
||||
EsntlAtchFileMngTreeResponseDto,
|
||||
EsntlAtchFileSaveBase,
|
||||
|
||||
@@ -155,6 +155,22 @@ export interface ElaprDocPrgrsClientResponseDto {
|
||||
dcarbYn?: string;
|
||||
}
|
||||
|
||||
/** 문서 상태 변경 이력 응답 DTO */
|
||||
export interface DocSttsChgHstryResponseDto {
|
||||
chgHstrySn: number;
|
||||
docSeComCd: string;
|
||||
docSeComNm: string;
|
||||
docNo: string;
|
||||
chgBfrSttsComCd: string;
|
||||
chgBfrSttsComNm: string;
|
||||
chgAftrSttsComCd: string;
|
||||
chgAftrSttsComNm: string;
|
||||
rmrk: string;
|
||||
rgtrUuid: string;
|
||||
rgtrNm: string;
|
||||
regDt: string;
|
||||
}
|
||||
|
||||
/** 사업규모 저장 공통 필드 */
|
||||
export interface BzScaleSaveBase {
|
||||
cnstpSeCd?: string;
|
||||
@@ -244,4 +260,5 @@ export interface PbadmsMngDetResponseBase<TDet, TRvwOpnn = never, TSplmntDmnd =
|
||||
rvwList?: TRvwOpnn[];
|
||||
splmntDmndList?: TSplmntDmnd[];
|
||||
elaprDocPrgrsList?: ElaprDocPrgrsClientResponseDto[] | null;
|
||||
sttsChgHstryList?: DocSttsChgHstryResponseDto[];
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ export {
|
||||
type PbadmsTaskApplySelection,
|
||||
} from "./ui/pbadms-task-apply-dialog";
|
||||
export { PrivacyConsentSection } from "./ui/privacy-consent-section";
|
||||
export { ProgressStatusSection } from "./ui/progress-status-section";
|
||||
export {
|
||||
SplmntDmndDialog,
|
||||
type SplmntDmndDialogConfirmItem,
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
import type {
|
||||
DocSttsChgHstryResponseDto,
|
||||
ElaprDocPrgrsClientResponseDto,
|
||||
} from "@/shared/model/pbadms-sprt";
|
||||
|
||||
interface ProgressStatusItem {
|
||||
rgtrNm: string;
|
||||
regDt: string;
|
||||
}
|
||||
|
||||
const TECH_REVIEW_STTS_COM_CD = "TE";
|
||||
const TECH_REVIEW_ATRZ_SE_COM_CD = "ATRZ02";
|
||||
const TECH_REVIEW_ATRZ_PRGRS_STTS_COM_CD = "ATRZ_PRGRS_003";
|
||||
|
||||
function findProgressStatusItem(
|
||||
sttsChgHstryList: DocSttsChgHstryResponseDto[],
|
||||
sttsComCd: string,
|
||||
): ProgressStatusItem[] {
|
||||
return sttsChgHstryList
|
||||
.filter((item) => item.chgAftrSttsComCd === sttsComCd)
|
||||
.map((item) => ({
|
||||
rgtrNm: item.rgtrNm,
|
||||
regDt: item.regDt,
|
||||
}));
|
||||
}
|
||||
|
||||
function findTechReviewProgressItem(
|
||||
elaprDocPrgrsList: ElaprDocPrgrsClientResponseDto[],
|
||||
): ProgressStatusItem[] {
|
||||
return elaprDocPrgrsList
|
||||
.filter(
|
||||
(item) =>
|
||||
item.atrzSeComCd === TECH_REVIEW_ATRZ_SE_COM_CD &&
|
||||
item.atrzPrgrsSttsComCd === TECH_REVIEW_ATRZ_PRGRS_STTS_COM_CD,
|
||||
)
|
||||
.map((item) => ({
|
||||
rgtrNm: item.aprvrNm ?? "",
|
||||
regDt: item.atrzDt ?? "",
|
||||
}));
|
||||
}
|
||||
|
||||
function resolveProgressStatusItem(
|
||||
sttsComCd: string,
|
||||
sttsChgHstryList: DocSttsChgHstryResponseDto[],
|
||||
elaprDocPrgrsList: ElaprDocPrgrsClientResponseDto[],
|
||||
): ProgressStatusItem[] {
|
||||
if (sttsComCd === TECH_REVIEW_STTS_COM_CD) {
|
||||
return findTechReviewProgressItem(elaprDocPrgrsList);
|
||||
}
|
||||
|
||||
return findProgressStatusItem(sttsChgHstryList, sttsComCd);
|
||||
}
|
||||
|
||||
export {
|
||||
findProgressStatusItem,
|
||||
findTechReviewProgressItem,
|
||||
resolveProgressStatusItem,
|
||||
TECH_REVIEW_STTS_COM_CD,
|
||||
};
|
||||
@@ -0,0 +1,88 @@
|
||||
"use client";
|
||||
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { DocSttsChgHstryResponseDto } from "@/shared/model/pbadms-sprt";
|
||||
import { SectionCollapsible } from "@/shared/ui";
|
||||
import { useElaprDocPrgrsByDocNo } from "@/entities/elapr";
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@common/components";
|
||||
|
||||
import { resolveProgressStatusItem } from "../lib/progress-status-utils";
|
||||
|
||||
interface ProgressStatusColumn {
|
||||
label: string;
|
||||
sttsComCd: string;
|
||||
}
|
||||
|
||||
interface ProgressStatusItem {
|
||||
rgtrNm: string;
|
||||
regDt: string;
|
||||
}
|
||||
|
||||
interface ProgressStatusSectionProps {
|
||||
columns: ProgressStatusColumn[];
|
||||
sttsChgHstryList: DocSttsChgHstryResponseDto[];
|
||||
elaprDocNo: string;
|
||||
}
|
||||
|
||||
interface ProgressStatusCellProps {
|
||||
items: ProgressStatusItem[];
|
||||
}
|
||||
|
||||
function ProgressStatusCell({ items }: ProgressStatusCellProps) {
|
||||
if (items.length === 0) return "-";
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
{items.map((item, index) => (
|
||||
<div key={`${item.rgtrNm}-${item.regDt}-${index}`}>
|
||||
{item.rgtrNm || "-"}
|
||||
{item.regDt && (
|
||||
<p className="mt-1 text-lg text-muted-foreground">
|
||||
{dayjs(item.regDt).format("YYYY-MM-DD")}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ProgressStatusSection({
|
||||
columns,
|
||||
sttsChgHstryList,
|
||||
elaprDocNo,
|
||||
}: ProgressStatusSectionProps) {
|
||||
const { data: elaprDocPrgrsList = [] } = useElaprDocPrgrsByDocNo(elaprDocNo);
|
||||
|
||||
return (
|
||||
<SectionCollapsible title="진행 상태">
|
||||
<Table variant="secondary">
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
{columns.map((column) => (
|
||||
<TableHead key={column.sttsComCd}>{column.label}</TableHead>
|
||||
))}
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
<TableRow>
|
||||
{columns.map((column) => (
|
||||
<TableCell key={column.sttsComCd} align="center">
|
||||
<ProgressStatusCell
|
||||
items={resolveProgressStatusItem(
|
||||
column.sttsComCd,
|
||||
sttsChgHstryList,
|
||||
elaprDocPrgrsList,
|
||||
)}
|
||||
/>
|
||||
</TableCell>
|
||||
))}
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
</SectionCollapsible>
|
||||
);
|
||||
}
|
||||
|
||||
export { ProgressStatusSection };
|
||||
Reference in New Issue
Block a user