Compare commits
28
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a730db95dd | ||
|
|
f2999f60f2 | ||
|
|
0307ee9fd6 | ||
|
|
8087ed343c | ||
|
|
eaf0a618a0 | ||
|
|
4329eafa9b | ||
|
|
411e490b5d | ||
|
|
b5f5938e51 | ||
|
|
038b2d441e | ||
|
|
2ec58f1f5b | ||
|
|
3cf3617513 | ||
|
|
b611538180 | ||
|
|
1cffe06cf9 | ||
|
|
9a24e4aa23 | ||
|
|
3732c9380b | ||
|
|
9e15b23eda | ||
|
|
6f300918cd | ||
|
|
619878bc03 | ||
|
|
9f0e03c151 | ||
|
|
471a431af5 | ||
|
|
26d8410649 | ||
|
|
8403ad556c | ||
|
|
d26c15f857 | ||
|
|
86ed664e3e | ||
|
|
a105f395dd | ||
|
|
a5ebc12580 | ||
|
|
270f6e366f | ||
|
|
acf215c1bf |
@@ -50,7 +50,6 @@ export interface TechReviewOpinionSectionHandle {
|
|||||||
|
|
||||||
interface TechReviewOpinionTableProps {
|
interface TechReviewOpinionTableProps {
|
||||||
items: DesignCnstnRvwOpnnResponseDto[];
|
items: DesignCnstnRvwOpnnResponseDto[];
|
||||||
isReviewTurn: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface UploadedOpinionFile {
|
interface UploadedOpinionFile {
|
||||||
@@ -296,7 +295,7 @@ const TechReviewOpinionSection = forwardRef<
|
|||||||
<SectionCollapsible title={`${REVIEW_STEP_LABELS.KECO} 검토의견`}>
|
<SectionCollapsible title={`${REVIEW_STEP_LABELS.KECO} 검토의견`}>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
{kecoRvwList.length > 0 ? (
|
{kecoRvwList.length > 0 ? (
|
||||||
<TechReviewOpinionTable items={kecoRvwList} isReviewTurn={isReviewTurn("KECO")} />
|
<TechReviewOpinionTable items={kecoRvwList} />
|
||||||
) : null}
|
) : null}
|
||||||
{renderOpinionForm("KECO")}
|
{renderOpinionForm("KECO")}
|
||||||
</div>
|
</div>
|
||||||
@@ -311,7 +310,7 @@ function getRvwOpnnIds(item: DesignCnstnRvwOpnnResponseDto) {
|
|||||||
return [item.designCnstnDocNo, item.rvwOpnnSn] as const;
|
return [item.designCnstnDocNo, item.rvwOpnnSn] as const;
|
||||||
}
|
}
|
||||||
|
|
||||||
function TechReviewOpinionTable({ items, isReviewTurn }: TechReviewOpinionTableProps) {
|
function TechReviewOpinionTable({ items }: TechReviewOpinionTableProps) {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const currentUserUuid = useUserStore((state) => state.userInfo?.userUnqId);
|
const currentUserUuid = useUserStore((state) => state.userInfo?.userUnqId);
|
||||||
|
|
||||||
@@ -320,7 +319,6 @@ function TechReviewOpinionTable({ items, isReviewTurn }: TechReviewOpinionTableP
|
|||||||
items={items}
|
items={items}
|
||||||
getRowKey={(item) => `${item.designCnstnDocNo}_${item.rvwOpnnSn}`}
|
getRowKey={(item) => `${item.designCnstnDocNo}_${item.rvwOpnnSn}`}
|
||||||
currentUserUuid={currentUserUuid}
|
currentUserUuid={currentUserUuid}
|
||||||
isReviewTurn={isReviewTurn}
|
|
||||||
onUpdate={async (item, body) => {
|
onUpdate={async (item, body) => {
|
||||||
await designCnstnRvwOpnnService.update(...getRvwOpnnIds(item), body);
|
await designCnstnRvwOpnnService.update(...getRvwOpnnIds(item), body);
|
||||||
await queryClient.invalidateQueries({ queryKey: designCnstnKeys.all });
|
await queryClient.invalidateQueries({ queryKey: designCnstnKeys.all });
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ export interface TechReviewOpinionSectionHandle {
|
|||||||
|
|
||||||
interface TechReviewOpinionTableProps {
|
interface TechReviewOpinionTableProps {
|
||||||
items: FnrsCnsltnRvwOpnnResponseDto[];
|
items: FnrsCnsltnRvwOpnnResponseDto[];
|
||||||
isReviewTurn: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface UploadedOpinionFile {
|
interface UploadedOpinionFile {
|
||||||
@@ -292,7 +291,7 @@ const TechReviewOpinionSection = forwardRef<
|
|||||||
<SectionCollapsible title={`${REVIEW_STEP_LABELS.ENV} 검토의견`}>
|
<SectionCollapsible title={`${REVIEW_STEP_LABELS.ENV} 검토의견`}>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
{envRvwList.length > 0 ? (
|
{envRvwList.length > 0 ? (
|
||||||
<TechReviewOpinionTable items={envRvwList} isReviewTurn={isReviewTurn("ENV")} />
|
<TechReviewOpinionTable items={envRvwList} />
|
||||||
) : null}
|
) : null}
|
||||||
{renderOpinionForm("ENV")}
|
{renderOpinionForm("ENV")}
|
||||||
</div>
|
</div>
|
||||||
@@ -302,7 +301,7 @@ const TechReviewOpinionSection = forwardRef<
|
|||||||
<SectionCollapsible title={`${REVIEW_STEP_LABELS.KECO} 검토의견`}>
|
<SectionCollapsible title={`${REVIEW_STEP_LABELS.KECO} 검토의견`}>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
{kecoRvwList.length > 0 ? (
|
{kecoRvwList.length > 0 ? (
|
||||||
<TechReviewOpinionTable items={kecoRvwList} isReviewTurn={isReviewTurn("KECO")} />
|
<TechReviewOpinionTable items={kecoRvwList} />
|
||||||
) : null}
|
) : null}
|
||||||
{/*
|
{/*
|
||||||
재원협의에서 환경공단 검토의견은 자동 생성
|
재원협의에서 환경공단 검토의견은 자동 생성
|
||||||
@@ -322,7 +321,7 @@ function getRvwOpnnIds(item: FnrsCnsltnRvwOpnnResponseDto) {
|
|||||||
return [item.fnrsCnsltnDocNo, item.rvwOpnnSn] as const;
|
return [item.fnrsCnsltnDocNo, item.rvwOpnnSn] as const;
|
||||||
}
|
}
|
||||||
|
|
||||||
function TechReviewOpinionTable({ items, isReviewTurn }: TechReviewOpinionTableProps) {
|
function TechReviewOpinionTable({ items }: TechReviewOpinionTableProps) {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const currentUserUuid = useUserStore((state) => state.userInfo?.userUnqId);
|
const currentUserUuid = useUserStore((state) => state.userInfo?.userUnqId);
|
||||||
|
|
||||||
@@ -331,7 +330,6 @@ function TechReviewOpinionTable({ items, isReviewTurn }: TechReviewOpinionTableP
|
|||||||
items={items}
|
items={items}
|
||||||
getRowKey={(item) => `${item.fnrsCnsltnDocNo}_${item.rvwOpnnSn}`}
|
getRowKey={(item) => `${item.fnrsCnsltnDocNo}_${item.rvwOpnnSn}`}
|
||||||
currentUserUuid={currentUserUuid}
|
currentUserUuid={currentUserUuid}
|
||||||
isReviewTurn={isReviewTurn}
|
|
||||||
onUpdate={async (item, body) => {
|
onUpdate={async (item, body) => {
|
||||||
await fnrsCnsltnRvwOpnnService.update(...getRvwOpnnIds(item), body);
|
await fnrsCnsltnRvwOpnnService.update(...getRvwOpnnIds(item), body);
|
||||||
await queryClient.invalidateQueries({ queryKey: fnrsCnsltnKeys.all });
|
await queryClient.invalidateQueries({ queryKey: fnrsCnsltnKeys.all });
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ export const INSTL_SNCN_VIEW_BUTTON_ACTION = {
|
|||||||
aply: "aply",
|
aply: "aply",
|
||||||
del: "del",
|
del: "del",
|
||||||
instlSncnAncmnt: "instlSncnAncmnt",
|
instlSncnAncmnt: "instlSncnAncmnt",
|
||||||
envoSbmsn: "envoSbmsn",
|
|
||||||
rjct: "rjct",
|
rjct: "rjct",
|
||||||
sncnAprv: "sncnAprv",
|
sncnAprv: "sncnAprv",
|
||||||
rvwRply: "rvwRply",
|
rvwRply: "rvwRply",
|
||||||
@@ -33,14 +32,16 @@ const ROLE_STATUS_BUTTON_ACTIONS: Record<string, Record<string, InstlSncnViewBut
|
|||||||
],
|
],
|
||||||
TA: [INSTL_SNCN_VIEW_BUTTON_ACTION.instlSncnAncmnt],
|
TA: [INSTL_SNCN_VIEW_BUTTON_ACTION.instlSncnAncmnt],
|
||||||
},
|
},
|
||||||
ROLE_USER04: {
|
// 환경청 단계 제거: 기존 환경청(LE·TP) 기능을 광역자치단체가 수행
|
||||||
ST: [INSTL_SNCN_VIEW_BUTTON_ACTION.envoSbmsn, INSTL_SNCN_VIEW_BUTTON_ACTION.rjct],
|
ROLE_USER04: {
|
||||||
EP: [INSTL_SNCN_VIEW_BUTTON_ACTION.sncnAprv],
|
ST: [
|
||||||
},
|
INSTL_SNCN_VIEW_BUTTON_ACTION.rvwRply,
|
||||||
ROLE_USER03: {
|
INSTL_SNCN_VIEW_BUTTON_ACTION.rqstTechRvw,
|
||||||
LE: [INSTL_SNCN_VIEW_BUTTON_ACTION.rvwRply, INSTL_SNCN_VIEW_BUTTON_ACTION.rqstTechRvw],
|
INSTL_SNCN_VIEW_BUTTON_ACTION.rjct,
|
||||||
TP: [INSTL_SNCN_VIEW_BUTTON_ACTION.rvwRply],
|
],
|
||||||
},
|
TP: [INSTL_SNCN_VIEW_BUTTON_ACTION.rvwRply],
|
||||||
|
EP: [INSTL_SNCN_VIEW_BUTTON_ACTION.sncnAprv],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const ROLE_USER01_ATRZ_STATUS_CODES = ["ER", "TE"] as const;
|
const ROLE_USER01_ATRZ_STATUS_CODES = ["ER", "TE"] as const;
|
||||||
|
|||||||
@@ -55,16 +55,8 @@ export const instlSncnRegistSchema = z.object({
|
|||||||
tstmDesignAmt: z.number(),
|
tstmDesignAmt: z.number(),
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
cklstResultList: z.array(
|
// 설치인가 화면에서 체크리스트 미사용: 숨겨진 값 때문에 신청·저장 검증이 막히지 않도록 필수값을 두지 않음
|
||||||
instlSncnCklstResultItemSchema.extend({
|
cklstResultList: z.array(instlSncnCklstResultItemSchema),
|
||||||
cklstSn: z.number(),
|
|
||||||
cklstArtclSn: z.number(),
|
|
||||||
cklstRvwSn: z.number(),
|
|
||||||
rvwStpComCd: z.string(),
|
|
||||||
selected: z.enum(["Y", "N"]).nullish(),
|
|
||||||
picRvwCn: z.string().nullish(),
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
esntlAtchFileList: z.array(
|
esntlAtchFileList: z.array(
|
||||||
instlSncnEsntlAtchFileItemSchema.extend({
|
instlSncnEsntlAtchFileItemSchema.extend({
|
||||||
esntlAtchFileId: z.string(),
|
esntlAtchFileId: z.string(),
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export function getEditableReviewStep(
|
|||||||
dtlInstCd?: string,
|
dtlInstCd?: string,
|
||||||
prgrsSttsComCd?: string,
|
prgrsSttsComCd?: string,
|
||||||
): ReviewStepCode | undefined {
|
): ReviewStepCode | undefined {
|
||||||
if (dtlInstCd === "ROLE_USER03" && (prgrsSttsComCd === "LE" || prgrsSttsComCd === "TP")) {
|
if (dtlInstCd === "ROLE_USER04" && (prgrsSttsComCd === "ST" || prgrsSttsComCd === "TP")) {
|
||||||
return "ENV";
|
return "ENV";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ export const REVIEW_STEP_CODES: ReviewStepCode[] = ["LOCAL", "ENV", "KECO"];
|
|||||||
|
|
||||||
export const CHECKLIST_TAB_LABELS: Record<ReviewStepCode, string> = {
|
export const CHECKLIST_TAB_LABELS: Record<ReviewStepCode, string> = {
|
||||||
LOCAL: "자가체크",
|
LOCAL: "자가체크",
|
||||||
ENV: "환경청검토",
|
ENV: "광역자치단체검토",
|
||||||
KECO: "기술검토",
|
KECO: "기술검토",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const REVIEW_STEP_LABELS: Record<ReviewStepCode, string> = {
|
export const REVIEW_STEP_LABELS: Record<ReviewStepCode, string> = {
|
||||||
LOCAL: "지자체",
|
LOCAL: "지자체",
|
||||||
ENV: "환경청",
|
ENV: "광역자치단체",
|
||||||
KECO: "환경공단",
|
KECO: "환경공단",
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ export const INSTL_PROGRESS_ORDER = [
|
|||||||
|
|
||||||
export const ROLE_TO_REVIEW_STEP: Record<string, ReviewStepCode> = {
|
export const ROLE_TO_REVIEW_STEP: Record<string, ReviewStepCode> = {
|
||||||
ROLE_USER05: "LOCAL",
|
ROLE_USER05: "LOCAL",
|
||||||
ROLE_USER03: "ENV",
|
ROLE_USER04: "ENV",
|
||||||
ROLE_USER01: "KECO",
|
ROLE_USER01: "KECO",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ import {
|
|||||||
type InstlSncnViewButtonAction,
|
type InstlSncnViewButtonAction,
|
||||||
needsRoleUser01AtrzResolve,
|
needsRoleUser01AtrzResolve,
|
||||||
} from "../../lib/button-config";
|
} from "../../lib/button-config";
|
||||||
import { computeReviewStepChecklistProgress } from "../../lib/checklist-utils";
|
|
||||||
import {
|
import {
|
||||||
buildSavePayload,
|
buildSavePayload,
|
||||||
buildSupplementReqPayload,
|
buildSupplementReqPayload,
|
||||||
@@ -179,11 +178,6 @@ function FloatingActionButtons({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleAplyClick() {
|
async function handleAplyClick() {
|
||||||
const { percent } = computeReviewStepChecklistProgress(
|
|
||||||
data.cklstResultList ?? [],
|
|
||||||
checklistFormState.results,
|
|
||||||
"LOCAL",
|
|
||||||
);
|
|
||||||
const payload: InstlSncnApplySaveRequestDto = buildSavePayload(
|
const payload: InstlSncnApplySaveRequestDto = buildSavePayload(
|
||||||
data,
|
data,
|
||||||
checklistFormState,
|
checklistFormState,
|
||||||
@@ -191,11 +185,6 @@ function FloatingActionButtons({
|
|||||||
"ST",
|
"ST",
|
||||||
);
|
);
|
||||||
|
|
||||||
if (percent !== 100) {
|
|
||||||
alert("모든 체크리스트 항목을 체크해야 신청이 가능합니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await executeAction({
|
await executeAction({
|
||||||
action: INSTL_SNCN_VIEW_BUTTON_ACTION.aply,
|
action: INSTL_SNCN_VIEW_BUTTON_ACTION.aply,
|
||||||
request: payload,
|
request: payload,
|
||||||
@@ -231,22 +220,6 @@ function FloatingActionButtons({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleEnvoSbmsnClick() {
|
|
||||||
const payload: DocPrgrsUpdateRequestDto = {
|
|
||||||
docNo,
|
|
||||||
docSeComCd,
|
|
||||||
prgrsSttsComCd: "LE",
|
|
||||||
};
|
|
||||||
await executeAction({
|
|
||||||
action: INSTL_SNCN_VIEW_BUTTON_ACTION.envoSbmsn,
|
|
||||||
request: payload,
|
|
||||||
successMessage: "제출되었습니다.",
|
|
||||||
});
|
|
||||||
queryClient.invalidateQueries({
|
|
||||||
queryKey: instlSncnKeys.list(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleRjctClick() {
|
async function handleRjctClick() {
|
||||||
const payload: DocPrgrsUpdateRequestDto = {
|
const payload: DocPrgrsUpdateRequestDto = {
|
||||||
docNo,
|
docNo,
|
||||||
@@ -284,16 +257,6 @@ function FloatingActionButtons({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleRvwRplyClick() {
|
async function handleRvwRplyClick() {
|
||||||
const { percent } = computeReviewStepChecklistProgress(
|
|
||||||
data.cklstResultList ?? [],
|
|
||||||
checklistFormState.results,
|
|
||||||
"ENV",
|
|
||||||
);
|
|
||||||
|
|
||||||
if (percent !== 100) {
|
|
||||||
alert("모든 체크리스트 항목을 체크해야 검토결과 회신이 가능합니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const payload = buildTechReviewReplyPayload(
|
const payload = buildTechReviewReplyPayload(
|
||||||
data,
|
data,
|
||||||
@@ -369,16 +332,6 @@ function FloatingActionButtons({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleRvwCmptnClick() {
|
async function handleRvwCmptnClick() {
|
||||||
const { percent } = computeReviewStepChecklistProgress(
|
|
||||||
data.cklstResultList ?? [],
|
|
||||||
checklistFormState.results,
|
|
||||||
"KECO",
|
|
||||||
);
|
|
||||||
|
|
||||||
if (percent !== 100) {
|
|
||||||
alert("모든 체크리스트 항목을 체크해야 검토완료가 가능합니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
...buildTechReviewReplyPayload(
|
...buildTechReviewReplyPayload(
|
||||||
@@ -447,11 +400,6 @@ function FloatingActionButtons({
|
|||||||
설치인가 고시
|
설치인가 고시
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{shouldShowButton(INSTL_SNCN_VIEW_BUTTON_ACTION.envoSbmsn) && (
|
|
||||||
<Button onClick={handleEnvoSbmsnClick} disabled={isProcessing}>
|
|
||||||
환경청제출
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
{shouldShowButton(INSTL_SNCN_VIEW_BUTTON_ACTION.rjct) && (
|
{shouldShowButton(INSTL_SNCN_VIEW_BUTTON_ACTION.rjct) && (
|
||||||
<Button color="red" onClick={handleRjctClick} disabled={isProcessing}>
|
<Button color="red" onClick={handleRjctClick} disabled={isProcessing}>
|
||||||
반려
|
반려
|
||||||
@@ -618,7 +566,6 @@ const buttonActionHandlers: Record<InstlSncnViewButtonAction, ActionHandler> = {
|
|||||||
aply: handleSaveApply,
|
aply: handleSaveApply,
|
||||||
del: handleDel,
|
del: handleDel,
|
||||||
instlSncnAncmnt: handleChangePrgrsSttsComCd,
|
instlSncnAncmnt: handleChangePrgrsSttsComCd,
|
||||||
envoSbmsn: handleChangePrgrsSttsComCd,
|
|
||||||
rjct: handleChangePrgrsSttsComCd,
|
rjct: handleChangePrgrsSttsComCd,
|
||||||
sncnAprv: handleChangePrgrsSttsComCd,
|
sncnAprv: handleChangePrgrsSttsComCd,
|
||||||
rvwRply: handleTechReview,
|
rvwRply: handleTechReview,
|
||||||
|
|||||||
@@ -20,9 +20,7 @@ import {
|
|||||||
AttachmentsFormSection,
|
AttachmentsFormSection,
|
||||||
BusinessCostFormSection,
|
BusinessCostFormSection,
|
||||||
BusinessScaleFormSection,
|
BusinessScaleFormSection,
|
||||||
ChecklistFormSection,
|
|
||||||
ContactInfoFormSection,
|
ContactInfoFormSection,
|
||||||
isFormChecklistComplete,
|
|
||||||
isFormEsntlAtchComplete,
|
isFormEsntlAtchComplete,
|
||||||
PrivacyConsentSection,
|
PrivacyConsentSection,
|
||||||
ProgressStatusSection,
|
ProgressStatusSection,
|
||||||
@@ -154,11 +152,6 @@ function InstlFormPage({ mode, initialData, createDefaults }: InstlFormPageProps
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isFormChecklistComplete(data.cklstResultList)) {
|
|
||||||
alert("모든 체크리스트 항목을 체크해야 신청이 가능합니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isFormEsntlAtchComplete(essentialFiles, data.esntlAtchFileList)) {
|
if (!isFormEsntlAtchComplete(essentialFiles, data.esntlAtchFileList)) {
|
||||||
alert("필수 첨부파일을 모두 등록해야 신청이 가능합니다.");
|
alert("필수 첨부파일을 모두 등록해야 신청이 가능합니다.");
|
||||||
return;
|
return;
|
||||||
@@ -228,7 +221,6 @@ function InstlFormPage({ mode, initialData, createDefaults }: InstlFormPageProps
|
|||||||
<PrivacyConsentSection />
|
<PrivacyConsentSection />
|
||||||
<BusinessScaleFormSection />
|
<BusinessScaleFormSection />
|
||||||
<BusinessCostFormSection />
|
<BusinessCostFormSection />
|
||||||
<ChecklistFormSection docSeComCd="INSTL" fieldPrefix="instlSncnMng" />
|
|
||||||
<AttachmentsFormSection
|
<AttachmentsFormSection
|
||||||
docSeComCd="INSTL"
|
docSeComCd="INSTL"
|
||||||
fieldPrefix="instlSncnMng"
|
fieldPrefix="instlSncnMng"
|
||||||
|
|||||||
@@ -1,149 +1,141 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useMemo, useRef } from "react";
|
import { useMemo, useRef } from "react";
|
||||||
|
|
||||||
import { useUserStore } from "@/shared/lib";
|
import { useUserStore } from "@/shared/lib";
|
||||||
import { SectionCollapsibleGroup, SectionCollapsibleToggle } from "@/shared/ui";
|
import { SectionCollapsibleGroup, SectionCollapsibleToggle } from "@/shared/ui";
|
||||||
import { ElaprDocPrgrsStatus } from "@/entities/elapr";
|
import { ElaprDocPrgrsStatus } from "@/entities/elapr";
|
||||||
import { useInstlSncnDetail } from "@/entities/instl-sncn";
|
import { useInstlSncnDetail } from "@/entities/instl-sncn";
|
||||||
import { useRvwMnpwMngLoginUserList } from "@/entities/rvw-mnpw";
|
import { useRvwMnpwMngLoginUserList } from "@/entities/rvw-mnpw";
|
||||||
import {
|
import {
|
||||||
AttachmentsViewSection,
|
AttachmentsViewSection,
|
||||||
ProgressStatusSection,
|
ProgressStatusSection,
|
||||||
SupplementDemandSection,
|
SupplementDemandSection,
|
||||||
} from "@/widgets/pbadms-sprt";
|
} from "@/widgets/pbadms-sprt";
|
||||||
import { Skeleton } from "@common/components";
|
import { Skeleton } from "@common/components";
|
||||||
|
|
||||||
import { needsRoleUser01AtrzResolve } from "../lib/button-config";
|
import { needsRoleUser01AtrzResolve } from "../lib/button-config";
|
||||||
import { getEditableReviewStep } from "../lib/review-step-utils";
|
import { getEditableReviewStep } from "../lib/review-step-utils";
|
||||||
import { EMPTY_CKLST_RESULT_LIST, useChecklistFormState } from "../lib/use-checklist-form-state";
|
import { EMPTY_CKLST_RESULT_LIST, useChecklistFormState } from "../lib/use-checklist-form-state";
|
||||||
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
import { PROGRESS_STATUS_COLUMNS } from "../model/columns";
|
||||||
|
|
||||||
import { FloatingActionButtons } from "./components/floating-action-buttons";
|
import { FloatingActionButtons } from "./components/floating-action-buttons";
|
||||||
import { BasicInfoSection } from "./sections/basic-info-section";
|
import { BasicInfoSection } from "./sections/basic-info-section";
|
||||||
import { BusinessCostSection } from "./sections/business-cost-section";
|
import { BusinessCostSection } from "./sections/business-cost-section";
|
||||||
import { BusinessScaleSection } from "./sections/business-scale-section";
|
import { BusinessScaleSection } from "./sections/business-scale-section";
|
||||||
import { ChecklistSection } from "./sections/checklist-section";
|
import { ContactInfoSection } from "./sections/contact-info-section";
|
||||||
import { ContactInfoSection } from "./sections/contact-info-section";
|
import {
|
||||||
import {
|
TechReviewOpinionSection,
|
||||||
TechReviewOpinionSection,
|
type TechReviewOpinionSectionHandle,
|
||||||
type TechReviewOpinionSectionHandle,
|
} from "./sections/tech-review-opinion-section";
|
||||||
} from "./sections/tech-review-opinion-section";
|
|
||||||
|
interface InstlViewPageProps {
|
||||||
interface InstlViewPageProps {
|
id: string;
|
||||||
id: string;
|
}
|
||||||
}
|
|
||||||
|
function InstlViewPage({ id }: InstlViewPageProps) {
|
||||||
function InstlViewPage({ id }: InstlViewPageProps) {
|
const userInfo = useUserStore((state) => state.userInfo);
|
||||||
const userInfo = useUserStore((state) => state.userInfo);
|
const techReviewOpinionRef = useRef<TechReviewOpinionSectionHandle>(null);
|
||||||
const techReviewOpinionRef = useRef<TechReviewOpinionSectionHandle>(null);
|
const { data, isLoading, isError } = useInstlSncnDetail(id);
|
||||||
const { data, isLoading, isError } = useInstlSncnDetail(id);
|
const { formState: checklistFormState } = useChecklistFormState(
|
||||||
const { formState: checklistFormState, setFormState: setChecklistFormState } =
|
data?.cklstResultList ?? EMPTY_CKLST_RESULT_LIST,
|
||||||
useChecklistFormState(data?.cklstResultList ?? EMPTY_CKLST_RESULT_LIST);
|
);
|
||||||
|
|
||||||
const prgrsSttsComCd = data?.detDto?.prgrsSttsComCd || "";
|
const prgrsSttsComCd = data?.detDto?.prgrsSttsComCd || "";
|
||||||
const needsAtrzResolve = needsRoleUser01AtrzResolve(userInfo?.dtlInstCd, prgrsSttsComCd);
|
const needsAtrzResolve = needsRoleUser01AtrzResolve(userInfo?.dtlInstCd, prgrsSttsComCd);
|
||||||
const { data: rvwLoginUserData, isLoading: isRvwLoginUserLoading } = useRvwMnpwMngLoginUserList(
|
const { data: rvwLoginUserData, isLoading: isRvwLoginUserLoading } = useRvwMnpwMngLoginUserList(
|
||||||
{},
|
{},
|
||||||
{ enabled: needsAtrzResolve },
|
{ enabled: needsAtrzResolve },
|
||||||
);
|
);
|
||||||
const atrzSeComCdList = useMemo(
|
const atrzSeComCdList = useMemo(
|
||||||
() => rvwLoginUserData?.content?.map((item) => item.atrzSeComCd) ?? [],
|
() => rvwLoginUserData?.content?.map((item) => item.atrzSeComCd) ?? [],
|
||||||
[rvwLoginUserData],
|
[rvwLoginUserData],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
<div className="mt-6 flex flex-col gap-4 px-6">
|
<div className="mt-6 flex flex-col gap-4 px-6">
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<Skeleton className="h-[4rem] rounded-xl" />
|
<Skeleton className="h-[4rem] rounded-xl" />
|
||||||
<Skeleton className="h-[16rem] rounded-xl" />
|
<Skeleton className="h-[16rem] rounded-xl" />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<Skeleton className="h-[4rem] rounded-xl" />
|
<Skeleton className="h-[4rem] rounded-xl" />
|
||||||
<Skeleton className="h-[16rem] rounded-xl" />
|
<Skeleton className="h-[16rem] rounded-xl" />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<Skeleton className="h-[4rem] rounded-xl" />
|
<Skeleton className="h-[4rem] rounded-xl" />
|
||||||
<Skeleton className="h-[32rem] rounded-xl" />
|
<Skeleton className="h-[32rem] rounded-xl" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isError || !data) {
|
if (isError || !data) {
|
||||||
return <div className="mt-6 text-[1.4rem]">상세 정보를 찾을 수 없습니다.</div>;
|
return <div className="mt-6 text-[1.4rem]">상세 정보를 찾을 수 없습니다.</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
detDto,
|
detDto,
|
||||||
bizSclList,
|
bizSclList,
|
||||||
bizCstList,
|
bizCstList,
|
||||||
cklstResultList = [],
|
esntlFileList,
|
||||||
esntlFileList,
|
etcFileList,
|
||||||
etcFileList,
|
rvwList = [],
|
||||||
rvwList = [],
|
splmntDmndList = [],
|
||||||
splmntDmndList = [],
|
sttsChgHstryList = [],
|
||||||
sttsChgHstryList = [],
|
} = data;
|
||||||
} = data;
|
|
||||||
|
const editableReviewStep = getEditableReviewStep(
|
||||||
const editableReviewStep = getEditableReviewStep(
|
userInfo?.dtlInstCd,
|
||||||
userInfo?.dtlInstCd,
|
detDto.prgrsSttsComCd || "",
|
||||||
detDto.prgrsSttsComCd || "",
|
);
|
||||||
);
|
|
||||||
|
return (
|
||||||
return (
|
<div className="mt-4">
|
||||||
<div className="mt-4">
|
<SectionCollapsibleGroup>
|
||||||
<SectionCollapsibleGroup>
|
<div className="sticky top-[6rem] z-30 bg-container px-4 py-2">
|
||||||
<div className="sticky top-[6rem] z-30 bg-container px-4 py-2">
|
<SectionCollapsibleToggle />
|
||||||
<SectionCollapsibleToggle />
|
</div>
|
||||||
</div>
|
<div className="space-y-4">
|
||||||
<div className="space-y-4">
|
<ProgressStatusSection
|
||||||
<ProgressStatusSection
|
columns={PROGRESS_STATUS_COLUMNS}
|
||||||
columns={PROGRESS_STATUS_COLUMNS}
|
sttsChgHstryList={sttsChgHstryList}
|
||||||
sttsChgHstryList={sttsChgHstryList}
|
elaprDocNo={detDto.instlSncnDocNo}
|
||||||
elaprDocNo={detDto.instlSncnDocNo}
|
/>
|
||||||
/>
|
<BasicInfoSection det={detDto} />
|
||||||
<BasicInfoSection det={detDto} />
|
<ContactInfoSection det={detDto} />
|
||||||
<ContactInfoSection det={detDto} />
|
<ElaprDocPrgrsStatus elaprDocNo={detDto.instlSncnDocNo} />
|
||||||
<ElaprDocPrgrsStatus elaprDocNo={detDto.instlSncnDocNo} />
|
<BusinessScaleSection bizSclList={bizSclList} />
|
||||||
<BusinessScaleSection bizSclList={bizSclList} />
|
<BusinessCostSection bizCstList={bizCstList} />
|
||||||
<BusinessCostSection bizCstList={bizCstList} />
|
<AttachmentsViewSection
|
||||||
<ChecklistSection
|
esntlFileList={esntlFileList ?? []}
|
||||||
cklstResultList={cklstResultList}
|
etcFileList={etcFileList ?? []}
|
||||||
prgrsSttsComCd={detDto.prgrsSttsComCd || ""}
|
/>
|
||||||
userRoleCode={userInfo?.dtlInstCd}
|
<TechReviewOpinionSection
|
||||||
formState={checklistFormState}
|
ref={techReviewOpinionRef}
|
||||||
setFormState={setChecklistFormState}
|
rvwList={rvwList}
|
||||||
/>
|
editableReviewStep={editableReviewStep}
|
||||||
<AttachmentsViewSection
|
atrzSeComCdList={atrzSeComCdList}
|
||||||
esntlFileList={esntlFileList ?? []}
|
isAtrzLoading={needsAtrzResolve && isRvwLoginUserLoading}
|
||||||
etcFileList={etcFileList ?? []}
|
/>
|
||||||
/>
|
<SupplementDemandSection splmntDmndList={splmntDmndList} />
|
||||||
<TechReviewOpinionSection
|
<FloatingActionButtons
|
||||||
ref={techReviewOpinionRef}
|
data={data}
|
||||||
rvwList={rvwList}
|
docSeComCd="INSTL"
|
||||||
editableReviewStep={editableReviewStep}
|
instlSncnDocNo={detDto.instlSncnDocNo}
|
||||||
atrzSeComCdList={atrzSeComCdList}
|
prgrsSttsComCd={detDto.prgrsSttsComCd || ""}
|
||||||
isAtrzLoading={needsAtrzResolve && isRvwLoginUserLoading}
|
dtlInstCd={userInfo?.dtlInstCd}
|
||||||
/>
|
atrzSeComCdList={atrzSeComCdList}
|
||||||
<SupplementDemandSection splmntDmndList={splmntDmndList} />
|
isRvwLoginUserLoading={needsAtrzResolve && isRvwLoginUserLoading}
|
||||||
<FloatingActionButtons
|
checklistFormState={checklistFormState}
|
||||||
data={data}
|
techReviewOpinionRef={techReviewOpinionRef}
|
||||||
docSeComCd="INSTL"
|
opnrNm={userInfo?.userName}
|
||||||
instlSncnDocNo={detDto.instlSncnDocNo}
|
/>
|
||||||
prgrsSttsComCd={detDto.prgrsSttsComCd || ""}
|
</div>
|
||||||
dtlInstCd={userInfo?.dtlInstCd}
|
</SectionCollapsibleGroup>
|
||||||
atrzSeComCdList={atrzSeComCdList}
|
</div>
|
||||||
isRvwLoginUserLoading={needsAtrzResolve && isRvwLoginUserLoading}
|
);
|
||||||
checklistFormState={checklistFormState}
|
}
|
||||||
techReviewOpinionRef={techReviewOpinionRef}
|
|
||||||
opnrNm={userInfo?.userName}
|
export { InstlViewPage };
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</SectionCollapsibleGroup>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export { InstlViewPage };
|
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ export interface TechReviewOpinionSectionHandle {
|
|||||||
|
|
||||||
interface TechReviewOpinionTableProps {
|
interface TechReviewOpinionTableProps {
|
||||||
items: InstlSncnRvwOpnnResponseDto[];
|
items: InstlSncnRvwOpnnResponseDto[];
|
||||||
isReviewTurn: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface UploadedOpinionFile {
|
interface UploadedOpinionFile {
|
||||||
@@ -300,7 +299,7 @@ const TechReviewOpinionSection = forwardRef<
|
|||||||
<SectionCollapsible title={`${REVIEW_STEP_LABELS.ENV} 검토의견`}>
|
<SectionCollapsible title={`${REVIEW_STEP_LABELS.ENV} 검토의견`}>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
{envRvwList.length > 0 ? (
|
{envRvwList.length > 0 ? (
|
||||||
<TechReviewOpinionTable items={envRvwList} isReviewTurn={isReviewTurn("ENV")} />
|
<TechReviewOpinionTable items={envRvwList} />
|
||||||
) : null}
|
) : null}
|
||||||
{renderOpinionForm("ENV")}
|
{renderOpinionForm("ENV")}
|
||||||
</div>
|
</div>
|
||||||
@@ -310,7 +309,7 @@ const TechReviewOpinionSection = forwardRef<
|
|||||||
<SectionCollapsible title={`${REVIEW_STEP_LABELS.KECO} 검토의견`}>
|
<SectionCollapsible title={`${REVIEW_STEP_LABELS.KECO} 검토의견`}>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
{kecoRvwList.length > 0 ? (
|
{kecoRvwList.length > 0 ? (
|
||||||
<TechReviewOpinionTable items={kecoRvwList} isReviewTurn={isReviewTurn("KECO")} />
|
<TechReviewOpinionTable items={kecoRvwList} />
|
||||||
) : null}
|
) : null}
|
||||||
{renderOpinionForm("KECO")}
|
{renderOpinionForm("KECO")}
|
||||||
</div>
|
</div>
|
||||||
@@ -327,7 +326,7 @@ function getRvwOpnnIds(item: InstlSncnRvwOpnnResponseDto) {
|
|||||||
return [item.instlSncnDocNo, item.rvwOpnnSn] as const;
|
return [item.instlSncnDocNo, item.rvwOpnnSn] as const;
|
||||||
}
|
}
|
||||||
|
|
||||||
function TechReviewOpinionTable({ items, isReviewTurn }: TechReviewOpinionTableProps) {
|
function TechReviewOpinionTable({ items }: TechReviewOpinionTableProps) {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const currentUserUuid = useUserStore((state) => state.userInfo?.userUnqId);
|
const currentUserUuid = useUserStore((state) => state.userInfo?.userUnqId);
|
||||||
|
|
||||||
@@ -336,7 +335,6 @@ function TechReviewOpinionTable({ items, isReviewTurn }: TechReviewOpinionTableP
|
|||||||
items={items}
|
items={items}
|
||||||
getRowKey={(item) => `${item.instlSncnDocNo}_${item.rvwOpnnSn}`}
|
getRowKey={(item) => `${item.instlSncnDocNo}_${item.rvwOpnnSn}`}
|
||||||
currentUserUuid={currentUserUuid}
|
currentUserUuid={currentUserUuid}
|
||||||
isReviewTurn={isReviewTurn}
|
|
||||||
onUpdate={async (item, body) => {
|
onUpdate={async (item, body) => {
|
||||||
await instlSncnRvwOpnnService.update(...getRvwOpnnIds(item), body);
|
await instlSncnRvwOpnnService.update(...getRvwOpnnIds(item), body);
|
||||||
await queryClient.invalidateQueries({ queryKey: instlSncnKeys.all });
|
await queryClient.invalidateQueries({ queryKey: instlSncnKeys.all });
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ export interface TechReviewOpinionSectionHandle {
|
|||||||
|
|
||||||
interface TechReviewOpinionTableProps {
|
interface TechReviewOpinionTableProps {
|
||||||
items: SewerBscPlanRvwOpnnResponseDto[];
|
items: SewerBscPlanRvwOpnnResponseDto[];
|
||||||
isReviewTurn: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface UploadedOpinionFile {
|
interface UploadedOpinionFile {
|
||||||
@@ -304,7 +303,7 @@ const TechReviewOpinionSection = forwardRef<
|
|||||||
<SectionCollapsible title={`${REVIEW_STEP_LABELS.ENV} 검토의견`}>
|
<SectionCollapsible title={`${REVIEW_STEP_LABELS.ENV} 검토의견`}>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
{envRvwList.length > 0 ? (
|
{envRvwList.length > 0 ? (
|
||||||
<TechReviewOpinionTable items={envRvwList} isReviewTurn={isReviewTurn("ENV")} />
|
<TechReviewOpinionTable items={envRvwList} />
|
||||||
) : null}
|
) : null}
|
||||||
{renderOpinionForm("ENV")}
|
{renderOpinionForm("ENV")}
|
||||||
</div>
|
</div>
|
||||||
@@ -314,7 +313,7 @@ const TechReviewOpinionSection = forwardRef<
|
|||||||
<SectionCollapsible title={`${REVIEW_STEP_LABELS.KECO} 검토의견`}>
|
<SectionCollapsible title={`${REVIEW_STEP_LABELS.KECO} 검토의견`}>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
{kecoRvwList.length > 0 ? (
|
{kecoRvwList.length > 0 ? (
|
||||||
<TechReviewOpinionTable items={kecoRvwList} isReviewTurn={isReviewTurn("KECO")} />
|
<TechReviewOpinionTable items={kecoRvwList} />
|
||||||
) : null}
|
) : null}
|
||||||
{renderOpinionForm("KECO")}
|
{renderOpinionForm("KECO")}
|
||||||
</div>
|
</div>
|
||||||
@@ -331,7 +330,7 @@ function getRvwOpnnIds(item: SewerBscPlanRvwOpnnResponseDto) {
|
|||||||
return [item.sewerBscPlanDocNo, item.chgCycl, item.rvwOpnnSn] as const;
|
return [item.sewerBscPlanDocNo, item.chgCycl, item.rvwOpnnSn] as const;
|
||||||
}
|
}
|
||||||
|
|
||||||
function TechReviewOpinionTable({ items, isReviewTurn }: TechReviewOpinionTableProps) {
|
function TechReviewOpinionTable({ items }: TechReviewOpinionTableProps) {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const currentUserUuid = useUserStore((state) => state.userInfo?.userUnqId);
|
const currentUserUuid = useUserStore((state) => state.userInfo?.userUnqId);
|
||||||
|
|
||||||
@@ -340,7 +339,6 @@ function TechReviewOpinionTable({ items, isReviewTurn }: TechReviewOpinionTableP
|
|||||||
items={items}
|
items={items}
|
||||||
getRowKey={(item) => `${item.sewerBscPlanDocNo}_${item.rvwOpnnSn}`}
|
getRowKey={(item) => `${item.sewerBscPlanDocNo}_${item.rvwOpnnSn}`}
|
||||||
currentUserUuid={currentUserUuid}
|
currentUserUuid={currentUserUuid}
|
||||||
isReviewTurn={isReviewTurn}
|
|
||||||
onUpdate={async (item, body) => {
|
onUpdate={async (item, body) => {
|
||||||
await sewerBscPlanRvwOpnnService.update(...getRvwOpnnIds(item), body);
|
await sewerBscPlanRvwOpnnService.update(...getRvwOpnnIds(item), body);
|
||||||
await queryClient.invalidateQueries({ queryKey: sewerBscPlanKeys.all });
|
await queryClient.invalidateQueries({ queryKey: sewerBscPlanKeys.all });
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ interface RvwOpnnListTableProps<T extends RvwOpnnListItem> {
|
|||||||
getRowKey: (item: T) => string;
|
getRowKey: (item: T) => string;
|
||||||
/** 로그인 사용자 UUID — 검토의견 등록자(rgtr)와 같을 때만 수정·삭제 버튼 노출 */
|
/** 로그인 사용자 UUID — 검토의견 등록자(rgtr)와 같을 때만 수정·삭제 버튼 노출 */
|
||||||
currentUserUuid?: string;
|
currentUserUuid?: string;
|
||||||
/** 현재 검토 단계가 로그인 사용자 차례인지 여부 — false면 등록자라도 수정·삭제 불가 */
|
|
||||||
isReviewTurn?: boolean;
|
|
||||||
onUpdate: (item: T, body: RvwOpnnUpdateRequestDto) => Promise<void>;
|
onUpdate: (item: T, body: RvwOpnnUpdateRequestDto) => Promise<void>;
|
||||||
onDelete: (item: T) => Promise<void>;
|
onDelete: (item: T) => Promise<void>;
|
||||||
}
|
}
|
||||||
@@ -76,7 +74,6 @@ function RvwOpnnListTable<T extends RvwOpnnListItem>({
|
|||||||
items,
|
items,
|
||||||
getRowKey,
|
getRowKey,
|
||||||
currentUserUuid,
|
currentUserUuid,
|
||||||
isReviewTurn = false,
|
|
||||||
onUpdate,
|
onUpdate,
|
||||||
onDelete,
|
onDelete,
|
||||||
}: RvwOpnnListTableProps<T>) {
|
}: RvwOpnnListTableProps<T>) {
|
||||||
@@ -102,7 +99,7 @@ function RvwOpnnListTable<T extends RvwOpnnListItem>({
|
|||||||
const editFileUploading = editFile ? (isUploading[editFile.fileKey] ?? false) : false;
|
const editFileUploading = editFile ? (isUploading[editFile.fileKey] ?? false) : false;
|
||||||
|
|
||||||
function canModify(item: T) {
|
function canModify(item: T) {
|
||||||
return isReviewTurn && Boolean(currentUserUuid) && item.rgtr === currentUserUuid;
|
return Boolean(currentUserUuid) && item.rgtr === currentUserUuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function discardNewFile(file: EditFile | null) {
|
async function discardNewFile(file: EditFile | null) {
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
FROM node:20-alpine
|
||||||
|
|
||||||
|
# pnpm 설치
|
||||||
|
RUN corepack enable && corepack prepare pnpm@8.15.5 --activate
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# 모든 소스 복사
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# .env.production 파일 생성
|
||||||
|
RUN mkdir -p /app/apps/st && \
|
||||||
|
echo "NODE_ENV=production" > /app/apps/st/.env.production && \
|
||||||
|
echo "PORT=3000" >> /app/apps/st/.env.production && \
|
||||||
|
echo "NEXT_PUBLIC_PORT=3000" >> /app/apps/st/.env.production && \
|
||||||
|
echo "SERVER_API_URL=http://dev.onasys.co.kr:8000" >> /app/apps/st/.env.production && \
|
||||||
|
echo "NEXT_PUBLIC_PROXY_HOST=https://st.apps.rsonesoft.com" >> /app/apps/st/.env.production && \
|
||||||
|
echo "NEXT_PUBLIC_TINY_API_KEY=t9nc4z6inquvvd5pq1vea8wcp7lb01qmqseh6egms9vpaju2" >> /app/apps/st/.env.production && \
|
||||||
|
echo "NEXT_PUBLIC_ST_SERVICE_URL=https://apigateway.apps.rsonesoft.com" >> /app/apps/st/.env.production && \
|
||||||
|
echo "NEXT_PUBLIC_ST_REALGRID_KEY=upVcPE+wPOmtLjqyBIh9RkM/nBOseBrflwxYpzGZyYnkTzf7Gmn/c+YNYZY36ZjDHoLUQjrb+Zx6JscIKXc6ti45WUEqxvh/kkzVSHLUHquykNuBw5QDg+AQvETEhgujkdwMl8bfXmKFzr6UT9cAmQ==" >> /app/apps/st/.env.production && \
|
||||||
|
echo "NEXT_PUBLIC_SITE_ID=ST" >> /app/apps/st/.env.production
|
||||||
|
|
||||||
|
RUN pnpm install --filter=st...
|
||||||
|
RUN pnpm build --filter=st...
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["sh", "-c", "pnpm --filter st start & wait"]
|
||||||
@@ -33,6 +33,7 @@ import {
|
|||||||
hasAdmdstCdColumn,
|
hasAdmdstCdColumn,
|
||||||
isExcelImportAdmdstCdInvalid,
|
isExcelImportAdmdstCdInvalid,
|
||||||
mergeExcelImportWithExistingRows,
|
mergeExcelImportWithExistingRows,
|
||||||
|
parseExcelImportCellValue,
|
||||||
prepareGridColumnsForExcelExport,
|
prepareGridColumnsForExcelExport,
|
||||||
releaseFixedOptionsForExcelExport,
|
releaseFixedOptionsForExcelExport,
|
||||||
resolveColumnStyleName,
|
resolveColumnStyleName,
|
||||||
@@ -289,14 +290,28 @@ type GridViewWithSetColumnProperty = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type GridViewWithEditOptions = {
|
type GridViewWithEditOptions = {
|
||||||
setEditOptions?: (options: { commitWhenLeave?: boolean }) => void;
|
setEditOptions?: (options: {
|
||||||
|
commitWhenLeave?: boolean;
|
||||||
|
appendable?: boolean;
|
||||||
|
insertable?: boolean;
|
||||||
|
}) => void;
|
||||||
|
setPasteOptions?: (options: { enableAppend?: boolean }) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 포커스가 그리드 밖으로 나갈 때 편집 중인 값을 자동 commit */
|
/** 포커스가 그리드 밖으로 나갈 때 편집 중인 값을 자동 commit */
|
||||||
function applyDefaultGridEditOptions(
|
function applyDefaultGridEditOptions(
|
||||||
gridView: GridViewWithEditOptions | null | undefined,
|
gridView: GridViewWithEditOptions | null | undefined,
|
||||||
|
options?: { preventRowAppend?: boolean },
|
||||||
) {
|
) {
|
||||||
gridView?.setEditOptions?.({ commitWhenLeave: true });
|
gridView?.setEditOptions?.({
|
||||||
|
commitWhenLeave: true,
|
||||||
|
...(options?.preventRowAppend
|
||||||
|
? { appendable: false, insertable: false }
|
||||||
|
: {}),
|
||||||
|
});
|
||||||
|
if (options?.preventRowAppend) {
|
||||||
|
gridView?.setPasteOptions?.({ enableAppend: false });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function isDateEditorColumn(column: {
|
function isDateEditorColumn(column: {
|
||||||
@@ -853,6 +868,7 @@ const DataGrid = ({
|
|||||||
gridHeight = 55, // vh 단위
|
gridHeight = 55, // vh 단위
|
||||||
headerHeight = 60,
|
headerHeight = 60,
|
||||||
fitStyle = GridFitStyle.EVEN,
|
fitStyle = GridFitStyle.EVEN,
|
||||||
|
preventRowAppend = true,
|
||||||
}: DataGridProps) => {
|
}: DataGridProps) => {
|
||||||
const { columns, columnLayout } = columnInfo;
|
const { columns, columnLayout } = columnInfo;
|
||||||
const fixedColumnNameSet = useMemo(
|
const fixedColumnNameSet = useMemo(
|
||||||
@@ -1331,6 +1347,11 @@ useEffect(() => {
|
|||||||
columnLayout,
|
columnLayout,
|
||||||
{ skipNonEditable: false },
|
{ skipNonEditable: false },
|
||||||
);
|
);
|
||||||
|
const valueTypeByFieldName = new Map(
|
||||||
|
columns
|
||||||
|
.filter((c) => c.fieldName)
|
||||||
|
.map((c) => [c.fieldName as string, c.valueType]),
|
||||||
|
);
|
||||||
|
|
||||||
// 데이터 행 읽기
|
// 데이터 행 읽기
|
||||||
const dataRows: Record<string, string | number>[] = [];
|
const dataRows: Record<string, string | number>[] = [];
|
||||||
@@ -1352,36 +1373,13 @@ useEffect(() => {
|
|||||||
];
|
];
|
||||||
const fieldName = excelColumnFieldNames[colIndex];
|
const fieldName = excelColumnFieldNames[colIndex];
|
||||||
const allFieldName = excelColumnFieldNamesAll[colIndex];
|
const allFieldName = excelColumnFieldNamesAll[colIndex];
|
||||||
|
const typeFieldName = fieldName || allFieldName;
|
||||||
let cellValue: string | number = "";
|
const cellValue = parseExcelImportCellValue(
|
||||||
if (
|
cell,
|
||||||
cell &&
|
typeFieldName
|
||||||
cell.v !== undefined &&
|
? valueTypeByFieldName.get(typeFieldName)
|
||||||
cell.v !== null
|
: undefined,
|
||||||
) {
|
);
|
||||||
// 엑셀 셀 타입이 숫자이거나 값이 숫자인 경우 숫자로 변환
|
|
||||||
if (
|
|
||||||
cell.t === "n" ||
|
|
||||||
(typeof cell.v === "number" &&
|
|
||||||
!isNaN(cell.v))
|
|
||||||
) {
|
|
||||||
cellValue = cell.v as number;
|
|
||||||
} else {
|
|
||||||
const stringValue = String(cell.v);
|
|
||||||
// 문자열이지만 숫자로 변환 가능한 경우 숫자로 변환
|
|
||||||
const numericValue = Number(
|
|
||||||
stringValue.replace(/,/g, ""),
|
|
||||||
);
|
|
||||||
if (
|
|
||||||
!isNaN(numericValue) &&
|
|
||||||
stringValue.trim() !== ""
|
|
||||||
) {
|
|
||||||
cellValue = numericValue;
|
|
||||||
} else {
|
|
||||||
cellValue = stringValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (allFieldName === "admdstCd" && cellValue !== "") {
|
if (allFieldName === "admdstCd" && cellValue !== "") {
|
||||||
rowAdmdstCd = cellValue;
|
rowAdmdstCd = cellValue;
|
||||||
@@ -1467,7 +1465,9 @@ useEffect(() => {
|
|||||||
const scheduleFooterTask = (task: () => void, delayMs: number) => {
|
const scheduleFooterTask = (task: () => void, delayMs: number) => {
|
||||||
footerTimerIds.push(setTimeout(task, delayMs));
|
footerTimerIds.push(setTimeout(task, delayMs));
|
||||||
};
|
};
|
||||||
applyDefaultGridEditOptions(gridView as GridViewWithEditOptions);
|
applyDefaultGridEditOptions(gridView as GridViewWithEditOptions, {
|
||||||
|
preventRowAppend,
|
||||||
|
});
|
||||||
|
|
||||||
const columnsFieldsSig = columns.map((c) => c.fieldName).join("\u0001");
|
const columnsFieldsSig = columns.map((c) => c.fieldName).join("\u0001");
|
||||||
if (columnsFieldsSig !== columnsFieldsSigRef.current) {
|
if (columnsFieldsSig !== columnsFieldsSigRef.current) {
|
||||||
@@ -1990,6 +1990,7 @@ useEffect(() => {
|
|||||||
fitStyle,
|
fitStyle,
|
||||||
enableSort,
|
enableSort,
|
||||||
footerVerificationResult,
|
footerVerificationResult,
|
||||||
|
preventRowAppend,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 행·셀 클릭 이벤트 (검증 오류 툴팁은 hover만 — onShowTooltip / 빈 셀 오버레이)
|
// 행·셀 클릭 이벤트 (검증 오류 툴팁은 hover만 — onShowTooltip / 빈 셀 오버레이)
|
||||||
@@ -2527,6 +2528,7 @@ useEffect(() => {
|
|||||||
const gridView = gridRef.current?.gridView ?? grid;
|
const gridView = gridRef.current?.gridView ?? grid;
|
||||||
applyDefaultGridEditOptions(
|
applyDefaultGridEditOptions(
|
||||||
gridView as GridViewWithEditOptions,
|
gridView as GridViewWithEditOptions,
|
||||||
|
{ preventRowAppend },
|
||||||
);
|
);
|
||||||
if (!gridView?.columnByName) return;
|
if (!gridView?.columnByName) return;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ import {
|
|||||||
hasAdmdstCdColumn,
|
hasAdmdstCdColumn,
|
||||||
isExcelImportAdmdstCdInvalid,
|
isExcelImportAdmdstCdInvalid,
|
||||||
mergeExcelImportWithExistingRows,
|
mergeExcelImportWithExistingRows,
|
||||||
|
parseExcelImportCellValue,
|
||||||
prepareGridColumnsForExcelExport,
|
prepareGridColumnsForExcelExport,
|
||||||
releaseFixedOptionsForExcelExport,
|
releaseFixedOptionsForExcelExport,
|
||||||
resolveColumnStyleName,
|
resolveColumnStyleName,
|
||||||
@@ -611,6 +612,11 @@ const TabDataGrid = ({
|
|||||||
columnLayout,
|
columnLayout,
|
||||||
{ skipNonEditable: false },
|
{ skipNonEditable: false },
|
||||||
);
|
);
|
||||||
|
const valueTypeByFieldName = new Map(
|
||||||
|
columns
|
||||||
|
.filter((c) => c.fieldName)
|
||||||
|
.map((c) => [c.fieldName as string, c.valueType]),
|
||||||
|
);
|
||||||
|
|
||||||
// 데이터 행 읽기
|
// 데이터 행 읽기
|
||||||
const dataRows: Record<string, string | number>[] = [];
|
const dataRows: Record<string, string | number>[] = [];
|
||||||
@@ -625,23 +631,13 @@ const TabDataGrid = ({
|
|||||||
const cell = worksheet[XLSX.utils.encode_cell({ r: row, c: col })];
|
const cell = worksheet[XLSX.utils.encode_cell({ r: row, c: col })];
|
||||||
const fieldName = excelColumnFieldNames[colIndex];
|
const fieldName = excelColumnFieldNames[colIndex];
|
||||||
const allFieldName = excelColumnFieldNamesAll[colIndex];
|
const allFieldName = excelColumnFieldNamesAll[colIndex];
|
||||||
|
const typeFieldName = fieldName || allFieldName;
|
||||||
let cellValue: string | number = '';
|
const cellValue = parseExcelImportCellValue(
|
||||||
if (cell && cell.v !== undefined && cell.v !== null) {
|
cell,
|
||||||
// 엑셀 셀 타입이 숫자이거나 값이 숫자인 경우 숫자로 변환
|
typeFieldName
|
||||||
if (cell.t === 'n' || (typeof cell.v === 'number' && !isNaN(cell.v))) {
|
? valueTypeByFieldName.get(typeFieldName)
|
||||||
cellValue = cell.v as number;
|
: undefined,
|
||||||
} else {
|
);
|
||||||
const stringValue = String(cell.v);
|
|
||||||
// 문자열이지만 숫자로 변환 가능한 경우 숫자로 변환
|
|
||||||
const numericValue = Number(stringValue.replace(/,/g, ''));
|
|
||||||
if (!isNaN(numericValue) && stringValue.trim() !== '') {
|
|
||||||
cellValue = numericValue;
|
|
||||||
} else {
|
|
||||||
cellValue = stringValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (allFieldName === 'admdstCd' && cellValue !== '') {
|
if (allFieldName === 'admdstCd' && cellValue !== '') {
|
||||||
rowAdmdstCd = cellValue;
|
rowAdmdstCd = cellValue;
|
||||||
|
|||||||
@@ -16,10 +16,12 @@ import { useAlertStore, useGlobalProgressStore, useStatisticsInputToolbarGroupGa
|
|||||||
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
||||||
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
||||||
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||||
|
import { filterSggOptionsBySearchGugun } from "@/components/util/input/filter-sgg-options-by-search";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { statisticsInputExcretaTreatmentFacilityApi } from "@/entities/statistics/api/input/statistics-input-excreta-treatment-facility-service";
|
import { statisticsInputExcretaTreatmentFacilityApi } from "@/entities/statistics/api/input/statistics-input-excreta-treatment-facility-service";
|
||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import {
|
import {
|
||||||
EXCRETA_TREATMENT_FACILITY_STATS_CD,
|
EXCRETA_TREATMENT_FACILITY_STATS_CD,
|
||||||
type ExcretaTreatmentFacilityItem,
|
type ExcretaTreatmentFacilityItem,
|
||||||
@@ -75,7 +77,11 @@ import { toGridRows } from "@/components/util/grid/gridFunction";
|
|||||||
import { formatCompactYmdForGrid, toCompactYmdOrNull } from "@/components/util/grid/ymdFormat";
|
import { formatCompactYmdForGrid, toCompactYmdOrNull } from "@/components/util/grid/ymdFormat";
|
||||||
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
||||||
import { isVerificationFailedFromCommonInfo } from "@/components/util/input/verification-failed-flag";
|
import { isVerificationFailedFromCommonInfo } from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
|
|
||||||
@@ -139,8 +145,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,7 +212,7 @@ function mapExcretaTreatmentFacilityListToGridRows(
|
|||||||
},
|
},
|
||||||
])[0] as GridRowWithVerification;
|
])[0] as GridRowWithVerification;
|
||||||
if (item.verificationResult) {
|
if (item.verificationResult) {
|
||||||
row.verificationResult = item.verificationResult;
|
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
@@ -439,7 +444,11 @@ const ExcretaTreatmentFacilityInp = () => {
|
|||||||
return { ...col, editable: false as const };
|
return { ...col, editable: false as const };
|
||||||
}
|
}
|
||||||
if (col.fieldName === "sggNm" && enterable) {
|
if (col.fieldName === "sggNm" && enterable) {
|
||||||
return buildSggNmColumn(col, true, sggOptions);
|
return buildSggNmColumn(
|
||||||
|
col,
|
||||||
|
true,
|
||||||
|
filterSggOptionsBySearchGugun(sggOptions, lastSearchedValues?.gugun),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return col;
|
return col;
|
||||||
})
|
})
|
||||||
@@ -452,7 +461,7 @@ const ExcretaTreatmentFacilityInp = () => {
|
|||||||
columns,
|
columns,
|
||||||
columnLayout: ExcretaTreatFactInpColumn.columnLayout ?? [],
|
columnLayout: ExcretaTreatFactInpColumn.columnLayout ?? [],
|
||||||
};
|
};
|
||||||
}, [statusInfo, inputPeriodEnterable, isAdminInfo, sggOptions, columnGuidesByEngCol]);
|
}, [statusInfo, inputPeriodEnterable, isAdminInfo, sggOptions, lastSearchedValues?.gugun, columnGuidesByEngCol]);
|
||||||
|
|
||||||
const canEditGrid =
|
const canEditGrid =
|
||||||
(computeTabEnterable(statusInfo, inputPeriodEnterable) || isAdminInfo) && inputPeriodEnterable;
|
(computeTabEnterable(statusInfo, inputPeriodEnterable) || isAdminInfo) && inputPeriodEnterable;
|
||||||
@@ -502,7 +511,9 @@ const ExcretaTreatmentFacilityInp = () => {
|
|||||||
setStatusInfo(nextStatusInfo);
|
setStatusInfo(nextStatusInfo);
|
||||||
setStatsCd(commonInfo.statsCd);
|
setStatsCd(commonInfo.statsCd);
|
||||||
setIsVerificationFailed(isVerificationFailedFromCommonInfo(commonInfo));
|
setIsVerificationFailed(isVerificationFailedFromCommonInfo(commonInfo));
|
||||||
setFooterVerificationResult(commonInfo.verificationResult ?? null);
|
setFooterVerificationResult(
|
||||||
|
normalizeVerificationResultMap(commonInfo.verificationResult) ?? null,
|
||||||
|
);
|
||||||
if (overrides?.mode !== "PRE") {
|
if (overrides?.mode !== "PRE") {
|
||||||
setIsNotApplicable(gridRows.length === 0);
|
setIsNotApplicable(gridRows.length === 0);
|
||||||
} else if (gridRows.length > 0) {
|
} else if (gridRows.length > 0) {
|
||||||
@@ -784,7 +795,6 @@ const ExcretaTreatmentFacilityInp = () => {
|
|||||||
lclgvIdfrTelnoCn: submitInfo.lclgvIdfrTelnoCn,
|
lclgvIdfrTelnoCn: submitInfo.lclgvIdfrTelnoCn,
|
||||||
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
||||||
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
||||||
...(isAdminInfo ? { superAdmin: "superAdmin" } : {}),
|
|
||||||
noApplicable,
|
noApplicable,
|
||||||
submitList,
|
submitList,
|
||||||
deleteList: deleteListForSubmit,
|
deleteList: deleteListForSubmit,
|
||||||
@@ -814,7 +824,13 @@ const ExcretaTreatmentFacilityInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForSubmit,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: statusInfo?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -953,19 +969,7 @@ const ExcretaTreatmentFacilityInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR"
|
|
||||||
? "시계열 검증 - "
|
|
||||||
: e.vrfcCd === "NV"
|
|
||||||
? "일반검증 - "
|
|
||||||
: "모집단 검증 -";
|
|
||||||
return `${prefix}${e.rsnExpln}
|
|
||||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1044,7 +1048,7 @@ const ExcretaTreatmentFacilityInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{statusInfo?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{statusInfo?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
|||||||
import { statisticsInputPrivateSewageFacilityApi } from "@/entities/statistics/api/input/statistics-input-private-sewage-facility-service";
|
import { statisticsInputPrivateSewageFacilityApi } from "@/entities/statistics/api/input/statistics-input-private-sewage-facility-service";
|
||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import type {
|
import type {
|
||||||
PrivateSewageDesigStatusItem,
|
PrivateSewageDesigStatusItem,
|
||||||
PrivateSewageDesigStatusSaveItem,
|
PrivateSewageDesigStatusSaveItem,
|
||||||
@@ -68,7 +69,11 @@ import {
|
|||||||
patchFooterVerificationByTab,
|
patchFooterVerificationByTab,
|
||||||
patchVerificationFailedByTab,
|
patchVerificationFailedByTab,
|
||||||
} from "@/components/util/input/verification-failed-flag";
|
} from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
@@ -156,8 +161,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +179,9 @@ function mapRegionalListToGridRows<
|
|||||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||||
const { verificationResult, ...rest } = item;
|
const { verificationResult, ...rest } = item;
|
||||||
const row = toGridRows([{ ctpvNm, ...rest }])[0] as GridRowWithVerification;
|
const row = toGridRows([{ ctpvNm, ...rest }])[0] as GridRowWithVerification;
|
||||||
if (verificationResult) row.verificationResult = verificationResult;
|
if (verificationResult) {
|
||||||
|
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||||
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -797,7 +803,6 @@ const PrivateSewageFacilityInp = () => {
|
|||||||
|
|
||||||
const activeTabStatus = tabStatusInfoMap.get(tabKey) ?? null;
|
const activeTabStatus = tabStatusInfoMap.get(tabKey) ?? null;
|
||||||
const statsCdForTab = tabStatsCdMap.get(tabKey) ?? tabKey;
|
const statsCdForTab = tabStatsCdMap.get(tabKey) ?? tabKey;
|
||||||
const adminOpt = isAdminInfo ? { superAdmin: "superAdmin" as const } : {};
|
|
||||||
|
|
||||||
const submitInfoBase = {
|
const submitInfoBase = {
|
||||||
statsYr: lastSearchedValues.year ?? "",
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
@@ -842,7 +847,6 @@ const PrivateSewageFacilityInp = () => {
|
|||||||
...submitInfoBase,
|
...submitInfoBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: buildSewageTreatFactStatusSaveList(currentData),
|
submitList: buildSewageTreatFactStatusSaveList(currentData),
|
||||||
...adminOpt,
|
|
||||||
};
|
};
|
||||||
response =
|
response =
|
||||||
await statisticsInputPrivateSewageFacilityApi.submitSewageTreatFactStatus(
|
await statisticsInputPrivateSewageFacilityApi.submitSewageTreatFactStatus(
|
||||||
@@ -853,7 +857,6 @@ const PrivateSewageFacilityInp = () => {
|
|||||||
...submitInfoBase,
|
...submitInfoBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: buildSepticTankStatusSaveList(currentData),
|
submitList: buildSepticTankStatusSaveList(currentData),
|
||||||
...adminOpt,
|
|
||||||
};
|
};
|
||||||
response =
|
response =
|
||||||
await statisticsInputPrivateSewageFacilityApi.submitSepticTankStatus(param);
|
await statisticsInputPrivateSewageFacilityApi.submitSepticTankStatus(param);
|
||||||
@@ -862,7 +865,6 @@ const PrivateSewageFacilityInp = () => {
|
|||||||
...submitInfoBase,
|
...submitInfoBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: buildPrivateSewageDesigStatusSaveList(currentData),
|
submitList: buildPrivateSewageDesigStatusSaveList(currentData),
|
||||||
...adminOpt,
|
|
||||||
};
|
};
|
||||||
response =
|
response =
|
||||||
await statisticsInputPrivateSewageFacilityApi.submitPrivateSewageDesigStatus(
|
await statisticsInputPrivateSewageFacilityApi.submitPrivateSewageDesigStatus(
|
||||||
@@ -892,7 +894,13 @@ const PrivateSewageFacilityInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForTab,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -1148,18 +1156,7 @@ const PrivateSewageFacilityInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR"
|
|
||||||
? "시계열 검증 - "
|
|
||||||
: e.vrfcCd === "NV"
|
|
||||||
? "일반검증 - "
|
|
||||||
: "모집단 검증 - ";
|
|
||||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1202,7 +1199,7 @@ const PrivateSewageFacilityInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { useStatisticsInputPendingNavigation } from '@/shared/lib/use-statistics
|
|||||||
import { statisticsInputSewSupplyRateApi } from '@/entities/statistics/api/input/statistics-input-sew-supply-rate-service';
|
import { statisticsInputSewSupplyRateApi } from '@/entities/statistics/api/input/statistics-input-sew-supply-rate-service';
|
||||||
import { statisticsInputPublicSewageFacilityApiService } from '@/entities/statistics/api/input/statistics-public-sewage-facility-input-service';
|
import { statisticsInputPublicSewageFacilityApiService } from '@/entities/statistics/api/input/statistics-public-sewage-facility-input-service';
|
||||||
import { statisticsApi } from '@/entities/statistics/api/statistics-service';
|
import { statisticsApi } from '@/entities/statistics/api/statistics-service';
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from '@/components/util/input/call-imr-with-rollback';
|
||||||
import type {
|
import type {
|
||||||
PublicSewageFacilityRequestParams,
|
PublicSewageFacilityRequestParams,
|
||||||
PublicSewageFacilitySaveItem,
|
PublicSewageFacilitySaveItem,
|
||||||
@@ -52,7 +53,11 @@ import { fetchColumnGuidesRecord } from '@/components/util/grid/columnGuides';
|
|||||||
import { toGridRows } from '@/components/util/grid/gridFunction';
|
import { toGridRows } from '@/components/util/grid/gridFunction';
|
||||||
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
||||||
import { patchFooterVerificationByTab,patchVerificationFailedByTab } from '@/components/util/input/verification-failed-flag';
|
import { patchFooterVerificationByTab,patchVerificationFailedByTab } from '@/components/util/input/verification-failed-flag';
|
||||||
import type { VerificationResultLikeMap } from '@/components/util/input/verification-result-display';
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
withNormalizedVerificationResult,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from '@/components/util/input/verification-result-display';
|
||||||
import { nullableTrimmedString } from '@/components/util/input/nullableString';
|
import { nullableTrimmedString } from '@/components/util/input/nullableString';
|
||||||
import { useAdminStore } from '@/store/admin-store';
|
import { useAdminStore } from '@/store/admin-store';
|
||||||
import { useTabStore } from '@/store/tab-store';
|
import { useTabStore } from '@/store/tab-store';
|
||||||
@@ -116,8 +121,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,7 +442,13 @@ const PublicSewageFacilityInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? '',
|
||||||
|
statsCd: statsCdForTab,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? '',
|
||||||
|
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? '',
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -789,11 +799,13 @@ const PublicSewageFacilityInp = () => {
|
|||||||
sidoListRef.current,
|
sidoListRef.current,
|
||||||
searchContext,
|
searchContext,
|
||||||
);
|
);
|
||||||
const convertedData = list.map((item) => ({
|
const convertedData = list.map((item) =>
|
||||||
ctpvNm: commonInfo.ctpvNm,
|
withNormalizedVerificationResult({
|
||||||
...item,
|
ctpvNm: commonInfo.ctpvNm,
|
||||||
rmrk: item.rmrk ?? null,
|
...item,
|
||||||
}));
|
rmrk: item.rmrk ?? null,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
if (list.length === 0) {
|
if (list.length === 0) {
|
||||||
setShowIsNotApplicable(true);
|
setShowIsNotApplicable(true);
|
||||||
@@ -1323,7 +1335,7 @@ const PublicSewageFacilityInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{!isMainFacilityTab && activeTabStatus?.lclgvSbmsnSttsCd === '2' && submitOk && (
|
{!isMainFacilityTab && activeTabStatus?.lclgvSbmsnSttsCd === '2' && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
@@ -1575,17 +1587,7 @@ const PublicSewageFacilityInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR" ? "시계열 검증 - " : (e.vrfcCd === "NV" ? "일반검증 - " : "모집단 검증 - ");
|
|
||||||
const comp = e.cmprCn ?? "";
|
|
||||||
const now = e.nowCn ?? "";
|
|
||||||
return `${prefix}${e.rsnExpln}
|
|
||||||
(검증 기준값: ${comp} / 현재 입력값: ${now})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -16,10 +16,12 @@ import { useAlertStore, useGlobalProgressStore, useStatisticsInputToolbarGroupGa
|
|||||||
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
||||||
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
||||||
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||||
|
import { filterSggOptionsBySearchGugun } from "@/components/util/input/filter-sgg-options-by-search";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { statisticsInputPumpingStationApi } from "@/entities/statistics/api/input/statistics-input-pumping-station-service";
|
import { statisticsInputPumpingStationApi } from "@/entities/statistics/api/input/statistics-input-pumping-station-service";
|
||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import {
|
import {
|
||||||
PUMPING_STATION_STATS_CD,
|
PUMPING_STATION_STATS_CD,
|
||||||
type PumpingStationItem,
|
type PumpingStationItem,
|
||||||
@@ -75,7 +77,11 @@ import { toGridRows } from "@/components/util/grid/gridFunction";
|
|||||||
import { formatCompactYmdForGrid, toCompactYmdOrNull } from "@/components/util/grid/ymdFormat";
|
import { formatCompactYmdForGrid, toCompactYmdOrNull } from "@/components/util/grid/ymdFormat";
|
||||||
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
||||||
import { isVerificationFailedFromCommonInfo } from "@/components/util/input/verification-failed-flag";
|
import { isVerificationFailedFromCommonInfo } from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
|
|
||||||
@@ -139,8 +145,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,7 +211,7 @@ function mapPumpingStationListToGridRows(
|
|||||||
},
|
},
|
||||||
])[0] as GridRowWithVerification;
|
])[0] as GridRowWithVerification;
|
||||||
if (item.verificationResult) {
|
if (item.verificationResult) {
|
||||||
row.verificationResult = item.verificationResult;
|
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
@@ -433,7 +438,11 @@ const PumpingStationInp = () => {
|
|||||||
return { ...col, editable: false as const };
|
return { ...col, editable: false as const };
|
||||||
}
|
}
|
||||||
if (col.fieldName === "sggNm" && enterable) {
|
if (col.fieldName === "sggNm" && enterable) {
|
||||||
return buildSggNmColumn(col, true, sggOptions);
|
return buildSggNmColumn(
|
||||||
|
col,
|
||||||
|
true,
|
||||||
|
filterSggOptionsBySearchGugun(sggOptions, lastSearchedValues?.gugun),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return col;
|
return col;
|
||||||
})
|
})
|
||||||
@@ -446,7 +455,7 @@ const PumpingStationInp = () => {
|
|||||||
columns,
|
columns,
|
||||||
columnLayout: PumpingStationInpColumn.columnLayout ?? [],
|
columnLayout: PumpingStationInpColumn.columnLayout ?? [],
|
||||||
};
|
};
|
||||||
}, [statusInfo, inputPeriodEnterable, isAdminInfo, sggOptions, columnGuidesByEngCol]);
|
}, [statusInfo, inputPeriodEnterable, isAdminInfo, sggOptions, lastSearchedValues?.gugun, columnGuidesByEngCol]);
|
||||||
|
|
||||||
const canEditGrid =
|
const canEditGrid =
|
||||||
(computeTabEnterable(statusInfo, inputPeriodEnterable) || isAdminInfo) && inputPeriodEnterable;
|
(computeTabEnterable(statusInfo, inputPeriodEnterable) || isAdminInfo) && inputPeriodEnterable;
|
||||||
@@ -493,7 +502,9 @@ const PumpingStationInp = () => {
|
|||||||
setStatusInfo(nextStatusInfo);
|
setStatusInfo(nextStatusInfo);
|
||||||
setStatsCd(commonInfo.statsCd);
|
setStatsCd(commonInfo.statsCd);
|
||||||
setIsVerificationFailed(isVerificationFailedFromCommonInfo(commonInfo));
|
setIsVerificationFailed(isVerificationFailedFromCommonInfo(commonInfo));
|
||||||
setFooterVerificationResult(commonInfo.verificationResult ?? null);
|
setFooterVerificationResult(
|
||||||
|
normalizeVerificationResultMap(commonInfo.verificationResult) ?? null,
|
||||||
|
);
|
||||||
if (overrides?.mode !== "PRE") {
|
if (overrides?.mode !== "PRE") {
|
||||||
setIsNotApplicable(gridRows.length === 0);
|
setIsNotApplicable(gridRows.length === 0);
|
||||||
} else if (gridRows.length > 0) {
|
} else if (gridRows.length > 0) {
|
||||||
@@ -768,7 +779,6 @@ const PumpingStationInp = () => {
|
|||||||
lclgvIdfrTelnoCn: submitInfo.lclgvIdfrTelnoCn,
|
lclgvIdfrTelnoCn: submitInfo.lclgvIdfrTelnoCn,
|
||||||
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
||||||
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
||||||
...(isAdminInfo ? { superAdmin: "superAdmin" } : {}),
|
|
||||||
noApplicable,
|
noApplicable,
|
||||||
submitList,
|
submitList,
|
||||||
deleteList,
|
deleteList,
|
||||||
@@ -797,7 +807,13 @@ const PumpingStationInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForSubmit,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: statusInfo?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -936,19 +952,7 @@ const PumpingStationInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR"
|
|
||||||
? "시계열 검증 - "
|
|
||||||
: e.vrfcCd === "NV"
|
|
||||||
? "일반검증 - "
|
|
||||||
: "모집단 검증 -";
|
|
||||||
return `${prefix}${e.rsnExpln}
|
|
||||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1027,7 +1031,7 @@ const PumpingStationInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{statusInfo?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{statusInfo?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
|
|||||||
@@ -9,10 +9,12 @@ import { useAlertStore, useGlobalProgressStore, useStatisticsInputToolbarGroupGa
|
|||||||
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
||||||
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
||||||
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||||
|
import { filterSggOptionsBySearchGugun } from "@/components/util/input/filter-sgg-options-by-search";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsInputSewageExcretaRelatedApi } from "@/entities/statistics/api/input/statistics-input-sewage-excreta-related-service";
|
import { statisticsInputSewageExcretaRelatedApi } from "@/entities/statistics/api/input/statistics-input-sewage-excreta-related-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import type {
|
import type {
|
||||||
ExcretaRelatedIndustrySaveItem,
|
ExcretaRelatedIndustrySaveItem,
|
||||||
PrivateSewageTreatRelatedIndustrySaveItem,
|
PrivateSewageTreatRelatedIndustrySaveItem,
|
||||||
@@ -84,7 +86,11 @@ import {
|
|||||||
patchFooterVerificationByTab,
|
patchFooterVerificationByTab,
|
||||||
patchVerificationFailedByTab,
|
patchVerificationFailedByTab,
|
||||||
} from "@/components/util/input/verification-failed-flag";
|
} from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
|
|
||||||
@@ -203,8 +209,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -552,19 +557,7 @@ function verificationCellTooltip({
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR"
|
|
||||||
? "시계열 검증 - "
|
|
||||||
: e.vrfcCd === "NV"
|
|
||||||
? "일반검증 - "
|
|
||||||
: "모집단 검증 - ";
|
|
||||||
return `${prefix}${e.rsnExpln}
|
|
||||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,7 +581,7 @@ function mapListToGridRows<T extends { verificationResult?: SewageExcretaRelated
|
|||||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||||
const row = toGridRows([{ ctpvNm, ...item }])[0] as GridRowWithVerification;
|
const row = toGridRows([{ ctpvNm, ...item }])[0] as GridRowWithVerification;
|
||||||
if (item.verificationResult) {
|
if (item.verificationResult) {
|
||||||
row.verificationResult = item.verificationResult;
|
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
@@ -1410,7 +1403,6 @@ const SewageExcretaRelatedInp = () => {
|
|||||||
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
||||||
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
||||||
...(isPublicInstitutionTab ? { noApplicable } : {}),
|
...(isPublicInstitutionTab ? { noApplicable } : {}),
|
||||||
...(isAdminInfo ? { superAdmin: "superAdmin" as const } : {}),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const verificationQuery = {
|
const verificationQuery = {
|
||||||
@@ -1504,7 +1496,13 @@ const SewageExcretaRelatedInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForTab,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -1889,7 +1887,11 @@ const SewageExcretaRelatedInp = () => {
|
|||||||
SGG_NM_DROPDOWN_TAB_KEYS.has(tabKey) &&
|
SGG_NM_DROPDOWN_TAB_KEYS.has(tabKey) &&
|
||||||
col.fieldName === "sggNm"
|
col.fieldName === "sggNm"
|
||||||
) {
|
) {
|
||||||
next = buildSggNmColumn(col, canEdit, sggOptions);
|
next = buildSggNmColumn(
|
||||||
|
col,
|
||||||
|
canEdit,
|
||||||
|
filterSggOptionsBySearchGugun(sggOptions, lastSearchedValues?.gugun),
|
||||||
|
);
|
||||||
} else if (col.fieldName === "sggNm") {
|
} else if (col.fieldName === "sggNm") {
|
||||||
next = { ...col, editable: false as const, styleName: "rg-cell-readonly" };
|
next = { ...col, editable: false as const, styleName: "rg-cell-readonly" };
|
||||||
}
|
}
|
||||||
@@ -1902,7 +1904,7 @@ const SewageExcretaRelatedInp = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}, [tabStatusInfoMap, inputPeriodEnterable, isAdminInfo, columnGuidesByTab, sggOptions]);
|
}, [tabStatusInfoMap, inputPeriodEnterable, isAdminInfo, columnGuidesByTab, sggOptions, lastSearchedValues?.gugun]);
|
||||||
|
|
||||||
const publicInstitutionArticleCellStyleCallback = useCallback<CellStyleCallback>(
|
const publicInstitutionArticleCellStyleCallback = useCallback<CellStyleCallback>(
|
||||||
({ fieldName, row }) => {
|
({ fieldName, row }) => {
|
||||||
@@ -2025,7 +2027,7 @@ const SewageExcretaRelatedInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
|
|||||||
@@ -17,10 +17,12 @@ import { useAlertStore, useGlobalProgressStore, useStatisticsInputToolbarGroupGa
|
|||||||
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
||||||
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
||||||
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||||
|
import { filterSggOptionsBySearchGugun } from "@/components/util/input/filter-sgg-options-by-search";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsInputSewageExcretaSlurgeApi } from "@/entities/statistics/api/input/statistics-input-sewage-excreta-slurge-service";
|
import { statisticsInputSewageExcretaSlurgeApi } from "@/entities/statistics/api/input/statistics-input-sewage-excreta-slurge-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import type {
|
import type {
|
||||||
DigestorOperatingStatusSaveItem,
|
DigestorOperatingStatusSaveItem,
|
||||||
ExcretaSlurgeProcessingStatusSaveItem,
|
ExcretaSlurgeProcessingStatusSaveItem,
|
||||||
@@ -59,6 +61,7 @@ import LastYearDataButton from "@/components/button/LastYearDataButton";
|
|||||||
import NotApplicableCheckButton from "@/components/button/NotApplicableCheckButton";
|
import NotApplicableCheckButton from "@/components/button/NotApplicableCheckButton";
|
||||||
import SaveButton from "@/components/button/SaveButton";
|
import SaveButton from "@/components/button/SaveButton";
|
||||||
import SubmitButton from "@/components/button/SumitButton";
|
import SubmitButton from "@/components/button/SumitButton";
|
||||||
|
import UpdateOperateDataButton from "@/components/button/UpdateOperateDataButton";
|
||||||
import VerificationResultButton from "@/components/button/VerificationResultButton";
|
import VerificationResultButton from "@/components/button/VerificationResultButton";
|
||||||
import DataGrid from "@/components/module/DataGrid";
|
import DataGrid from "@/components/module/DataGrid";
|
||||||
import { openVerificationResultDialogIfNeeded } from "@/components/module/post-submit-verification-results";
|
import { openVerificationResultDialogIfNeeded } from "@/components/module/post-submit-verification-results";
|
||||||
@@ -90,7 +93,11 @@ import {
|
|||||||
patchFooterVerificationByTab,
|
patchFooterVerificationByTab,
|
||||||
patchVerificationFailedByTab,
|
patchVerificationFailedByTab,
|
||||||
} from "@/components/util/input/verification-failed-flag";
|
} from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
|
|
||||||
@@ -148,19 +155,7 @@ function verificationCellTooltip({
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR"
|
|
||||||
? "시계열 검증 - "
|
|
||||||
: e.vrfcCd === "NV"
|
|
||||||
? "일반검증 - "
|
|
||||||
: "모집단 검증 - ";
|
|
||||||
return `${prefix}${e.rsnExpln}
|
|
||||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,16 +180,16 @@ function mapListToGridRows<T extends { verificationResult?: SewageExcretaSlurgeV
|
|||||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||||
const row = toGridRows([{ ctpvNm, ...item }])[0] as GridRowWithVerification;
|
const row = toGridRows([{ ctpvNm, ...item }])[0] as GridRowWithVerification;
|
||||||
if (item.verificationResult) {
|
if (item.verificationResult) {
|
||||||
row.verificationResult = item.verificationResult;
|
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const SewageExcretaSlurgeInpTabList = [
|
const SewageExcretaSlurgeInpTabList = [
|
||||||
SlurgeProcessingFacStatusInpColumn,
|
SlurgeProcessingFacStatusInpColumn,
|
||||||
DigestorOperatingStatusInpColumn,
|
DigestorOperatingStatusInpColumn,
|
||||||
SewageSlurgeProcessingFacStatusInpColumn,
|
SewageSlurgeProcessingFacStatusInpColumn,
|
||||||
ExcretaSlurgeProcessingStatusInpColumn,
|
ExcretaSlurgeProcessingStatusInpColumn,
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
@@ -389,8 +384,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -627,7 +621,6 @@ function buildExcretaSlurgeProcessingStatusSaveItem(
|
|||||||
rcycQnt: toGridNumber(row.rcycQnt),
|
rcycQnt: toGridNumber(row.rcycQnt),
|
||||||
olandLfvlm: toGridNumber(row.olandLfvlm),
|
olandLfvlm: toGridNumber(row.olandLfvlm),
|
||||||
incnrQnt: toGridNumber(row.incnrQnt),
|
incnrQnt: toGridNumber(row.incnrQnt),
|
||||||
oceanInputQnt: toGridNumber(row.oceanInputQnt),
|
|
||||||
fuelQnt: toGridNumber(row.fuelQnt),
|
fuelQnt: toGridNumber(row.fuelQnt),
|
||||||
etcQnt: toGridNumber(row.etcQnt),
|
etcQnt: toGridNumber(row.etcQnt),
|
||||||
unprcsQnt: toGridNumber(row.unprcsQnt),
|
unprcsQnt: toGridNumber(row.unprcsQnt),
|
||||||
@@ -1349,23 +1342,18 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
noApplicable || !isSewageSlurgeFacTab
|
noApplicable || !isSewageSlurgeFacTab
|
||||||
? []
|
? []
|
||||||
: rowsForSubmit.map((row) =>
|
: rowsForSubmit.map((row) =>
|
||||||
buildSewageSlurgeProcessingFacStatusSaveItem(row, list),
|
buildSewageSlurgeProcessingFacStatusSaveItem(row, list),
|
||||||
);
|
);
|
||||||
const excretaSlurgeSubmitList =
|
const excretaSlurgeSubmitList =
|
||||||
noApplicable || !isExcretaSlurgeTab
|
noApplicable || !isExcretaSlurgeTab
|
||||||
? []
|
? []
|
||||||
: rowsForSubmit.map((row) =>
|
: rowsForSubmit.map((row) =>
|
||||||
buildExcretaSlurgeProcessingStatusSaveItem(row, list),
|
buildExcretaSlurgeProcessingStatusSaveItem(row, list),
|
||||||
);
|
);
|
||||||
const slurgeDeleteList = isSlurgeFacTab
|
|
||||||
? (deleteListByTab.get(tabKey) ?? [])
|
|
||||||
.filter((row) => isPersistedArticleRowForTab(tabKey, row))
|
|
||||||
.map((row) => buildSlurgeProcessingFacStatusSaveItem(row, list))
|
|
||||||
: [];
|
|
||||||
const sewageSlurgeFacDeleteList = isSewageSlurgeFacTab
|
const sewageSlurgeFacDeleteList = isSewageSlurgeFacTab
|
||||||
? (deleteListByTab.get(tabKey) ?? [])
|
? (deleteListByTab.get(tabKey) ?? [])
|
||||||
.filter((row) => isPersistedArticleRowForTab(tabKey, row))
|
.filter((row) => isPersistedArticleRowForTab(tabKey, row))
|
||||||
.map((row) => buildSewageSlurgeProcessingFacStatusSaveItem(row, list))
|
.map((row) => buildSewageSlurgeProcessingFacStatusSaveItem(row, list))
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@@ -1386,10 +1374,10 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
(isDigestorTab
|
(isDigestorTab
|
||||||
? SEWAGE_EXCRETA_DIGESTOR_OPERATING_STATS_CD
|
? SEWAGE_EXCRETA_DIGESTOR_OPERATING_STATS_CD
|
||||||
: isSewageSlurgeFacTab
|
: isSewageSlurgeFacTab
|
||||||
? SEWAGE_EXCRETA_SEWAGE_SLURGE_FAC_STATUS_STATS_CD
|
? SEWAGE_EXCRETA_SEWAGE_SLURGE_FAC_STATUS_STATS_CD
|
||||||
: isExcretaSlurgeTab
|
: isExcretaSlurgeTab
|
||||||
? SEWAGE_EXCRETA_EXCRETA_SLURGE_PROCESSING_STATS_CD
|
? SEWAGE_EXCRETA_EXCRETA_SLURGE_PROCESSING_STATS_CD
|
||||||
: SEWAGE_EXCRETA_SLURGE_PROCESSING_FAC_STATUS_STATS_CD);
|
: SEWAGE_EXCRETA_SLURGE_PROCESSING_FAC_STATUS_STATS_CD);
|
||||||
|
|
||||||
const verificationQuery = {
|
const verificationQuery = {
|
||||||
...toInputSearchRegion(sidoListRef.current, lastSearchedValues),
|
...toInputSearchRegion(sidoListRef.current, lastSearchedValues),
|
||||||
@@ -1432,7 +1420,6 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
lclgvIdfrTelnoCn: submitInfo.lclgvIdfrTelnoCn,
|
lclgvIdfrTelnoCn: submitInfo.lclgvIdfrTelnoCn,
|
||||||
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
||||||
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
||||||
...(isAdminInfo ? { superAdmin: "superAdmin" as const } : {}),
|
|
||||||
noApplicable,
|
noApplicable,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1442,33 +1429,32 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
setGlobalProgressLabel("일반 검증 진행 중...");
|
setGlobalProgressLabel("일반 검증 진행 중...");
|
||||||
const response = isSlurgeFacTab
|
const response = isSlurgeFacTab
|
||||||
? await statisticsInputSewageExcretaSlurgeApi.submitSlurgeProcessingFacStatus({
|
? await statisticsInputSewageExcretaSlurgeApi.submitSlurgeProcessingFacStatus({
|
||||||
...submitRequestBase,
|
...submitRequestBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: slurgeSubmitList,
|
submitList: slurgeSubmitList,
|
||||||
deleteList: slurgeDeleteList,
|
})
|
||||||
})
|
|
||||||
: isDigestorTab
|
: isDigestorTab
|
||||||
? await statisticsInputSewageExcretaSlurgeApi.submitDigestorOperatingStatus({
|
? await statisticsInputSewageExcretaSlurgeApi.submitDigestorOperatingStatus({
|
||||||
...submitRequestBase,
|
...submitRequestBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: digestorSubmitList,
|
submitList: digestorSubmitList,
|
||||||
})
|
})
|
||||||
: isSewageSlurgeFacTab
|
: isSewageSlurgeFacTab
|
||||||
? await statisticsInputSewageExcretaSlurgeApi.submitSewageSlurgeProcessingFacStatus(
|
? await statisticsInputSewageExcretaSlurgeApi.submitSewageSlurgeProcessingFacStatus(
|
||||||
{
|
{
|
||||||
...submitRequestBase,
|
...submitRequestBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: sewageSlurgeFacSubmitList,
|
submitList: sewageSlurgeFacSubmitList,
|
||||||
deleteList: sewageSlurgeFacDeleteList,
|
deleteList: sewageSlurgeFacDeleteList,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: await statisticsInputSewageExcretaSlurgeApi.submitExcretaSlurgeProcessingStatus(
|
: await statisticsInputSewageExcretaSlurgeApi.submitExcretaSlurgeProcessingStatus(
|
||||||
{
|
{
|
||||||
...submitRequestBase,
|
...submitRequestBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: excretaSlurgeSubmitList,
|
submitList: excretaSlurgeSubmitList,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.status !== "success") {
|
if (response.status !== "success") {
|
||||||
alert(response.message ?? "데이터 제출 중 오류가 발생했습니다.");
|
alert(response.message ?? "데이터 제출 중 오류가 발생했습니다.");
|
||||||
@@ -1493,7 +1479,13 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForSubmit,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -1542,6 +1534,61 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const updateOperateDataButtonFunc = () => {
|
||||||
|
void (async () => {
|
||||||
|
if (!lastSearchedValues) {
|
||||||
|
alert("먼저 조회를 진행해주세요.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!(await confirm("자체발생량·함수율·자체 1차 처리량이 운영 데이터로 덮어씁니다."))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
showGlobalProgress({ label: "운영 데이터 업데이트 중...", progress: 0 });
|
||||||
|
const userInfo = await getUserInfo();
|
||||||
|
const request = {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
ctpvNm: lastSearchedValues.sido ?? "",
|
||||||
|
...toInputSearchRegion(sidoListRef.current, lastSearchedValues),
|
||||||
|
userUuid: userInfo.userUnqId,
|
||||||
|
};
|
||||||
|
|
||||||
|
const response =
|
||||||
|
await statisticsInputSewageExcretaSlurgeApi.updateSlurgeProcessingFacStatusOperationData(
|
||||||
|
request,
|
||||||
|
);
|
||||||
|
if (response.status !== "success") {
|
||||||
|
alert(
|
||||||
|
response.message ||
|
||||||
|
"운영 데이터 업데이트 중 오류가 발생했습니다.",
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setGlobalProgress(50);
|
||||||
|
const tabKey = SlurgeProcessingFacStatusInpColumn.tabKey;
|
||||||
|
const param =
|
||||||
|
searchParamRef.current ??
|
||||||
|
buildSewageExcretaSlurgeSearchParam(lastSearchedValues);
|
||||||
|
await loadActiveTabData(tabKey, param, lastSearchedValues, true, false);
|
||||||
|
setGlobalProgress(100);
|
||||||
|
alert("운영 데이터가 업데이트되었습니다.");
|
||||||
|
} catch (error) {
|
||||||
|
const message =
|
||||||
|
error &&
|
||||||
|
typeof error === "object" &&
|
||||||
|
"response" in error
|
||||||
|
? (error as { response?: { data?: { message?: string } } })
|
||||||
|
.response?.data?.message
|
||||||
|
: undefined;
|
||||||
|
alert(message || "운영 데이터 업데이트 중 오류가 발생했습니다.");
|
||||||
|
} finally {
|
||||||
|
hideGlobalProgress();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
};
|
||||||
|
|
||||||
const cnacelSubmitFunc = () => {
|
const cnacelSubmitFunc = () => {
|
||||||
void (async () => {
|
void (async () => {
|
||||||
try {
|
try {
|
||||||
@@ -1653,11 +1700,8 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
const saveList = noApplicable
|
const saveList = noApplicable
|
||||||
? []
|
? []
|
||||||
: rowsForSave.map((row) =>
|
: rowsForSave.map((row) =>
|
||||||
buildSlurgeProcessingFacStatusSaveItem(row, list),
|
buildSlurgeProcessingFacStatusSaveItem(row, list),
|
||||||
);
|
);
|
||||||
const deleteList = (deleteListByTab.get(tabKey) ?? [])
|
|
||||||
.filter((row) => isPersistedArticleRowForTab(tabKey, row))
|
|
||||||
.map((row) => buildSlurgeProcessingFacStatusSaveItem(row, list));
|
|
||||||
|
|
||||||
if (!noApplicable && saveList.length === 0 && buildSubmitOkForToolbar(searchContextByTab.get(tabKey) ?? lastSearchedValues)) {
|
if (!noApplicable && saveList.length === 0 && buildSubmitOkForToolbar(searchContextByTab.get(tabKey) ?? lastSearchedValues)) {
|
||||||
alert("해당사항 없음을 체크해주세요.");
|
alert("해당사항 없음을 체크해주세요.");
|
||||||
@@ -1670,7 +1714,6 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
...baseSaveRequest,
|
...baseSaveRequest,
|
||||||
...userFields,
|
...userFields,
|
||||||
saveList,
|
saveList,
|
||||||
deleteList,
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else if (tabKey === DigestorOperatingStatusInpColumn.tabKey) {
|
} else if (tabKey === DigestorOperatingStatusInpColumn.tabKey) {
|
||||||
@@ -1683,8 +1726,8 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
const saveList = noApplicable
|
const saveList = noApplicable
|
||||||
? []
|
? []
|
||||||
: rowsForSave.map((row) =>
|
: rowsForSave.map((row) =>
|
||||||
buildDigestorOperatingStatusSaveItem(row, list),
|
buildDigestorOperatingStatusSaveItem(row, list),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!noApplicable && saveList.length === 0 && buildSubmitOkForToolbar(searchContextByTab.get(tabKey) ?? lastSearchedValues)) {
|
if (!noApplicable && saveList.length === 0 && buildSubmitOkForToolbar(searchContextByTab.get(tabKey) ?? lastSearchedValues)) {
|
||||||
alert("해당사항 없음을 체크해주세요.");
|
alert("해당사항 없음을 체크해주세요.");
|
||||||
@@ -1706,8 +1749,8 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
const saveList = noApplicable
|
const saveList = noApplicable
|
||||||
? []
|
? []
|
||||||
: rowsForSave.map((row) =>
|
: rowsForSave.map((row) =>
|
||||||
buildSewageSlurgeProcessingFacStatusSaveItem(row, list),
|
buildSewageSlurgeProcessingFacStatusSaveItem(row, list),
|
||||||
);
|
);
|
||||||
const deleteList = (deleteListByTab.get(tabKey) ?? [])
|
const deleteList = (deleteListByTab.get(tabKey) ?? [])
|
||||||
.filter((row) => isPersistedArticleRowForTab(tabKey, row))
|
.filter((row) => isPersistedArticleRowForTab(tabKey, row))
|
||||||
.map((row) => buildSewageSlurgeProcessingFacStatusSaveItem(row, list));
|
.map((row) => buildSewageSlurgeProcessingFacStatusSaveItem(row, list));
|
||||||
@@ -1736,8 +1779,8 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
const saveList = noApplicable
|
const saveList = noApplicable
|
||||||
? []
|
? []
|
||||||
: rowsForSave.map((row) =>
|
: rowsForSave.map((row) =>
|
||||||
buildExcretaSlurgeProcessingStatusSaveItem(row, list),
|
buildExcretaSlurgeProcessingStatusSaveItem(row, list),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!noApplicable && saveList.length === 0 && buildSubmitOkForToolbar(searchContextByTab.get(tabKey) ?? lastSearchedValues)) {
|
if (!noApplicable && saveList.length === 0 && buildSubmitOkForToolbar(searchContextByTab.get(tabKey) ?? lastSearchedValues)) {
|
||||||
alert("해당사항 없음을 체크해주세요.");
|
alert("해당사항 없음을 체크해주세요.");
|
||||||
@@ -1789,17 +1832,17 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
const getCheckedItemIndexesFromGrid = (rowCount: number): number[] => {
|
const getCheckedItemIndexesFromGrid = (rowCount: number): number[] => {
|
||||||
const gridView = getGridRef.current?.gridView as
|
const gridView = getGridRef.current?.gridView as
|
||||||
| {
|
| {
|
||||||
getCheckedItems?: () => number[];
|
getCheckedItems?: () => number[];
|
||||||
getCheckedRows?: () => number[];
|
getCheckedRows?: () => number[];
|
||||||
}
|
}
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
const checked =
|
const checked =
|
||||||
(typeof gridView?.getCheckedItems === "function"
|
(typeof gridView?.getCheckedItems === "function"
|
||||||
? gridView.getCheckedItems()
|
? gridView.getCheckedItems()
|
||||||
: typeof gridView?.getCheckedRows === "function"
|
: typeof gridView?.getCheckedRows === "function"
|
||||||
? gridView.getCheckedRows()
|
? gridView.getCheckedRows()
|
||||||
: []) ?? [];
|
: []) ?? [];
|
||||||
|
|
||||||
return checked.filter(
|
return checked.filter(
|
||||||
(idx) => Number.isInteger(idx) && idx >= 0 && idx < rowCount,
|
(idx) => Number.isInteger(idx) && idx >= 0 && idx < rowCount,
|
||||||
@@ -1871,10 +1914,10 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
checkedIndexes.length > 0
|
checkedIndexes.length > 0
|
||||||
? new Set(checkedIndexes)
|
? new Set(checkedIndexes)
|
||||||
: new Set(
|
: new Set(
|
||||||
currentRows
|
currentRows
|
||||||
.map((row, idx) => (isCheckedRow(row) ? idx : -1))
|
.map((row, idx) => (isCheckedRow(row) ? idx : -1))
|
||||||
.filter((idx) => idx >= 0),
|
.filter((idx) => idx >= 0),
|
||||||
);
|
);
|
||||||
|
|
||||||
const removedRows = currentRows.filter((_, idx) => checkedIndexSet.has(idx));
|
const removedRows = currentRows.filter((_, idx) => checkedIndexSet.has(idx));
|
||||||
const nextRows = currentRows.filter((_, idx) => !checkedIndexSet.has(idx));
|
const nextRows = currentRows.filter((_, idx) => !checkedIndexSet.has(idx));
|
||||||
@@ -1933,7 +1976,11 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
SGG_NM_DROPDOWN_TAB_KEYS.has(tabKey) &&
|
SGG_NM_DROPDOWN_TAB_KEYS.has(tabKey) &&
|
||||||
col.fieldName === "sggNm"
|
col.fieldName === "sggNm"
|
||||||
) {
|
) {
|
||||||
next = buildSggNmColumn(col, canEdit, sggOptions);
|
next = buildSggNmColumn(
|
||||||
|
col,
|
||||||
|
canEdit,
|
||||||
|
filterSggOptionsBySearchGugun(sggOptions, lastSearchedValues?.gugun),
|
||||||
|
);
|
||||||
} else if (col.fieldName === "sggNm") {
|
} else if (col.fieldName === "sggNm") {
|
||||||
next = { ...col, editable: false as const, styleName: "rg-cell-readonly" };
|
next = { ...col, editable: false as const, styleName: "rg-cell-readonly" };
|
||||||
}
|
}
|
||||||
@@ -2093,8 +2140,8 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
onValuesChange={setSearchValues}
|
onValuesChange={setSearchValues}
|
||||||
/>
|
/>
|
||||||
{showActionToolbarCard && (
|
{showActionToolbarCard && (
|
||||||
<div className="card !py-0">
|
<div className="card !py-0">
|
||||||
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
|
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
|
||||||
<VerificationResultButton
|
<VerificationResultButton
|
||||||
VerificationResultButtonFunc={openVerificationHistoryDialog}
|
VerificationResultButtonFunc={openVerificationHistoryDialog}
|
||||||
isVerificationFailed={
|
isVerificationFailed={
|
||||||
@@ -2106,19 +2153,24 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
<LastYearDataButton
|
<LastYearDataButton
|
||||||
getLastYearDataFunc={() => void lastYearDataFunc()}
|
getLastYearDataFunc={() => void lastYearDataFunc()}
|
||||||
/>
|
/>
|
||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{activeTab === SEWAGE_EXCRETA_SLURGE_PROCESSING_FAC_STATUS_STATS_CD && (
|
||||||
|
<UpdateOperateDataButton
|
||||||
|
updateOperateDataButtonFunc={updateOperateDataButtonFunc}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{showSecondaryToolbarCard && (
|
{showSecondaryToolbarCard && (
|
||||||
<div className="card !py-0">
|
<div className="card !py-0">
|
||||||
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
|
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
|
||||||
{showNotApplicableForActiveTab && (
|
{showNotApplicableForActiveTab && (
|
||||||
<NotApplicableCheckButton
|
<NotApplicableCheckButton
|
||||||
isCheck={isNotApplicableForActiveTab}
|
isCheck={isNotApplicableForActiveTab}
|
||||||
@@ -2127,12 +2179,12 @@ const SewageExcretaSlurgeInp = () => {
|
|||||||
)}
|
)}
|
||||||
{showArticleEditButtons && (
|
{showArticleEditButtons && (
|
||||||
<>
|
<>
|
||||||
<AddArticleButton addArticleFunc={addArticleFunc} />
|
<AddArticleButton addArticleFunc={addArticleFunc} />
|
||||||
<DeleteArticleButton deleteArticleFunc={deleteArticleFunc} />
|
<DeleteArticleButton deleteArticleFunc={deleteArticleFunc} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{isLoading && (
|
{isLoading && (
|
||||||
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsInputSewPipeApiService } from "@/entities/statistics/api/input/statistics-sewage-pipe-input-service";
|
import { statisticsInputSewPipeApiService } from "@/entities/statistics/api/input/statistics-sewage-pipe-input-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import type {
|
import type {
|
||||||
SeweragePipeInputFactInstallStatusSaveRequest,
|
SeweragePipeInputFactInstallStatusSaveRequest,
|
||||||
SeweragePipeInputFactInstallStatusSubmitRequest,
|
SeweragePipeInputFactInstallStatusSubmitRequest,
|
||||||
@@ -82,7 +83,10 @@ import {
|
|||||||
} from "@/components/util/input/verification-failed-flag";
|
} from "@/components/util/input/verification-failed-flag";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import {
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
getVerificationErrorsForField,
|
getVerificationErrorsForField,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
withNormalizedVerificationResult,
|
||||||
type VerificationResultLikeMap,
|
type VerificationResultLikeMap,
|
||||||
} from "@/components/util/input/verification-result-display";
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
@@ -289,7 +293,10 @@ function normalizePipeTypeStatusRow(
|
|||||||
lyngPrlg: Number(lyngPrlgWhol ?? 0),
|
lyngPrlg: Number(lyngPrlgWhol ?? 0),
|
||||||
dmltnPrlg: Number(dmltnPrlgWhol ?? 0),
|
dmltnPrlg: Number(dmltnPrlgWhol ?? 0),
|
||||||
...yearFields,
|
...yearFields,
|
||||||
verificationResult: remapPipeTypePrlgWholVerification(verificationResult) ?? undefined,
|
verificationResult:
|
||||||
|
normalizeVerificationResultMap(
|
||||||
|
remapPipeTypePrlgWholVerification(verificationResult),
|
||||||
|
) ?? undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,7 +357,6 @@ function buildRegionalFactSubmitListFromGrid(
|
|||||||
};
|
};
|
||||||
return currentData.map((d) => ({
|
return currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
goalYr: nullableTrimmedString(d.goalYr),
|
goalYr: nullableTrimmedString(d.goalYr),
|
||||||
wholPplMtncPlanPrlg: formatNumber(d.wholPplMtncPlanPrlg, "wholPplMtncPlanPrlg"),
|
wholPplMtncPlanPrlg: formatNumber(d.wholPplMtncPlanPrlg, "wholPplMtncPlanPrlg"),
|
||||||
@@ -447,8 +453,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -720,10 +725,12 @@ const SewagePipeInp = () => {
|
|||||||
const response = await statisticsInputSewPipeApiService.getRegionalFactStatus(searchParam);
|
const response = await statisticsInputSewPipeApiService.getRegionalFactStatus(searchParam);
|
||||||
if (response.status === 'success') {
|
if (response.status === 'success') {
|
||||||
const commonInfo = response.data.commonInfo;
|
const commonInfo = response.data.commonInfo;
|
||||||
const convertedData = filterFetched(response.data.regionalFactStatusList).map((d) => ({
|
const convertedData = filterFetched(response.data.regionalFactStatusList).map((d) =>
|
||||||
ctpvNm: commonInfo.ctpvNm,
|
withNormalizedVerificationResult({
|
||||||
...d,
|
ctpvNm: commonInfo.ctpvNm,
|
||||||
}));
|
...d,
|
||||||
|
}),
|
||||||
|
);
|
||||||
applyRowMap((m) => m.set('ST00020001', toGridRows(convertedData)));
|
applyRowMap((m) => m.set('ST00020001', toGridRows(convertedData)));
|
||||||
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
||||||
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
||||||
@@ -750,10 +757,12 @@ const SewagePipeInp = () => {
|
|||||||
const response = await statisticsInputSewPipeApiService.getFactInstallStatus(searchParam);
|
const response = await statisticsInputSewPipeApiService.getFactInstallStatus(searchParam);
|
||||||
if (response.status === 'success') {
|
if (response.status === 'success') {
|
||||||
const commonInfo = response.data.commonInfo;
|
const commonInfo = response.data.commonInfo;
|
||||||
const convertedData = filterFetched(response.data.factInstallStatusList).map((d) => ({
|
const convertedData = filterFetched(response.data.factInstallStatusList).map((d) =>
|
||||||
ctpvNm: commonInfo.ctpvNm,
|
withNormalizedVerificationResult({
|
||||||
...d,
|
ctpvNm: commonInfo.ctpvNm,
|
||||||
}));
|
...d,
|
||||||
|
}),
|
||||||
|
);
|
||||||
if (convertedData.length === 0) {
|
if (convertedData.length === 0) {
|
||||||
const alreadyHandledForSameSearch =
|
const alreadyHandledForSameSearch =
|
||||||
factInstallNoDataHandledKeyRef.current === searchConditionKey;
|
factInstallNoDataHandledKeyRef.current === searchConditionKey;
|
||||||
@@ -830,10 +839,12 @@ const SewagePipeInp = () => {
|
|||||||
const response = await statisticsInputSewPipeApiService.getPipeDiameterStatus(searchParam);
|
const response = await statisticsInputSewPipeApiService.getPipeDiameterStatus(searchParam);
|
||||||
if (response.status === 'success') {
|
if (response.status === 'success') {
|
||||||
const commonInfo = response.data.commonInfo;
|
const commonInfo = response.data.commonInfo;
|
||||||
const convertedData = filterFetched(response.data.pipeDiameterStatusList).map((d) => ({
|
const convertedData = filterFetched(response.data.pipeDiameterStatusList).map((d) =>
|
||||||
ctpvNm: commonInfo.ctpvNm,
|
withNormalizedVerificationResult({
|
||||||
...d,
|
ctpvNm: commonInfo.ctpvNm,
|
||||||
}));
|
...d,
|
||||||
|
}),
|
||||||
|
);
|
||||||
applyRowMap((m) => m.set('ST00020004', toGridRows(convertedData)));
|
applyRowMap((m) => m.set('ST00020004', toGridRows(convertedData)));
|
||||||
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
||||||
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
||||||
@@ -860,10 +871,12 @@ const SewagePipeInp = () => {
|
|||||||
const response = await statisticsInputSewPipeApiService.getManholeStatus(searchParam);
|
const response = await statisticsInputSewPipeApiService.getManholeStatus(searchParam);
|
||||||
if (response.status === 'success') {
|
if (response.status === 'success') {
|
||||||
const commonInfo = response.data.commonInfo;
|
const commonInfo = response.data.commonInfo;
|
||||||
const convertedData = filterFetched(response.data.manholeStatusList).map((d) => ({
|
const convertedData = filterFetched(response.data.manholeStatusList).map((d) =>
|
||||||
ctpvNm: commonInfo.ctpvNm,
|
withNormalizedVerificationResult({
|
||||||
...d,
|
ctpvNm: commonInfo.ctpvNm,
|
||||||
}));
|
...d,
|
||||||
|
}),
|
||||||
|
);
|
||||||
applyRowMap((m) => m.set('ST00020005', toGridRows(convertedData)));
|
applyRowMap((m) => m.set('ST00020005', toGridRows(convertedData)));
|
||||||
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
||||||
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
||||||
@@ -890,13 +903,15 @@ const SewagePipeInp = () => {
|
|||||||
const response = await statisticsInputSewPipeApiService.getConnectionStatus(searchParam);
|
const response = await statisticsInputSewPipeApiService.getConnectionStatus(searchParam);
|
||||||
if (response.status === 'success') {
|
if (response.status === 'success') {
|
||||||
const commonInfo = response.data.commonInfo;
|
const commonInfo = response.data.commonInfo;
|
||||||
const facilityConvertedData = filterFetched(response.data.facilityConnectionList).map((d) => ({
|
const facilityConvertedData = filterFetched(response.data.facilityConnectionList).map((d) =>
|
||||||
...d,
|
withNormalizedVerificationResult({ ...d }),
|
||||||
}));
|
);
|
||||||
const adminConvertedData = filterFetched(response.data.adminAreaConnectionList).map((d) => ({
|
const adminConvertedData = filterFetched(response.data.adminAreaConnectionList).map((d) =>
|
||||||
...d,
|
withNormalizedVerificationResult({
|
||||||
ctpvNm: d.ctpvNm || commonInfo.ctpvNm,
|
...d,
|
||||||
}));
|
ctpvNm: d.ctpvNm || commonInfo.ctpvNm,
|
||||||
|
}),
|
||||||
|
);
|
||||||
applyRowMap((m) => {
|
applyRowMap((m) => {
|
||||||
m.set('treatmentPlantConnectionInp', toGridRows(facilityConvertedData));
|
m.set('treatmentPlantConnectionInp', toGridRows(facilityConvertedData));
|
||||||
m.set('adminAreaConnectionInp', toGridRows(adminConvertedData));
|
m.set('adminAreaConnectionInp', toGridRows(adminConvertedData));
|
||||||
@@ -1264,7 +1279,6 @@ const SewagePipeInp = () => {
|
|||||||
};
|
};
|
||||||
const submitList = currentData.map((d) => ({
|
const submitList = currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
fcltSn: nullableTrimmedString(d.fcltSn),
|
fcltSn: nullableTrimmedString(d.fcltSn),
|
||||||
swtrmtFcltCd: nullableTrimmedString(d.swtrmtFcltCd),
|
swtrmtFcltCd: nullableTrimmedString(d.swtrmtFcltCd),
|
||||||
@@ -1340,7 +1354,6 @@ const SewagePipeInp = () => {
|
|||||||
rmrk: nullableTrimmedString(d.rmrk),
|
rmrk: nullableTrimmedString(d.rmrk),
|
||||||
lyngPrlgWhol: formatNumber(d.lyngPrlg, "lyngPrlg"),
|
lyngPrlgWhol: formatNumber(d.lyngPrlg, "lyngPrlg"),
|
||||||
dmltnPrlgWhol: formatNumber(d.dmltnPrlg, "dmltnPrlg"),
|
dmltnPrlgWhol: formatNumber(d.dmltnPrlg, "dmltnPrlg"),
|
||||||
pipeByPrstWhol: formatNumber(d.pipeByPrstWhol, "pipeByPrstWhol"),
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
const requestData: SeweragePipeInputPipeTypeStatusSubmitRequest = {
|
const requestData: SeweragePipeInputPipeTypeStatusSubmitRequest = {
|
||||||
@@ -1457,7 +1470,13 @@ const SewagePipeInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: values.year ?? "",
|
||||||
|
statsCd: statsCdForTab,
|
||||||
|
sewerBzmnCd: values?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: statusForTab?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -1637,7 +1656,6 @@ const SewagePipeInp = () => {
|
|||||||
|
|
||||||
const saveList = currentData.map((d) => ({
|
const saveList = currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
goalYr: nullableTrimmedString(d.goalYr),
|
goalYr: nullableTrimmedString(d.goalYr),
|
||||||
wholPplMtncPlanPrlg: formatNumber(d.wholPplMtncPlanPrlg, "wholPplMtncPlanPrlg"),
|
wholPplMtncPlanPrlg: formatNumber(d.wholPplMtncPlanPrlg, "wholPplMtncPlanPrlg"),
|
||||||
@@ -1728,7 +1746,6 @@ const SewagePipeInp = () => {
|
|||||||
|
|
||||||
const saveList = currentData.map((d) => ({
|
const saveList = currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
fcltSn: nullableTrimmedString(d.fcltSn),
|
fcltSn: nullableTrimmedString(d.fcltSn),
|
||||||
swtrmtFcltCd: nullableTrimmedString(d.swtrmtFcltCd),
|
swtrmtFcltCd: nullableTrimmedString(d.swtrmtFcltCd),
|
||||||
@@ -1834,7 +1851,6 @@ const SewagePipeInp = () => {
|
|||||||
rmrk: nullableTrimmedString(d.rmrk),
|
rmrk: nullableTrimmedString(d.rmrk),
|
||||||
lyngPrlgWhol: formatNumber(d.lyngPrlg, "lyngPrlg"),
|
lyngPrlgWhol: formatNumber(d.lyngPrlg, "lyngPrlg"),
|
||||||
dmltnPrlgWhol: formatNumber(d.dmltnPrlg, "dmltnPrlg"),
|
dmltnPrlgWhol: formatNumber(d.dmltnPrlg, "dmltnPrlg"),
|
||||||
pipeByPrstWhol: formatNumber(d.pipeByPrstWhol, "pipeByPrstWhol"),
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2045,7 +2061,7 @@ const SewagePipeInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={() => void submitFunc(false)} />}
|
{submitOk && <SubmitButton submitFunc={() => void submitFunc(false)} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
@@ -2241,17 +2257,7 @@ const SewagePipeInp = () => {
|
|||||||
tabKey,
|
tabKey,
|
||||||
);
|
);
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR" ? "시계열 검증 - " : (e.vrfcCd === "NV" ? "일반검증 - " : "모집단 검증 - ");
|
|
||||||
const comp = e.cmprCn ?? "";
|
|
||||||
const now = e.nowCn ?? "";
|
|
||||||
return `${prefix}${e.rsnExpln}
|
|
||||||
(검증 기준값: ${comp} / 현재 입력값: ${now})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
|||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { sewagePipeMaintainApiService } from "@/entities/statistics/api/input/statistics-input-sewage-pipe-maintain-service";
|
import { sewagePipeMaintainApiService } from "@/entities/statistics/api/input/statistics-input-sewage-pipe-maintain-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import type {
|
import type {
|
||||||
SewagePipeMaintainDredgingSaveItem,
|
SewagePipeMaintainDredgingSaveItem,
|
||||||
SewagePipeMaintainDredgingSaveRequest,
|
SewagePipeMaintainDredgingSaveRequest,
|
||||||
@@ -69,7 +70,11 @@ import {
|
|||||||
patchFooterVerificationByTab,
|
patchFooterVerificationByTab,
|
||||||
patchVerificationFailedByTab,
|
patchVerificationFailedByTab,
|
||||||
} from "@/components/util/input/verification-failed-flag";
|
} from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
withNormalizedVerificationResult,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useStatisticsInputFocusStore } from "@/store/statistics-input-focus-store";
|
import { useStatisticsInputFocusStore } from "@/store/statistics-input-focus-store";
|
||||||
@@ -151,8 +156,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +222,6 @@ function buildRepairRowList(
|
|||||||
|
|
||||||
return currentData.map((d) => ({
|
return currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
dfrpWholPrlg: formatNumber(d.dfrpWholPrlg, "dfrpWholPrlg"),
|
dfrpWholPrlg: formatNumber(d.dfrpWholPrlg, "dfrpWholPrlg"),
|
||||||
cbsysDfrpPrlg: formatNumber(d.cbsysDfrpPrlg, "cbsysDfrpPrlg"),
|
cbsysDfrpPrlg: formatNumber(d.cbsysDfrpPrlg, "cbsysDfrpPrlg"),
|
||||||
@@ -247,7 +250,6 @@ function buildDredgingRowList(
|
|||||||
|
|
||||||
return currentData.map((d) => ({
|
return currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
wholFcltPrlg: formatNumber(d.wholFcltPrlg, "wholFcltPrlg"),
|
wholFcltPrlg: formatNumber(d.wholFcltPrlg, "wholFcltPrlg"),
|
||||||
wholSwagePpl: formatNumber(d.wholSwagePpl, "wholSwagePpl"),
|
wholSwagePpl: formatNumber(d.wholSwagePpl, "wholSwagePpl"),
|
||||||
@@ -446,10 +448,12 @@ const SewagePipeMaintainInp = () => {
|
|||||||
repairStatusList ?? [],
|
repairStatusList ?? [],
|
||||||
sidoListRef.current,
|
sidoListRef.current,
|
||||||
searchContext,
|
searchContext,
|
||||||
).map((d) => ({
|
).map((d) =>
|
||||||
ctpvNm: commonInfo.ctpvNm,
|
withNormalizedVerificationResult({
|
||||||
...d,
|
ctpvNm: commonInfo.ctpvNm,
|
||||||
}));
|
...d,
|
||||||
|
}),
|
||||||
|
);
|
||||||
const gridRows = toGridRows(convertedData);
|
const gridRows = toGridRows(convertedData);
|
||||||
|
|
||||||
applyRowMap(mergeIntoExistingMap, (m) => {
|
applyRowMap(mergeIntoExistingMap, (m) => {
|
||||||
@@ -489,10 +493,12 @@ const SewagePipeMaintainInp = () => {
|
|||||||
pipeDredgingStatusList ?? [],
|
pipeDredgingStatusList ?? [],
|
||||||
sidoListRef.current,
|
sidoListRef.current,
|
||||||
searchContext,
|
searchContext,
|
||||||
).map((d) => ({
|
).map((d) =>
|
||||||
ctpvNm: commonInfo.ctpvNm,
|
withNormalizedVerificationResult({
|
||||||
...d,
|
ctpvNm: commonInfo.ctpvNm,
|
||||||
}));
|
...d,
|
||||||
|
}),
|
||||||
|
);
|
||||||
const gridRows = toGridRows(convertedData);
|
const gridRows = toGridRows(convertedData);
|
||||||
|
|
||||||
applyRowMap(mergeIntoExistingMap, (m) => {
|
applyRowMap(mergeIntoExistingMap, (m) => {
|
||||||
@@ -680,7 +686,13 @@ const SewagePipeMaintainInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForTab,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -1105,14 +1117,7 @@ const SewagePipeMaintainInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR" ? "시계열 검증 - " : e.vrfcCd === "NV" ? "일반검증 - " : "모집단 검증 - ";
|
|
||||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1144,7 +1149,7 @@ const SewagePipeMaintainInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
|
|||||||
@@ -17,10 +17,12 @@ import { useAlertStore, useGlobalProgressStore, useStatisticsInputToolbarGroupGa
|
|||||||
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
||||||
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
||||||
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||||
|
import { filterSggOptionsBySearchGugun } from "@/components/util/input/filter-sgg-options-by-search";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsInputSewageReservoirPumpApi } from "@/entities/statistics/api/input/statistics-input-sewage-reservoir-pump-service";
|
import { statisticsInputSewageReservoirPumpApi } from "@/entities/statistics/api/input/statistics-input-sewage-reservoir-pump-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import {
|
import {
|
||||||
type RainfallPumpStationItem,
|
type RainfallPumpStationItem,
|
||||||
type RainfallPumpStationSaveItem,
|
type RainfallPumpStationSaveItem,
|
||||||
@@ -89,7 +91,11 @@ import {
|
|||||||
patchFooterVerificationByTab,
|
patchFooterVerificationByTab,
|
||||||
patchVerificationFailedByTab,
|
patchVerificationFailedByTab,
|
||||||
} from "@/components/util/input/verification-failed-flag";
|
} from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
|
|
||||||
@@ -171,8 +177,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,7 +284,7 @@ function mapSewageReservoirListToGridRows(
|
|||||||
},
|
},
|
||||||
])[0] as GridRowWithVerification;
|
])[0] as GridRowWithVerification;
|
||||||
if (item.verificationResult) {
|
if (item.verificationResult) {
|
||||||
row.verificationResult = item.verificationResult;
|
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
@@ -435,7 +440,7 @@ function mapRainfallPumpStationListToGridRows(
|
|||||||
])[0] as GridRowWithVerification;
|
])[0] as GridRowWithVerification;
|
||||||
|
|
||||||
if (item.verificationResult) {
|
if (item.verificationResult) {
|
||||||
row.verificationResult = item.verificationResult;
|
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
@@ -864,7 +869,13 @@ const SewageReservoirPumpInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForTab,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -1480,7 +1491,11 @@ const SewageReservoirPumpInp = () => {
|
|||||||
col.fieldName === "sggNm" &&
|
col.fieldName === "sggNm" &&
|
||||||
canEdit
|
canEdit
|
||||||
) {
|
) {
|
||||||
return buildSggNmColumn(col, true, sggOptions);
|
return buildSggNmColumn(
|
||||||
|
col,
|
||||||
|
true,
|
||||||
|
filterSggOptionsBySearchGugun(sggOptions, lastSearchedValues?.gugun),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return col;
|
return col;
|
||||||
}).map((col) => {
|
}).map((col) => {
|
||||||
@@ -1493,7 +1508,7 @@ const SewageReservoirPumpInp = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}, [tabStatusInfoMap, inputPeriodEnterable, isAdminInfo, sggOptions, columnGuidesByTab]);
|
}, [tabStatusInfoMap, inputPeriodEnterable, isAdminInfo, sggOptions, lastSearchedValues?.gugun, columnGuidesByTab]);
|
||||||
|
|
||||||
const verificationCellStyle = ({
|
const verificationCellStyle = ({
|
||||||
fieldName,
|
fieldName,
|
||||||
@@ -1516,19 +1531,7 @@ const SewageReservoirPumpInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR"
|
|
||||||
? "시계열 검증 - "
|
|
||||||
: e.vrfcCd === "NV"
|
|
||||||
? "일반검증 - "
|
|
||||||
: "모집단 검증 -";
|
|
||||||
return `${prefix}${e.rsnExpln}
|
|
||||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1584,7 +1587,7 @@ const SewageReservoirPumpInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics
|
|||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsInputSewerageFinanceApi } from "@/entities/statistics/api/input/statistics-input-sewerage-finance-service";
|
import { statisticsInputSewerageFinanceApi } from "@/entities/statistics/api/input/statistics-input-sewerage-finance-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import type {
|
import type {
|
||||||
CauserBurdenItem,
|
CauserBurdenItem,
|
||||||
CauserBurdenSaveItem,
|
CauserBurdenSaveItem,
|
||||||
@@ -73,7 +74,11 @@ import {
|
|||||||
patchFooterVerificationByTab,
|
patchFooterVerificationByTab,
|
||||||
patchVerificationFailedByTab,
|
patchVerificationFailedByTab,
|
||||||
} from "@/components/util/input/verification-failed-flag";
|
} from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
@@ -155,8 +160,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,7 +178,9 @@ function mapRegionalListToGridRows<
|
|||||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||||
const { verificationResult, ...rest } = item;
|
const { verificationResult, ...rest } = item;
|
||||||
const row = toGridRows([{ ctpvNm, ...rest }])[0] as GridRowWithVerification;
|
const row = toGridRows([{ ctpvNm, ...rest }])[0] as GridRowWithVerification;
|
||||||
if (verificationResult) row.verificationResult = verificationResult;
|
if (verificationResult) {
|
||||||
|
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||||
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -215,7 +221,6 @@ function buildSewerageFinanceSettleSaveList(
|
|||||||
|
|
||||||
return currentData.map((d) => ({
|
return currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
soaGovSprtAmt: formatNumber(d.soaGovSprtAmt, "soaGovSprtAmt"),
|
soaGovSprtAmt: formatNumber(d.soaGovSprtAmt, "soaGovSprtAmt"),
|
||||||
mctpvLcexpAmt: formatNumber(d.mctpvLcexpAmt, "mctpvLcexpAmt"),
|
mctpvLcexpAmt: formatNumber(d.mctpvLcexpAmt, "mctpvLcexpAmt"),
|
||||||
@@ -257,7 +262,6 @@ function buildSewerageChargeSaveList(
|
|||||||
|
|
||||||
return currentData.map((d) => ({
|
return currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
anlLevyQnt: formatNumber(d.anlLevyQnt, "anlLevyQnt"),
|
anlLevyQnt: formatNumber(d.anlLevyQnt, "anlLevyQnt"),
|
||||||
sewerLevyAmt: formatNumber(d.sewerLevyAmt, "sewerLevyAmt"),
|
sewerLevyAmt: formatNumber(d.sewerLevyAmt, "sewerLevyAmt"),
|
||||||
@@ -276,7 +280,6 @@ function buildSewerageUsageFeeSaveList(
|
|||||||
|
|
||||||
return currentData.map((d) => ({
|
return currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
hshusLevyAmt: formatNumber(d.hshusLevyAmt, "hshusLevyAmt"),
|
hshusLevyAmt: formatNumber(d.hshusLevyAmt, "hshusLevyAmt"),
|
||||||
hshusLevyQnt: formatNumber(d.hshusLevyQnt, "hshusLevyQnt"),
|
hshusLevyQnt: formatNumber(d.hshusLevyQnt, "hshusLevyQnt"),
|
||||||
@@ -312,7 +315,6 @@ function buildCauserBurdenSaveList(
|
|||||||
|
|
||||||
return currentData.map((d) => ({
|
return currentData.map((d) => ({
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
brdnAmtLevyNocs: formatNumber(d.brdnAmtLevyNocs, "brdnAmtLevyNocs"),
|
brdnAmtLevyNocs: formatNumber(d.brdnAmtLevyNocs, "brdnAmtLevyNocs"),
|
||||||
brdnAmtLevyAmt: formatNumber(d.brdnAmtLevyAmt, "brdnAmtLevyAmt"),
|
brdnAmtLevyAmt: formatNumber(d.brdnAmtLevyAmt, "brdnAmtLevyAmt"),
|
||||||
@@ -849,7 +851,6 @@ const SewerageFinanceInp = () => {
|
|||||||
|
|
||||||
const activeTabStatus = tabStatusInfoMap.get(tabKey) ?? null;
|
const activeTabStatus = tabStatusInfoMap.get(tabKey) ?? null;
|
||||||
const statsCdForTab = tabStatsCdMap.get(tabKey) ?? tabKey;
|
const statsCdForTab = tabStatsCdMap.get(tabKey) ?? tabKey;
|
||||||
const adminOpt = isAdminInfo ? { superAdmin: "superAdmin" as const } : {};
|
|
||||||
|
|
||||||
const submitInfoBase = {
|
const submitInfoBase = {
|
||||||
statsYr: lastSearchedValues.year ?? "",
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
@@ -894,7 +895,6 @@ const SewerageFinanceInp = () => {
|
|||||||
...submitInfoBase,
|
...submitInfoBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: buildSewerageFinanceSettleSaveList(currentData),
|
submitList: buildSewerageFinanceSettleSaveList(currentData),
|
||||||
...adminOpt,
|
|
||||||
};
|
};
|
||||||
response =
|
response =
|
||||||
await statisticsInputSewerageFinanceApi.submitSewerageFinanceSettle(
|
await statisticsInputSewerageFinanceApi.submitSewerageFinanceSettle(
|
||||||
@@ -905,7 +905,6 @@ const SewerageFinanceInp = () => {
|
|||||||
...submitInfoBase,
|
...submitInfoBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: buildSewerageChargeSaveList(currentData),
|
submitList: buildSewerageChargeSaveList(currentData),
|
||||||
...adminOpt,
|
|
||||||
};
|
};
|
||||||
response = await statisticsInputSewerageFinanceApi.submitSewerageCharge(param);
|
response = await statisticsInputSewerageFinanceApi.submitSewerageCharge(param);
|
||||||
} else if (isUsageFeeTab) {
|
} else if (isUsageFeeTab) {
|
||||||
@@ -913,7 +912,6 @@ const SewerageFinanceInp = () => {
|
|||||||
...submitInfoBase,
|
...submitInfoBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: buildSewerageUsageFeeSaveList(currentData),
|
submitList: buildSewerageUsageFeeSaveList(currentData),
|
||||||
...adminOpt,
|
|
||||||
};
|
};
|
||||||
response =
|
response =
|
||||||
await statisticsInputSewerageFinanceApi.submitSewerageUsageFee(param);
|
await statisticsInputSewerageFinanceApi.submitSewerageUsageFee(param);
|
||||||
@@ -922,7 +920,6 @@ const SewerageFinanceInp = () => {
|
|||||||
...submitInfoBase,
|
...submitInfoBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
submitList: buildCauserBurdenSaveList(currentData),
|
submitList: buildCauserBurdenSaveList(currentData),
|
||||||
...adminOpt,
|
|
||||||
};
|
};
|
||||||
response = await statisticsInputSewerageFinanceApi.submitCauserBurden(param);
|
response = await statisticsInputSewerageFinanceApi.submitCauserBurden(param);
|
||||||
}
|
}
|
||||||
@@ -949,7 +946,13 @@ const SewerageFinanceInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForTab,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -1224,18 +1227,7 @@ const SewerageFinanceInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR"
|
|
||||||
? "시계열 검증 - "
|
|
||||||
: e.vrfcCd === "NV"
|
|
||||||
? "일반검증 - "
|
|
||||||
: "모집단 검증 - ";
|
|
||||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1278,7 +1270,7 @@ const SewerageFinanceInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import {
|
import {
|
||||||
type CheckInputPeriodItem,
|
type CheckInputPeriodItem,
|
||||||
getVerificationPeriodActionBlockedMessage,
|
getVerificationPeriodActionBlockedMessage,
|
||||||
@@ -58,7 +59,11 @@ import { toGridRows } from "@/components/util/grid/gridFunction";
|
|||||||
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { isVerificationFailedFromCommonInfo } from "@/components/util/input/verification-failed-flag";
|
import { isVerificationFailedFromCommonInfo } from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useStatisticsInputFocusStore } from "@/store/statistics-input-focus-store";
|
import { useStatisticsInputFocusStore } from "@/store/statistics-input-focus-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
@@ -87,7 +92,7 @@ const remapCommonInfoVerificationToGridFields = (
|
|||||||
// API 키로도 조회 가능하도록 유지
|
// API 키로도 조회 가능하도록 유지
|
||||||
if (gridField !== key) remapped[key] = errors;
|
if (gridField !== key) remapped[key] = errors;
|
||||||
}
|
}
|
||||||
return remapped;
|
return normalizeVerificationResultMap(remapped) ?? remapped;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 컬럼 가이드 API 조회용 통계코드 (하수도 보급률) */
|
/** 컬럼 가이드 API 조회용 통계코드 (하수도 보급률) */
|
||||||
@@ -302,7 +307,11 @@ const SeweragePenetrationRateInp = () => {
|
|||||||
setRowData(
|
setRowData(
|
||||||
convertedData.map((d) => {
|
convertedData.map((d) => {
|
||||||
const row = toGridRows([d])[0] as GridRowWithVerification;
|
const row = toGridRows([d])[0] as GridRowWithVerification;
|
||||||
if (d.verificationResult) row.verificationResult = d.verificationResult;
|
if (d.verificationResult) {
|
||||||
|
row.verificationResult = normalizeVerificationResultMap(
|
||||||
|
d.verificationResult,
|
||||||
|
);
|
||||||
|
}
|
||||||
return row;
|
return row;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -399,10 +408,6 @@ const SeweragePenetrationRateInp = () => {
|
|||||||
statsCd: statsCd,
|
statsCd: statsCd,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isAdminInfo) {
|
|
||||||
params.superAdmin = 'superAdmin';
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|
||||||
@@ -498,7 +503,6 @@ const SeweragePenetrationRateInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const convertedData: SewerageSupplyRateSaveItem[] = currentData.map((d) => ({
|
const convertedData: SewerageSupplyRateSaveItem[] = currentData.map((d) => ({
|
||||||
sggNm: nullableTrimmedString(d.sggNm),
|
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd),
|
admdstCd: nullableTrimmedString(d.admdstCd),
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm),
|
admdstNm: nullableTrimmedString(d.admdstNm),
|
||||||
statsTrbtrNm: nullableTrimmedString(d.statsTrbtrNm),
|
statsTrbtrNm: nullableTrimmedString(d.statsTrbtrNm),
|
||||||
@@ -563,7 +567,13 @@ const SeweragePenetrationRateInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: searchValues?.year ?? "",
|
||||||
|
statsCd,
|
||||||
|
sewerBzmnCd: searchValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: statusInfo?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(imrResponse.job_id, (id) =>
|
await waitForImrJobCompleted(imrResponse.job_id, (id) =>
|
||||||
statisticsApi.getImrStatus(id),
|
statisticsApi.getImrStatus(id),
|
||||||
@@ -677,8 +687,6 @@ const SeweragePenetrationRateInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const convertedData: SewerageSupplyRateSaveItem[] = currentData.map((d) => ({
|
const convertedData: SewerageSupplyRateSaveItem[] = currentData.map((d) => ({
|
||||||
// 행정구역
|
|
||||||
sggNm: nullableTrimmedString(d.sggNm), // 시군구
|
|
||||||
admdstCd: nullableTrimmedString(d.admdstCd), // 행정코드
|
admdstCd: nullableTrimmedString(d.admdstCd), // 행정코드
|
||||||
admdstNm: nullableTrimmedString(d.admdstNm), // 행정구역명
|
admdstNm: nullableTrimmedString(d.admdstNm), // 행정구역명
|
||||||
statsTrbtrNm: nullableTrimmedString(d.statsTrbtrNm), // 지류
|
statsTrbtrNm: nullableTrimmedString(d.statsTrbtrNm), // 지류
|
||||||
@@ -807,8 +815,7 @@ const SeweragePenetrationRateInp = () => {
|
|||||||
toolbarGroupAllowed &&
|
toolbarGroupAllowed &&
|
||||||
(baseShowSaveInToolbar ||
|
(baseShowSaveInToolbar ||
|
||||||
baseShowEnterableToolbarButtons ||
|
baseShowEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -834,7 +841,7 @@ const SeweragePenetrationRateInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={() => submitFunc(false)} />}
|
{submitOk && <SubmitButton submitFunc={() => submitFunc(false)} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{statusInfo?.lclgvSbmsnSttsCd === '2' && submitOk && <CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />}
|
{statusInfo?.lclgvSbmsnSttsCd === '2' && submitOk && inputPeriodCurrent && <CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -874,14 +881,7 @@ const SeweragePenetrationRateInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix = e.vrfcCd === 'IMR' ? '시계열 검증 - ' : (e.vrfcCd === 'NV' ? '일반검증 - ' : '모집단 검증 -');
|
|
||||||
return `${prefix}${e.rsnExpln}
|
|
||||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join('\n');
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
|||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsInputSewerageServiceLevelApi } from "@/entities/statistics/api/input/statistics-input-sewerage-service-level-service";
|
import { statisticsInputSewerageServiceLevelApi } from "@/entities/statistics/api/input/statistics-input-sewerage-service-level-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import {
|
import {
|
||||||
SEWERAGE_SERVICE_LEVEL_COMPLAINT_STATS_CD,
|
SEWERAGE_SERVICE_LEVEL_COMPLAINT_STATS_CD,
|
||||||
SEWERAGE_SERVICE_LEVEL_RESIDENT_FRIENDLY_FACT_STATS_CD,
|
SEWERAGE_SERVICE_LEVEL_RESIDENT_FRIENDLY_FACT_STATS_CD,
|
||||||
@@ -63,7 +64,11 @@ import {
|
|||||||
patchFooterVerificationByTab,
|
patchFooterVerificationByTab,
|
||||||
patchVerificationFailedByTab,
|
patchVerificationFailedByTab,
|
||||||
} from "@/components/util/input/verification-failed-flag";
|
} from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
@@ -164,8 +169,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +191,9 @@ function mapServiceLevelListToGridRows<
|
|||||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||||
const { verificationResult, ...rest } = item;
|
const { verificationResult, ...rest } = item;
|
||||||
const row = toGridRows([{ ctpvNm, ...rest }])[0] as GridRowWithVerification;
|
const row = toGridRows([{ ctpvNm, ...rest }])[0] as GridRowWithVerification;
|
||||||
if (verificationResult) row.verificationResult = verificationResult;
|
if (verificationResult) {
|
||||||
|
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||||
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -808,13 +814,11 @@ const SewerageServiceLevelInp = () => {
|
|||||||
? await statisticsInputSewerageServiceLevelApi.submitComplaintList({
|
? await statisticsInputSewerageServiceLevelApi.submitComplaintList({
|
||||||
...submitInfoBase,
|
...submitInfoBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
...(isAdminInfo ? { superAdmin: "superAdmin" } : {}),
|
|
||||||
submitList: complaintSubmitList,
|
submitList: complaintSubmitList,
|
||||||
})
|
})
|
||||||
: await statisticsInputSewerageServiceLevelApi.submitResidentFriendlyFactList({
|
: await statisticsInputSewerageServiceLevelApi.submitResidentFriendlyFactList({
|
||||||
...submitInfoBase,
|
...submitInfoBase,
|
||||||
userUuid: userInfo.userUnqId,
|
userUuid: userInfo.userUnqId,
|
||||||
...(isAdminInfo ? { superAdmin: "superAdmin" } : {}),
|
|
||||||
noApplicable,
|
noApplicable,
|
||||||
submitList: residentSubmitList,
|
submitList: residentSubmitList,
|
||||||
});
|
});
|
||||||
@@ -841,7 +845,13 @@ const SewerageServiceLevelInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForTab,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -1148,18 +1158,7 @@ const SewerageServiceLevelInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR"
|
|
||||||
? "시계열 검증 - "
|
|
||||||
: e.vrfcCd === "NV"
|
|
||||||
? "일반검증 - "
|
|
||||||
: "모집단 검증 - ";
|
|
||||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1202,7 +1201,7 @@ const SewerageServiceLevelInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ const StatisticsReviewHistory = () => {
|
|||||||
{ name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false },
|
{ name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false },
|
||||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||||
{ name: "menuNm", fieldName: "menuNm", header: { text: "통계항목" }, editable: false },
|
{ name: "menuNm", fieldName: "menuNm", header: { text: "통계항목" }, editable: false },
|
||||||
{ name: "chckerOpinionSm", fieldName: "chckerOpinionSm", header: { text: "검토자의견" }, editable: false },
|
{ name: "splmntOpnnCn", fieldName: "splmntOpnnCn", header: { text: "검토자의견" }, editable: false },
|
||||||
{ name: "wrterOpinionSm", fieldName: "wrterOpinionSm", header: { text: "처리내역" }, editable: false },
|
{ name: "rjctOpnnCn", fieldName: "rjctOpnnCn", header: { text: "반려의견" }, editable: false },
|
||||||
];
|
];
|
||||||
|
|
||||||
const columnLayout = [
|
const columnLayout = [
|
||||||
@@ -29,8 +29,8 @@ const StatisticsReviewHistory = () => {
|
|||||||
"ctpvNm",
|
"ctpvNm",
|
||||||
"sggNm",
|
"sggNm",
|
||||||
"menuNm",
|
"menuNm",
|
||||||
"chckerOpinionSm",
|
"splmntOpnnCn",
|
||||||
"wrterOpinionSm",
|
"rjctOpnnCn",
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleSearch = async (values: SearchFormValues) => {
|
const handleSearch = async (values: SearchFormValues) => {
|
||||||
|
|||||||
@@ -17,10 +17,12 @@ import { useAlertStore, useGlobalProgressStore, useStatisticsInputToolbarGroupGa
|
|||||||
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
|
||||||
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
|
||||||
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||||
|
import { filterSggOptionsBySearchGugun } from "@/components/util/input/filter-sgg-options-by-search";
|
||||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||||
import { statisticsInputWaterReuseApi } from "@/entities/statistics/api/input/statistics-input-water-reuse-service";
|
import { statisticsInputWaterReuseApi } from "@/entities/statistics/api/input/statistics-input-water-reuse-service";
|
||||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||||
import {
|
import {
|
||||||
type PublicSewageTreatWaterReuseItem,
|
type PublicSewageTreatWaterReuseItem,
|
||||||
type PublicSewageTreatWaterReuseSaveItem,
|
type PublicSewageTreatWaterReuseSaveItem,
|
||||||
@@ -93,7 +95,11 @@ import {
|
|||||||
patchFooterVerificationByTab,
|
patchFooterVerificationByTab,
|
||||||
patchVerificationFailedByTab,
|
patchVerificationFailedByTab,
|
||||||
} from "@/components/util/input/verification-failed-flag";
|
} from "@/components/util/input/verification-failed-flag";
|
||||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
import {
|
||||||
|
formatVerificationTooltip,
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "@/components/util/input/verification-result-display";
|
||||||
import { useAdminStore } from "@/store/admin-store";
|
import { useAdminStore } from "@/store/admin-store";
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
|
|
||||||
@@ -203,8 +209,7 @@ function computeTabToolbarSnapshot(
|
|||||||
(hasRowData || treatAsSearched) &&
|
(hasRowData || treatAsSearched) &&
|
||||||
(showSaveInToolbar ||
|
(showSaveInToolbar ||
|
||||||
showEnterableToolbarButtons ||
|
showEnterableToolbarButtons ||
|
||||||
showSubmittedInInputPeriodToolbar ||
|
showSubmittedInInputPeriodToolbar);
|
||||||
(isSubmitted && isAdminInfo));
|
|
||||||
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
return { showSaveInToolbar, showEnterableToolbarButtons, showActionToolbarCard };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,7 +448,9 @@ function mapPublicSewageTreatWaterReuseListToGridRows(
|
|||||||
instlAprvYmd: formatCompactYmdForGrid(item.instlAprvYmd),
|
instlAprvYmd: formatCompactYmdForGrid(item.instlAprvYmd),
|
||||||
},
|
},
|
||||||
])[0] as GridRowWithVerification;
|
])[0] as GridRowWithVerification;
|
||||||
if (verificationResult) row.verificationResult = verificationResult;
|
if (verificationResult) {
|
||||||
|
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||||
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -462,7 +469,9 @@ function mapRecycledWaterStatusListToGridRows(
|
|||||||
oprtngStrtYmd: formatCompactYmdForGrid(item.oprtngStrtYmd),
|
oprtngStrtYmd: formatCompactYmdForGrid(item.oprtngStrtYmd),
|
||||||
},
|
},
|
||||||
])[0] as GridRowWithVerification;
|
])[0] as GridRowWithVerification;
|
||||||
if (verificationResult) row.verificationResult = verificationResult;
|
if (verificationResult) {
|
||||||
|
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||||
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -480,7 +489,9 @@ function mapRainFallUtilFactStatusListToGridRows(
|
|||||||
cmptnYmd: formatCompactYmdForGrid(item.cmptnYmd),
|
cmptnYmd: formatCompactYmdForGrid(item.cmptnYmd),
|
||||||
},
|
},
|
||||||
])[0] as GridRowWithVerification;
|
])[0] as GridRowWithVerification;
|
||||||
if (verificationResult) row.verificationResult = verificationResult;
|
if (verificationResult) {
|
||||||
|
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||||
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -497,7 +508,9 @@ function mapTreatWaterReuseStatusListToGridRows<
|
|||||||
coRegYmd: formatCompactYmdForGrid(item.coRegYmd),
|
coRegYmd: formatCompactYmdForGrid(item.coRegYmd),
|
||||||
},
|
},
|
||||||
])[0] as GridRowWithVerification;
|
])[0] as GridRowWithVerification;
|
||||||
if (verificationResult) row.verificationResult = verificationResult;
|
if (verificationResult) {
|
||||||
|
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||||
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1153,7 +1166,6 @@ const WaterReuseInp = () => {
|
|||||||
lclgvIdfrTelnoCn: submitInfo.lclgvIdfrTelnoCn,
|
lclgvIdfrTelnoCn: submitInfo.lclgvIdfrTelnoCn,
|
||||||
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
lclgvIdfrDeptNm: submitInfo.lclgvIdfrDeptNm,
|
||||||
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
lclgvIdfrJbgdNm: submitInfo.lclgvIdfrJbgdNm,
|
||||||
...(isAdminInfo ? { superAdmin: "superAdmin" } : {}),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let articleSggOptions: Sgg[] | null = null;
|
let articleSggOptions: Sgg[] | null = null;
|
||||||
@@ -1356,7 +1368,13 @@ const WaterReuseInp = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||||
|
statsYr: lastSearchedValues.year ?? "",
|
||||||
|
statsCd: statsCdForTab,
|
||||||
|
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||||
|
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||||
|
mdfrUuid: userInfo.userUnqId,
|
||||||
|
});
|
||||||
if (imrResponse.job_id) {
|
if (imrResponse.job_id) {
|
||||||
await waitForImrJobCompleted(
|
await waitForImrJobCompleted(
|
||||||
imrResponse.job_id,
|
imrResponse.job_id,
|
||||||
@@ -1964,7 +1982,11 @@ const WaterReuseInp = () => {
|
|||||||
ARTICLE_EDIT_TAB_KEYS.has(tabKey) &&
|
ARTICLE_EDIT_TAB_KEYS.has(tabKey) &&
|
||||||
col.fieldName === "sggNm"
|
col.fieldName === "sggNm"
|
||||||
) {
|
) {
|
||||||
next = buildSggNmColumn(col, canEdit, sggOptions);
|
next = buildSggNmColumn(
|
||||||
|
col,
|
||||||
|
canEdit,
|
||||||
|
filterSggOptionsBySearchGugun(sggOptions, lastSearchedValues?.gugun),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
const guide = columnGuidesByTab[tabKey]?.[col.fieldName]?.trim();
|
const guide = columnGuidesByTab[tabKey]?.[col.fieldName]?.trim();
|
||||||
return guide ? { ...next, tooltip: guide } : next;
|
return guide ? { ...next, tooltip: guide } : next;
|
||||||
@@ -1975,7 +1997,7 @@ const WaterReuseInp = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}, [tabStatusInfoMap, inputPeriodEnterable, isAdminInfo, columnGuidesByTab, sggOptions]);
|
}, [tabStatusInfoMap, inputPeriodEnterable, isAdminInfo, columnGuidesByTab, sggOptions, lastSearchedValues?.gugun]);
|
||||||
|
|
||||||
const searchContextForToolbar = searchContextByTab.get(activeTab) ?? lastSearchedValues;
|
const searchContextForToolbar = searchContextByTab.get(activeTab) ?? lastSearchedValues;
|
||||||
const activeTabStatus = tabStatusInfoMap.get(activeTab) ?? null;
|
const activeTabStatus = tabStatusInfoMap.get(activeTab) ?? null;
|
||||||
@@ -2064,18 +2086,7 @@ const WaterReuseInp = () => {
|
|||||||
if (!verification) return;
|
if (!verification) return;
|
||||||
const errors = verification[fieldName];
|
const errors = verification[fieldName];
|
||||||
if (Array.isArray(errors) && errors.length > 0) {
|
if (Array.isArray(errors) && errors.length > 0) {
|
||||||
return errors
|
return formatVerificationTooltip(errors);
|
||||||
.map((e) => {
|
|
||||||
const prefix =
|
|
||||||
e.vrfcCd === "IMR"
|
|
||||||
? "시계열 검증 - "
|
|
||||||
: e.vrfcCd === "NV"
|
|
||||||
? "일반검증 - "
|
|
||||||
: "모집단 검증 - ";
|
|
||||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
|
||||||
})
|
|
||||||
.filter(Boolean)
|
|
||||||
.join("\n");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2118,7 +2129,7 @@ const WaterReuseInp = () => {
|
|||||||
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
{submitOk && <SubmitButton submitFunc={submitFunc} />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && (
|
{activeTabStatus?.lclgvSbmsnSttsCd === "2" && submitOk && inputPeriodEnterable && (
|
||||||
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
<CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />
|
||||||
)}
|
)}
|
||||||
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
{showSaveInToolbar && <SaveButton saveFunc={saveFunc} />}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import {
|
|||||||
DialogHeader,
|
DialogHeader,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
Input,
|
Input,
|
||||||
InputDatePicker,
|
|
||||||
Label,
|
Label,
|
||||||
Select,
|
Select,
|
||||||
SelectContent,
|
SelectContent,
|
||||||
@@ -48,9 +47,32 @@ function normalizeStatsYrInput(raw: string): string {
|
|||||||
function formatDateToYmd(d: Date | undefined): string | null {
|
function formatDateToYmd(d: Date | undefined): string | null {
|
||||||
if (!d || Number.isNaN(d.getTime())) return null;
|
if (!d || Number.isNaN(d.getTime())) return null;
|
||||||
const y = d.getFullYear();
|
const y = d.getFullYear();
|
||||||
|
if (y < 1000 || y > 9999) return null;
|
||||||
const m = String(d.getMonth() + 1).padStart(2, "0");
|
const m = String(d.getMonth() + 1).padStart(2, "0");
|
||||||
const day = String(d.getDate()).padStart(2, "0");
|
const day = String(d.getDate()).padStart(2, "0");
|
||||||
return `${y}${m}${day}`;
|
return `${String(y).padStart(4, "0")}${m}${day}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Chrome `type="date"`는 max가 없으면 연도를 6자리까지 받음 */
|
||||||
|
const PERIOD_DATE_INPUT_MIN = "1000-01-01";
|
||||||
|
const PERIOD_DATE_INPUT_MAX = "9999-12-31";
|
||||||
|
|
||||||
|
function formatDateToInputValue(d: Date | undefined): string {
|
||||||
|
if (!d || Number.isNaN(d.getTime())) return "";
|
||||||
|
const ymd = formatDateToYmd(d);
|
||||||
|
if (!ymd) return "";
|
||||||
|
return `${ymd.slice(0, 4)}-${ymd.slice(4, 6)}-${ymd.slice(6, 8)}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseFourDigitYearDate(raw: string): Date | undefined {
|
||||||
|
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(raw);
|
||||||
|
if (!match) return undefined;
|
||||||
|
const year = Number(match[1]);
|
||||||
|
const month = Number(match[2]);
|
||||||
|
const day = Number(match[3]);
|
||||||
|
const parsed = new Date(year, month - 1, day);
|
||||||
|
if (Number.isNaN(parsed.getTime()) || parsed.getFullYear() !== year) return undefined;
|
||||||
|
return parsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StatisticsInputPeriodDialogProps {
|
export interface StatisticsInputPeriodDialogProps {
|
||||||
@@ -281,18 +303,26 @@ export function StatisticsInputPeriodDialog({
|
|||||||
)}
|
)}
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<Label className="text-label">시작일</Label>
|
<Label className="text-label">시작일</Label>
|
||||||
<InputDatePicker
|
<Input
|
||||||
value={bgngYmd}
|
type="date"
|
||||||
onChange={setBgngYmd}
|
min={PERIOD_DATE_INPUT_MIN}
|
||||||
className="w-full"
|
max={PERIOD_DATE_INPUT_MAX}
|
||||||
|
value={formatDateToInputValue(bgngYmd)}
|
||||||
|
onChange={(e) => setBgngYmd(parseFourDigitYearDate(e.target.value))}
|
||||||
|
disabled={isSubmitting}
|
||||||
|
className="!text-[1.3rem] w-full"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<Label className="text-label">종료일</Label>
|
<Label className="text-label">종료일</Label>
|
||||||
<InputDatePicker
|
<Input
|
||||||
value={endYmd}
|
type="date"
|
||||||
onChange={setEndYmd}
|
min={PERIOD_DATE_INPUT_MIN}
|
||||||
className="w-full"
|
max={PERIOD_DATE_INPUT_MAX}
|
||||||
|
value={formatDateToInputValue(endYmd)}
|
||||||
|
onChange={(e) => setEndYmd(parseFourDigitYearDate(e.target.value))}
|
||||||
|
disabled={isSubmitting}
|
||||||
|
className="!text-[1.3rem] w-full"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ const ExcretaTreatmentFacilityRvw = () => {
|
|||||||
const [reviewOpinionContext, setReviewOpinionContext] =
|
const [reviewOpinionContext, setReviewOpinionContext] =
|
||||||
useState<ReviewOpinionDialogContext | null>(null);
|
useState<ReviewOpinionDialogContext | null>(null);
|
||||||
const [latestReviewOpinion, setLatestReviewOpinion] = useState("");
|
const [latestReviewOpinion, setLatestReviewOpinion] = useState("");
|
||||||
const [latestProcessHistory, setLatestProcessHistory] = useState("");
|
|
||||||
const [lastSearchValues, setLastSearchValues] = useState<SearchFormValues | null>(null);
|
const [lastSearchValues, setLastSearchValues] = useState<SearchFormValues | null>(null);
|
||||||
|
|
||||||
const columnInfo = useMemo(() => {
|
const columnInfo = useMemo(() => {
|
||||||
@@ -116,7 +115,6 @@ const ExcretaTreatmentFacilityRvw = () => {
|
|||||||
setStatsStatusInfo({});
|
setStatsStatusInfo({});
|
||||||
setReviewOpinionContext(null);
|
setReviewOpinionContext(null);
|
||||||
setLatestReviewOpinion("");
|
setLatestReviewOpinion("");
|
||||||
setLatestProcessHistory("");
|
|
||||||
setLastSearchValues(null);
|
setLastSearchValues(null);
|
||||||
setReviewOpinionOpen(false);
|
setReviewOpinionOpen(false);
|
||||||
setReturnDialogOpen(false);
|
setReturnDialogOpen(false);
|
||||||
@@ -170,14 +168,12 @@ const ExcretaTreatmentFacilityRvw = () => {
|
|||||||
statsCd: statsInfo.statsCd ?? "",
|
statsCd: statsInfo.statsCd ?? "",
|
||||||
});
|
});
|
||||||
setLatestReviewOpinion(statsInfo.splmntOpnnCn ?? "");
|
setLatestReviewOpinion(statsInfo.splmntOpnnCn ?? "");
|
||||||
setLatestProcessHistory(statsInfo.splmntRsltCn ?? "");
|
|
||||||
setRowData(toGridRows(convertedData as unknown as object[]));
|
setRowData(toGridRows(convertedData as unknown as object[]));
|
||||||
} else {
|
} else {
|
||||||
setRowData([]);
|
setRowData([]);
|
||||||
setStatsStatusInfo({});
|
setStatsStatusInfo({});
|
||||||
setReviewOpinionContext(null);
|
setReviewOpinionContext(null);
|
||||||
setLatestReviewOpinion("");
|
setLatestReviewOpinion("");
|
||||||
setLatestProcessHistory("");
|
|
||||||
alert(response.message || "데이터가 없습니다.");
|
alert(response.message || "데이터가 없습니다.");
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@@ -216,7 +212,6 @@ const ExcretaTreatmentFacilityRvw = () => {
|
|||||||
|
|
||||||
const row = detailRes.data?.[0];
|
const row = detailRes.data?.[0];
|
||||||
setLatestReviewOpinion(row?.splmntOpnnCn ?? "");
|
setLatestReviewOpinion(row?.splmntOpnnCn ?? "");
|
||||||
setLatestProcessHistory(row?.splmntRsltCn ?? "");
|
|
||||||
setReviewOpinionOpen(true);
|
setReviewOpinionOpen(true);
|
||||||
} catch {
|
} catch {
|
||||||
alert("검토의견 조회 중 오류가 발생했습니다.");
|
alert("검토의견 조회 중 오류가 발생했습니다.");
|
||||||
@@ -234,10 +229,8 @@ const ExcretaTreatmentFacilityRvw = () => {
|
|||||||
setStatsStatusInfo((prev) => ({
|
setStatsStatusInfo((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
}));
|
}));
|
||||||
setLatestReviewOpinion(param.splmntOpnnCn);
|
setLatestReviewOpinion(param.splmntOpnnCn);
|
||||||
setLatestProcessHistory(param.splmntRsltCn);
|
|
||||||
} catch {
|
} catch {
|
||||||
alert("저장 중 오류가 발생했습니다.");
|
alert("저장 중 오류가 발생했습니다.");
|
||||||
}
|
}
|
||||||
@@ -297,7 +290,6 @@ const ExcretaTreatmentFacilityRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ const PrivateSewageFacilityRvw = () => {
|
|||||||
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
||||||
|
|
||||||
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
||||||
const latestProcessHistory = activeStatsStatusInfo.splmntRsltCn ?? "";
|
|
||||||
|
|
||||||
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
||||||
if (lastSearchValues == null) return null;
|
if (lastSearchValues == null) return null;
|
||||||
@@ -284,7 +283,6 @@ const PrivateSewageFacilityRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: row?.splmntRsltCn ?? "",
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -307,7 +305,6 @@ const PrivateSewageFacilityRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -411,7 +408,6 @@ const PrivateSewageFacilityRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ const PublicSewageFacilityRvw = () => {
|
|||||||
const [reviewOpinionContext, setReviewOpinionContext] =
|
const [reviewOpinionContext, setReviewOpinionContext] =
|
||||||
useState<ReviewOpinionDialogContext | null>(null);
|
useState<ReviewOpinionDialogContext | null>(null);
|
||||||
const [latestReviewOpinion, setLatestReviewOpinion] = useState("");
|
const [latestReviewOpinion, setLatestReviewOpinion] = useState("");
|
||||||
const [latestProcessHistory, setLatestProcessHistory] = useState("");
|
|
||||||
const [lastSearchValues, setLastSearchValues] = useState<SearchFormValues | null>(null);
|
const [lastSearchValues, setLastSearchValues] = useState<SearchFormValues | null>(null);
|
||||||
|
|
||||||
const columnInfo = useMemo(() => {
|
const columnInfo = useMemo(() => {
|
||||||
@@ -100,7 +99,6 @@ const PublicSewageFacilityRvw = () => {
|
|||||||
setStatsStatusInfo({});
|
setStatsStatusInfo({});
|
||||||
setReviewOpinionContext(null);
|
setReviewOpinionContext(null);
|
||||||
setLatestReviewOpinion("");
|
setLatestReviewOpinion("");
|
||||||
setLatestProcessHistory("");
|
|
||||||
setLastSearchValues(null);
|
setLastSearchValues(null);
|
||||||
setSubmitDialogOpen(false);
|
setSubmitDialogOpen(false);
|
||||||
};
|
};
|
||||||
@@ -143,16 +141,12 @@ const PublicSewageFacilityRvw = () => {
|
|||||||
setLatestReviewOpinion(
|
setLatestReviewOpinion(
|
||||||
response.data.statsStatusInfo.splmntOpnnCn ?? "",
|
response.data.statsStatusInfo.splmntOpnnCn ?? "",
|
||||||
);
|
);
|
||||||
setLatestProcessHistory(
|
|
||||||
response.data.statsStatusInfo.splmntRsltCn ?? "",
|
|
||||||
);
|
|
||||||
setRowData(toGridRows(convertedData as unknown as object[]));
|
setRowData(toGridRows(convertedData as unknown as object[]));
|
||||||
} else {
|
} else {
|
||||||
setRowData([]);
|
setRowData([]);
|
||||||
setStatsStatusInfo({});
|
setStatsStatusInfo({});
|
||||||
setReviewOpinionContext(null);
|
setReviewOpinionContext(null);
|
||||||
setLatestReviewOpinion("");
|
setLatestReviewOpinion("");
|
||||||
setLatestProcessHistory("");
|
|
||||||
alert(response.message || "데이터가 없습니다.");
|
alert(response.message || "데이터가 없습니다.");
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -192,7 +186,6 @@ const PublicSewageFacilityRvw = () => {
|
|||||||
|
|
||||||
const row = detailRes.data?.[0];
|
const row = detailRes.data?.[0];
|
||||||
setLatestReviewOpinion(row?.splmntOpnnCn ?? "");
|
setLatestReviewOpinion(row?.splmntOpnnCn ?? "");
|
||||||
setLatestProcessHistory(row?.splmntRsltCn ?? "");
|
|
||||||
setReviewOpinionOpen(true);
|
setReviewOpinionOpen(true);
|
||||||
} catch {
|
} catch {
|
||||||
alert("검토의견 조회 중 오류가 발생했습니다.");
|
alert("검토의견 조회 중 오류가 발생했습니다.");
|
||||||
@@ -210,10 +203,8 @@ const PublicSewageFacilityRvw = () => {
|
|||||||
setStatsStatusInfo((prev) => ({
|
setStatsStatusInfo((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
}));
|
}));
|
||||||
setLatestReviewOpinion(param.splmntOpnnCn);
|
setLatestReviewOpinion(param.splmntOpnnCn);
|
||||||
setLatestProcessHistory(param.splmntRsltCn);
|
|
||||||
} catch {
|
} catch {
|
||||||
alert("저장 중 오류가 발생했습니다.");
|
alert("저장 중 오류가 발생했습니다.");
|
||||||
}
|
}
|
||||||
@@ -267,7 +258,6 @@ const PublicSewageFacilityRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ const PumpingStationRvw = () => {
|
|||||||
const [reviewOpinionContext, setReviewOpinionContext] =
|
const [reviewOpinionContext, setReviewOpinionContext] =
|
||||||
useState<ReviewOpinionDialogContext | null>(null);
|
useState<ReviewOpinionDialogContext | null>(null);
|
||||||
const [latestReviewOpinion, setLatestReviewOpinion] = useState("");
|
const [latestReviewOpinion, setLatestReviewOpinion] = useState("");
|
||||||
const [latestProcessHistory, setLatestProcessHistory] = useState("");
|
|
||||||
const [lastSearchValues, setLastSearchValues] = useState<SearchFormValues | null>(null);
|
const [lastSearchValues, setLastSearchValues] = useState<SearchFormValues | null>(null);
|
||||||
|
|
||||||
const columnInfo = useMemo(() => {
|
const columnInfo = useMemo(() => {
|
||||||
@@ -111,7 +110,6 @@ const PumpingStationRvw = () => {
|
|||||||
setStatsStatusInfo({});
|
setStatsStatusInfo({});
|
||||||
setReviewOpinionContext(null);
|
setReviewOpinionContext(null);
|
||||||
setLatestReviewOpinion("");
|
setLatestReviewOpinion("");
|
||||||
setLatestProcessHistory("");
|
|
||||||
setLastSearchValues(null);
|
setLastSearchValues(null);
|
||||||
setReviewOpinionOpen(false);
|
setReviewOpinionOpen(false);
|
||||||
setReturnDialogOpen(false);
|
setReturnDialogOpen(false);
|
||||||
@@ -157,14 +155,12 @@ const PumpingStationRvw = () => {
|
|||||||
statsCd: statsInfo.statsCd ?? "",
|
statsCd: statsInfo.statsCd ?? "",
|
||||||
});
|
});
|
||||||
setLatestReviewOpinion(statsInfo.splmntOpnnCn ?? "");
|
setLatestReviewOpinion(statsInfo.splmntOpnnCn ?? "");
|
||||||
setLatestProcessHistory(statsInfo.splmntRsltCn ?? "");
|
|
||||||
setRowData(toGridRows(convertedData));
|
setRowData(toGridRows(convertedData));
|
||||||
} else {
|
} else {
|
||||||
setRowData([]);
|
setRowData([]);
|
||||||
setStatsStatusInfo({});
|
setStatsStatusInfo({});
|
||||||
setReviewOpinionContext(null);
|
setReviewOpinionContext(null);
|
||||||
setLatestReviewOpinion("");
|
setLatestReviewOpinion("");
|
||||||
setLatestProcessHistory("");
|
|
||||||
alert(response.message || "데이터가 없습니다.");
|
alert(response.message || "데이터가 없습니다.");
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@@ -203,7 +199,6 @@ const PumpingStationRvw = () => {
|
|||||||
|
|
||||||
const row = detailRes.data?.[0];
|
const row = detailRes.data?.[0];
|
||||||
setLatestReviewOpinion(row?.splmntOpnnCn ?? "");
|
setLatestReviewOpinion(row?.splmntOpnnCn ?? "");
|
||||||
setLatestProcessHistory(row?.splmntRsltCn ?? "");
|
|
||||||
setReviewOpinionOpen(true);
|
setReviewOpinionOpen(true);
|
||||||
} catch {
|
} catch {
|
||||||
alert("검토의견 조회 중 오류가 발생했습니다.");
|
alert("검토의견 조회 중 오류가 발생했습니다.");
|
||||||
@@ -221,10 +216,8 @@ const PumpingStationRvw = () => {
|
|||||||
setStatsStatusInfo((prev) => ({
|
setStatsStatusInfo((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
}));
|
}));
|
||||||
setLatestReviewOpinion(param.splmntOpnnCn);
|
setLatestReviewOpinion(param.splmntOpnnCn);
|
||||||
setLatestProcessHistory(param.splmntRsltCn);
|
|
||||||
} catch {
|
} catch {
|
||||||
alert("저장 중 오류가 발생했습니다.");
|
alert("저장 중 오류가 발생했습니다.");
|
||||||
}
|
}
|
||||||
@@ -284,7 +277,6 @@ const PumpingStationRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ export interface ReviewOpinionDialogProps {
|
|||||||
context: ReviewOpinionDialogContext | null;
|
context: ReviewOpinionDialogContext | null;
|
||||||
/** 다이얼로그 열릴 때 검토의견 초기값 */
|
/** 다이얼로그 열릴 때 검토의견 초기값 */
|
||||||
initialReviewOpinion?: string;
|
initialReviewOpinion?: string;
|
||||||
/** 다이얼로그 열릴 때 처리내역 초기값 */
|
|
||||||
initialProcessHistory?: string;
|
|
||||||
/** 저장 시 생성된 param 전달 (API 호출 등) */
|
/** 저장 시 생성된 param 전달 (API 호출 등) */
|
||||||
onSave?: (param: ReviewOpinionSaveRequest) => void | Promise<void>;
|
onSave?: (param: ReviewOpinionSaveRequest) => void | Promise<void>;
|
||||||
}
|
}
|
||||||
@@ -41,18 +39,15 @@ export function ReviewOpinionDialog({
|
|||||||
onOpenChange,
|
onOpenChange,
|
||||||
context,
|
context,
|
||||||
initialReviewOpinion = "",
|
initialReviewOpinion = "",
|
||||||
initialProcessHistory = "",
|
|
||||||
onSave,
|
onSave,
|
||||||
}: ReviewOpinionDialogProps) {
|
}: ReviewOpinionDialogProps) {
|
||||||
const { setMessage: alert } = useAlertStore((state) => state);
|
const { setMessage: alert } = useAlertStore((state) => state);
|
||||||
const [reviewOpinion, setReviewOpinion] = useState("");
|
const [reviewOpinion, setReviewOpinion] = useState("");
|
||||||
const [processHistory, setProcessHistory] = useState("");
|
|
||||||
const [isSaving, setIsSaving] = useState(false);
|
const [isSaving, setIsSaving] = useState(false);
|
||||||
const [reviewOpinionError, setReviewOpinionError] = useState(false);
|
const [reviewOpinionError, setReviewOpinionError] = useState(false);
|
||||||
|
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
setReviewOpinion("");
|
setReviewOpinion("");
|
||||||
setProcessHistory("");
|
|
||||||
setReviewOpinionError(false);
|
setReviewOpinionError(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -64,8 +59,7 @@ export function ReviewOpinionDialog({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!open) return;
|
if (!open) return;
|
||||||
setReviewOpinion(initialReviewOpinion);
|
setReviewOpinion(initialReviewOpinion);
|
||||||
setProcessHistory(initialProcessHistory);
|
}, [open, initialReviewOpinion]);
|
||||||
}, [open, initialReviewOpinion, initialProcessHistory]);
|
|
||||||
|
|
||||||
const handleSave = async () => {
|
const handleSave = async () => {
|
||||||
if (reviewOpinion.trim() === "") {
|
if (reviewOpinion.trim() === "") {
|
||||||
@@ -96,7 +90,6 @@ export function ReviewOpinionDialog({
|
|||||||
sewerBzmnCd: context.sewerBzmnCd,
|
sewerBzmnCd: context.sewerBzmnCd,
|
||||||
statsCd: context.statsCd,
|
statsCd: context.statsCd,
|
||||||
splmntOpnnCn: reviewOpinion,
|
splmntOpnnCn: reviewOpinion,
|
||||||
splmntRsltCn: processHistory,
|
|
||||||
mdfrUuid: userInfo.userUnqId,
|
mdfrUuid: userInfo.userUnqId,
|
||||||
};
|
};
|
||||||
await onSave?.(param);
|
await onSave?.(param);
|
||||||
@@ -136,16 +129,6 @@ export function ReviewOpinionDialog({
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-2">
|
|
||||||
<Label className="text-label mb-2">처리내역</Label>
|
|
||||||
<Textarea
|
|
||||||
value={processHistory}
|
|
||||||
onChange={(e) => setProcessHistory(e.target.value)}
|
|
||||||
className="min-h-[10rem] resize-y !text-[1.3rem] !leading-6"
|
|
||||||
placeholder="처리내역을 입력하세요."
|
|
||||||
disabled={isSaving}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<DialogClose asChild>
|
<DialogClose asChild>
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ export interface ReviewSubmitDialogProps {
|
|||||||
context: ReviewerInfoRequest | null;
|
context: ReviewerInfoRequest | null;
|
||||||
onSubmitted?: () => void | Promise<void>;
|
onSubmitted?: () => void | Promise<void>;
|
||||||
/**
|
/**
|
||||||
* true면 검토의견·처리내역 UI를 숨기고
|
* true면 검토의견 UI를 숨기고
|
||||||
* submit body에 statsCd / splmntOpnnCn / splmntRsltCn을 넣지 않음
|
* submit body에 statsCd / splmntOpnnCn을 넣지 않음
|
||||||
*/
|
*/
|
||||||
hideOpinionFields?: boolean;
|
hideOpinionFields?: boolean;
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,6 @@ export function ReviewSubmitDialog({
|
|||||||
statsCd: context.statsCd,
|
statsCd: context.statsCd,
|
||||||
mdfrUuid: userInfo.userUnqId,
|
mdfrUuid: userInfo.userUnqId,
|
||||||
splmntOpnnCn: reviewerInfo?.splmntOpnnCn ?? "",
|
splmntOpnnCn: reviewerInfo?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: reviewerInfo?.splmntRsltCn ?? "",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await statisticsApi.submitReview(submitParam);
|
const response = await statisticsApi.submitReview(submitParam);
|
||||||
@@ -175,14 +174,6 @@ export function ReviewSubmitDialog({
|
|||||||
className="min-h-[10rem] p-2 resize-none !text-xl"
|
className="min-h-[10rem] p-2 resize-none !text-xl"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-2 flex flex-col gap-2">
|
|
||||||
<Label className="text-label">처리내역</Label>
|
|
||||||
<Textarea
|
|
||||||
value={reviewerInfo?.splmntRsltCn ?? "-"}
|
|
||||||
readOnly
|
|
||||||
className="min-h-[10rem] p-2 resize-none !text-xl"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ const SewageExcretaRelatedRvw = () => {
|
|||||||
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
||||||
|
|
||||||
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
||||||
const latestProcessHistory = activeStatsStatusInfo.splmntRsltCn ?? "";
|
|
||||||
|
|
||||||
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
||||||
if (lastSearchValues == null) return null;
|
if (lastSearchValues == null) return null;
|
||||||
@@ -289,7 +288,6 @@ const SewageExcretaRelatedRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: row?.splmntRsltCn ?? "",
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -312,7 +310,6 @@ const SewageExcretaRelatedRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -416,7 +413,6 @@ const SewageExcretaRelatedRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ const SewageExcretaSlurgeRvw = () => {
|
|||||||
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
||||||
|
|
||||||
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
||||||
const latestProcessHistory = activeStatsStatusInfo.splmntRsltCn ?? "";
|
|
||||||
|
|
||||||
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
||||||
if (lastSearchValues == null) return null;
|
if (lastSearchValues == null) return null;
|
||||||
@@ -290,7 +289,6 @@ const SewageExcretaSlurgeRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: row?.splmntRsltCn ?? "",
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -313,7 +311,6 @@ const SewageExcretaSlurgeRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -417,7 +414,6 @@ const SewageExcretaSlurgeRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ const SewagePipeMaintainRvw = () => {
|
|||||||
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
||||||
|
|
||||||
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
||||||
const latestProcessHistory = activeStatsStatusInfo.splmntRsltCn ?? "";
|
|
||||||
|
|
||||||
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
||||||
if (lastSearchValues == null) return null;
|
if (lastSearchValues == null) return null;
|
||||||
@@ -302,7 +301,6 @@ const SewagePipeMaintainRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: row?.splmntRsltCn ?? "",
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -325,7 +323,6 @@ const SewagePipeMaintainRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -429,7 +426,6 @@ const SewagePipeMaintainRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -181,7 +181,6 @@ const SewagePipeRvw = () => {
|
|||||||
};
|
};
|
||||||
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
||||||
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
||||||
const latestProcessHistory = activeStatsStatusInfo.splmntRsltCn ?? "";
|
|
||||||
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
||||||
if (lastSearchValues == null) return null;
|
if (lastSearchValues == null) return null;
|
||||||
|
|
||||||
@@ -362,7 +361,6 @@ const SewagePipeRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: row?.splmntRsltCn ?? "",
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -385,7 +383,6 @@ const SewagePipeRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -488,7 +485,6 @@ const SewagePipeRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -126,7 +126,6 @@ const SewageReservoirPumpRvw = () => {
|
|||||||
}, [activeStatsCd, lastSearchValues]);
|
}, [activeStatsCd, lastSearchValues]);
|
||||||
|
|
||||||
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
||||||
const latestProcessHistory = activeStatsStatusInfo.splmntRsltCn ?? "";
|
|
||||||
|
|
||||||
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
||||||
if (lastSearchValues == null) return null;
|
if (lastSearchValues == null) return null;
|
||||||
@@ -308,7 +307,6 @@ const SewageReservoirPumpRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: row?.splmntRsltCn ?? "",
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -331,7 +329,6 @@ const SewageReservoirPumpRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -435,7 +432,6 @@ const SewageReservoirPumpRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ const SewerageFinanceRvw = () => {
|
|||||||
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
||||||
|
|
||||||
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
||||||
const latestProcessHistory = activeStatsStatusInfo.splmntRsltCn ?? "";
|
|
||||||
|
|
||||||
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
||||||
if (lastSearchValues == null) return null;
|
if (lastSearchValues == null) return null;
|
||||||
@@ -287,7 +286,6 @@ const SewerageFinanceRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: row?.splmntRsltCn ?? "",
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -310,7 +308,6 @@ const SewerageFinanceRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -414,7 +411,6 @@ const SewerageFinanceRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ const SeweragePenetrationRateRvw = () => {
|
|||||||
const [reviewOpinionContext, setReviewOpinionContext] =
|
const [reviewOpinionContext, setReviewOpinionContext] =
|
||||||
useState<ReviewOpinionDialogContext | null>(null);
|
useState<ReviewOpinionDialogContext | null>(null);
|
||||||
const [latestReviewOpinion, setLatestReviewOpinion] = useState("");
|
const [latestReviewOpinion, setLatestReviewOpinion] = useState("");
|
||||||
const [latestProcessHistory, setLatestProcessHistory] = useState("");
|
|
||||||
const [lastSearchValues, setLastSearchValues] = useState<SearchFormValues | null>(null);
|
const [lastSearchValues, setLastSearchValues] = useState<SearchFormValues | null>(null);
|
||||||
|
|
||||||
const columnInfo = useMemo(() => {
|
const columnInfo = useMemo(() => {
|
||||||
@@ -100,7 +99,6 @@ const SeweragePenetrationRateRvw = () => {
|
|||||||
setStatsStatusInfo({});
|
setStatsStatusInfo({});
|
||||||
setReviewOpinionContext(null);
|
setReviewOpinionContext(null);
|
||||||
setLatestReviewOpinion("");
|
setLatestReviewOpinion("");
|
||||||
setLatestProcessHistory("");
|
|
||||||
setLastSearchValues(null);
|
setLastSearchValues(null);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -139,15 +137,11 @@ const SeweragePenetrationRateRvw = () => {
|
|||||||
setLatestReviewOpinion(
|
setLatestReviewOpinion(
|
||||||
response.data.statsStatusInfo.splmntOpnnCn ?? "",
|
response.data.statsStatusInfo.splmntOpnnCn ?? "",
|
||||||
);
|
);
|
||||||
setLatestProcessHistory(
|
|
||||||
response.data.statsStatusInfo.splmntRsltCn ?? "",
|
|
||||||
);
|
|
||||||
setRowData(toGridRows(convertedData));
|
setRowData(toGridRows(convertedData));
|
||||||
} else {
|
} else {
|
||||||
setRowData([]);
|
setRowData([]);
|
||||||
setReviewOpinionContext(null);
|
setReviewOpinionContext(null);
|
||||||
setLatestReviewOpinion("");
|
setLatestReviewOpinion("");
|
||||||
setLatestProcessHistory("");
|
|
||||||
alert(response.message || "데이터가 없습니다.");
|
alert(response.message || "데이터가 없습니다.");
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -187,7 +181,6 @@ const SeweragePenetrationRateRvw = () => {
|
|||||||
|
|
||||||
const row = detailRes.data?.[0];
|
const row = detailRes.data?.[0];
|
||||||
setLatestReviewOpinion(row?.splmntOpnnCn ?? "");
|
setLatestReviewOpinion(row?.splmntOpnnCn ?? "");
|
||||||
setLatestProcessHistory(row?.splmntRsltCn ?? "");
|
|
||||||
setReviewOpinionOpen(true);
|
setReviewOpinionOpen(true);
|
||||||
} catch {
|
} catch {
|
||||||
alert("검토의견 조회 중 오류가 발생했습니다.");
|
alert("검토의견 조회 중 오류가 발생했습니다.");
|
||||||
@@ -205,10 +198,8 @@ const SeweragePenetrationRateRvw = () => {
|
|||||||
setStatsStatusInfo((prev) => ({
|
setStatsStatusInfo((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
}));
|
}));
|
||||||
setLatestReviewOpinion(param.splmntOpnnCn);
|
setLatestReviewOpinion(param.splmntOpnnCn);
|
||||||
setLatestProcessHistory(param.splmntRsltCn);
|
|
||||||
} catch {
|
} catch {
|
||||||
alert("저장 중 오류가 발생했습니다.");
|
alert("저장 중 오류가 발생했습니다.");
|
||||||
}
|
}
|
||||||
@@ -264,7 +255,6 @@ const SeweragePenetrationRateRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ const SewerageServiceLevelRvw = () => {
|
|||||||
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
||||||
|
|
||||||
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
||||||
const latestProcessHistory = activeStatsStatusInfo.splmntRsltCn ?? "";
|
|
||||||
|
|
||||||
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
||||||
if (lastSearchValues == null) return null;
|
if (lastSearchValues == null) return null;
|
||||||
@@ -288,7 +287,6 @@ const SewerageServiceLevelRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: row?.splmntRsltCn ?? "",
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -311,7 +309,6 @@ const SewerageServiceLevelRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -415,7 +412,6 @@ const SewerageServiceLevelRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
@@ -39,22 +39,14 @@ import { toGridRows } from "@/components/util/grid/gridFunction";
|
|||||||
|
|
||||||
type ReviewHistoryRow = ReviewHistoryResponse["data"][number];
|
type ReviewHistoryRow = ReviewHistoryResponse["data"][number];
|
||||||
|
|
||||||
const checkPrvnStatusCd = (code: string) => {
|
|
||||||
return (code === '0' || code === '1') ? '미작성' : (code === '2' ? '제출완료' : (code === '3' ? '승인완료' : '반려'));
|
|
||||||
};
|
|
||||||
|
|
||||||
const checkSubmitStatusCd = (code: string) => {
|
|
||||||
return code === '0' ? '미작성' : (code === '1' ? '작성중' : (code === '2' ? '제출완료' : (code === '3' ? '승인완료' : '보완요청')));
|
|
||||||
};
|
|
||||||
|
|
||||||
const isStatsInputStatusRowApprovable = (row: Record<string, string | number>) =>
|
const isStatsInputStatusRowApprovable = (row: Record<string, string | number>) =>
|
||||||
String(row.submitStatusCd ?? "") === "3" && (String(row.prvnStatusCd ?? "") === "2" || String(row.prvnStatusCd ?? "") === "3");
|
String(row.lclgvSbmsnSttsCd ?? "") === "3" &&
|
||||||
|
(String(row.mctpvPicSbmsnSttsCd ?? "") === "2" ||
|
||||||
|
String(row.mctpvPicSbmsnSttsCd ?? "") === "3");
|
||||||
|
|
||||||
const mapSewerageListToGridRows = (rawList: StatsInputStatusReviewItem[]) =>
|
const mapSewerageListToGridRows = (rawList: StatsInputStatusReviewItem[]) =>
|
||||||
rawList.map((r) => ({
|
rawList.map((r) => ({
|
||||||
...r,
|
...r,
|
||||||
prvnStatusNm: checkPrvnStatusCd(r.prvnStatusCd || "0"),
|
|
||||||
submitStatusNm: checkSubmitStatusCd(r.submitStatusCd || "0"),
|
|
||||||
reviewHistory: "검토이력",
|
reviewHistory: "검토이력",
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -97,7 +89,7 @@ const StatsInputStatusRvw = () => {
|
|||||||
const reviewHistoryColumns = useMemo(() => {
|
const reviewHistoryColumns = useMemo(() => {
|
||||||
const col = createColumnHelper<ReviewHistoryRow>();
|
const col = createColumnHelper<ReviewHistoryRow>();
|
||||||
return [
|
return [
|
||||||
col.accessor("logDt", {
|
col.accessor("regDt", {
|
||||||
header: "등록일",
|
header: "등록일",
|
||||||
cell: (info) => info.getValue(),
|
cell: (info) => info.getValue(),
|
||||||
}),
|
}),
|
||||||
@@ -238,23 +230,23 @@ const StatsInputStatusRvw = () => {
|
|||||||
const allSubmitStatusApproved = useMemo(
|
const allSubmitStatusApproved = useMemo(
|
||||||
() =>
|
() =>
|
||||||
rowData.length > 0 &&
|
rowData.length > 0 &&
|
||||||
rowData.every((row) => String(row.submitStatusCd ?? "") === "3"),
|
rowData.every((row) => String(row.lclgvSbmsnSttsCd ?? "") === "3"),
|
||||||
[rowData],
|
[rowData],
|
||||||
);
|
);
|
||||||
|
|
||||||
/** 진행상태(prvn) 코드가 모두 승인완료(3) */
|
/** 진행상태(광역) 코드가 모두 승인완료(3) */
|
||||||
const allPrvnStatusApproved = useMemo(
|
const allPrvnStatusApproved = useMemo(
|
||||||
() =>
|
() =>
|
||||||
rowData.length > 0 &&
|
rowData.length > 0 &&
|
||||||
rowData.every((row) => String(row.prvnStatusCd ?? "") === "3"),
|
rowData.every((row) => String(row.mctpvPicSbmsnSttsCd ?? "") === "3"),
|
||||||
[rowData],
|
[rowData],
|
||||||
);
|
);
|
||||||
|
|
||||||
/** 진행상태(prvn) 코드가 모두 제출완료(2) */
|
/** 진행상태(광역) 코드가 모두 제출완료(2) */
|
||||||
const allPrvnStatusSubmitted = useMemo(
|
const allPrvnStatusSubmitted = useMemo(
|
||||||
() =>
|
() =>
|
||||||
rowData.length > 0 &&
|
rowData.length > 0 &&
|
||||||
rowData.every((row) => String(row.prvnStatusCd ?? "") === "2"),
|
rowData.every((row) => String(row.mctpvPicSbmsnSttsCd ?? "") === "2"),
|
||||||
[rowData],
|
[rowData],
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -392,8 +384,8 @@ const StatsInputStatusRvw = () => {
|
|||||||
setRowData={setRowData}
|
setRowData={setRowData}
|
||||||
onDataCellClick={handleReviewHistoryCellClick}
|
onDataCellClick={handleReviewHistoryCellClick}
|
||||||
cellStyleCallback={({ row, fieldName }) => {
|
cellStyleCallback={({ row, fieldName }) => {
|
||||||
if (fieldName === "submitStatusNm") {
|
if (fieldName === "lclgvSbmsnSttsNm") {
|
||||||
const statusCd = String(row.submitStatusCd ?? "");
|
const statusCd = String(row.lclgvSbmsnSttsCd ?? "");
|
||||||
|
|
||||||
if (statusCd === "0" || statusCd === "1") {
|
if (statusCd === "0" || statusCd === "1") {
|
||||||
return "rg-cell-stats-status-pending";
|
return "rg-cell-stats-status-pending";
|
||||||
@@ -408,8 +400,8 @@ const StatsInputStatusRvw = () => {
|
|||||||
return "rg-cell-stats-status-rejected";
|
return "rg-cell-stats-status-rejected";
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
} else if (fieldName === "prvnStatusNm") {
|
} else if (fieldName === "mctpvPicSbmsnSttsNm") {
|
||||||
const statusCd = String(row.prvnStatusCd ?? "");
|
const statusCd = String(row.mctpvPicSbmsnSttsCd ?? "");
|
||||||
|
|
||||||
if (statusCd === "0" || statusCd === "1") {
|
if (statusCd === "0" || statusCd === "1") {
|
||||||
return "rg-cell-stats-status-pending";
|
return "rg-cell-stats-status-pending";
|
||||||
|
|||||||
@@ -108,7 +108,6 @@ const WaterReuseRvw = () => {
|
|||||||
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
}, [activeStatsStatusInfo.statsCd, lastSearchValues]);
|
||||||
|
|
||||||
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
const latestReviewOpinion = activeStatsStatusInfo.splmntOpnnCn ?? "";
|
||||||
const latestProcessHistory = activeStatsStatusInfo.splmntRsltCn ?? "";
|
|
||||||
|
|
||||||
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
const submitDialogContext = useMemo<ReviewerInfoRequest | null>(() => {
|
||||||
if (lastSearchValues == null) return null;
|
if (lastSearchValues == null) return null;
|
||||||
@@ -291,7 +290,6 @@ const WaterReuseRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
splmntOpnnCn: row?.splmntOpnnCn ?? "",
|
||||||
splmntRsltCn: row?.splmntRsltCn ?? "",
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -314,7 +312,6 @@ const WaterReuseRvw = () => {
|
|||||||
next.set(activeTab, {
|
next.set(activeTab, {
|
||||||
...(next.get(activeTab) ?? {}),
|
...(next.get(activeTab) ?? {}),
|
||||||
splmntOpnnCn: param.splmntOpnnCn,
|
splmntOpnnCn: param.splmntOpnnCn,
|
||||||
splmntRsltCn: param.splmntRsltCn,
|
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
@@ -418,7 +415,6 @@ const WaterReuseRvw = () => {
|
|||||||
onOpenChange={setReviewOpinionOpen}
|
onOpenChange={setReviewOpinionOpen}
|
||||||
context={reviewOpinionContext}
|
context={reviewOpinionContext}
|
||||||
initialReviewOpinion={latestReviewOpinion}
|
initialReviewOpinion={latestReviewOpinion}
|
||||||
initialProcessHistory={latestProcessHistory}
|
|
||||||
onSave={saveReviewOpinion}
|
onSave={saveReviewOpinion}
|
||||||
/>
|
/>
|
||||||
<ReviewSubmitDialog
|
<ReviewSubmitDialog
|
||||||
|
|||||||
+7
-4
@@ -554,17 +554,20 @@ const DetailComponent = ({
|
|||||||
const userInfo = await getUserInfo();
|
const userInfo = await getUserInfo();
|
||||||
let response;
|
let response;
|
||||||
|
|
||||||
|
const vrfcSn = detailInfo?.commonInfo.vrfcSn;
|
||||||
|
if (vrfcSn == null) {
|
||||||
|
alert("검증 일련번호가 없습니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!hasPersistedDetails) {
|
if (!hasPersistedDetails) {
|
||||||
response =
|
response =
|
||||||
await generalverificationApiService.RegistVrfcDetail({
|
await generalverificationApiService.RegistVrfcDetail(vrfcSn, {
|
||||||
vrfcSn: detailInfo?.commonInfo.vrfcSn ?? null,
|
|
||||||
detailList: rows,
|
detailList: rows,
|
||||||
rgtrUuid: userInfo.userUnqId,
|
rgtrUuid: userInfo.userUnqId,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
response =
|
response =
|
||||||
await generalverificationApiService.UpdateVrfcDetail({
|
await generalverificationApiService.UpdateVrfcDetail(vrfcSn, {
|
||||||
vrfcSn: detailInfo?.commonInfo.vrfcSn ?? null,
|
|
||||||
detailList: rows,
|
detailList: rows,
|
||||||
mdfrUuid: userInfo.userUnqId,
|
mdfrUuid: userInfo.userUnqId,
|
||||||
});
|
});
|
||||||
|
|||||||
+14
-7
@@ -146,9 +146,15 @@ const RegistDialog = memo(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUpdateVrfcMaster = async (data: GeneralVerificationMasterSubmitFormData) => {
|
const handleUpdateVrfcMaster = async (
|
||||||
|
updateVrfcSn: number,
|
||||||
|
body: UpdateVrfcMasterRequest,
|
||||||
|
) => {
|
||||||
try {
|
try {
|
||||||
const response = await generalverificationApiService.UpdateVrfcMaster(data as UpdateVrfcMasterRequest);
|
const response = await generalverificationApiService.UpdateVrfcMaster(
|
||||||
|
updateVrfcSn,
|
||||||
|
body,
|
||||||
|
);
|
||||||
|
|
||||||
if (response.status === 'success') {
|
if (response.status === 'success') {
|
||||||
alert('수정되었습니다.');
|
alert('수정되었습니다.');
|
||||||
@@ -258,8 +264,11 @@ const RegistDialog = memo(
|
|||||||
if (await confirm(confirmMessage)) {
|
if (await confirm(confirmMessage)) {
|
||||||
const userInfo = await getUserInfo();
|
const userInfo = await getUserInfo();
|
||||||
if (isVrfcSn) {
|
if (isVrfcSn) {
|
||||||
const updateData = {
|
if (data.vrfcSn == null) {
|
||||||
vrfcSn: data.vrfcSn,
|
alert('수정 대상이 없습니다.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await handleUpdateVrfcMaster(data.vrfcSn, {
|
||||||
vrfcNm: data.vrfcNm,
|
vrfcNm: data.vrfcNm,
|
||||||
vrfcClsfCd: data.vrfcClsfCd,
|
vrfcClsfCd: data.vrfcClsfCd,
|
||||||
dcptDgt: data.dcptDgt,
|
dcptDgt: data.dcptDgt,
|
||||||
@@ -267,10 +276,8 @@ const RegistDialog = memo(
|
|||||||
...(data.dcptDgt === 0
|
...(data.dcptDgt === 0
|
||||||
? {}
|
? {}
|
||||||
: { dcptPrcsMthCd: data.dcptPrcsMthCd }),
|
: { dcptPrcsMthCd: data.dcptPrcsMthCd }),
|
||||||
trgtStatsCd: data.trgtStatsCd,
|
|
||||||
mdfrUuid: userInfo.userUnqId,
|
mdfrUuid: userInfo.userUnqId,
|
||||||
};
|
});
|
||||||
await handleUpdateVrfcMaster(updateData);
|
|
||||||
} else {
|
} else {
|
||||||
const registData = {
|
const registData = {
|
||||||
vrfcNm: data.vrfcNm,
|
vrfcNm: data.vrfcNm,
|
||||||
|
|||||||
@@ -481,6 +481,11 @@ export type DataGridProps = {
|
|||||||
headerHeight?: number;
|
headerHeight?: number;
|
||||||
/** RealGrid `displayOptions.fitStyle` (기본 EVEN). 컬럼별 width 유지 시 NONE */
|
/** RealGrid `displayOptions.fitStyle` (기본 EVEN). 컬럼별 width 유지 시 NONE */
|
||||||
fitStyle?: GridFitStyle;
|
fitStyle?: GridFitStyle;
|
||||||
|
/**
|
||||||
|
* true면 붙여넣기·편집으로 행을 추가하지 않음.
|
||||||
|
* 검증 결과처럼 조회 행 수가 고정된 그리드에서 사용.
|
||||||
|
*/
|
||||||
|
preventRowAppend?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TabDataGridProps = {
|
export type TabDataGridProps = {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export const doList = [
|
|||||||
"4600000000",
|
"4600000000",
|
||||||
"4700000000",
|
"4700000000",
|
||||||
"4800000000",
|
"4800000000",
|
||||||
|
"5000000000",
|
||||||
];
|
];
|
||||||
|
|
||||||
export const needBsnmFrgnrPoplSmSidoList = [
|
export const needBsnmFrgnrPoplSmSidoList = [
|
||||||
|
|||||||
-4
@@ -27,7 +27,6 @@ export const ExcretaSlurgeProcessingStatusInpColumn = {
|
|||||||
'rcycQnt',
|
'rcycQnt',
|
||||||
'olandLfvlm',
|
'olandLfvlm',
|
||||||
'incnrQnt',
|
'incnrQnt',
|
||||||
'oceanInputQnt',
|
|
||||||
'fuelQnt',
|
'fuelQnt',
|
||||||
'etcQnt',
|
'etcQnt',
|
||||||
'unprcsQnt'
|
'unprcsQnt'
|
||||||
@@ -51,7 +50,6 @@ export const ExcretaSlurgeProcessingStatusInpColumn = {
|
|||||||
'rcycQnt',
|
'rcycQnt',
|
||||||
'olandLfvlm',
|
'olandLfvlm',
|
||||||
'incnrQnt',
|
'incnrQnt',
|
||||||
'oceanInputQnt',
|
|
||||||
'fuelQnt',
|
'fuelQnt',
|
||||||
'etcQnt',
|
'etcQnt',
|
||||||
],
|
],
|
||||||
@@ -61,7 +59,6 @@ export const ExcretaSlurgeProcessingStatusInpColumn = {
|
|||||||
{ name: 'rcycQnt', fieldName: 'rcycQnt', header: { text: '재활용' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
{ name: 'rcycQnt', fieldName: 'rcycQnt', header: { text: '재활용' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||||
{ name: 'olandLfvlm', fieldName: 'olandLfvlm', header: { text: '육상매립' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
{ name: 'olandLfvlm', fieldName: 'olandLfvlm', header: { text: '육상매립' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||||
{ name: 'incnrQnt', fieldName: 'incnrQnt', header: { text: '소각' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
{ name: 'incnrQnt', fieldName: 'incnrQnt', header: { text: '소각' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||||
{ name: 'oceanInputQnt', fieldName: 'oceanInputQnt', header: { text: '해양투기' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
|
||||||
{ name: 'fuelQnt', fieldName: 'fuelQnt', header: { text: '연료화' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
{ name: 'fuelQnt', fieldName: 'fuelQnt', header: { text: '연료화' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||||
{ name: 'etcQnt', fieldName: 'etcQnt', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
{ name: 'etcQnt', fieldName: 'etcQnt', header: { text: '기타' }, footer: footerDecimal1, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||||
|
|
||||||
@@ -100,7 +97,6 @@ export const ExcretaSlurgeProcessingStatusInpColumn = {
|
|||||||
'rcycQnt',
|
'rcycQnt',
|
||||||
'olandLfvlm',
|
'olandLfvlm',
|
||||||
'incnrQnt',
|
'incnrQnt',
|
||||||
'oceanInputQnt',
|
|
||||||
'fuelQnt',
|
'fuelQnt',
|
||||||
'etcQnt'
|
'etcQnt'
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -49,6 +49,43 @@ export const ManholeStatusInpColumn = {
|
|||||||
styleName: "rg-cell-readonly",
|
styleName: "rg-cell-readonly",
|
||||||
footer: { text: "합계" },
|
footer: { text: "합계" },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "wholMnhlCntSum",
|
||||||
|
fieldName: "wholMnhlCntSum",
|
||||||
|
header: { text: "맨홀총계" },
|
||||||
|
footer: footerInt,
|
||||||
|
editable: false,
|
||||||
|
valueType: ValueType.NUMBER,
|
||||||
|
dataFormat: "#,##0",
|
||||||
|
styleName: "rg-cell-readonly",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "frlvlMnhlCntSum",
|
||||||
|
fieldName: "frlvlMnhlCntSum",
|
||||||
|
header: { text: "주철계" },
|
||||||
|
footer: footerInt,
|
||||||
|
editable: false,
|
||||||
|
valueType: ValueType.NUMBER,
|
||||||
|
dataFormat: "#,##0",
|
||||||
|
styleName: "rg-cell-readonly",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "thlvlMnhlCntSum",
|
||||||
|
fieldName: "thlvlMnhlCntSum",
|
||||||
|
header: { text: "콘크리트계" },
|
||||||
|
footer: footerInt,
|
||||||
|
editable: false,
|
||||||
|
valueType: ValueType.NUMBER,
|
||||||
|
dataFormat: "#,##0",
|
||||||
|
styleName: "rg-cell-readonly",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "picNm",
|
||||||
|
fieldName: "picNm",
|
||||||
|
header: { text: "담당자명" },
|
||||||
|
editable: false,
|
||||||
|
styleName: "rg-cell-readonly",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
...intCol("wholMnhlCnt", "계", false),
|
...intCol("wholMnhlCnt", "계", false),
|
||||||
computed: {
|
computed: {
|
||||||
@@ -88,6 +125,12 @@ export const ManholeStatusInpColumn = {
|
|||||||
},
|
},
|
||||||
"admdstNm",
|
"admdstNm",
|
||||||
"emphsMngSeNm",
|
"emphsMngSeNm",
|
||||||
|
{
|
||||||
|
name: "adminRefGroup",
|
||||||
|
hideChildHeaders: false,
|
||||||
|
header: { text: "행정참고자료" },
|
||||||
|
items: ["wholMnhlCntSum", "frlvlMnhlCntSum", "thlvlMnhlCntSum", "picNm"],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "mtrlGroup",
|
name: "mtrlGroup",
|
||||||
hideChildHeaders: false,
|
hideChildHeaders: false,
|
||||||
|
|||||||
+2
@@ -75,6 +75,8 @@ export const PublicSewageTreatWaterReuseInpColumn = {
|
|||||||
name: 'lglYn',
|
name: 'lglYn',
|
||||||
fieldName: 'lglYn',
|
fieldName: 'lglYn',
|
||||||
header: { text: '법적의무대상(대상/미대상)' },
|
header: { text: '법적의무대상(대상/미대상)' },
|
||||||
|
editable: false,
|
||||||
|
styleName: 'rg-cell-readonly'
|
||||||
},
|
},
|
||||||
PUBLIC_SEWAGE_TREAT_WATER_REUSE_LGL_YN_VALUES,
|
PUBLIC_SEWAGE_TREAT_WATER_REUSE_LGL_YN_VALUES,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ export const getGeneralVerificationColumns = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: "vrfcClsfNm",
|
accessorKey: "vrfcClsfNm",
|
||||||
header: "검증분류",
|
header: "검증 분류",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: "useYn",
|
accessorKey: "useYn",
|
||||||
header: "사용여부",
|
header: "사용 여부",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: "regDt",
|
accessorKey: "regDt",
|
||||||
|
|||||||
@@ -346,7 +346,6 @@ const rawSludgeList = [
|
|||||||
decimal1Col("rcycQnt", "재활용"),
|
decimal1Col("rcycQnt", "재활용"),
|
||||||
decimal1Col("olandLfvlm", "육상매립"),
|
decimal1Col("olandLfvlm", "육상매립"),
|
||||||
decimal1Col("incnrQnt", "소각"),
|
decimal1Col("incnrQnt", "소각"),
|
||||||
decimal1Col("oceanInputQnt", "해양투기"),
|
|
||||||
decimal1Col("fuelQnt", "연료화"),
|
decimal1Col("fuelQnt", "연료화"),
|
||||||
decimal1Col("etcQnt", "기타"),
|
decimal1Col("etcQnt", "기타"),
|
||||||
decimal1Col("unprcsQnt", "미처분량\n(이월량)(C)"),
|
decimal1Col("unprcsQnt", "미처분량\n(이월량)(C)"),
|
||||||
@@ -366,7 +365,6 @@ const rawSludgeList = [
|
|||||||
"rcycQnt",
|
"rcycQnt",
|
||||||
"olandLfvlm",
|
"olandLfvlm",
|
||||||
"incnrQnt",
|
"incnrQnt",
|
||||||
"oceanInputQnt",
|
|
||||||
"fuelQnt",
|
"fuelQnt",
|
||||||
"etcQnt",
|
"etcQnt",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -491,6 +491,10 @@ const rawList = [
|
|||||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, mergeCells: true, sortdisable: true },
|
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, mergeCells: true, sortdisable: true },
|
||||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, mergeCells: true, sortdisable: true },
|
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, mergeCells: true, sortdisable: true },
|
||||||
{ name: 'emphsMngSeNm', fieldName: 'emphsMngSeNm', header: { text: '집중강우\n중점관리\n구역구분' }, mergeCells: true },
|
{ name: 'emphsMngSeNm', fieldName: 'emphsMngSeNm', header: { text: '집중강우\n중점관리\n구역구분' }, mergeCells: true },
|
||||||
|
{ name: 'wholMnhlCntSum', fieldName: 'wholMnhlCntSum', header: { text: '맨홀총계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||||
|
{ name: 'frlvlMnhlCntSum', fieldName: 'frlvlMnhlCntSum', header: { text: '주철계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||||
|
{ name: 'thlvlMnhlCntSum', fieldName: 'thlvlMnhlCntSum', header: { text: '콘크리트계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||||
|
{ name: 'picNm', fieldName: 'picNm', header: { text: '담당자명' } },
|
||||||
{
|
{
|
||||||
name: 'displayYear',
|
name: 'displayYear',
|
||||||
fieldName: 'displayYear',
|
fieldName: 'displayYear',
|
||||||
@@ -544,6 +548,12 @@ const rawList = [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
'emphsMngSeNm',
|
'emphsMngSeNm',
|
||||||
|
{
|
||||||
|
name: 'adminRefGroup',
|
||||||
|
hideChildHeaders: false,
|
||||||
|
header: { text: '행정참고자료' },
|
||||||
|
items: ['wholMnhlCntSum', 'frlvlMnhlCntSum', 'thlvlMnhlCntSum', 'picNm'],
|
||||||
|
},
|
||||||
'displayYear',
|
'displayYear',
|
||||||
{
|
{
|
||||||
name: 'mtrlGroup',
|
name: 'mtrlGroup',
|
||||||
|
|||||||
@@ -17,12 +17,12 @@ const StatsInputStatusInfoColumnRaw = {
|
|||||||
styleName: 'rg-cell-outline-action-btn',
|
styleName: 'rg-cell-outline-action-btn',
|
||||||
},
|
},
|
||||||
|
|
||||||
{ name: 'chargerNm', fieldName: 'chargerNm', header: { text: '제출자' } },
|
{ name: 'lclgvPicNm', fieldName: 'lclgvPicNm', header: { text: '제출자' } },
|
||||||
{ name: 'chargerCttpc', fieldName: 'chargerCttpc', header: { text: '연락처' } },
|
{ name: 'lclgvPicTelnoCn', fieldName: 'lclgvPicTelnoCn', header: { text: '연락처' } },
|
||||||
{ name: 'submitStatusNm', fieldName: 'submitStatusNm', header: { text: '지자체진행상태' } },
|
{ name: 'lclgvSbmsnSttsNm', fieldName: 'lclgvSbmsnSttsNm', header: { text: '지자체진행상태' } },
|
||||||
{ name: 'submitStatusCd', fieldName: 'submitStatusCd', header: { text: '지자체진행상태코드' }, visible: false },
|
{ name: 'lclgvSbmsnSttsCd', fieldName: 'lclgvSbmsnSttsCd', header: { text: '지자체진행상태코드' }, visible: false },
|
||||||
{ name: 'prvnStatusNm', fieldName: 'prvnStatusNm', header: { text: '진행상태' } },
|
{ name: 'mctpvPicSbmsnSttsNm', fieldName: 'mctpvPicSbmsnSttsNm', header: { text: '진행상태' } },
|
||||||
{ name: 'prvnStatusCd', fieldName: 'prvnStatusCd', header: { text: '진행상태코드' }, visible: false },
|
{ name: 'mctpvPicSbmsnSttsCd', fieldName: 'mctpvPicSbmsnSttsCd', header: { text: '진행상태코드' }, visible: false },
|
||||||
],
|
],
|
||||||
|
|
||||||
columnLayout: [
|
columnLayout: [
|
||||||
@@ -30,14 +30,14 @@ const StatsInputStatusInfoColumnRaw = {
|
|||||||
'sggNm',
|
'sggNm',
|
||||||
'tabNm',
|
'tabNm',
|
||||||
'reviewHistory',
|
'reviewHistory',
|
||||||
'chargerNm',
|
'lclgvPicNm',
|
||||||
'chargerCttpc',
|
'lclgvPicTelnoCn',
|
||||||
'submitStatusNm',
|
'lclgvSbmsnSttsNm',
|
||||||
'prvnStatusNm',
|
'mctpvPicSbmsnSttsNm',
|
||||||
'statsCd',
|
'statsCd',
|
||||||
'sewerBzmnCd',
|
'sewerBzmnCd',
|
||||||
'submitStatusCd',
|
'lclgvSbmsnSttsCd',
|
||||||
'prvnStatusCd'
|
'mctpvPicSbmsnSttsCd',
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -710,6 +710,10 @@ const rawSewagePipeTotList = [
|
|||||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||||
{ name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false },
|
{ name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false },
|
||||||
{ name: "emphsMngSeNm", fieldName: "emphsMngSeNm", header: { text: "집중강우\n중점관리\n구역구분" }, editable: false },
|
{ name: "emphsMngSeNm", fieldName: "emphsMngSeNm", header: { text: "집중강우\n중점관리\n구역구분" }, editable: false },
|
||||||
|
{ name: "wholMnhlCntSum", fieldName: "wholMnhlCntSum", header: { text: "맨홀총계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||||
|
{ name: "frlvlMnhlCntSum", fieldName: "frlvlMnhlCntSum", header: { text: "주철계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||||
|
{ name: "thlvlMnhlCntSum", fieldName: "thlvlMnhlCntSum", header: { text: "콘크리트계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||||
|
{ name: "picNm", fieldName: "picNm", header: { text: "담당자명" }, editable: false },
|
||||||
{ name: "wholMnhlCnt", fieldName: "wholMnhlCnt", header: { text: "계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
{ name: "wholMnhlCnt", fieldName: "wholMnhlCnt", header: { text: "계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||||
{ name: "frlvlMnhlCnt", fieldName: "frlvlMnhlCnt", header: { text: "주철" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
{ name: "frlvlMnhlCnt", fieldName: "frlvlMnhlCnt", header: { text: "주철" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||||
{ name: "sclvlMnhlCnt", fieldName: "sclvlMnhlCnt", header: { text: "주철(조화)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
{ name: "sclvlMnhlCnt", fieldName: "sclvlMnhlCnt", header: { text: "주철(조화)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||||
@@ -720,6 +724,11 @@ const rawSewagePipeTotList = [
|
|||||||
columnLayout: [
|
columnLayout: [
|
||||||
{ name: "addrGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] },
|
{ name: "addrGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] },
|
||||||
"emphsMngSeNm",
|
"emphsMngSeNm",
|
||||||
|
{
|
||||||
|
name: "adminRefGroup",
|
||||||
|
header: { text: "행정참고자료" },
|
||||||
|
items: ["wholMnhlCntSum", "frlvlMnhlCntSum", "thlvlMnhlCntSum", "picNm"],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "mtrlGroup",
|
name: "mtrlGroup",
|
||||||
header: { text: "맨홀뚜껑 재질(개)" },
|
header: { text: "맨홀뚜껑 재질(개)" },
|
||||||
|
|||||||
+1
-2
@@ -16,7 +16,6 @@ export const HumanWasteSludgeTab4ColumnConfig = {
|
|||||||
{ name: "rcycQnt", fieldName: "rcycQnt", header: { text: "재활용" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
{ name: "rcycQnt", fieldName: "rcycQnt", header: { text: "재활용" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||||
{ name: "olandLfvlm", fieldName: "olandLfvlm", header: { text: "육상매립" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
{ name: "olandLfvlm", fieldName: "olandLfvlm", header: { text: "육상매립" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||||
{ name: "incnrQnt", fieldName: "incnrQnt", header: { text: "소각" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
{ name: "incnrQnt", fieldName: "incnrQnt", header: { text: "소각" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||||
{ name: "oceanInputQnt", fieldName: "oceanInputQnt", header: { text: "해양투기" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
|
||||||
{ name: "fuelQnt", fieldName: "fuelQnt", header: { text: "연료화" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
{ name: "fuelQnt", fieldName: "fuelQnt", header: { text: "연료화" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||||
{ name: "etcQnt", fieldName: "etcQnt", header: { text: "기타" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
{ name: "etcQnt", fieldName: "etcQnt", header: { text: "기타" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||||
{ name: "unprcsQnt", fieldName: "unprcsQnt", header: { text: "미처분량\n(이월량)(C)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
{ name: "unprcsQnt", fieldName: "unprcsQnt", header: { text: "미처분량\n(이월량)(C)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false },
|
||||||
@@ -29,7 +28,7 @@ export const HumanWasteSludgeTab4ColumnConfig = {
|
|||||||
{
|
{
|
||||||
name: "dspsGroup",
|
name: "dspsGroup",
|
||||||
header: { text: "처분량" },
|
header: { text: "처분량" },
|
||||||
items: ["wholDspsQnt", "rcycQnt", "olandLfvlm", "incnrQnt", "oceanInputQnt", "fuelQnt", "etcQnt"]
|
items: ["wholDspsQnt", "rcycQnt", "olandLfvlm", "incnrQnt", "fuelQnt", "etcQnt"]
|
||||||
},
|
},
|
||||||
"unprcsQnt",
|
"unprcsQnt",
|
||||||
"swtrmtFcltNm"
|
"swtrmtFcltNm"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { GridView } from "realgrid";
|
import { type GridView, ValueType } from "realgrid";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
ColumnConfig,
|
ColumnConfig,
|
||||||
@@ -124,6 +124,82 @@ export function getNonEditableColumnFieldNames(
|
|||||||
return fieldNames;
|
return fieldNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ExcelImportCell = {
|
||||||
|
t?: string;
|
||||||
|
v?: unknown;
|
||||||
|
w?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 엑셀 셀 → 그리드 값. NUMBER 컬럼만 숫자화하고, 코드(01)는 문자열로 유지 */
|
||||||
|
export function parseExcelImportCellValue(
|
||||||
|
cell: ExcelImportCell | undefined,
|
||||||
|
valueType?: ColumnConfig["valueType"],
|
||||||
|
): string | number {
|
||||||
|
if (!cell || cell.v === undefined || cell.v === null || cell.v === "") {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (valueType === ValueType.NUMBER) {
|
||||||
|
if (typeof cell.v === "number" && !Number.isNaN(cell.v)) {
|
||||||
|
return cell.v;
|
||||||
|
}
|
||||||
|
const stringValue = String(cell.v);
|
||||||
|
const numericValue = Number(stringValue.replace(/,/g, ""));
|
||||||
|
if (!Number.isNaN(numericValue) && stringValue.trim() !== "") {
|
||||||
|
return numericValue;
|
||||||
|
}
|
||||||
|
return stringValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatted = typeof cell.w === "string" ? cell.w.trim() : "";
|
||||||
|
if (/^0\d+$/.test(formatted)) {
|
||||||
|
return formatted;
|
||||||
|
}
|
||||||
|
return String(cell.v);
|
||||||
|
}
|
||||||
|
|
||||||
|
function collectZeroPaddedCodeWidths(
|
||||||
|
rows: Record<string, string | number>[],
|
||||||
|
): Map<string, number> {
|
||||||
|
const widthByField = new Map<string, number>();
|
||||||
|
for (const row of rows) {
|
||||||
|
for (const [field, value] of Object.entries(row)) {
|
||||||
|
const s = String(value ?? "").trim();
|
||||||
|
if (!/^0\d+$/.test(s)) continue;
|
||||||
|
widthByField.set(field, Math.max(widthByField.get(field) ?? 0, s.length));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return widthByField;
|
||||||
|
}
|
||||||
|
|
||||||
|
function restoreImportedCodeLeadingZeros(
|
||||||
|
importedRow: Record<string, string | number>,
|
||||||
|
existingRow: Record<string, string | number> | undefined,
|
||||||
|
codeWidthByField: Map<string, number>,
|
||||||
|
): Record<string, string | number> {
|
||||||
|
const next: Record<string, string | number> = { ...importedRow };
|
||||||
|
for (const [field, value] of Object.entries(next)) {
|
||||||
|
if (value === "" || value == null) continue;
|
||||||
|
if (typeof value === "number" && !Number.isInteger(value)) continue;
|
||||||
|
const importedStr = String(value).trim();
|
||||||
|
if (!/^\d+$/.test(importedStr)) continue;
|
||||||
|
|
||||||
|
const existingStr =
|
||||||
|
existingRow != null ? String(existingRow[field] ?? "").trim() : "";
|
||||||
|
let width = codeWidthByField.get(field);
|
||||||
|
if (!width && /^0\d+$/.test(existingStr)) {
|
||||||
|
width = existingStr.length;
|
||||||
|
}
|
||||||
|
if (!width && field.endsWith("Cd") && importedStr.length <= 2) {
|
||||||
|
width = 2;
|
||||||
|
}
|
||||||
|
if (width && importedStr.length < width) {
|
||||||
|
next[field] = importedStr.padStart(width, "0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
|
||||||
/** 엑셀 import 결과를 기존 행과 병합 — preserveFieldNames는 기존 그리드 값 유지 */
|
/** 엑셀 import 결과를 기존 행과 병합 — preserveFieldNames는 기존 그리드 값 유지 */
|
||||||
export function mergeExcelImportWithExistingRows(
|
export function mergeExcelImportWithExistingRows(
|
||||||
existingRows: Record<string, string | number>[],
|
existingRows: Record<string, string | number>[],
|
||||||
@@ -134,14 +210,20 @@ export function mergeExcelImportWithExistingRows(
|
|||||||
options?.preserveFieldNames && options.preserveFieldNames.length > 0
|
options?.preserveFieldNames && options.preserveFieldNames.length > 0
|
||||||
? new Set(options.preserveFieldNames)
|
? new Set(options.preserveFieldNames)
|
||||||
: null;
|
: null;
|
||||||
|
const codeWidthByField = collectZeroPaddedCodeWidths(existingRows);
|
||||||
|
|
||||||
return importedRows.map((importedRow, index) => {
|
return importedRows.map((importedRow, index) => {
|
||||||
const existingRow = existingRows[index];
|
const existingRow = existingRows[index];
|
||||||
if (!existingRow) return { ...importedRow };
|
const normalizedImported = restoreImportedCodeLeadingZeros(
|
||||||
|
importedRow,
|
||||||
|
existingRow,
|
||||||
|
codeWidthByField,
|
||||||
|
);
|
||||||
|
if (!existingRow) return normalizedImported;
|
||||||
|
|
||||||
const merged: Record<string, string | number> = {
|
const merged: Record<string, string | number> = {
|
||||||
...existingRow,
|
...existingRow,
|
||||||
...importedRow,
|
...normalizedImported,
|
||||||
};
|
};
|
||||||
if (preserveSet) {
|
if (preserveSet) {
|
||||||
for (const fieldName of preserveSet) {
|
for (const fieldName of preserveSet) {
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||||
|
import type {
|
||||||
|
ImrRequest,
|
||||||
|
ImrResponse,
|
||||||
|
rollbackStatusRequest,
|
||||||
|
} from "@/entities/statistics/model/statistics-interface";
|
||||||
|
|
||||||
|
/** 제출 직후 IMR 요청이 실패하면 검증 이전 상태로 롤백 */
|
||||||
|
export async function callImrServiceWithRollbackOnFailure(
|
||||||
|
imrParam: ImrRequest,
|
||||||
|
rollbackParam: rollbackStatusRequest,
|
||||||
|
): Promise<ImrResponse> {
|
||||||
|
try {
|
||||||
|
return await statisticsApi.callImrService(imrParam);
|
||||||
|
} catch (error) {
|
||||||
|
try {
|
||||||
|
await statisticsApi.rollbackStatus(rollbackParam);
|
||||||
|
} catch {
|
||||||
|
// 롤백 실패는 IMR 실패를 가리지 않음
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import type { Sgg } from "@/entities/statistics/model/statistics-interface";
|
||||||
|
|
||||||
|
/** 조회 시군구가 전체(ALL)면 시도의 전체 옵션, 특정 구면 해당 구만 */
|
||||||
|
export function filterSggOptionsBySearchGugun(
|
||||||
|
sggOptions: readonly Sgg[],
|
||||||
|
gugun: string | null | undefined,
|
||||||
|
): Sgg[] {
|
||||||
|
const selected = gugun?.trim();
|
||||||
|
if (!selected || selected === "ALL") {
|
||||||
|
return [...sggOptions];
|
||||||
|
}
|
||||||
|
return sggOptions.filter((s) => s.gugun === selected);
|
||||||
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
import type { StatisticsInputCommonInfoBase } from "@/entities/statistics/model/statistics-interface";
|
import type { StatisticsInputCommonInfoBase } from "@/entities/statistics/model/statistics-interface";
|
||||||
|
|
||||||
import type { VerificationResultLikeMap } from "./verification-result-display";
|
import {
|
||||||
|
normalizeVerificationResultMap,
|
||||||
|
type VerificationResultLikeMap,
|
||||||
|
} from "./verification-result-display";
|
||||||
|
|
||||||
export function isVerificationFailedFromCommonInfo(
|
export function isVerificationFailedFromCommonInfo(
|
||||||
commonInfo: Pick<StatisticsInputCommonInfoBase, "isVerificationFailed"> | null | undefined,
|
commonInfo: Pick<StatisticsInputCommonInfoBase, "isVerificationFailed"> | null | undefined,
|
||||||
@@ -28,6 +31,9 @@ export function patchFooterVerificationByTab(
|
|||||||
| undefined,
|
| undefined,
|
||||||
): Map<string, VerificationResultLikeMap | null> {
|
): Map<string, VerificationResultLikeMap | null> {
|
||||||
const next = new Map(prev);
|
const next = new Map(prev);
|
||||||
next.set(tabKey, commonInfo?.verificationResult ?? null);
|
next.set(
|
||||||
|
tabKey,
|
||||||
|
normalizeVerificationResultMap(commonInfo?.verificationResult) ?? null,
|
||||||
|
);
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,49 @@ export type VerificationResultLikeMap = Record<
|
|||||||
VerificationResultLikeItem[]
|
VerificationResultLikeItem[]
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
/** 입력 조회 verificationResult의 기준값/입력값이 null이면 "-" */
|
||||||
|
export function displayVerificationCn(
|
||||||
|
value: string | null | undefined,
|
||||||
|
): string {
|
||||||
|
if (value == null || String(value).trim() === "") return "-";
|
||||||
|
return String(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function normalizeVerificationResultItem<T extends VerificationResultLikeItem>(
|
||||||
|
item: T,
|
||||||
|
): T {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
nowCn: displayVerificationCn(item.nowCn ?? item.nowVlCn),
|
||||||
|
cmprCn: displayVerificationCn(item.cmprCn ?? item.compVlCn),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function normalizeVerificationResultMap<T extends VerificationResultLikeMap>(
|
||||||
|
result: T | null | undefined,
|
||||||
|
): T | undefined {
|
||||||
|
if (!result || typeof result !== "object") return undefined;
|
||||||
|
const next = {} as T;
|
||||||
|
for (const [key, items] of Object.entries(result)) {
|
||||||
|
(next as VerificationResultLikeMap)[key] = Array.isArray(items)
|
||||||
|
? items.map((item) => normalizeVerificationResultItem(item))
|
||||||
|
: [];
|
||||||
|
}
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 조회 행/객체에 붙은 verificationResult의 cmprCn·nowCn null을 "-"로 바꿈 */
|
||||||
|
export function withNormalizedVerificationResult<T extends object>(item: T): T {
|
||||||
|
if (!("verificationResult" in item) || item.verificationResult == null) {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
const verificationResult = normalizeVerificationResultMap(
|
||||||
|
item.verificationResult as VerificationResultLikeMap,
|
||||||
|
);
|
||||||
|
if (!verificationResult) return item;
|
||||||
|
return { ...item, verificationResult };
|
||||||
|
}
|
||||||
|
|
||||||
/** 검증 오류 배열 → RealGrid styleName */
|
/** 검증 오류 배열 → RealGrid styleName */
|
||||||
export function getVerificationStyleName(
|
export function getVerificationStyleName(
|
||||||
errors: VerificationResultLikeItem[] | null | undefined,
|
errors: VerificationResultLikeItem[] | null | undefined,
|
||||||
@@ -37,8 +80,8 @@ export function formatVerificationTooltip(
|
|||||||
: e.vrfcCd === "NV"
|
: e.vrfcCd === "NV"
|
||||||
? "일반검증 - "
|
? "일반검증 - "
|
||||||
: "모집단 검증 - ";
|
: "모집단 검증 - ";
|
||||||
const comp = e.cmprCn ?? e.compVlCn ?? "";
|
const comp = displayVerificationCn(e.cmprCn ?? e.compVlCn);
|
||||||
const now = e.nowCn ?? e.nowVlCn ?? "";
|
const now = displayVerificationCn(e.nowCn ?? e.nowVlCn);
|
||||||
return `${prefix}${e.rsnExpln}\n(검증 기준값: ${comp} / 현재 입력값: ${now})`;
|
return `${prefix}${e.rsnExpln}\n(검증 기준값: ${comp} / 현재 입력값: ${now})`;
|
||||||
})
|
})
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
|
|||||||
@@ -56,10 +56,11 @@ export class GeneralverificationApiService implements GeneralverificationService
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async UpdateVrfcMaster(
|
public async UpdateVrfcMaster(
|
||||||
|
vrfcSn: number,
|
||||||
param: UpdateVrfcMasterRequest,
|
param: UpdateVrfcMasterRequest,
|
||||||
): Promise<UpdateVrfcMasterResponse> {
|
): Promise<UpdateVrfcMasterResponse> {
|
||||||
const response = await stClient.put<UpdateVrfcMasterResponse>(
|
const response = await stClient.put<UpdateVrfcMasterResponse>(
|
||||||
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/masters/${param.vrfcSn}`,
|
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/masters/${vrfcSn}`,
|
||||||
param,
|
param,
|
||||||
);
|
);
|
||||||
return response.data;
|
return response.data;
|
||||||
@@ -127,20 +128,22 @@ export class GeneralverificationApiService implements GeneralverificationService
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async RegistVrfcDetail(
|
public async RegistVrfcDetail(
|
||||||
|
vrfcSn: number,
|
||||||
param: VerifyDetailRegistRequest,
|
param: VerifyDetailRegistRequest,
|
||||||
): Promise<RegistVrfcMasterResponse> {
|
): Promise<RegistVrfcMasterResponse> {
|
||||||
const response = await stClient.post<RegistVrfcMasterResponse>(
|
const response = await stClient.post<RegistVrfcMasterResponse>(
|
||||||
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/${param.vrfcSn}/details`,
|
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/${vrfcSn}/details`,
|
||||||
param,
|
param,
|
||||||
);
|
);
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async UpdateVrfcDetail(
|
public async UpdateVrfcDetail(
|
||||||
|
vrfcSn: number,
|
||||||
param: VerifyDetailUpdateRequest,
|
param: VerifyDetailUpdateRequest,
|
||||||
): Promise<RegistVrfcMasterResponse> {
|
): Promise<RegistVrfcMasterResponse> {
|
||||||
const response = await stClient.put<RegistVrfcMasterResponse>(
|
const response = await stClient.put<RegistVrfcMasterResponse>(
|
||||||
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/${param.vrfcSn}/details`,
|
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/${vrfcSn}/details`,
|
||||||
param,
|
param,
|
||||||
);
|
);
|
||||||
return response.data;
|
return response.data;
|
||||||
|
|||||||
+14
@@ -22,6 +22,8 @@ import type {
|
|||||||
SewageSlurgeProcessingFacStatusSubmitRequest,
|
SewageSlurgeProcessingFacStatusSubmitRequest,
|
||||||
SewageSlurgeProcessingFacStatusSubmitResponse,
|
SewageSlurgeProcessingFacStatusSubmitResponse,
|
||||||
SlurgeProcessingFacStatusApiResponse,
|
SlurgeProcessingFacStatusApiResponse,
|
||||||
|
SlurgeProcessingFacStatusOperationDataUpdateRequest,
|
||||||
|
SlurgeProcessingFacStatusOperationDataUpdateResponse,
|
||||||
SlurgeProcessingFacStatusSaveRequest,
|
SlurgeProcessingFacStatusSaveRequest,
|
||||||
SlurgeProcessingFacStatusSaveResponse,
|
SlurgeProcessingFacStatusSaveResponse,
|
||||||
SlurgeProcessingFacStatusSubmitRequest,
|
SlurgeProcessingFacStatusSubmitRequest,
|
||||||
@@ -68,6 +70,18 @@ export class StatisticsInputSewageExcretaSlurgeApiService implements StatisticsI
|
|||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 찌꺼기(슬러지)처리시설현황 운영 데이터 업데이트 — ST00110001 */
|
||||||
|
public async updateSlurgeProcessingFacStatusOperationData(
|
||||||
|
request: SlurgeProcessingFacStatusOperationDataUpdateRequest,
|
||||||
|
): Promise<SlurgeProcessingFacStatusOperationDataUpdateResponse> {
|
||||||
|
const response =
|
||||||
|
await stClient.put<SlurgeProcessingFacStatusOperationDataUpdateResponse>(
|
||||||
|
`${BASE}/slurge-processing-fac-status/operation-data/update`,
|
||||||
|
request,
|
||||||
|
);
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
|
|
||||||
/** 소화조 운영현황 조회 — ST00110002 */
|
/** 소화조 운영현황 조회 — ST00110002 */
|
||||||
public async getDigestorOperatingStatusList(
|
public async getDigestorOperatingStatusList(
|
||||||
params: SewageExcretaSlurgeRequestParams,
|
params: SewageExcretaSlurgeRequestParams,
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import {
|
|||||||
type ImrStatusResponse,
|
type ImrStatusResponse,
|
||||||
type ReviewerInfoRequest,
|
type ReviewerInfoRequest,
|
||||||
type ReviewerInfoResponse,
|
type ReviewerInfoResponse,
|
||||||
|
type rollbackStatusRequest,
|
||||||
|
type rollbackStatusResponse,
|
||||||
type ReviewInputSaveRequest,
|
type ReviewInputSaveRequest,
|
||||||
type ReviewOpinionSaveRequest,
|
type ReviewOpinionSaveRequest,
|
||||||
type ReviewOpinionSaveResponse,
|
type ReviewOpinionSaveResponse,
|
||||||
@@ -156,6 +158,17 @@ export class StatisticsApiService implements StatisticsService {
|
|||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 입력 - 검증 이전 상태로 롤백
|
||||||
|
public async rollbackStatus(
|
||||||
|
param: rollbackStatusRequest,
|
||||||
|
): Promise<rollbackStatusResponse> {
|
||||||
|
const response = await stClient.put<rollbackStatusResponse>(
|
||||||
|
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/rollback-status`,
|
||||||
|
param,
|
||||||
|
);
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
|
|
||||||
public async callImrService(param: ImrRequest): Promise<ImrResponse> {
|
public async callImrService(param: ImrRequest): Promise<ImrResponse> {
|
||||||
const response = await client.post<ImrResponse>(
|
const response = await client.post<ImrResponse>(
|
||||||
`${ENDPOINT.STATVERIFY_SERVICE.IMR}`,
|
`${ENDPOINT.STATVERIFY_SERVICE.IMR}`,
|
||||||
|
|||||||
@@ -1,100 +1,100 @@
|
|||||||
export interface DashboardSearchParams {
|
export interface DashboardSearchParams {
|
||||||
statsYr: string;
|
statsYr: string;
|
||||||
dtlInstCd: string;
|
dtlInstCd: string;
|
||||||
enoCd?: string;
|
enoCd?: string;
|
||||||
laeSeCd?: string;
|
laeSeCd?: string;
|
||||||
sewerBzmnCd?: string;
|
sewerBzmnCd?: string;
|
||||||
sido?: string;
|
sido?: string;
|
||||||
sggNm?: string;
|
sggNm?: string;
|
||||||
unSubmitOnly?: boolean;
|
unSubmitOnly?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DashboardApiResponse<T> {
|
export interface DashboardApiResponse<T> {
|
||||||
status: string;
|
status: string;
|
||||||
message: string;
|
message: string;
|
||||||
data: T;
|
data: T;
|
||||||
code: string;
|
code: string;
|
||||||
httpStatus: number;
|
httpStatus: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VrfcReportResponse {
|
export interface VrfcReportResponse {
|
||||||
typeCounts: Record<string, number>;
|
typeCounts: Record<string, number>;
|
||||||
list: VrfcReportSelect[];
|
list: VrfcReportSelect[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VrfcReportSelect {
|
export interface VrfcReportSelect {
|
||||||
vrfcCd: string;
|
vrfcCd: string;
|
||||||
statsNm: string;
|
statsNm: string;
|
||||||
rsnExpln: string;
|
rsnExpln: string;
|
||||||
admdstNm: string;
|
admdstNm: string;
|
||||||
nowVlCn: string;
|
nowCn: string;
|
||||||
compVlCn: string;
|
cmprCn: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VrfcErrCountResponse {
|
export interface VrfcErrCountResponse {
|
||||||
statsYr: string;
|
statsYr: string;
|
||||||
vrfcErrCount: number;
|
vrfcErrCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UnSubmitCountResponse {
|
export interface UnSubmitCountResponse {
|
||||||
statsYr: string;
|
statsYr: string;
|
||||||
statusList: UnSubmitStatsResponse[];
|
statusList: UnSubmitStatsResponse[];
|
||||||
submittedCount: number;
|
submittedCount: number;
|
||||||
totalCount: number;
|
totalCount: number;
|
||||||
unSubmittedCount: number;
|
unSubmittedCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UnSubmitStatsResponse {
|
export interface UnSubmitStatsResponse {
|
||||||
sbmsnYn: string;
|
sbmsnYn: string;
|
||||||
sidoSggNm: string;
|
sidoSggNm: string;
|
||||||
statsCd: string;
|
statsCd: string;
|
||||||
statsNm: string;
|
statsNm: string;
|
||||||
statusCd: string;
|
statusCd: string;
|
||||||
statusNm: string;
|
statusNm: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StatsSubmissionResponse {
|
export interface StatsSubmissionResponse {
|
||||||
totalCount: number;
|
totalCount: number;
|
||||||
submittedCount: number;
|
submittedCount: number;
|
||||||
submissionRate: number;
|
submissionRate: number;
|
||||||
statusLevel: string;
|
statusLevel: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EcptReqCountResponse {
|
export interface EcptReqCountResponse {
|
||||||
statsYr: string;
|
statsYr: string;
|
||||||
ecptReqCount: number;
|
ecptReqCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ThreeStageStatusResponse {
|
export interface ThreeStageStatusResponse {
|
||||||
statsYr: string;
|
statsYr: string;
|
||||||
lclgvSbmsnSttsCd: string;
|
lclgvSbmsnSttsCd: string;
|
||||||
lclgvSbmsnSttsNm: string;
|
lclgvSbmsnSttsNm: string;
|
||||||
lclgvRejected: boolean;
|
lclgvRejected: boolean;
|
||||||
mctpvPicSbmsnSttsCd: string;
|
mctpvPicSbmsnSttsCd: string;
|
||||||
mctpvPicSbmsnSttsNm: string;
|
mctpvPicSbmsnSttsNm: string;
|
||||||
mctpvRejected: boolean;
|
mctpvRejected: boolean;
|
||||||
pbcpSbmsnSttsCd: string;
|
pbcpSbmsnSttsCd: string;
|
||||||
pbcpSbmsnSttsNm: string;
|
pbcpSbmsnSttsNm: string;
|
||||||
pbcpRejected: boolean;
|
pbcpRejected: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DashboardService {
|
export interface DashboardService {
|
||||||
getVrfcReport(
|
getVrfcReport(
|
||||||
params: DashboardSearchParams,
|
params: DashboardSearchParams,
|
||||||
): Promise<DashboardApiResponse<VrfcReportResponse>>;
|
): Promise<DashboardApiResponse<VrfcReportResponse>>;
|
||||||
getVrfcErrCount(
|
getVrfcErrCount(
|
||||||
params: DashboardSearchParams,
|
params: DashboardSearchParams,
|
||||||
): Promise<DashboardApiResponse<VrfcErrCountResponse>>;
|
): Promise<DashboardApiResponse<VrfcErrCountResponse>>;
|
||||||
getUnSubmitCount(
|
getUnSubmitCount(
|
||||||
params: DashboardSearchParams,
|
params: DashboardSearchParams,
|
||||||
): Promise<DashboardApiResponse<UnSubmitCountResponse>>;
|
): Promise<DashboardApiResponse<UnSubmitCountResponse>>;
|
||||||
getStatsSubmissionRate(
|
getStatsSubmissionRate(
|
||||||
params: DashboardSearchParams,
|
params: DashboardSearchParams,
|
||||||
): Promise<DashboardApiResponse<StatsSubmissionResponse>>;
|
): Promise<DashboardApiResponse<StatsSubmissionResponse>>;
|
||||||
getEcptReqCount(
|
getEcptReqCount(
|
||||||
params: DashboardSearchParams,
|
params: DashboardSearchParams,
|
||||||
): Promise<DashboardApiResponse<EcptReqCountResponse>>;
|
): Promise<DashboardApiResponse<EcptReqCountResponse>>;
|
||||||
getThreeStageStatus(
|
getThreeStageStatus(
|
||||||
params: DashboardSearchParams,
|
params: DashboardSearchParams,
|
||||||
): Promise<DashboardApiResponse<ThreeStageStatusResponse>>;
|
): Promise<DashboardApiResponse<ThreeStageStatusResponse>>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ export interface CheckVerificationNameResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface UpdateVrfcMasterRequest {
|
export interface UpdateVrfcMasterRequest {
|
||||||
vrfcSn?: number | null;
|
|
||||||
vrfcNm?: string | null;
|
vrfcNm?: string | null;
|
||||||
vrfcClsfCd?: string | null;
|
vrfcClsfCd?: string | null;
|
||||||
dcptDgt?: number | null;
|
dcptDgt?: number | null;
|
||||||
@@ -184,13 +183,11 @@ export interface VerifyDetailRegistData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface VerifyDetailRegistRequest {
|
export interface VerifyDetailRegistRequest {
|
||||||
vrfcSn: number | null;
|
|
||||||
detailList: VerifyDetailRegistData[];
|
detailList: VerifyDetailRegistData[];
|
||||||
rgtrUuid: string;
|
rgtrUuid: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VerifyDetailUpdateRequest {
|
export interface VerifyDetailUpdateRequest {
|
||||||
vrfcSn: number | null;
|
|
||||||
detailList: VerifyDetailRegistData[];
|
detailList: VerifyDetailRegistData[];
|
||||||
mdfrUuid: string;
|
mdfrUuid: string;
|
||||||
}
|
}
|
||||||
@@ -297,6 +294,7 @@ export interface GeneralverificationService {
|
|||||||
param: CheckVerificationNameRequest,
|
param: CheckVerificationNameRequest,
|
||||||
): Promise<CheckVerificationNameResponse>;
|
): Promise<CheckVerificationNameResponse>;
|
||||||
UpdateVrfcMaster(
|
UpdateVrfcMaster(
|
||||||
|
vrfcSn: number,
|
||||||
param: UpdateVrfcMasterRequest,
|
param: UpdateVrfcMasterRequest,
|
||||||
): Promise<UpdateVrfcMasterResponse>;
|
): Promise<UpdateVrfcMasterResponse>;
|
||||||
RegistVrfcMaster(
|
RegistVrfcMaster(
|
||||||
@@ -315,9 +313,11 @@ export interface GeneralverificationService {
|
|||||||
param: string,
|
param: string,
|
||||||
): Promise<VerifyColumnListResponse>;
|
): Promise<VerifyColumnListResponse>;
|
||||||
RegistVrfcDetail(
|
RegistVrfcDetail(
|
||||||
|
vrfcSn: number,
|
||||||
param: VerifyDetailRegistRequest,
|
param: VerifyDetailRegistRequest,
|
||||||
): Promise<RegistVrfcMasterResponse>;
|
): Promise<RegistVrfcMasterResponse>;
|
||||||
UpdateVrfcDetail(
|
UpdateVrfcDetail(
|
||||||
|
vrfcSn: number,
|
||||||
param: VerifyDetailUpdateRequest,
|
param: VerifyDetailUpdateRequest,
|
||||||
): Promise<RegistVrfcMasterResponse>;
|
): Promise<RegistVrfcMasterResponse>;
|
||||||
CopyVrfcData(
|
CopyVrfcData(
|
||||||
|
|||||||
+22
-4
@@ -117,7 +117,7 @@ export type SlurgeProcessingFacStatusApiResponse =
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ST00110001 저장 — `saveList` / `deleteList` 항목.
|
* ST00110001 저장 — `saveList` 항목.
|
||||||
* `sggNm`·계산필드·검증결과는 저장 요청에서 제외.
|
* `sggNm`·계산필드·검증결과는 저장 요청에서 제외.
|
||||||
*/
|
*/
|
||||||
export type SlurgeProcessingFacStatusSaveItem = Omit<
|
export type SlurgeProcessingFacStatusSaveItem = Omit<
|
||||||
@@ -167,7 +167,6 @@ export interface SlurgeProcessingFacStatusSaveRequest {
|
|||||||
superAdmin?: string;
|
superAdmin?: string;
|
||||||
noApplicable?: boolean;
|
noApplicable?: boolean;
|
||||||
saveList: SlurgeProcessingFacStatusSaveItem[];
|
saveList: SlurgeProcessingFacStatusSaveItem[];
|
||||||
deleteList: SlurgeProcessingFacStatusSaveItem[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SlurgeProcessingFacStatusSaveResponse = ApiResponse<unknown> & {
|
export type SlurgeProcessingFacStatusSaveResponse = ApiResponse<unknown> & {
|
||||||
@@ -194,7 +193,6 @@ export interface SlurgeProcessingFacStatusSubmitRequest {
|
|||||||
superAdmin?: string;
|
superAdmin?: string;
|
||||||
noApplicable?: boolean;
|
noApplicable?: boolean;
|
||||||
submitList: SlurgeProcessingFacStatusSubmitItem[];
|
submitList: SlurgeProcessingFacStatusSubmitItem[];
|
||||||
deleteList: SlurgeProcessingFacStatusSubmitItem[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SlurgeProcessingFacStatusSubmitResponse {
|
export interface SlurgeProcessingFacStatusSubmitResponse {
|
||||||
@@ -207,6 +205,23 @@ export interface SlurgeProcessingFacStatusSubmitResponse {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ST00110001 운영 데이터 업데이트 요청 */
|
||||||
|
export interface SlurgeProcessingFacStatusOperationDataUpdateRequest {
|
||||||
|
statsYr: string;
|
||||||
|
ctpvNm: string;
|
||||||
|
/** 도에서만 사용, 특·광역시는 빈 값 */
|
||||||
|
sggNm?: string;
|
||||||
|
sewerBzmnCd: string;
|
||||||
|
userUuid: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ST00110001 운영 데이터 업데이트 응답 */
|
||||||
|
export interface SlurgeProcessingFacStatusOperationDataUpdateResponse {
|
||||||
|
status: string;
|
||||||
|
message?: string;
|
||||||
|
data?: unknown | null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ST00110002 조회 `data.digestorOperatingStatusList[]` 한 행.
|
* ST00110002 조회 `data.digestorOperatingStatusList[]` 한 행.
|
||||||
* `DigestorOperatingStatusInpColumn` fieldName과 동일 (`ctpvNm` 그리드 값은 `commonInfo.ctpvNm` 시도명).
|
* `DigestorOperatingStatusInpColumn` fieldName과 동일 (`ctpvNm` 그리드 값은 `commonInfo.ctpvNm` 시도명).
|
||||||
@@ -439,7 +454,6 @@ export interface ExcretaSlurgeProcessingStatusItem {
|
|||||||
rcycQnt: number;
|
rcycQnt: number;
|
||||||
olandLfvlm: number;
|
olandLfvlm: number;
|
||||||
incnrQnt: number;
|
incnrQnt: number;
|
||||||
oceanInputQnt: number;
|
|
||||||
fuelQnt: number;
|
fuelQnt: number;
|
||||||
etcQnt: number;
|
etcQnt: number;
|
||||||
unprcsQnt: number;
|
unprcsQnt: number;
|
||||||
@@ -564,6 +578,10 @@ export interface StatisticsInputSewageExcretaSlurgeService {
|
|||||||
submitSlurgeProcessingFacStatus(
|
submitSlurgeProcessingFacStatus(
|
||||||
request: SlurgeProcessingFacStatusSubmitRequest,
|
request: SlurgeProcessingFacStatusSubmitRequest,
|
||||||
): Promise<SlurgeProcessingFacStatusSubmitResponse>;
|
): Promise<SlurgeProcessingFacStatusSubmitResponse>;
|
||||||
|
/** 찌꺼기(슬러지)처리시설현황 운영 데이터 업데이트 — ST00110001 */
|
||||||
|
updateSlurgeProcessingFacStatusOperationData(
|
||||||
|
request: SlurgeProcessingFacStatusOperationDataUpdateRequest,
|
||||||
|
): Promise<SlurgeProcessingFacStatusOperationDataUpdateResponse>;
|
||||||
/** 소화조 운영현황 조회 — ST00110002 */
|
/** 소화조 운영현황 조회 — ST00110002 */
|
||||||
getDigestorOperatingStatusList(
|
getDigestorOperatingStatusList(
|
||||||
params: SewageExcretaSlurgeRequestParams,
|
params: SewageExcretaSlurgeRequestParams,
|
||||||
|
|||||||
-2
@@ -98,7 +98,6 @@ export type SewagePipeMaintainDredgingResponse = ApiResponse<SewagePipeMaintainD
|
|||||||
/** ST00030001 하수관로 유지관리 > 개보수 저장·제출 API 행 */
|
/** ST00030001 하수관로 유지관리 > 개보수 저장·제출 API 행 */
|
||||||
export interface SewagePipeMaintainRepairSaveItem {
|
export interface SewagePipeMaintainRepairSaveItem {
|
||||||
admdstCd: string | null;
|
admdstCd: string | null;
|
||||||
sggNm: string | null;
|
|
||||||
admdstNm: string | null;
|
admdstNm: string | null;
|
||||||
dfrpWholPrlg: number;
|
dfrpWholPrlg: number;
|
||||||
cbsysDfrpPrlg: number;
|
cbsysDfrpPrlg: number;
|
||||||
@@ -167,7 +166,6 @@ export interface SewagePipeMaintainRepairSubmitResponse {
|
|||||||
/** ST00030002 하수관로 유지관리 > 관로준설 저장·제출 API 행 */
|
/** ST00030002 하수관로 유지관리 > 관로준설 저장·제출 API 행 */
|
||||||
export interface SewagePipeMaintainDredgingSaveItem {
|
export interface SewagePipeMaintainDredgingSaveItem {
|
||||||
admdstCd: string | null;
|
admdstCd: string | null;
|
||||||
sggNm: string | null;
|
|
||||||
admdstNm: string | null;
|
admdstNm: string | null;
|
||||||
wholFcltPrlg: number;
|
wholFcltPrlg: number;
|
||||||
wholSwagePpl: number;
|
wholSwagePpl: number;
|
||||||
|
|||||||
-4
@@ -92,7 +92,6 @@ export interface SewerageFinanceSettleRequestParams {
|
|||||||
*/
|
*/
|
||||||
export interface SewerageFinanceSettleSaveItem {
|
export interface SewerageFinanceSettleSaveItem {
|
||||||
admdstCd: string | null;
|
admdstCd: string | null;
|
||||||
sggNm: string | null;
|
|
||||||
admdstNm: string | null;
|
admdstNm: string | null;
|
||||||
soaGovSprtAmt: number;
|
soaGovSprtAmt: number;
|
||||||
mctpvLcexpAmt: number;
|
mctpvLcexpAmt: number;
|
||||||
@@ -255,7 +254,6 @@ export interface SewerageChargeRequestParams {
|
|||||||
*/
|
*/
|
||||||
export interface SewerageChargeSaveItem {
|
export interface SewerageChargeSaveItem {
|
||||||
admdstCd: string | null;
|
admdstCd: string | null;
|
||||||
sggNm: string | null;
|
|
||||||
admdstNm: string | null;
|
admdstNm: string | null;
|
||||||
anlLevyQnt: number;
|
anlLevyQnt: number;
|
||||||
sewerLevyAmt: number;
|
sewerLevyAmt: number;
|
||||||
@@ -362,7 +360,6 @@ export interface SewerageUsageFeeRequestParams {
|
|||||||
*/
|
*/
|
||||||
export interface SewerageUsageFeeSaveItem {
|
export interface SewerageUsageFeeSaveItem {
|
||||||
admdstCd: string | null;
|
admdstCd: string | null;
|
||||||
sggNm: string | null;
|
|
||||||
admdstNm: string | null;
|
admdstNm: string | null;
|
||||||
hshusLevyAmt: number;
|
hshusLevyAmt: number;
|
||||||
hshusLevyQnt: number;
|
hshusLevyQnt: number;
|
||||||
@@ -472,7 +469,6 @@ export interface CauserBurdenRequestParams {
|
|||||||
*/
|
*/
|
||||||
export interface CauserBurdenSaveItem {
|
export interface CauserBurdenSaveItem {
|
||||||
admdstCd: string | null;
|
admdstCd: string | null;
|
||||||
sggNm: string | null;
|
|
||||||
admdstNm: string | null;
|
admdstNm: string | null;
|
||||||
brdnAmtLevyNocs: number;
|
brdnAmtLevyNocs: number;
|
||||||
brdnAmtLevyAmt: number;
|
brdnAmtLevyAmt: number;
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ export interface ReportStatusResponseDto {
|
|||||||
lastCfmtnPicTelnoCn?: string | null;
|
lastCfmtnPicTelnoCn?: string | null;
|
||||||
lastCfmtnPicDeptNm?: string | null;
|
lastCfmtnPicDeptNm?: string | null;
|
||||||
lastCfmtnPicJbgdNm?: string | null;
|
lastCfmtnPicJbgdNm?: string | null;
|
||||||
splmntRsltCn?: string | null;
|
|
||||||
splmntOpnnCn?: string | null;
|
splmntOpnnCn?: string | null;
|
||||||
rjctOpnnCn?: string | null;
|
rjctOpnnCn?: string | null;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -99,7 +99,6 @@ export type SeweragePipeInputRegionalFactStatusSaveItem = Omit<
|
|||||||
"verificationResult" | "admdstCd" | "sggNm" | "admdstNm" | "goalYr"
|
"verificationResult" | "admdstCd" | "sggNm" | "admdstNm" | "goalYr"
|
||||||
> & {
|
> & {
|
||||||
admdstCd: string | null;
|
admdstCd: string | null;
|
||||||
sggNm: string | null;
|
|
||||||
admdstNm: string | null;
|
admdstNm: string | null;
|
||||||
goalYr: string | null;
|
goalYr: string | null;
|
||||||
};
|
};
|
||||||
@@ -118,7 +117,6 @@ export type SeweragePipeInputFactInstallStatusSaveItem = Omit<
|
|||||||
| "rmrk"
|
| "rmrk"
|
||||||
> & {
|
> & {
|
||||||
admdstCd: string | null;
|
admdstCd: string | null;
|
||||||
sggNm: string | null;
|
|
||||||
admdstNm: string | null;
|
admdstNm: string | null;
|
||||||
fcltSn: string | null;
|
fcltSn: string | null;
|
||||||
swtrmtFcltCd: string | null;
|
swtrmtFcltCd: string | null;
|
||||||
@@ -310,7 +308,6 @@ export interface SeweragePipeInputPipeTypeStatusSaveItem {
|
|||||||
rmrk: string | null;
|
rmrk: string | null;
|
||||||
lyngPrlgWhol: number;
|
lyngPrlgWhol: number;
|
||||||
dmltnPrlgWhol: number;
|
dmltnPrlgWhol: number;
|
||||||
pipeByPrstWhol: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 관종별 현황 저장 API 요청 */
|
/** 관종별 현황 저장 API 요청 */
|
||||||
@@ -422,6 +419,10 @@ export interface SeweragePipeInputManholeStatusItem {
|
|||||||
folvlMnhlCnt: number;
|
folvlMnhlCnt: number;
|
||||||
filvlMnhlCnt: number;
|
filvlMnhlCnt: number;
|
||||||
rmrk: string;
|
rmrk: string;
|
||||||
|
wholMnhlCntSum: number;
|
||||||
|
frlvlMnhlCntSum: number;
|
||||||
|
thlvlMnhlCntSum: number;
|
||||||
|
picNm: string | null;
|
||||||
verificationResult?: SeweragePipeInputVerificationResult;
|
verificationResult?: SeweragePipeInputVerificationResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-1
@@ -86,7 +86,6 @@ export interface SewerageSupplyRateRequestParams {
|
|||||||
|
|
||||||
/** 하수도 보급률 저장 API 요청 body (한 행) */
|
/** 하수도 보급률 저장 API 요청 body (한 행) */
|
||||||
export interface SewerageSupplyRateSaveItem {
|
export interface SewerageSupplyRateSaveItem {
|
||||||
sggNm: string | null;
|
|
||||||
admdstCd: string | null;
|
admdstCd: string | null;
|
||||||
admdstNm: string | null;
|
admdstNm: string | null;
|
||||||
statsTrbtrNm: string | null;
|
statsTrbtrNm: string | null;
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ export interface StatsInputStatusReviewItem {
|
|||||||
sewerBzmnCd?: string;
|
sewerBzmnCd?: string;
|
||||||
tabNm?: string;
|
tabNm?: string;
|
||||||
statsCd?: string;
|
statsCd?: string;
|
||||||
submitStatusNm?: string;
|
lclgvPicNm?: string;
|
||||||
prvnStatusNm?: string;
|
lclgvPicTelnoCn?: string;
|
||||||
chargerNm?: string;
|
lclgvSbmsnSttsCd?: string;
|
||||||
chargerCttpc?: string;
|
lclgvSbmsnSttsNm?: string;
|
||||||
submitStatusCd?: string;
|
mctpvPicSbmsnSttsCd?: string;
|
||||||
prvnStatusCd?: string;
|
mctpvPicSbmsnSttsNm?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StatsInputStatusReviewResponseData {
|
export interface StatsInputStatusReviewResponseData {
|
||||||
@@ -37,7 +37,7 @@ export interface ReviewHistoryResponse {
|
|||||||
status: string;
|
status: string;
|
||||||
message?: string;
|
message?: string;
|
||||||
data: {
|
data: {
|
||||||
logDt: string;
|
regDt: string;
|
||||||
historyContent: string;
|
historyContent: string;
|
||||||
}[]
|
}[]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,21 @@ export interface cancelSubmitResponse {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 검증 이전 상태로 롤백 요청 */
|
||||||
|
export interface rollbackStatusRequest {
|
||||||
|
statsYr: string;
|
||||||
|
statsCd: string;
|
||||||
|
sewerBzmnCd: string;
|
||||||
|
rollbackStatusCode: string;
|
||||||
|
mdfrUuid: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 검증 이전 상태로 롤백 응답 */
|
||||||
|
export interface rollbackStatusResponse {
|
||||||
|
status: string;
|
||||||
|
message?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ApiResponse<T> {
|
export interface ApiResponse<T> {
|
||||||
status: string;
|
status: string;
|
||||||
data?: T;
|
data?: T;
|
||||||
@@ -327,7 +342,6 @@ export interface ReviewOpinionDetailItem {
|
|||||||
sewerBzmnCd: string;
|
sewerBzmnCd: string;
|
||||||
statsCd: string;
|
statsCd: string;
|
||||||
splmntOpnnCn: string | null;
|
splmntOpnnCn: string | null;
|
||||||
splmntRsltCn: string | null;
|
|
||||||
mdfrUuid: string | null;
|
mdfrUuid: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,7 +357,6 @@ export interface ReviewOpinionSaveRequest {
|
|||||||
sewerBzmnCd: string;
|
sewerBzmnCd: string;
|
||||||
statsCd: string;
|
statsCd: string;
|
||||||
splmntOpnnCn: string;
|
splmntOpnnCn: string;
|
||||||
splmntRsltCn: string;
|
|
||||||
mdfrUuid: string;
|
mdfrUuid: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -388,7 +401,6 @@ export interface ReviewSubmitRequest {
|
|||||||
/** 통계항목 단위 제출 시 사용 (통계 입력 현황 일괄 제출에는 미사용) */
|
/** 통계항목 단위 제출 시 사용 (통계 입력 현황 일괄 제출에는 미사용) */
|
||||||
statsCd?: string;
|
statsCd?: string;
|
||||||
splmntOpnnCn?: string;
|
splmntOpnnCn?: string;
|
||||||
splmntRsltCn?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ReviewSubmitResponse {
|
export interface ReviewSubmitResponse {
|
||||||
@@ -454,7 +466,6 @@ export interface ReviewerInfoResponse {
|
|||||||
dpmNm: string;
|
dpmNm: string;
|
||||||
cps: string;
|
cps: string;
|
||||||
splmntOpnnCn: string;
|
splmntOpnnCn: string;
|
||||||
splmntRsltCn: string;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,9 +489,8 @@ export interface StatiscicsManagementReviewHistoryItem {
|
|||||||
ctpvNm: string;
|
ctpvNm: string;
|
||||||
sggNm: string;
|
sggNm: string;
|
||||||
menuNm: string;
|
menuNm: string;
|
||||||
wrterOpinionSm: string | null;
|
splmntOpnnCn: string | null;
|
||||||
chckerOpinionSm: string | null;
|
rjctOpnnCn: string | null;
|
||||||
returnOpinionSm: string | null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StatiscicsManagementReviewHistoryResponse {
|
export interface StatiscicsManagementReviewHistoryResponse {
|
||||||
@@ -557,6 +567,7 @@ export interface StatisticsService {
|
|||||||
saveStatsInputPeriod(param: StatsInputPeriodSaveRequest): Promise<StatsInputPeriodSaveApiResponse>;
|
saveStatsInputPeriod(param: StatsInputPeriodSaveRequest): Promise<StatsInputPeriodSaveApiResponse>;
|
||||||
deleteStatsInputPeriod(param: StatsInputPeriodDeleteRequest): Promise<StatsInputPeriodDeleteApiResponse>;
|
deleteStatsInputPeriod(param: StatsInputPeriodDeleteRequest): Promise<StatsInputPeriodDeleteApiResponse>;
|
||||||
cancelSubmit(param: cancelSubmitRequest): Promise<cancelSubmitResponse>;
|
cancelSubmit(param: cancelSubmitRequest): Promise<cancelSubmitResponse>;
|
||||||
|
rollbackStatus(param: rollbackStatusRequest): Promise<rollbackStatusResponse>;
|
||||||
callImrService(param: ImrRequest): Promise<ImrResponse>;
|
callImrService(param: ImrRequest): Promise<ImrResponse>;
|
||||||
submitException(param: SubmitExceptionRequest): Promise<SubmitExceptionResponse>;
|
submitException(param: SubmitExceptionRequest): Promise<SubmitExceptionResponse>;
|
||||||
getLogList(param: StatisticsLogRequest): Promise<StatisticsLogResponse>;
|
getLogList(param: StatisticsLogRequest): Promise<StatisticsLogResponse>;
|
||||||
|
|||||||
-2
@@ -127,7 +127,6 @@ export interface HumanWasteSludgeReviewItem {
|
|||||||
rcycQnt: number | null;
|
rcycQnt: number | null;
|
||||||
olandLfvlm: number | null;
|
olandLfvlm: number | null;
|
||||||
incnrQnt: number | null;
|
incnrQnt: number | null;
|
||||||
oceanInputQnt: number | null;
|
|
||||||
fuelQnt: number | null;
|
fuelQnt: number | null;
|
||||||
etcQnt: number | null;
|
etcQnt: number | null;
|
||||||
unprcsQnt: number | null;
|
unprcsQnt: number | null;
|
||||||
@@ -218,7 +217,6 @@ export function mapSewageExcretaSlurgeReviewRows(list: unknown[]): object[] {
|
|||||||
rcycQnt: row.rcycQnt ?? 0,
|
rcycQnt: row.rcycQnt ?? 0,
|
||||||
olandLfvlm: row.olandLfvlm ?? 0,
|
olandLfvlm: row.olandLfvlm ?? 0,
|
||||||
incnrQnt: row.incnrQnt ?? 0,
|
incnrQnt: row.incnrQnt ?? 0,
|
||||||
oceanInputQnt: row.oceanInputQnt ?? 0,
|
|
||||||
fuelQnt: row.fuelQnt ?? 0,
|
fuelQnt: row.fuelQnt ?? 0,
|
||||||
etcQnt: row.etcQnt ?? 0,
|
etcQnt: row.etcQnt ?? 0,
|
||||||
unprcsQnt: row.unprcsQnt ?? 0,
|
unprcsQnt: row.unprcsQnt ?? 0,
|
||||||
|
|||||||
@@ -108,5 +108,4 @@ export interface StatsStatusInfo {
|
|||||||
mctpvPicSbmsnSttsCd?: string;
|
mctpvPicSbmsnSttsCd?: string;
|
||||||
rjctOpnnCn?: string;
|
rjctOpnnCn?: string;
|
||||||
splmntOpnnCn?: string;
|
splmntOpnnCn?: string;
|
||||||
splmntRsltCn?: string;
|
|
||||||
}
|
}
|
||||||
@@ -247,6 +247,10 @@ export interface SewagePipeReviewManholeItem {
|
|||||||
folvlMnhlCnt: number;
|
folvlMnhlCnt: number;
|
||||||
filvlMnhlCnt: number;
|
filvlMnhlCnt: number;
|
||||||
rmrk: string | null;
|
rmrk: string | null;
|
||||||
|
wholMnhlCntSum: number;
|
||||||
|
frlvlMnhlCntSum: number;
|
||||||
|
thlvlMnhlCntSum: number;
|
||||||
|
picNm: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SewagePipeManholeResponseData {
|
export interface SewagePipeManholeResponseData {
|
||||||
@@ -266,5 +270,4 @@ export interface StatsStatusInfo {
|
|||||||
mctpvPicSbmsnSttsCd?: string;
|
mctpvPicSbmsnSttsCd?: string;
|
||||||
rjctOpnnCn?: string;
|
rjctOpnnCn?: string;
|
||||||
splmntOpnnCn?: string;
|
splmntOpnnCn?: string;
|
||||||
splmntRsltCn?: string;
|
|
||||||
}
|
}
|
||||||
-1
@@ -59,7 +59,6 @@ export interface statsStatusInfo {
|
|||||||
mctpvPicSbmsnSttsCd?: string;
|
mctpvPicSbmsnSttsCd?: string;
|
||||||
rjctOpnnCn?: string;
|
rjctOpnnCn?: string;
|
||||||
splmntOpnnCn?: string;
|
splmntOpnnCn?: string;
|
||||||
splmntRsltCn?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SewerageSupplyRateReviewResponseData {
|
export interface SewerageSupplyRateReviewResponseData {
|
||||||
|
|||||||
+4
@@ -168,6 +168,10 @@ export interface FcltyManholeSummaryItem {
|
|||||||
thlvlMnhlCnt: number;
|
thlvlMnhlCnt: number;
|
||||||
folvlMnhlCnt: number;
|
folvlMnhlCnt: number;
|
||||||
filvlMnhlCnt: number;
|
filvlMnhlCnt: number;
|
||||||
|
wholMnhlCntSum: number;
|
||||||
|
frlvlMnhlCntSum: number;
|
||||||
|
thlvlMnhlCntSum: number;
|
||||||
|
picNm: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
-1
@@ -135,7 +135,6 @@ export interface HumanWasteSludgeStatusTotalItem {
|
|||||||
rcycQnt: number;
|
rcycQnt: number;
|
||||||
olandLfvlm: number;
|
olandLfvlm: number;
|
||||||
incnrQnt: number;
|
incnrQnt: number;
|
||||||
oceanInputQnt: number;
|
|
||||||
fuelQnt: number;
|
fuelQnt: number;
|
||||||
etcQnt: number;
|
etcQnt: number;
|
||||||
unprcsQnt: number;
|
unprcsQnt: number;
|
||||||
|
|||||||
@@ -19,14 +19,14 @@ interface StatsSubmissionPanelProps {
|
|||||||
const STATUS_LEVEL_TEXT_COLOR = {
|
const STATUS_LEVEL_TEXT_COLOR = {
|
||||||
GREAT: "text-blue-500",
|
GREAT: "text-blue-500",
|
||||||
GOOD: "text-green-500",
|
GOOD: "text-green-500",
|
||||||
WARNING: "text-yellow-500",
|
NORMAL: "text-yellow-500",
|
||||||
BAD: "text-red-500",
|
BAD: "text-red-500",
|
||||||
};
|
};
|
||||||
|
|
||||||
const STATUS_LEVEL_EMOJI = {
|
const STATUS_LEVEL_EMOJI = {
|
||||||
GREAT: <Laugh size={160} className={STATUS_LEVEL_TEXT_COLOR.GREAT} />,
|
GREAT: <Laugh size={160} className={STATUS_LEVEL_TEXT_COLOR.GREAT} />,
|
||||||
GOOD: <Smile size={160} className={STATUS_LEVEL_TEXT_COLOR.GOOD} />,
|
GOOD: <Smile size={160} className={STATUS_LEVEL_TEXT_COLOR.GOOD} />,
|
||||||
WARNING: <Meh size={160} className={STATUS_LEVEL_TEXT_COLOR.WARNING} />,
|
NORMAL: <Meh size={160} className={STATUS_LEVEL_TEXT_COLOR.NORMAL} />,
|
||||||
BAD: <Frown size={160} className={STATUS_LEVEL_TEXT_COLOR.BAD} />,
|
BAD: <Frown size={160} className={STATUS_LEVEL_TEXT_COLOR.BAD} />,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,133 +1,133 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useDashboardVrfcReport } from "@/entities/statistics";
|
import { useDashboardVrfcReport } from "@/entities/statistics";
|
||||||
import type { DashboardSearchParams } from "@/entities/statistics/model/dashboard/dashboard-interface";
|
import type { DashboardSearchParams } from "@/entities/statistics/model/dashboard/dashboard-interface";
|
||||||
import {
|
import {
|
||||||
Badge,
|
Badge,
|
||||||
type BadgeProps,
|
type BadgeProps,
|
||||||
LoadingWithAnimation,
|
LoadingWithAnimation,
|
||||||
} from "@common/components";
|
} from "@common/components";
|
||||||
|
|
||||||
import { useDragHandle } from "../sortable-panel";
|
import { useDragHandle } from "../sortable-panel";
|
||||||
|
|
||||||
interface VrfcReportPanelProps {
|
interface VrfcReportPanelProps {
|
||||||
params: DashboardSearchParams | null;
|
params: DashboardSearchParams | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TYPE_CODE_NAME_MAP: Record<string, string> = {
|
const TYPE_CODE_NAME_MAP: Record<string, string> = {
|
||||||
NV: "일반",
|
NV: "일반",
|
||||||
IMR: "I-MR",
|
IMR: "I-MR",
|
||||||
HB: "HB",
|
HB: "HB",
|
||||||
};
|
};
|
||||||
|
|
||||||
const TYPE_CODE_COLOR_MAP: Record<string, BadgeProps["color"]> = {
|
const TYPE_CODE_COLOR_MAP: Record<string, BadgeProps["color"]> = {
|
||||||
NV: "gray",
|
NV: "gray",
|
||||||
IMR: "red",
|
IMR: "red",
|
||||||
HB: "blue",
|
HB: "blue",
|
||||||
};
|
};
|
||||||
|
|
||||||
export function VrfcReportPanel({ params }: VrfcReportPanelProps) {
|
export function VrfcReportPanel({ params }: VrfcReportPanelProps) {
|
||||||
const { dragHandleProps, isDragging } = useDragHandle();
|
const { dragHandleProps, isDragging } = useDragHandle();
|
||||||
const { data, isLoading, error } = useDashboardVrfcReport(params);
|
const { data, isLoading, error } = useDashboardVrfcReport(params);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="card card-border !m-0 h-full border-border bg-background text-foreground">
|
<div className="card card-border !m-0 h-full border-border bg-background text-foreground">
|
||||||
<div
|
<div
|
||||||
className={`card-header cursor-grab border-border active:cursor-grabbing ${isDragging ? "opacity-50" : ""}`}
|
className={`card-header cursor-grab border-border active:cursor-grabbing ${isDragging ? "opacity-50" : ""}`}
|
||||||
{...dragHandleProps}
|
{...dragHandleProps}
|
||||||
title="헤더를 드래그하여 패널 순서 변경"
|
title="헤더를 드래그하여 패널 순서 변경"
|
||||||
>
|
>
|
||||||
<h3 className="text-2xl font-semibold">이상치 선별보고서</h3>
|
<h3 className="text-2xl font-semibold">이상치 선별보고서</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="card-body max-h-[calc(100%-3.25rem)] py-2.5">
|
<div className="card-body max-h-[calc(100%-3.25rem)] py-2.5">
|
||||||
{isLoading && (
|
{isLoading && (
|
||||||
<div className="flex h-full items-center justify-center">
|
<div className="flex h-full items-center justify-center">
|
||||||
<div className="relative size-[5rem]">
|
<div className="relative size-[5rem]">
|
||||||
<LoadingWithAnimation color="primary" />
|
<LoadingWithAnimation color="primary" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{error && (
|
{error && (
|
||||||
<div className="flex h-full items-center justify-center">
|
<div className="flex h-full items-center justify-center">
|
||||||
데이터를 불러올 수 없습니다.
|
데이터를 불러올 수 없습니다.
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{data && (
|
{data && (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
{/* TBD: typeCounts 표시 방법 (탭? 필터?) */}
|
{/* TBD: typeCounts 표시 방법 (탭? 필터?) */}
|
||||||
{data.typeCounts &&
|
{data.typeCounts &&
|
||||||
Object.keys(data.typeCounts).length > 0 && (
|
Object.keys(data.typeCounts).length > 0 && (
|
||||||
<div className="flex flex-wrap gap-2">
|
<div className="flex flex-wrap gap-2">
|
||||||
{Object.entries(data.typeCounts).map(
|
{Object.entries(data.typeCounts).map(
|
||||||
([type, count]) => (
|
([type, count]) => (
|
||||||
<Badge
|
<Badge
|
||||||
key={type}
|
key={type}
|
||||||
color={
|
color={
|
||||||
TYPE_CODE_COLOR_MAP[type]
|
TYPE_CODE_COLOR_MAP[type]
|
||||||
}
|
}
|
||||||
className="rounded-full px-2 py-1 text-lg"
|
className="rounded-full px-2 py-1 text-lg"
|
||||||
>
|
>
|
||||||
{TYPE_CODE_NAME_MAP[type]}:{" "}
|
{TYPE_CODE_NAME_MAP[type]}:{" "}
|
||||||
{count}
|
{count}
|
||||||
</Badge>
|
</Badge>
|
||||||
),
|
),
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* TBD: 테이블 컬럼 정의, 증감 표시 방법 */}
|
{/* TBD: 테이블 컬럼 정의, 증감 표시 방법 */}
|
||||||
<div className="max-h-[44rem] overflow-y-auto">
|
<div className="max-h-[44rem] overflow-y-auto">
|
||||||
{data.list.length === 0 ? (
|
{data.list.length === 0 ? (
|
||||||
<div className="flex h-full items-center justify-center">
|
<div className="flex h-full items-center justify-center">
|
||||||
이상치 항목이 없습니다.
|
이상치 항목이 없습니다.
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="space-y-2 tracking-tight">
|
<div className="space-y-2 tracking-tight">
|
||||||
{data.list.map((item, index) => (
|
{data.list.map((item, index) => (
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
className="flex flex-col rounded-sm border border-border p-3"
|
className="flex flex-col rounded-sm border border-border p-3"
|
||||||
>
|
>
|
||||||
<div className="mb-2 flex items-center justify-between">
|
<div className="mb-2 flex items-center justify-between">
|
||||||
<span className="font-medium">
|
<span className="font-medium">
|
||||||
{item.statsNm}
|
{item.statsNm}
|
||||||
</span>
|
</span>
|
||||||
<Badge
|
<Badge
|
||||||
color={
|
color={
|
||||||
TYPE_CODE_COLOR_MAP[
|
TYPE_CODE_COLOR_MAP[
|
||||||
item.vrfcCd
|
item.vrfcCd
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
className="text-sm"
|
className="text-sm"
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
TYPE_CODE_NAME_MAP[
|
TYPE_CODE_NAME_MAP[
|
||||||
item.vrfcCd
|
item.vrfcCd
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
</Badge>
|
</Badge>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-lg text-muted-foreground">
|
<p className="text-lg text-muted-foreground">
|
||||||
{item.rsnExpln}
|
{item.rsnExpln}
|
||||||
</p>
|
</p>
|
||||||
<div className="flex justify-between text-lg text-muted-foreground">
|
<div className="flex justify-between text-lg text-muted-foreground">
|
||||||
<span>{item.admdstNm}</span>
|
<span>{item.admdstNm}</span>
|
||||||
<span>
|
<span>
|
||||||
{/* TBD: 증감 표시 방법 (nowVlCn - compVlCn 계산?) */}
|
{/* TBD: 증감 표시 방법 (nowCn - cmprCn 계산?) */}
|
||||||
현재: {item.nowVlCn ?? "-"}{" "}
|
현재:{" "}{item.nowCn ?? "-"}
|
||||||
/ 비교:{" "}
|
/ 비교:{" "}
|
||||||
{item.compVlCn ?? "-"}
|
{item.cmprCn ?? "-"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{/* TBD: 등급/점수/단계/업데이트 시각 필드 미제공 */}
|
{/* TBD: 등급/점수/단계/업데이트 시각 필드 미제공 */}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
export const STATISTICS_ROUTE = "/statistics";
|
export const STATISTICS_ROUTE = "/statistics";
|
||||||
export const STATISTICS_TAB_QUERY_KEY = "tab";
|
export const STATISTICS_TAB_QUERY_KEY = "tab";
|
||||||
|
/** 기본 화면(대시보드) 도움말 매칭용. URL에는 넣지 않음 */
|
||||||
|
export const STATISTICS_DASHBOARD_TAB_ID = "Dashboard";
|
||||||
|
|
||||||
export function buildStatisticsTabUrl(tabId: string): string {
|
export function buildStatisticsTabUrl(tabId: string): string {
|
||||||
return `${STATISTICS_ROUTE}?${STATISTICS_TAB_QUERY_KEY}=${encodeURIComponent(tabId)}`;
|
return `${STATISTICS_ROUTE}?${STATISTICS_TAB_QUERY_KEY}=${encodeURIComponent(tabId)}`;
|
||||||
|
|||||||
@@ -1,13 +1,20 @@
|
|||||||
import { PageTitle } from "@common/components";
|
import { PageTitle } from "@common/components";
|
||||||
|
|
||||||
|
import { findMenuItemByUrlPath } from "@/shared/lib/stats-cd-input-navigation";
|
||||||
|
import { STATISTICS_DASHBOARD_TAB_ID } from "@/shared/lib/statistics-tab-url";
|
||||||
|
|
||||||
import { TabBar } from "./tab-bar";
|
import { TabBar } from "./tab-bar";
|
||||||
|
|
||||||
import { useTabStore } from "@/store/tab-store";
|
import { useTabStore } from "@/store/tab-store";
|
||||||
|
|
||||||
function StatisticsPageLayout({ children }: { children: React.ReactNode }) {
|
function StatisticsPageLayout({ children }: { children: React.ReactNode }) {
|
||||||
const { activeTabId, tabs } = useTabStore();
|
const { activeTabId, tabs, menuList } = useTabStore();
|
||||||
|
|
||||||
const pageTitle = tabs.find((t) => t.id === activeTabId);
|
const pageTitle = tabs.find((t) => t.id === activeTabId);
|
||||||
|
const dashboardMenu =
|
||||||
|
!pageTitle && menuList
|
||||||
|
? findMenuItemByUrlPath(menuList, STATISTICS_DASHBOARD_TAB_ID)
|
||||||
|
: null;
|
||||||
|
|
||||||
const menuPaths = pageTitle?.path?.split(">").map((path) => path.trim());
|
const menuPaths = pageTitle?.path?.split(">").map((path) => path.trim());
|
||||||
|
|
||||||
@@ -16,7 +23,7 @@ function StatisticsPageLayout({ children }: { children: React.ReactNode }) {
|
|||||||
<TabBar />
|
<TabBar />
|
||||||
<PageTitle
|
<PageTitle
|
||||||
title={pageTitle?.label ?? ""}
|
title={pageTitle?.label ?? ""}
|
||||||
menuCd={pageTitle?.menuItem?.menuCd}
|
menuCd={pageTitle?.menuItem?.menuCd ?? dashboardMenu?.menuCd}
|
||||||
menuPaths={menuPaths ?? []}
|
menuPaths={menuPaths ?? []}
|
||||||
/>
|
/>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -73,7 +73,10 @@ function Calendar({
|
|||||||
"has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",
|
"has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",
|
||||||
defaultClassNames.dropdown_root,
|
defaultClassNames.dropdown_root,
|
||||||
),
|
),
|
||||||
dropdown: cn("absolute inset-0 opacity-0", defaultClassNames.dropdown),
|
dropdown: cn(
|
||||||
|
"absolute inset-0 opacity-0 [&_option]:bg-background [&_option]:text-foreground",
|
||||||
|
defaultClassNames.dropdown,
|
||||||
|
),
|
||||||
caption_label: cn(
|
caption_label: cn(
|
||||||
"select-none font-medium",
|
"select-none font-medium",
|
||||||
captionLayout === "label"
|
captionLayout === "label"
|
||||||
|
|||||||
Reference in New Issue
Block a user