Merge commit '5cb0719297bb84a4762095513ed55e9e9a001ce9' into iipbs/dm/dev
This commit is contained in:
@@ -44,7 +44,6 @@ import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import moment from "moment";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useForm, useWatch } from "react-hook-form";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import { z } from "zod";
|
||||
|
||||
|
||||
@@ -305,6 +304,7 @@ export default function CoMatRvw() {
|
||||
headName={"수요매칭검토현황"}
|
||||
tableData={dmdMatData || []}
|
||||
headlist={coRvwHeadList}
|
||||
widthFixed={true}
|
||||
pageSize={13}
|
||||
total={coMatRvwCount}
|
||||
cellClick={(index: number | undefined) => {
|
||||
@@ -770,7 +770,6 @@ export default function CoMatRvw() {
|
||||
</div>
|
||||
</div>
|
||||
</ContentsDiv>
|
||||
<Toaster position="top-center" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import * as XLSX from "xlsx";
|
||||
|
||||
@@ -44,6 +43,7 @@ export default function RuseCaseMng() {
|
||||
const [selectUtz, setSelectUtz] = useState<string>("");
|
||||
const [name, setName] = useState<string>("");
|
||||
const [resetPage, isResetPage] = useState(false);
|
||||
const [displayRuseCaseMngList, setDisplayRuseCaseMngList] = useState(ruseCaseMngList);
|
||||
const { t } = useTranslation("base");
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
@@ -56,6 +56,19 @@ export default function RuseCaseMng() {
|
||||
ruseCaseMngInit();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const sewageOutUseCodeList = code.sewageOutFclttUse ?? [];
|
||||
|
||||
setDisplayRuseCaseMngList(
|
||||
ruseCaseMngList.map((item) => ({
|
||||
...item,
|
||||
grnteWqUsg:
|
||||
sewageOutUseCodeList.find((codeItem) => codeItem.val === item.grnteWqUsg)?.text ??
|
||||
item.grnteWqUsg,
|
||||
}))
|
||||
);
|
||||
}, [code.sewageOutFclttUse, ruseCaseMngList]);
|
||||
|
||||
// 시도 선택
|
||||
const getSelCity = (val: string | number) => {
|
||||
const cityValue = String(val);
|
||||
@@ -133,7 +146,8 @@ export default function RuseCaseMng() {
|
||||
item.ruseFcltUsg,
|
||||
item.ruseFcltSplyCpct,
|
||||
item.ruseFcltPrcsMsrc,
|
||||
item.grnteWqUsg,
|
||||
code.sewageOutFclttUse.find((codeItem) => codeItem.val === item.grnteWqUsg)?.text ??
|
||||
item.grnteWqUsg,
|
||||
item.grnteWqGrssClfg,
|
||||
item.grnteWqCombResdch,
|
||||
item.grnteWqTrbt,
|
||||
@@ -313,8 +327,9 @@ export default function RuseCaseMng() {
|
||||
<div className="w-[350%]">
|
||||
<UiTable
|
||||
headName={"물재이용사례 현황"}
|
||||
tableData={ruseCaseMngList}
|
||||
tableData={displayRuseCaseMngList}
|
||||
headlist={ruseCaseMng.ruseHeadList}
|
||||
widthFixed={true}
|
||||
pageSize={20}
|
||||
total={count}
|
||||
cellClick={undefined}
|
||||
@@ -341,7 +356,6 @@ export default function RuseCaseMng() {
|
||||
</div>
|
||||
</div>
|
||||
</ContentsDiv>
|
||||
<Toaster position="top-center" />
|
||||
{/* 엑셀 등록 모달 */}
|
||||
<UiModal
|
||||
open={isExcelOpen}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* 수요처매칭 > 재이용검토이력
|
||||
*/
|
||||
"use client";
|
||||
@@ -7,13 +7,13 @@ import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
import { type RvwHistTableType } from "@/app/store/matDmd/coMatRvw/type";
|
||||
import {
|
||||
confirmToast,
|
||||
formatPhoneNumber,
|
||||
getCity,
|
||||
getdmdMatFlag,
|
||||
tableData,
|
||||
yearOptions,
|
||||
} from "@/components/lib/func/common";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
|
||||
import {
|
||||
ContentsDiv,
|
||||
@@ -30,7 +30,6 @@ import { Button, Label } from "@common/components/ui";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import moment from "moment";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
export default function RuseRvwHstry() {
|
||||
const {
|
||||
@@ -45,6 +44,7 @@ export default function RuseRvwHstry() {
|
||||
const { rvwHistRes, ruseHistHeadList, rvwHistCount } = ruseHist;
|
||||
const { regAuthrtYn } = auth;
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const { confirm } = useConfirm();
|
||||
|
||||
const [pageNation, setPageNatiion] = useState<number>(1);
|
||||
|
||||
@@ -146,7 +146,7 @@ export default function RuseRvwHstry() {
|
||||
},
|
||||
[rvwHistData]
|
||||
);
|
||||
const confrirmToast = () => {
|
||||
const confrirmToast = async () => {
|
||||
const completeData = rvwHistData
|
||||
?.map((item) => {
|
||||
if (item?.completeYn.chk && item.splyFcltFlg === "검토완료") {
|
||||
@@ -156,31 +156,14 @@ export default function RuseRvwHstry() {
|
||||
.filter((item) => item !== undefined);
|
||||
|
||||
if (completeData && completeData?.length > 0) {
|
||||
confirmToast(t('isMatchFinishMsg'), () => ruseRvwComplete(completeData as number[]));
|
||||
if (await confirm(t("isMatchFinishMsg"))) {
|
||||
const message = await ruseRvwComplete(completeData as number[]);
|
||||
alert(message);
|
||||
}
|
||||
|
||||
// const handleConfirm = async () => {
|
||||
// ruseRvwComplete(completeData as number[]);
|
||||
// };
|
||||
// toast((t) => (
|
||||
// <span className="flex flex-col items-center">
|
||||
// 매칭완료를 진행하시겠습니까?
|
||||
// <br />
|
||||
// <div className="mt-2 flex flex-row space-x-2">
|
||||
// <Button
|
||||
// size={"sm"}
|
||||
// onClick={() => {
|
||||
// toast.dismiss(t.id);
|
||||
// ruseRvwComplete(completeData as number[]);
|
||||
// }}
|
||||
// >
|
||||
// 확인
|
||||
// </Button>
|
||||
// <Button size={"sm"} onClick={() => toast.dismiss(t.id)}>
|
||||
// 취소
|
||||
// </Button>
|
||||
// </div>
|
||||
// </span>
|
||||
// ));
|
||||
} else {
|
||||
alert(t('isNotMatchFinishMsg'));
|
||||
}
|
||||
@@ -217,6 +200,9 @@ export default function RuseRvwHstry() {
|
||||
dmdCoNm: item.demandCo?.dmdCoNm,
|
||||
daddr: item.demandCo?.daddr,
|
||||
telno: formatPhoneNumber(item.demandCo?.telno || ""),
|
||||
useUsgCd:
|
||||
code.sewageOutFclttUse.find((codeItem) => codeItem.val === item.useUsgCd)?.text ??
|
||||
item.useUsgCd,
|
||||
dmndTmng: item?.dmndTmng
|
||||
? moment(item?.dmndTmng).format("YYYY-MM-DD")
|
||||
: "없음",
|
||||
@@ -232,7 +218,7 @@ export default function RuseRvwHstry() {
|
||||
|
||||
setRvwHistData(tableData(data, { code }));
|
||||
}
|
||||
}, [rvwHistRes]);
|
||||
}, [code.sewageOutFclttUse, rvwHistRes]);
|
||||
|
||||
|
||||
return (
|
||||
@@ -317,7 +303,7 @@ export default function RuseRvwHstry() {
|
||||
>
|
||||
조회
|
||||
</Button>
|
||||
<Button className={btnClass} onClick={confrirmToast} disabled={regAuthrtYn==='N'}>
|
||||
<Button className={btnClass} onClick={() => { void confrirmToast(); }} disabled={regAuthrtYn==='N'}>
|
||||
저장
|
||||
</Button>
|
||||
</div>
|
||||
@@ -334,6 +320,7 @@ export default function RuseRvwHstry() {
|
||||
headName={"재이용검토현황"}
|
||||
tableData={rvwHistData || []}
|
||||
headlist={ruseHistHeadList}
|
||||
widthFixed={true}
|
||||
pageSize={20}
|
||||
total={rvwHistCount}
|
||||
cellClick={(index: number | undefined, headId: string) => {
|
||||
@@ -347,7 +334,6 @@ export default function RuseRvwHstry() {
|
||||
</ListDiv>
|
||||
</div>
|
||||
</div>
|
||||
<Toaster position="top-center" />
|
||||
</ContentsDiv>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* 수요처관리
|
||||
@@ -8,7 +8,6 @@ import { btnClass } from "@/app/store/common/code";
|
||||
import { excelCoSttnParsing } from "@/app/store/matDmd/coSttn/excel";
|
||||
import { fetchType, getFetch } from "@/components/lib/api";
|
||||
import {
|
||||
//confirmToast,
|
||||
excelDownload,
|
||||
formatPhoneNumber,
|
||||
getCity,
|
||||
@@ -32,7 +31,6 @@ import type { DemandCompType } from "@common/business_components/ui/sdmInsertFor
|
||||
import { Button } from "@common/components/ui";
|
||||
import moment from "moment";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
// import toast, { Toaster } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
@@ -181,13 +179,11 @@ export default function CoSttn() {
|
||||
const message = await coSttnPwInit(dmdInfoId);
|
||||
alert(message);
|
||||
};
|
||||
//confirmToast( t('isInitPw', { dmdInfoId: dmdInfoSliceId }), handleConfirm, 'text-2xl');
|
||||
if (await confirm(t('isInitPw', { dmdInfoId: dmdInfoSliceId }))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
} else {
|
||||
alert("비밀번호 초기화를 원하는 행을 선택해주세요.");
|
||||
// toast.error("비밀번호 초기화를 원하는 행을 선택해주세요.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,6 +341,7 @@ export default function CoSttn() {
|
||||
coSttnSearch(String(page), "13", String(con));
|
||||
}}
|
||||
resetSelection={isResetSelection}
|
||||
widthFixed={true}
|
||||
></UiTable>
|
||||
</ListDiv>
|
||||
</div>
|
||||
@@ -373,7 +370,6 @@ export default function CoSttn() {
|
||||
}
|
||||
></UiModal>
|
||||
</ContentsDiv>
|
||||
{/* <Toaster position="top-center" /> */}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button, Label, ScrollArea } from "@common/components/ui";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
|
||||
export default function DrgtSttn() {
|
||||
const { code, drgt, drgtSearch, drgtModalSearch, drgtInit } = useWrStore((state) => state);
|
||||
@@ -292,7 +291,6 @@ export default function DrgtSttn() {
|
||||
bodyClass={"w-[50vw] max-w-none h-[80vh]"}
|
||||
body={<DrgtDetailModal data={drgtModal.data as customDrgt[]} />}
|
||||
/>
|
||||
<Toaster position="top-center" />
|
||||
</ContentsDiv>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -5,7 +5,6 @@ import { btnClass } from "@/app/store/common/code";
|
||||
import { type customLdrmnt } from "@/app/store/matDmd/ldrmntCoSttn";
|
||||
import { ldrmntHeadListExport } from "@/app/store/matDmd/ldrmntCoSttn/headList";
|
||||
import {
|
||||
confirmToast,
|
||||
excelDownload,
|
||||
getCity,
|
||||
tableData
|
||||
@@ -27,9 +26,9 @@ import {
|
||||
} from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function LdrmntCoSttn() {
|
||||
@@ -48,6 +47,7 @@ export default function LdrmntCoSttn() {
|
||||
const [isDownloadClicked, setIsDownloadClicked] = useState(false);
|
||||
const { t } = useTranslation('base');
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const { confirm } = useConfirm();
|
||||
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||
|
||||
const excelClick = useCallback(() => {
|
||||
@@ -248,7 +248,7 @@ export default function LdrmntCoSttn() {
|
||||
<div className="grid grid-cols-6 gap-4 ">
|
||||
<div className="col-span-6">
|
||||
<div className="overflow-x-auto">
|
||||
<ListDiv className="min-w-max">
|
||||
<ListDiv>
|
||||
<UiTable
|
||||
headName={[]}
|
||||
tableData={bdstTable || []}
|
||||
@@ -258,6 +258,7 @@ export default function LdrmntCoSttn() {
|
||||
cellClick={(index: number | undefined) => { cellClick(index ?? undefined) }}
|
||||
onPageChange={setPageNation}
|
||||
resetPageNo={resetPage}
|
||||
widthFixed={true}
|
||||
/>
|
||||
</ListDiv>
|
||||
</div>
|
||||
@@ -277,7 +278,9 @@ export default function LdrmntCoSttn() {
|
||||
setDetailModal({ ...detailModal, isOpen: false });
|
||||
ldrmntSearch(false, pageNation, '20', computeCityNm(), searchTxt || "");
|
||||
};
|
||||
confirmToast(t('isUpdateMsg'), handleConfirm);
|
||||
if (await confirm(t("isUpdateMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
}} />}
|
||||
/>
|
||||
|
||||
@@ -289,7 +292,6 @@ export default function LdrmntCoSttn() {
|
||||
bodyClass={"w-[40vw] max-w-none"}
|
||||
body={<CoRegExcel isModal={(isOpen) => setIsExcelOpen({ isModal: isOpen })} />}
|
||||
/>
|
||||
<Toaster position="top-center"></Toaster>
|
||||
</div>
|
||||
</ContentsDiv>
|
||||
</>
|
||||
|
||||
@@ -18,7 +18,6 @@ import {
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button } from "@common/components";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
|
||||
export default function Home() {
|
||||
const {
|
||||
@@ -183,7 +182,6 @@ export default function Home() {
|
||||
}}
|
||||
/>
|
||||
|
||||
<Toaster position="top-center" />
|
||||
</ContentsDiv>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@ import { btnClass } from "@/app/store/common/code";
|
||||
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@common/components";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { confirmToast, tableData } from "@/components/lib/func/common";
|
||||
import { tableData } from "@/components/lib/func/common";
|
||||
import type {
|
||||
customPbnst,
|
||||
fcBizType,
|
||||
@@ -44,13 +44,13 @@ import {
|
||||
import { PbnstMngForm } from "@/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm";
|
||||
import { PbnstBuseForm } from "@/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm";
|
||||
import { PbnstRegModal } from "@/components/ui/modal/fcltReg/pbnstRegModal/pbnstRegModal";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import { writeRgtrAndMdfr } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg";
|
||||
import { useFieldArray, useForm, type FieldErrors } from "react-hook-form"; // FieldErrors 타입 추가
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { z } from "zod";
|
||||
import { createDefaultPbnstItem } from "./utilsZod";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
export default function PublicReuseFaciltyInsert() {
|
||||
const {
|
||||
@@ -67,6 +67,7 @@ export default function PublicReuseFaciltyInsert() {
|
||||
} = useWrStore((state) => state);
|
||||
|
||||
const { t } = useTranslation("base");
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const { pubFacHeadList, pbnstHasuResCount, pbnstHasuRes, pbnstRes } = pbnst;
|
||||
const { regAuthrtYn, mdfcnAuthrtYn, laeSeCd } = auth;
|
||||
@@ -137,30 +138,29 @@ export default function PublicReuseFaciltyInsert() {
|
||||
});
|
||||
|
||||
const handleConfirm = async () => {
|
||||
Promise.allSettled([
|
||||
const [resFclt, resBiz] = await Promise.allSettled([
|
||||
pbnstRuseFcltUpdate(pbnst as customPbnst[]),
|
||||
pbnstRuseBizUpdate(bizs),
|
||||
]).then(([resFclt, resBiz]) => {
|
||||
const isFcltSuccess = resFclt.status === "fulfilled";
|
||||
const isBizSuccess = resBiz.status === "fulfilled";
|
||||
if (isFcltSuccess && isBizSuccess) {
|
||||
alert("하수 재이용 시설 및 사업이 수정되었습니다.");
|
||||
// 메시지 표시, 페이지 이동 등
|
||||
} else {
|
||||
let message = "";
|
||||
// ✅ 각각 어떤 항목이 실패했는지도 로그/알림 처리
|
||||
if (!isFcltSuccess) {
|
||||
message = "하수재이용 시설 ";
|
||||
}
|
||||
if (!isBizSuccess) {
|
||||
message += "하수재이용 시설 사업 ";
|
||||
}
|
||||
alert(message + "오류 입니다 ");
|
||||
pubHasuInit("1", laeSeCd);
|
||||
]);
|
||||
const isFcltSuccess = resFclt.status === "fulfilled";
|
||||
const isBizSuccess = resBiz.status === "fulfilled";
|
||||
if (isFcltSuccess && isBizSuccess) {
|
||||
alert("하수 재이용 시설 및 사업이 수정되었습니다.");
|
||||
} else {
|
||||
let message = "";
|
||||
if (!isFcltSuccess) {
|
||||
message = "하수재이용 시설 ";
|
||||
}
|
||||
});
|
||||
if (!isBizSuccess) {
|
||||
message += "하수재이용 시설 사업 ";
|
||||
}
|
||||
alert(message + "오류 입니다 ");
|
||||
pubHasuInit("1", laeSeCd);
|
||||
}
|
||||
};
|
||||
confirmToast(t("isUpdatetMsg"), handleConfirm);
|
||||
if (await confirm(t("isUpdatetMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
};
|
||||
|
||||
// 폼 유효성 검사 실패 시 호출될 함수
|
||||
@@ -330,9 +330,7 @@ export default function PublicReuseFaciltyInsert() {
|
||||
onClick={() => {
|
||||
// pbnstMngData([] as customPbnst[]);
|
||||
if (!selectRow) {
|
||||
alert(
|
||||
"재시용시설을 등록할 하수리시시설을 테이블에서 선택하고 등록버튼을 눌러주세요"
|
||||
);
|
||||
alert("재시용시설을 등록할 하수처리시설을 목록에서 선택하고\n 등록버튼을 눌러주세요");
|
||||
return;
|
||||
} else {
|
||||
appendPbnstRuseFclt();
|
||||
@@ -433,9 +431,7 @@ export default function PublicReuseFaciltyInsert() {
|
||||
onClick={() => {
|
||||
// pbnstMngData([] as customPbnst[]);
|
||||
if (!selectRow) {
|
||||
alert(
|
||||
"하수리시시설을 테이블을 선택하고 등록버튼을 눌러주세요"
|
||||
);
|
||||
alert("하수처리시설을 목록에서 선택하고\n 등록버튼을 눌러주세요");
|
||||
return;
|
||||
} else {
|
||||
appendPbnstRuseFclt();
|
||||
@@ -454,7 +450,10 @@ export default function PublicReuseFaciltyInsert() {
|
||||
form={form} // form prop 전달
|
||||
setPbnstInsert={(data) => {
|
||||
if (data) {
|
||||
pbnstInsert(data); // pbnstInsert 함수 호출
|
||||
void (async () => {
|
||||
const message = await pbnstInsert(data);
|
||||
alert(message);
|
||||
})();
|
||||
setIsRuseReg({ isModal: false });
|
||||
}
|
||||
}}
|
||||
@@ -470,7 +469,6 @@ export default function PublicReuseFaciltyInsert() {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<Toaster position="top-center" />
|
||||
</ContentsDiv>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -20,7 +20,6 @@ import {
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button } from "@common/components";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
|
||||
|
||||
|
||||
@@ -199,7 +198,6 @@ export default function Home() {
|
||||
}}
|
||||
/>
|
||||
|
||||
<Toaster position="top-center" />
|
||||
</ContentsDiv>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -20,7 +20,6 @@ import {
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button } from "@common/components";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
|
||||
|
||||
/**
|
||||
@@ -202,7 +201,6 @@ export default function Home() {
|
||||
}}
|
||||
/>
|
||||
|
||||
<Toaster position="top-center" />
|
||||
</ContentsDiv>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* 온배수시설 현황
|
||||
*/
|
||||
"use client";
|
||||
@@ -34,7 +34,7 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function HtdflSttn() {
|
||||
@@ -58,6 +58,7 @@ export default function HtdflSttn() {
|
||||
// chBuilding: chgBuilding[];
|
||||
// }>({ isOpen: false, chBuilding: [] });
|
||||
const [fcltNm, setFcltNm] = useState<string>("");
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
console.log("laeSeCd : ", laeSeCd);
|
||||
useEffect(() => {
|
||||
@@ -128,7 +129,7 @@ export default function HtdflSttn() {
|
||||
sheetArray
|
||||
);
|
||||
} else {
|
||||
toast.error(t('excelDownErrMsg'));
|
||||
alert(t('excelDownErrMsg'));
|
||||
}
|
||||
isDownloadTriggered.current = false;
|
||||
}, [htdflSttn.excelList, code]);
|
||||
@@ -241,6 +242,7 @@ export default function HtdflSttn() {
|
||||
}}
|
||||
onPageChange={setPageNation}
|
||||
resetPageNo={resetPage}
|
||||
widthFixed={true}
|
||||
>
|
||||
<HeadMakeColSpan upHeadList={htdflSttn.htdflSttNodeList} />
|
||||
</UiTable>
|
||||
@@ -275,7 +277,6 @@ export default function HtdflSttn() {
|
||||
body={<SttnDetailModal type={"HTB"} formObj={detailModal.data} />}
|
||||
/>
|
||||
</ContentsDiv>
|
||||
<Toaster position="top-center" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* 하수재이용 시설 현황
|
||||
* 재이용시설 현황 - 하수재이용시설 현황
|
||||
* - layout.tsx에 의해 공통 레이아웃이 적용됨
|
||||
@@ -30,7 +30,7 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ export default function PbnstSttn() {
|
||||
const isDownloadTriggered = useRef(false);
|
||||
const [pbnRuseNm, setPbnRuseNm] = useState<string>("");
|
||||
const { t } = useTranslation("base");
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const excelClick = useCallback(() => {
|
||||
isDownloadTriggered.current = true;
|
||||
pbnstSttnSearch(
|
||||
@@ -119,7 +120,7 @@ export default function PbnstSttn() {
|
||||
sheetArray
|
||||
);
|
||||
} else {
|
||||
toast.error(t("excelDownErrMsg"));
|
||||
alert(t("excelDownErrMsg"));
|
||||
}
|
||||
isDownloadTriggered.current = false;
|
||||
}, [pbnstSttn.excelList]);
|
||||
@@ -226,6 +227,7 @@ export default function PbnstSttn() {
|
||||
setIsReset(false);
|
||||
}}
|
||||
resetPageNo={isReset}
|
||||
widthFixed={true}
|
||||
>
|
||||
<HeadMakeColSpan upHeadList={pbnstSttn.pbnstSttNodeList} />
|
||||
</UiTable>
|
||||
@@ -269,7 +271,6 @@ export default function PbnstSttn() {
|
||||
}}
|
||||
/>
|
||||
</ContentsDiv>
|
||||
<Toaster position="top-center" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* 빗물이용시설 현황
|
||||
*/
|
||||
"use client";
|
||||
@@ -32,7 +32,7 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function RainSttn() {
|
||||
@@ -58,6 +58,7 @@ export default function RainSttn() {
|
||||
|
||||
const [fcltNm, setFcltNm] = useState<string>("");
|
||||
const { t } = useTranslation("base");
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const cellClick = (index: number | undefined) => {
|
||||
if (index !== undefined && bdstTable !== undefined) {
|
||||
@@ -173,7 +174,7 @@ export default function RainSttn() {
|
||||
sheetArray
|
||||
);
|
||||
} else {
|
||||
toast.error(t("excelDownErrMsg"));
|
||||
alert(t("excelDownErrMsg"));
|
||||
}
|
||||
isDownloadTriggered.current = false;
|
||||
}, [rainSttn.excelList]);
|
||||
@@ -286,6 +287,7 @@ export default function RainSttn() {
|
||||
}}
|
||||
onPageChange={setPageNation}
|
||||
resetPageNo={resetPage}
|
||||
widthFixed={true}
|
||||
>
|
||||
<HeadMakeColSpan upHeadList={rainSttn.rainSttNodeList} />
|
||||
</UiTable>
|
||||
@@ -318,7 +320,6 @@ export default function RainSttn() {
|
||||
body={<SttnDetailModal type={"RNB"} formObj={detailModal.data} />}
|
||||
/>
|
||||
</ContentsDiv>
|
||||
<Toaster position="top-center" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* 중수도시설 현황
|
||||
*/
|
||||
"use client";
|
||||
@@ -32,7 +32,7 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function RswtSttn() {
|
||||
@@ -52,6 +52,7 @@ export default function RswtSttn() {
|
||||
const [detailModal, setDetailModal] = useState<{ isOpen: boolean, data: customRswtBdst | undefined }>({ data: undefined, isOpen: false })
|
||||
const [fcltNm, setFcltNm] = useState<string>("");
|
||||
const { t } = useTranslation('base');
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const cellClick = (index: number | undefined) => {
|
||||
|
||||
if ( index !== undefined && bdstTable !== undefined) {
|
||||
@@ -143,7 +144,7 @@ export default function RswtSttn() {
|
||||
sheetArray
|
||||
);
|
||||
} else {
|
||||
toast.error(t('excelDownErrMsg'));
|
||||
alert(t('excelDownErrMsg'));
|
||||
}
|
||||
isDownloadTriggered.current = false;
|
||||
}, [rswtSttn.excelList]);
|
||||
@@ -243,6 +244,7 @@ export default function RswtSttn() {
|
||||
cellClick={(index: number | undefined) => { cellClick(index ?? undefined) }}
|
||||
onPageChange={setPageNation}
|
||||
resetPageNo={resetPage}
|
||||
widthFixed={true}
|
||||
>
|
||||
<HeadMakeColSpan upHeadList={rswtSttn.rswtSttNodeList} />
|
||||
</UiTable>
|
||||
@@ -278,7 +280,6 @@ export default function RswtSttn() {
|
||||
/>
|
||||
|
||||
</ContentsDiv>
|
||||
<Toaster position="top-center" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export const headMakeprfmnc = (
|
||||
className={`border border-gray-600 px-2 py-1 `}
|
||||
rowSpan={2}
|
||||
key={head.id}
|
||||
style={{ width: head.widthPercent ? `${head.widthPercent}%` : undefined }}
|
||||
>
|
||||
{head.title}
|
||||
</TableHead>
|
||||
@@ -28,6 +29,7 @@ export const headMakeprfmnc = (
|
||||
colSpan={
|
||||
makeHeadNm?.find((ch) => ch.headNm === head.upName)?.length
|
||||
}
|
||||
style={{ width: head.widthPercent ? `${head.widthPercent}%` : undefined }}
|
||||
>
|
||||
{makeHeadNm?.find((ch) => ch.headNm === head.upName)?.text}
|
||||
</TableHead>
|
||||
@@ -43,6 +45,7 @@ export const headMakeprfmnc = (
|
||||
<TableHead
|
||||
className={`border border-gray-600 px-2 py-1 `}
|
||||
key={head.id}
|
||||
style={{ width: head.widthPercent ? `${head.widthPercent}%` : undefined }}
|
||||
>
|
||||
{head.title}
|
||||
</TableHead>
|
||||
@@ -51,4 +54,4 @@ export const headMakeprfmnc = (
|
||||
</TableRow>
|
||||
</>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
@@ -11,11 +11,11 @@ import {
|
||||
type rswtrChkDetailsZodType,
|
||||
} from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn";
|
||||
import {
|
||||
confirmToast,
|
||||
excelArrayDownload,
|
||||
excelDownload,
|
||||
yearOptions,
|
||||
} from "@/components/lib/func/common";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import ChkgdExcel from "@/components/ui/modal/chkgd/chkgdExcel/chkgdExcel";
|
||||
import ChkgdModal from "@/components/ui/modal/chkgd/chkgdModal/chkgdModal";
|
||||
import RainChkgdTable from "@/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable";
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
TooltipTrigger,
|
||||
} from "@common/components/ui/tooltip";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function Page() {
|
||||
@@ -66,6 +66,7 @@ export default function Page() {
|
||||
return state;
|
||||
});
|
||||
const { regAuthrtYn, mdfcnAuthrtYn, delAuthrtYn,laeSeCd } = auth;
|
||||
const { confirm } = useConfirm();
|
||||
const [isRegExcel, setIsRegExcel] = useState(false);
|
||||
const [updateRainDetail, setUpdateRainDetail] = useState<rainChkZodType[]>([]);
|
||||
const [updateRswtDetail, setUpdateRSwtDetail] = useState<rswtrChkDetailsZodType[]>([]);
|
||||
@@ -236,33 +237,42 @@ export default function Page() {
|
||||
}, [rainChkgdn.isSttn, rswtChkgdn.isSttn]);
|
||||
|
||||
const { t } = useTranslation('base');
|
||||
const clickDelete = (data: number[], selFcltDiv: string) => {
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const clickDelete = async (data: number[], selFcltDiv: string) => {
|
||||
if (data.length > 0) {
|
||||
if (selFcltDiv === "RNB") {
|
||||
const handleConfirm = async () => {
|
||||
rainChkDelete(data, searchYear);
|
||||
const message = await rainChkDelete(data, searchYear);
|
||||
alert(message);
|
||||
};
|
||||
confirmToast(t('isDeleteMsg'), handleConfirm);
|
||||
if (await confirm(t("isDeleteMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
} else {
|
||||
const handleConfirm = async () => {
|
||||
rswtChkDelete(data, searchYear);
|
||||
const message = await rswtChkDelete(data, searchYear);
|
||||
alert(message);
|
||||
};
|
||||
confirmToast(t('isDeleteMsg'), handleConfirm);
|
||||
if (await confirm(t("isDeleteMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const chkUpdateTable = (selFcltDiv: string) => {
|
||||
const chkUpdateTable = async (selFcltDiv: string) => {
|
||||
if (selFcltDiv === "RNB") {
|
||||
if (updateRainDetail && updateRainDetail.length > 0) {
|
||||
rainChkDetilUpdate(updateRainDetail, searchYear);
|
||||
const message = await rainChkDetilUpdate(updateRainDetail, searchYear);
|
||||
alert(message);
|
||||
} else {
|
||||
toast.error("수정을 원하는 행을 선택하고 저장버튼을 눌러주세요 ");
|
||||
alert("수정을 원하는 행을 선택하고 저장버튼을 눌러주세요 ");
|
||||
}
|
||||
} else {
|
||||
if (updateRswtDetail && updateRswtDetail.length > 0) {
|
||||
rswtChkDetilsUpdate(updateRswtDetail, searchYear);
|
||||
const message = await rswtChkDetilsUpdate(updateRswtDetail, searchYear);
|
||||
alert(message);
|
||||
} else {
|
||||
toast.error("수정을 원하는 행을 선택하고 저장버튼을 눌러주세요 ");
|
||||
alert("수정을 원하는 행을 선택하고 저장버튼을 눌러주세요 ");
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -330,7 +340,7 @@ export default function Page() {
|
||||
<Button
|
||||
className={btnClass}
|
||||
onClick={() => {
|
||||
clickDelete(deleteIdx, selFcltDiv);
|
||||
void clickDelete(deleteIdx, selFcltDiv);
|
||||
}}
|
||||
disabled={delAuthrtYn === 'N'}
|
||||
>
|
||||
@@ -343,7 +353,7 @@ export default function Page() {
|
||||
<Button
|
||||
className={btnClass}
|
||||
onClick={() => {
|
||||
chkUpdateTable(selFcltDiv);
|
||||
void chkUpdateTable(selFcltDiv);
|
||||
}}
|
||||
disabled={mdfcnAuthrtYn === 'N'}
|
||||
>
|
||||
@@ -434,7 +444,6 @@ export default function Page() {
|
||||
></ChkgdExcel>
|
||||
}
|
||||
/>
|
||||
<Toaster position="top-center" />
|
||||
</ContentsDiv>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
import { excelToPbnPrfData } from "@/app/store/prfmncReg/pbnstPrfmncReg/excel";
|
||||
@@ -11,10 +11,10 @@ import {
|
||||
type PrfType,
|
||||
} from "@/app/store/prfmncReg/pbnstPrfmncReg/type";
|
||||
import {
|
||||
confirmToast,
|
||||
excelDownload,
|
||||
yearOptions,
|
||||
} from "@/components/lib/func/common";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { InputTableBody } from "@/components/lib/func/TableData";
|
||||
import PbnPrfExcelModal from "@/components/ui/modal/chkgd/pbnPrfExcelModal/pbnPrfExcelModal";
|
||||
import {
|
||||
@@ -37,7 +37,7 @@ import {
|
||||
TableHeader,
|
||||
} from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { headMakeprfmnc } from "../chkgdnReg/TableHead";
|
||||
|
||||
@@ -72,6 +72,8 @@ export default function PrfmncPrfmncReg() {
|
||||
const [searchYear, setSearchYear] = useState<string>(
|
||||
String(new Date().getFullYear())
|
||||
);
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const useInitRef = useRef(false);
|
||||
|
||||
@@ -85,11 +87,11 @@ export default function PrfmncPrfmncReg() {
|
||||
}, [prfmnc.excelList]);
|
||||
|
||||
const { t } = useTranslation("base");
|
||||
const onSave = useCallback(() => {
|
||||
const onSave = useCallback(async () => {
|
||||
const handleConfirm = async () => {
|
||||
if (!pbnstRuseFcltId) return;
|
||||
|
||||
prfmnRegData(
|
||||
const message = await prfmnRegData(
|
||||
1,
|
||||
laeSeCd,
|
||||
excelToPbnPrfData(
|
||||
@@ -100,10 +102,13 @@ export default function PrfmncPrfmncReg() {
|
||||
searchYear,
|
||||
prfPbnFclts
|
||||
);
|
||||
alert(message);
|
||||
};
|
||||
|
||||
confirmToast(t("isUpdateMsg"), handleConfirm);
|
||||
}, [inputData, searchYear, pbnstRuseFcltId, cellNum, prfPbnFclts]);
|
||||
if (await confirm(t("isUpdateMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
}, [inputData, searchYear, pbnstRuseFcltId, cellNum, prfPbnFclts, confirm, t, laeSeCd, prfmnRegData]);
|
||||
|
||||
const cellClick = useCallback(
|
||||
(index: number | undefined) => {
|
||||
@@ -274,7 +279,7 @@ export default function PrfmncPrfmncReg() {
|
||||
<Button
|
||||
className={btnClass}
|
||||
onClick={() => {
|
||||
onSave();
|
||||
void onSave();
|
||||
}}
|
||||
disabled={mdfcnAuthrtYn === "N"}
|
||||
>
|
||||
@@ -284,7 +289,7 @@ export default function PrfmncPrfmncReg() {
|
||||
className={btnClass}
|
||||
onClick={() => {
|
||||
if (cellNum === undefined) {
|
||||
toast.error("하수처리재이용시설을 선택해주세요.");
|
||||
alert("하수처리재이용시설을 선택해주세요.");
|
||||
return;
|
||||
} else {
|
||||
setIsExcelOPen({ ...isExcelOpen, isModal: true });
|
||||
@@ -371,7 +376,8 @@ export default function PrfmncPrfmncReg() {
|
||||
setIsExcelOPen({ ...isExcelOpen, isModal: open });
|
||||
}}
|
||||
setModalExcelData={async (excelData) => {
|
||||
await prfmnRegData(1, laeSeCd, excelData, searchYear, prfPbnFclts);
|
||||
const message = await prfmnRegData(1, laeSeCd, excelData, searchYear, prfPbnFclts);
|
||||
alert(message);
|
||||
// 데이터 저장 후 UI 업데이트는 useEffect가 감지하여 처리하므로 여기서는 호출하지 않습니다.
|
||||
}}
|
||||
></PbnPrfExcelModal>
|
||||
@@ -381,7 +387,6 @@ export default function PrfmncPrfmncReg() {
|
||||
setIsExcelOPen({ ...isExcelOpen, isModal: false });
|
||||
}}
|
||||
></UiModal>
|
||||
<Toaster position="top-center" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function Page() {
|
||||
@@ -137,13 +137,14 @@ export default function Page() {
|
||||
[isModal]
|
||||
);
|
||||
const { t } = useTranslation("base");
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const excelDown = () => {
|
||||
if (rainChkSttn.sttnExcelList && selFcltDiv === "RNB") {
|
||||
if (
|
||||
!rainChkSttn.sttnExcelList ||
|
||||
rainChkSttn.sttnExcelList.length === 0
|
||||
) {
|
||||
toast.error(t("excelDownErrMsg"));
|
||||
alert(t("excelDownErrMsg"));
|
||||
return;
|
||||
}
|
||||
// console.log(rainChkSttn.sttnExcelList);
|
||||
@@ -165,7 +166,7 @@ export default function Page() {
|
||||
!rswtChkSttn.sttnExcelList ||
|
||||
rswtChkSttn.sttnExcelList.length === 0
|
||||
) {
|
||||
toast.error(t("excelDownErrMsg"));
|
||||
alert(t("excelDownErrMsg"));
|
||||
return;
|
||||
}
|
||||
const sheetArray: SheetParameter[] = [{
|
||||
@@ -307,7 +308,6 @@ export default function Page() {
|
||||
/>
|
||||
}
|
||||
></UiModal>
|
||||
<Toaster position="top-center" />
|
||||
</ContentsDiv>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
@@ -11,7 +11,7 @@ import { CHART_FORM, ContentsDiv, MainChart, ScrollArea, SearchBaseForm, SearchI
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Label, Table, TableBody, TableHeader } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { headMakeprfmnc } from "../../prfmncReg/chkgdnReg/TableHead";
|
||||
|
||||
@@ -37,6 +37,7 @@ export default function PbnstPrfmncSttn() {
|
||||
// const [swtrmtFcltNm, setSwtrmtFcltNm] = useState<string>();
|
||||
const [pbnRuseNm, setPbnRuseNm] = useState<string>("");
|
||||
const { t } = useTranslation('base');
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const searchYear = String(new Date().getFullYear());
|
||||
const [excelData, setExcelData] = useState<any[]>([]);
|
||||
const [pageNation, setPageNation] = useState(1);
|
||||
@@ -44,7 +45,7 @@ export default function PbnstPrfmncSttn() {
|
||||
|
||||
const excelClick = useCallback(() => {
|
||||
if (!excelData || excelData.length === 0) {
|
||||
toast.error(t('excelDownErrMsg'));
|
||||
alert(t('excelDownErrMsg'));
|
||||
return;
|
||||
}
|
||||
const sheetArray: SheetParameter[] = [{
|
||||
@@ -598,10 +599,10 @@ export default function PbnstPrfmncSttn() {
|
||||
const fromNum = Number(fromDate);
|
||||
const toNum = Number(toDate);
|
||||
if (fromNum > toNum) {
|
||||
toast.error("시작년도가 종료년도 이후로 설정할 수 없습니다.");
|
||||
alert("시작년도가 종료년도 이후로 설정할 수 없습니다.");
|
||||
} else {
|
||||
if (toNum - fromNum > 4) {
|
||||
toast.error("최대 5년까지 선택 가능합니다.");
|
||||
alert("최대 5년까지 선택 가능합니다.");
|
||||
} else {
|
||||
tableHeadMaker(fromNum, toNum);
|
||||
|
||||
@@ -635,6 +636,7 @@ export default function PbnstPrfmncSttn() {
|
||||
onPageChange={setPageNation}
|
||||
index={0}
|
||||
resetPageNo={resetPage}
|
||||
widthFixed={true}
|
||||
/>
|
||||
|
||||
<hr />
|
||||
@@ -722,7 +724,6 @@ export default function PbnstPrfmncSttn() {
|
||||
</div>
|
||||
</div>
|
||||
</ContentsDiv>
|
||||
<Toaster position="top-center" />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { useEffect, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function RainStat() {
|
||||
@@ -30,6 +30,7 @@ export default function RainStat() {
|
||||
//const [exData, setExData] = useState<Array<Record<string, string | number>>>();
|
||||
const [bdstTable, setBdstTable] = useState<RainStatProps[]>();
|
||||
const { t } = useTranslation('base');
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
useEffect(() => {
|
||||
searchRainStatList(searchYear ,code.cityCd);
|
||||
@@ -184,7 +185,7 @@ export default function RainStat() {
|
||||
decimalArray0: [1,2,3,4,5,6,7,8,9,10,11,12], // 0부터 시작
|
||||
})
|
||||
}else{
|
||||
toast.error(t('excelDownErrMsg'));
|
||||
alert(t('excelDownErrMsg'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
import type { RswtStatProps } from "@/app/store/stats/rswtStat";
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { useEffect, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function RswtStat() {
|
||||
@@ -27,6 +27,7 @@ export default function RswtStat() {
|
||||
);
|
||||
|
||||
const { t } = useTranslation('base');
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
useEffect(() => {
|
||||
searchRswtStatList(searchYear, code.cityCd, code.rswtBdstType);
|
||||
}, [searchRswtStatList, code.cityCd])
|
||||
@@ -62,7 +63,7 @@ export default function RswtStat() {
|
||||
decimalArray0: [1,2,3,4,5,6,7,8,9,10,11,12,13], // 0부터 시작
|
||||
})
|
||||
} else {
|
||||
toast.error(t("excelDownErrMsg"))
|
||||
alert(t("excelDownErrMsg"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +297,6 @@ export default function RswtStat() {
|
||||
</ListDiv>
|
||||
</div>
|
||||
</div>
|
||||
<Toaster position="top-center"></Toaster>
|
||||
</ContentsDiv>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -3,6 +3,7 @@ export type CommonTableProps = {
|
||||
title: string;
|
||||
upName?: string;
|
||||
upSequnce?: number;
|
||||
widthPercent?: number;
|
||||
row?: number;
|
||||
rowSpan?: number;
|
||||
colSpan?: number;
|
||||
@@ -14,6 +15,7 @@ export type TableUpperProps = {
|
||||
title: string;
|
||||
upName?: string;
|
||||
upSequnce?: number;
|
||||
widthPercent?: number;
|
||||
edit?:boolean;
|
||||
visible?:boolean;
|
||||
rowSpan?: number;
|
||||
|
||||
@@ -3,187 +3,46 @@ import type { CommonTableProps } from "../../common/type/header";
|
||||
|
||||
|
||||
export const coRvwHeadListExport: CommonTableProps[]= [
|
||||
{
|
||||
id: "cityText",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "sggText",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "dmdCoNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "daddr",
|
||||
title: "주소",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "telno",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "dmndTmng",
|
||||
title: "신청일자",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "splyFcltFlg",
|
||||
title: "진행상태",
|
||||
visible: true,
|
||||
},
|
||||
{ id: "cityText", title: "시도", visible: true, widthPercent: 12, },
|
||||
{ id: "sggText", title: "시군구", visible: true, widthPercent: 8, },
|
||||
{ id: "dmdCoNm", title: "회사명", visible: true, widthPercent: 14, },
|
||||
{ id: "daddr", title: "주소", visible: true, widthPercent: 28, },
|
||||
{ id: "telno", title: "전화번호", visible: true, widthPercent: 12, },
|
||||
{ id: "dmndTmng", title: "신청일자", visible: true, widthPercent: 12, },
|
||||
{ id: "splyFcltFlg", title: "진행상태", visible: true, widthPercent: 14, },
|
||||
];
|
||||
|
||||
// id는 다확인해야함
|
||||
export const coRvwNodeListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpv",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sgg",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "coNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "addr",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "telNo",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "regDt", //바꾸기
|
||||
title: "신청일자",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "state", //바꾸기
|
||||
title: "진행상태",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{ id: "ctpv", title: "시도", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "sgg", title: "시군구", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "coNm", title: "회사명", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "addr", title: "공장주소", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "telNo", title: "전화번호", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "regDt", title: "신청일자", visible: true, row: 1, rowSpan: 1, colSpan: 1, }, //바꾸기
|
||||
{ id: "state", title: "진행상태", visible: true, row: 1, rowSpan: 1, colSpan: 1, }, //바꾸기
|
||||
];
|
||||
|
||||
export const constCostHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "gubun",
|
||||
title: "구분",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "500",
|
||||
title: "500",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "1000",
|
||||
title: "1,000",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "2000",
|
||||
title: "2,000",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "3000", //바꾸기
|
||||
title: "3,000",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "5000", //바꾸기
|
||||
title: "5,000",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "10000", //
|
||||
title: "10,000",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "20000", //
|
||||
title: "20,000",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "30000", //
|
||||
title: "30,000",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "50000", //
|
||||
title: "50,000",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "100000", //바꾸기
|
||||
title: "100,000",
|
||||
visible: true,
|
||||
},
|
||||
{ id: "gubun", title: "구분", visible: true, },
|
||||
{ id: "500", title: "500", visible: true, },
|
||||
{ id: "1000", title: "1,000", visible: true, },
|
||||
{ id: "2000", title: "2,000", visible: true, },
|
||||
{ id: "3000", title: "3,000", visible: true, }, //바꾸기
|
||||
{ id: "5000", title: "5,000", visible: true, }, //바꾸기
|
||||
{ id: "10000", title: "10,000", visible: true, }, //
|
||||
{ id: "20000", title: "20,000", visible: true, }, //
|
||||
{ id: "30000", title: "30,000", visible: true, }, //
|
||||
{ id: "50000", title: "50,000", visible: true, }, //
|
||||
{ id: "100000", title: "100,000", visible: true, }, //바꾸기
|
||||
];
|
||||
|
||||
export const rateFeeHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "gubun",
|
||||
title: "공사비/구분",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "BD",
|
||||
title: "기본조사설계비",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "WD",
|
||||
title: "실시설계비",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "SE",
|
||||
title: "공사감리비",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "CE",
|
||||
title: "시설부대비",
|
||||
visible: true,
|
||||
},
|
||||
{ id: "gubun", title: "공사비/구분", visible: true, },
|
||||
{ id: "BD", title: "기본조사설계비", visible: true, },
|
||||
{ id: "WD", title: "실시설계비", visible: true, },
|
||||
{ id: "SE", title: "공사감리비", visible: true, },
|
||||
{ id: "CE", title: "시설부대비", visible: true, },
|
||||
];
|
||||
|
||||
export const usageProcData = [
|
||||
|
||||
@@ -6,6 +6,7 @@ export const sttnHeadListType = z.array(
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
visible: z.boolean(),
|
||||
widthPercent: z.number().optional(),
|
||||
})
|
||||
);
|
||||
|
||||
@@ -14,90 +15,20 @@ export const coRegExcel = z.object({
|
||||
});
|
||||
|
||||
export const coSttHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
{
|
||||
id: "cityText",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "sggText",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "dmdCoNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "daddr",
|
||||
title: "주소",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "dmdInfoId",
|
||||
title: "사업자번호",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "telno",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "regDt",
|
||||
title: "등록일자",
|
||||
visible: true,
|
||||
},
|
||||
{ id: "cityText", title: "시도", visible: true, widthPercent: 8 },
|
||||
{ id: "sggText", title: "시군구", visible: true, widthPercent: 8 },
|
||||
{ id: "dmdCoNm", title: "회사명", visible: true, widthPercent: 18 },
|
||||
{ id: "daddr", title: "주소", visible: true, widthPercent: 28 },
|
||||
{ id: "dmdInfoId", title: "사업자번호", visible: true, widthPercent: 14 },
|
||||
{ id: "telno", title: "전화번호", visible: true, widthPercent: 12 },
|
||||
{ id: "regDt", title: "등록일자", visible: true, widthPercent: 12, },
|
||||
];
|
||||
|
||||
export const coSttNodeListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "cityText",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sggText",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "dmdCoNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "daddr",
|
||||
title: "주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "dmdInfoId",
|
||||
title: "사업자번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "telno",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
];
|
||||
{ id: "cityText", title: "시도", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "sggText", title: "시군구", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "dmdCoNm", title: "회사명", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "daddr", title: "주소", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "dmdInfoId", title: "사업자번호", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "telno", title: "전화번호", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
];
|
||||
|
||||
@@ -15,87 +15,17 @@ export const drgtZod = z.object({
|
||||
})
|
||||
|
||||
export const drgtHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpvCd",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sggNm",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "normal",
|
||||
title: "정상(횟수)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "attention",
|
||||
title: "관심(횟수)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "caution",
|
||||
title: "주의(횟수)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "warning",
|
||||
title: "관심+주의(횟수)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "ranking",
|
||||
title: "가뭄순위",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{ id: "ctpvCd", title: "시도", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "sggNm", title: "시군구", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "normal", title: "정상(횟수)", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "attention", title: "관심(횟수)", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "caution", title: "주의(횟수)", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "warning", title: "관심+주의(횟수)", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "ranking", title: "가뭄순위", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
];
|
||||
|
||||
export const drgtDetailHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "year",
|
||||
title: "년",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "month",
|
||||
title: "월",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "drgtState",
|
||||
title: "가뭄상태",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
]
|
||||
{ id: "year", title: "년", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "month", title: "월", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
{ id: "drgtState", title: "가뭄상태", visible: true, row: 1, rowSpan: 1, colSpan: 1, },
|
||||
]
|
||||
|
||||
@@ -46,359 +46,51 @@ export const ldrmntZod = z.object({
|
||||
})
|
||||
|
||||
export const ldrmntHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpvCd",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sggCd",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "dmdCoNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "fctryAddr",
|
||||
title: "회사주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "fctryMngNo",
|
||||
title: "공장관리번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "telno",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{ id: "ctpvCd", title: "시도", visible: true, row: 1, rowSpan: 1, colSpan: 1, widthPercent: 8, },
|
||||
{ id: "sggCd", title: "시군구", visible: true, row: 1, rowSpan: 1, colSpan: 1, widthPercent: 8 },
|
||||
{ id: "dmdCoNm", title: "회사명", visible: true, row: 1, rowSpan: 1, colSpan: 1, widthPercent: 18 },
|
||||
{ id: "fctryAddr", title: "회사주소", visible: true, row: 1, rowSpan: 1, colSpan: 1, widthPercent: 30 },
|
||||
{ id: "fctryMngNo", title: "공장관리번호", visible: true, row: 1, rowSpan: 1, colSpan: 1, widthPercent: 18 },
|
||||
{ id: "telno", title: "전화번호", visible: true, row: 1, rowSpan: 1, colSpan: 1, widthPercent: 18 },
|
||||
]
|
||||
|
||||
export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpvCd",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sggCd",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "mngInstNm",
|
||||
title: "관리기관",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "dmdCoNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "fctrySe",
|
||||
title: "공장구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "cmpxNm",
|
||||
title: "단지명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "fndnSe",
|
||||
title: "설립구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "mvnShp",
|
||||
title: "입주형태",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "hldSe",
|
||||
title: "보유구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "frstAprvYmd",
|
||||
title: "최초승인일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "frstRegYmd",
|
||||
title: "최초등록일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "regSe",
|
||||
title: "등록구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "regYmd",
|
||||
title: "등록일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "telno",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "maleEmpCnt",
|
||||
title: "남자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "fmaleEmpCnt",
|
||||
title: "여자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "frgnrMaleEmpCnt",
|
||||
title: "외국인남자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "frgnrFmaleEmpCnt",
|
||||
title: "외국인여자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "totalEmpCnt",
|
||||
title: "종업원합계",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "prdctnItem",
|
||||
title: "생산품",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "splyMtrl",
|
||||
title: "원자재",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "fctryScl",
|
||||
title: "공장규모",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "usgRgn",
|
||||
title: "용도지역",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "ldcg",
|
||||
title: "지목",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "usgRgnArea",
|
||||
title: "용지면적(m²)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "mnftrFcltArea",
|
||||
title: "제조시설면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sbsdFcltArea",
|
||||
title: "부대시설면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "archArea",
|
||||
title: "건축면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "knwlIndstCntrNm",
|
||||
title: "지식산업센터명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "rprsTpbiz",
|
||||
title: "대표업종",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "tpbizNm",
|
||||
title: "업종명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "tpbizCd",
|
||||
title: "업종코드",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "cycl",
|
||||
title: "차수",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "corpAddr",
|
||||
title: "법인주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "esntlIdx",
|
||||
title: "필지수",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "fctryAddr",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "fctryLotnoAddr",
|
||||
title: "공장주소_지번",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "fctryMngNo",
|
||||
title: "공장관리번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
];
|
||||
{ id: "ctpvCd", title: "시도", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "sggCd", title: "시군구", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "mngInstNm", title: "관리기관", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "dmdCoNm", title: "회사명", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "fctrySe", title: "공장구분", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "cmpxNm", title: "단지명", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "fndnSe", title: "설립구분", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "mvnShp", title: "입주형태", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "hldSe", title: "보유구분", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "frstAprvYmd", title: "최초승인일", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "frstRegYmd", title: "최초등록일", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "regSe", title: "등록구분", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "regYmd", title: "등록일", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "telno", title: "전화번호", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "maleEmpCnt", title: "남자종업원", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "fmaleEmpCnt", title: "여자종업원", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "frgnrMaleEmpCnt", title: "외국인남자종업원", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "frgnrFmaleEmpCnt", title: "외국인여자종업원", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "totalEmpCnt", title: "종업원합계", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "prdctnItem", title: "생산품", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "splyMtrl", title: "원자재", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "fctryScl", title: "공장규모", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "usgRgn", title: "용도지역", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "ldcg", title: "지목", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "usgRgnArea", title: "용지면적(m²)", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "mnftrFcltArea", title: "제조시설면적", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "sbsdFcltArea", title: "부대시설면적", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "archArea", title: "건축면적", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "knwlIndstCntrNm", title: "지식산업센터명", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "rprsTpbiz", title: "대표업종", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "tpbizNm", title: "업종명", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "tpbizCd", title: "업종코드", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "cycl", title: "차수", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "corpAddr", title: "법인주소", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "esntlIdx", title: "필지수", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "fctryAddr", title: "공장주소", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "fctryLotnoAddr", title: "공장주소_지번", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
{ id: "fctryMngNo", title: "공장관리번호", visible: true, row: 1, rowSpan: 1, colSpan: 1 },
|
||||
];
|
||||
|
||||
@@ -2,358 +2,63 @@ import type { SelectDataType } from "@common/business_components/ui";
|
||||
import type { TableUpperProps } from "../../common/type/header";
|
||||
|
||||
export const ruseCaseHeadListExport: TableUpperProps[] = [
|
||||
{
|
||||
id: "ruseBizNm",
|
||||
title: "사업명",
|
||||
visible: true,
|
||||
row: 0,
|
||||
rowSpan: 2,
|
||||
},
|
||||
{
|
||||
id: "bizBgngDate",
|
||||
title: "사업시작년",
|
||||
visible: true,
|
||||
row: 0,
|
||||
rowSpan: 2,
|
||||
},
|
||||
{
|
||||
id: "bizEndDate",
|
||||
title: "사업종료년",
|
||||
visible: true,
|
||||
row: 0,
|
||||
rowSpan: 2,
|
||||
},
|
||||
{
|
||||
id: "c",
|
||||
title: "공급처",
|
||||
visible: true,
|
||||
row: 0,
|
||||
colSpan: 3,
|
||||
},
|
||||
{
|
||||
id: "splyFcltKnd",
|
||||
title: "시설종류",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "splyFcltNm",
|
||||
title: "공급처명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "splyFcltCpct",
|
||||
title: "시설용량(m³/일)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "g",
|
||||
title: "수요처",
|
||||
visible: true,
|
||||
row: 0,
|
||||
colSpan: 2,
|
||||
},
|
||||
{
|
||||
id: "dmdFcltNm",
|
||||
title: "수요처명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "dmdFcltAddr",
|
||||
title: "주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "q",
|
||||
title: "재이용시설",
|
||||
visible: true,
|
||||
row: 0,
|
||||
colSpan: 5,
|
||||
},
|
||||
{
|
||||
id: "ruseFcltCpct",
|
||||
title: "시설용량(m³/일)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "ruseFcltPplLen",
|
||||
title: "관로(km)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "ruseFcltUsg",
|
||||
title: "용도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "ruseFcltSplyCpct",
|
||||
title: "공급량(m³/일)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "ruseFcltPrcsMsrc",
|
||||
title: "처리공법",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "k",
|
||||
title: "보증수질",
|
||||
visible: true,
|
||||
row: 0,
|
||||
colSpan: 13,
|
||||
},
|
||||
{
|
||||
id: "grnteWqUsg",
|
||||
title: "용도별",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqGrssClfg",
|
||||
title: "총대장균군수(개/100ml)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqCombResdch",
|
||||
title: "결합잔류염소(mg/L)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqTrbt",
|
||||
title: "탁도(NTU)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqBod",
|
||||
title: "생물학적산소요구량(BOD)(mg/L)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqSmll",
|
||||
title: "냄새",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqCrmty",
|
||||
title: "색도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqTn",
|
||||
title: "총질소(T-N)(mg/L)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqTp",
|
||||
title: "총인(T-P)(mg/L)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqPh",
|
||||
title: "수소이온농도(pH)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqClIonQnt",
|
||||
title: "염화물",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqCndctStat",
|
||||
title: "전기전도도(㎲/cm)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "grnteWqRmrk",
|
||||
title: "비고",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "h",
|
||||
title: "소요사업비(백만원)",
|
||||
visible: true,
|
||||
row: 0,
|
||||
colSpan: 14,
|
||||
},
|
||||
{
|
||||
id: "reqBizGrssCst",
|
||||
title: "총",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizReuseFcltCst",
|
||||
title: "토목재이용시설",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizPplCst",
|
||||
title: "토목관로",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizArchCst",
|
||||
title: "건축",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizMchnCst",
|
||||
title: "기계",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizMtrngCst",
|
||||
title: "전기・계측",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizGisCst",
|
||||
title: "GIS・DB",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizCctvCst",
|
||||
title: "CCTV",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizCmcnCst",
|
||||
title: "시공및준공",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizWstCst",
|
||||
title: "페기물",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizDesignCst",
|
||||
title: "설계비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizSpvsCst",
|
||||
title: "감리비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizSbsdCst",
|
||||
title: "시설부대비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "reqBizEtc",
|
||||
title: "기타",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "i",
|
||||
title: "자원조달계획(백만원)",
|
||||
visible: true,
|
||||
row: 0,
|
||||
colSpan: 5,
|
||||
},
|
||||
{
|
||||
id: "prcmPlanGrssCst",
|
||||
title: "총",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "prcmPlanNlep",
|
||||
title: "국비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "prcmPlanLcep",
|
||||
title: "지방비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "prcmPlanBrdnCst",
|
||||
title: "원인자부담",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "prcmPlanEcqrRt",
|
||||
title: "국고비율(%)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "j",
|
||||
title: "사업비정산(백만원)",
|
||||
visible: true,
|
||||
row: 0,
|
||||
colSpan: 5,
|
||||
},
|
||||
{
|
||||
id: "clclnGrssCst",
|
||||
title: "총",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "clclnNlep",
|
||||
title: "국비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "clclnLcep",
|
||||
title: "지방비",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "clclnBrdnCst",
|
||||
title: "원인자부담",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{
|
||||
id: "clclnEcqrRt",
|
||||
title: "국고비율(%)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
},
|
||||
{ id: "ruseBizNm", title: "사업명", visible: true, row: 0, rowSpan: 2, widthPercent: 6, },
|
||||
{ id: "bizBgngDate", title: "사업시작년", visible: true, row: 0, rowSpan: 2, widthPercent: 2, },
|
||||
{ id: "bizEndDate", title: "사업종료년", visible: true, row: 0, rowSpan: 2, widthPercent: 2, },
|
||||
{ id: "c", title: "공급처", visible: true, row: 0, colSpan: 3, },
|
||||
{ id: "splyFcltKnd", title: "시설종류", visible: true, row: 1, widthPercent: 2, },
|
||||
{ id: "splyFcltNm", title: "공급처명", visible: true, row: 1, widthPercent: 5, },
|
||||
{ id: "splyFcltCpct", title: "시설용량\n(m³/일)", visible: true, row: 1, widthPercent: 3, },
|
||||
{ id: "g", title: "수요처", visible: true, row: 0, colSpan: 2, },
|
||||
{ id: "dmdFcltNm", title: "수요처명", visible: true, row: 1, widthPercent: 4, },
|
||||
{ id: "dmdFcltAddr", title: "주소", visible: true, row: 1, widthPercent: 7, },
|
||||
{ id: "q", title: "재이용시설", visible: true, row: 0, colSpan: 5, },
|
||||
{ id: "ruseFcltCpct", title: "시설용량\n(m³/일)", visible: true, row: 1, widthPercent: 1.5, },
|
||||
{ id: "ruseFcltPplLen", title: "관로(km)", visible: true, row: 1, widthPercent: 1.5, },
|
||||
{ id: "ruseFcltUsg", title: "용도", visible: true, row: 1, widthPercent: 3, },
|
||||
{ id: "ruseFcltSplyCpct", title: "공급량\n(m³/일)", visible: true, row: 1, widthPercent: 2, },
|
||||
{ id: "ruseFcltPrcsMsrc", title: "처리공법", visible: true, row: 1, widthPercent: 3, },
|
||||
{ id: "k", title: "보증수질", visible: true, row: 0, colSpan: 13, },
|
||||
{ id: "grnteWqUsg", title: "용도별", visible: true, row: 1, widthPercent: 2, },
|
||||
{ id: "grnteWqGrssClfg", title: "총대장균군수\n(개/100ml)", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqCombResdch", title: "결합잔류염소\n(mg/L)", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqTrbt", title: "탁도(NTU)", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqBod", title: "생물학적산소요구량\n(BOD)(mg/L)", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqSmll", title: "냄새", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqCrmty", title: "색도", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqTn", title: "총질소(T-N)(mg/L)", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqTp", title: "총인(T-P)(mg/L)", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqPh", title: "수소이온농도(pH)", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqClIonQnt", title: "염화물", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqCndctStat", title: "전기전도도(㎲/cm)", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "grnteWqRmrk", title: "비고", visible: true, row: 1, widthPercent: 1.92, },
|
||||
{ id: "h", title: "소요사업비(백만원)", visible: true, row: 0, colSpan: 14, },
|
||||
{ id: "reqBizGrssCst", title: "총", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizReuseFcltCst", title: "토목재이용시설", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizPplCst", title: "토목관로", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizArchCst", title: "건축", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizMchnCst", title: "기계", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizMtrngCst", title: "전기・계측", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizGisCst", title: "GIS・DB", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizCctvCst", title: "CCTV", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizCmcnCst", title: "시공및준공", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizWstCst", title: "페기물", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizDesignCst", title: "설계비", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizSpvsCst", title: "감리비", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizSbsdCst", title: "시설부대비", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "reqBizEtc", title: "기타", visible: true, row: 1, widthPercent: 1.43, },
|
||||
{ id: "i", title: "자원조달계획(백만원)", visible: true, row: 0, colSpan: 5, },
|
||||
{ id: "prcmPlanGrssCst", title: "총", visible: true, row: 1, widthPercent: 1.6, },
|
||||
{ id: "prcmPlanNlep", title: "국비", visible: true, row: 1, widthPercent: 1.6, },
|
||||
{ id: "prcmPlanLcep", title: "지방비", visible: true, row: 1, widthPercent: 1.6, },
|
||||
{ id: "prcmPlanBrdnCst", title: "원인자부담", visible: true, row: 1, widthPercent: 1.6, },
|
||||
{ id: "prcmPlanEcqrRt", title: "국고비율(%)", visible: true, row: 1, widthPercent: 1.6, },
|
||||
{ id: "j", title: "사업비정산(백만원)", visible: true, row: 0, colSpan: 5, },
|
||||
{ id: "clclnGrssCst", title: "총", visible: true, row: 1, widthPercent: 2, },
|
||||
{ id: "clclnNlep", title: "국비", visible: true, row: 1, widthPercent: 1.5, },
|
||||
{ id: "clclnLcep", title: "지방비", visible: true, row: 1, widthPercent: 1.5, },
|
||||
{ id: "clclnBrdnCst", title: "원인자부담", visible: true, row: 1, widthPercent: 1.5, },
|
||||
{ id: "clclnEcqrRt", title: "국고비율(%)", visible: true, row: 1, widthPercent: 1.5, },
|
||||
];
|
||||
|
||||
export const ruseUtzType: SelectDataType[] = [
|
||||
|
||||
@@ -2,71 +2,18 @@ import type { TableUpperProps } from "../../common/type/header";
|
||||
|
||||
|
||||
export const ruseHstryHeadListExport:TableUpperProps[]= [
|
||||
{
|
||||
id: "cityText",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
|
||||
},
|
||||
{
|
||||
id: "sggText",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "dmdCoNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "daddr",
|
||||
title: "주소",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "telno",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "dmndTmng", //바꾸기
|
||||
title: "신청일자",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "rvwCmptnYmd", //바꾸기
|
||||
title: "검토일자",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "mtchnCmptnYmd", //바꾸기
|
||||
title: "매칭 완료일자",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "ruseUtztnFcltNm", //바꾸기
|
||||
title: "공급처",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "dmndQty", //바꾸기
|
||||
title: "요구수량(m³/일)",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "useUsgCd", //바꾸기
|
||||
title: "사용용도",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "splyFcltFlg", //바꾸기
|
||||
title: "진행상태",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "completeYn", //바꾸기
|
||||
title: "매칭완료 여부",
|
||||
visible: true,
|
||||
},
|
||||
{ id: "cityText", title: "시도", visible: true, widthPercent: 8, },
|
||||
{ id: "sggText", title: "시군구", visible: true, widthPercent: 6, },
|
||||
{ id: "dmdCoNm", title: "회사명", visible: true, widthPercent: 10, },
|
||||
{ id: "daddr", title: "주소", visible: true, widthPercent: 16, },
|
||||
{ id: "telno", title: "전화번호", visible: true, widthPercent: 8, },
|
||||
{ id: "dmndTmng", title: "신청일자", visible: true, widthPercent: 7, }, //바꾸기
|
||||
{ id: "rvwCmptnYmd", title: "검토일자", visible: true, widthPercent: 7, }, //바꾸기
|
||||
{ id: "mtchnCmptnYmd", title: "매칭 완료일자", visible: true, widthPercent: 7, }, //바꾸기
|
||||
{ id: "ruseUtztnFcltNm", title: "공급처", visible: true, widthPercent: 10, }, //바꾸기
|
||||
{ id: "dmndQty", title: "요구수량\n(m³/일)", visible: true, widthPercent: 6, }, //바꾸기
|
||||
{ id: "useUsgCd", title: "사용용도", visible: true, widthPercent: 5, }, //바꾸기
|
||||
{ id: "splyFcltFlg", title: "진행상태", visible: true, widthPercent: 5, }, //바꾸기
|
||||
{ id: "completeYn", title: "매칭완료 여부", visible: true, widthPercent: 5, }, //바꾸기
|
||||
];
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { fetchType, getFetchWithCount, postFectch, putFectch } from "@/components/lib/api";
|
||||
import toast from "react-hot-toast";
|
||||
import type {
|
||||
TableUpperProps
|
||||
} from "../../common/type/header";
|
||||
@@ -52,7 +51,7 @@ type ruseHstryActions = {
|
||||
endYear: string,
|
||||
sggCd?: string
|
||||
) => void;
|
||||
ruseRvwCalUpdate: (data: DmdCoReqType) => void;
|
||||
ruseRvwCalUpdate: (data: DmdCoReqType) => Promise<string>;
|
||||
ruseRvwSearch: (
|
||||
pageNo: number,
|
||||
pageCnt: number,
|
||||
@@ -69,7 +68,7 @@ type ruseHstryActions = {
|
||||
endYear: string,
|
||||
sggCd: string
|
||||
) => void;
|
||||
ruseRvwComplete:( data: number[]) => void;
|
||||
ruseRvwComplete:( data: number[]) => Promise<string>;
|
||||
};
|
||||
|
||||
const irvwHistInit = async (
|
||||
@@ -119,6 +118,8 @@ export const ruseHstryActionsExport: (set: any) => ruseHstryActions = (
|
||||
}));
|
||||
},
|
||||
ruseRvwCalUpdate: async (data: DmdCoReqType) => {
|
||||
const successMessage = "매칭 계산 저장이 완료입니다.";
|
||||
const failMessage = "매칭 계산 저장이 오류입니다.";
|
||||
try {
|
||||
|
||||
const updatedData = addRgtrAndMdfrToDemandObj(data);
|
||||
@@ -127,14 +128,13 @@ export const ruseHstryActionsExport: (set: any) => ruseHstryActions = (
|
||||
updatedData
|
||||
);
|
||||
if (update.status === 200) {
|
||||
toast.success("매칭 계산 저장이 완료입니다.");
|
||||
const rvwHistRes = await irvwHistInit(
|
||||
1,
|
||||
13,
|
||||
new Date().getFullYear().toString(),
|
||||
new Date().getFullYear().toString(),
|
||||
);
|
||||
return set((state: ruseHstryState) => ({
|
||||
set((state: ruseHstryState) => ({
|
||||
...state,
|
||||
ruseHist: {
|
||||
...state.ruseHist,
|
||||
@@ -142,10 +142,12 @@ export const ruseHstryActionsExport: (set: any) => ruseHstryActions = (
|
||||
rvwHistRes: rvwHistRes.data,
|
||||
rvwHistCount:rvwHistRes.count },
|
||||
}));
|
||||
return successMessage;
|
||||
}
|
||||
return failMessage;
|
||||
} catch (e) {
|
||||
toast.error("매칭 계산 저장이 오류입니다.");
|
||||
console.log(e);
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
ruseRvwSearch: async (
|
||||
@@ -210,6 +212,8 @@ export const ruseHstryActionsExport: (set: any) => ruseHstryActions = (
|
||||
}
|
||||
},
|
||||
ruseRvwComplete: async (data: number[]) => {
|
||||
const successMessage = "매칭완료가 완료되었습니다.";
|
||||
const failMessage = "매칭 완료 처리 중 오류가 발생했습니다.";
|
||||
try {
|
||||
const complet = await postFectch(
|
||||
`/reuseFc/request/completeCheck`,
|
||||
@@ -217,7 +221,6 @@ export const ruseHstryActionsExport: (set: any) => ruseHstryActions = (
|
||||
fetchType.WR
|
||||
);
|
||||
if (complet.status === 200) {
|
||||
toast.success("매칭완료가 완료되었습니다.");
|
||||
const rvwHistRes = await irvwHistInit(
|
||||
1,
|
||||
13,
|
||||
@@ -225,7 +228,7 @@ export const ruseHstryActionsExport: (set: any) => ruseHstryActions = (
|
||||
new Date().getFullYear().toString(),
|
||||
);
|
||||
|
||||
return set((state: ruseHstryState) => ({
|
||||
set((state: ruseHstryState) => ({
|
||||
...state,
|
||||
ruseHist: {
|
||||
...state.ruseHist,
|
||||
@@ -233,10 +236,12 @@ export const ruseHstryActionsExport: (set: any) => ruseHstryActions = (
|
||||
rvwHistCount:rvwHistRes.count
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
}
|
||||
return failMessage;
|
||||
} catch (e) {
|
||||
console.log(" error ", e);
|
||||
toast.error("매칭 완료 처리 중 오류가 발생했습니다.");
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TEST_UUID } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import { TEST_UUID } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import type { SelectDataType } from "@common/business_components";
|
||||
import type { rainChkZodType } from ".";
|
||||
import {
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
isInvalidNumber,
|
||||
parseRawValue,
|
||||
} from "@/components/lib/func/excelFunc";
|
||||
import toast from "react-hot-toast";
|
||||
import { codeToText, textToCode } from "@/components/lib/func/common";
|
||||
export const useTypes = [
|
||||
"조경용수",
|
||||
@@ -232,14 +231,21 @@ export const excelToRainChkData = (excelData: any, year: string) => {
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
toast.error("데이터가 없습니다. 점검 데이터를 확인해주세요.");
|
||||
}
|
||||
|
||||
if (issues.length > 0) {
|
||||
return { rainChkgdData: [], issues };
|
||||
return { rainChkgdData: [], issues, message: "" };
|
||||
}
|
||||
|
||||
return { rainChkgdData, issues: [] };
|
||||
if (rainChkgdData.length === 0) {
|
||||
return {
|
||||
rainChkgdData: [],
|
||||
issues: [],
|
||||
message: "데이터가 없습니다. 점검 데이터를 확인해주세요.",
|
||||
};
|
||||
}
|
||||
|
||||
return { rainChkgdData, issues: [], message: "" };
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { buildingType } from "@/app/store/common/code";
|
||||
import { buildingType } from "@/app/store/common/code";
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import { TEST_UUID } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import {
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
putFectch,
|
||||
} from "@/components/lib/api";
|
||||
import type { SelectDataType } from "@common/business_components/ui";
|
||||
import toast from "react-hot-toast";
|
||||
import { z } from "zod";
|
||||
import { buildingToExcelType } from "./excel";
|
||||
import {
|
||||
@@ -67,15 +66,15 @@ type rainChkgdnActions = {
|
||||
sggCd: string,
|
||||
searchTxt: string
|
||||
) => void;
|
||||
rainChkDetilUpdate(rainChk: rainChkZodType[] ,year:string) : Promise<void>;
|
||||
rainChkGuidUpdate(rainChk: rainChkZodType): Promise<void>;
|
||||
rainChkDetilUpdate(rainChk: rainChkZodType[] ,year:string) : Promise<string>;
|
||||
rainChkGuidUpdate(rainChk: rainChkZodType): Promise<string>;
|
||||
rainChkExcelDownload(
|
||||
sidoCode: SelectDataType[],
|
||||
sggCode: SelectDataType[],
|
||||
sggCd:string
|
||||
): Promise<void>;
|
||||
rainChkExcelDataUPload(excelData: rainChkZodType[] ,year :string,laeSeCd:string) : Promise<void>;
|
||||
rainChkDelete(chkgdnSns: number[] ,year :string): Promise<void>;
|
||||
rainChkExcelDataUPload(excelData: rainChkZodType[] ,year :string,laeSeCd:string) : Promise<string>;
|
||||
rainChkDelete(chkgdnSns: number[] ,year :string): Promise<string>;
|
||||
rainChkHeadChange: (rainChkgdn: rainChkgdnState, isEdit: boolean) => void;
|
||||
rainChkNmSearch: (
|
||||
pageNo: number,
|
||||
@@ -168,6 +167,8 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = (
|
||||
}));
|
||||
},
|
||||
rainChkExcelDataUPload: async (excelData: rainChkZodType[] ,year:string,laeSeCd:string) => {
|
||||
const successMessage = "지도점검 등록이 완료되었습니다.";
|
||||
const failMessage = "지도점검 등록이 실패되었습니다.";
|
||||
set((state: rainChkgdnType) => (
|
||||
{ rainChkgdn: { ...state.rainChkgdn, isLoading: true } }));
|
||||
try {
|
||||
@@ -187,13 +188,12 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = (
|
||||
rainChkCount: rainChkRes.count,
|
||||
},
|
||||
}));
|
||||
toast.success("지도점검 등록이 완료되었습니다.");
|
||||
} else {
|
||||
toast.error("지도점검 등록이 실패되었습니다.");
|
||||
return successMessage;
|
||||
}
|
||||
return failMessage;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
toast.error("지도점검 등록이 실패되었습니다.");
|
||||
return failMessage;
|
||||
} finally {
|
||||
set((state: rainChkgdnType) => ({ rainChkgdn: { ...state.rainChkgdn, isLoading: false } }));
|
||||
}
|
||||
@@ -257,21 +257,20 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = (
|
||||
}
|
||||
},
|
||||
rainChkDetilUpdate: async (rainChk: rainChkZodType[] ,year:string) => {
|
||||
const successMessage = "지도점검 대체수 및 빗물이용량 수정이 완료되었습니다. ";
|
||||
const failMessage = "지도점검 대체수 및 빗물이용량 수정 오류입니다.";
|
||||
try {
|
||||
const chData = await makeMdfrChk(rainChk, "rain");
|
||||
|
||||
const res = await putFectch("/reuseChk/rainy/list", chData);
|
||||
if (res) {
|
||||
toast.success(
|
||||
"지도점검 대체수 및 빗물이용량 수정이 완료되었습니다. "
|
||||
);
|
||||
const rainChkRes = await initFetch(
|
||||
1,
|
||||
rainPageSize,
|
||||
year,
|
||||
"41"
|
||||
);
|
||||
return set((state: rainChkgdnState) => ({
|
||||
set((state: rainChkgdnState) => ({
|
||||
...state,
|
||||
rainChkgdn: {
|
||||
...state.rainChkgdn,
|
||||
@@ -279,21 +278,20 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = (
|
||||
rainChkCount: rainChkRes.count,
|
||||
},
|
||||
}));
|
||||
} else {
|
||||
toast.error("지도점검 대체수 및 빗물이용량 수정 오류입니다.");
|
||||
return successMessage;
|
||||
}
|
||||
return failMessage;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
toast.error("지도점검 대체수 및 빗물이용량 수정 오류입니다.");
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
rainChkGuidUpdate: async (rainChk: rainChkZodType) => {
|
||||
const successMessage = "지도점검 수질 및 과태료 수정이 완료되었습니다. ";
|
||||
const failMessage = "지도점검 수질 및 과태료 수정 오류입니다.";
|
||||
try {
|
||||
//const chData = await makeMdfrChk(rainChk, "guideDetails", "rainDetil");
|
||||
const res = await putFectch("/reuseChk/rainy", rainChk);
|
||||
if (res.status === 200) {
|
||||
toast.success("지도점검 수질 및 과태료 수정이 완료되었습니다. ");
|
||||
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
const rainChkRes = await initFetch(
|
||||
1,
|
||||
@@ -301,7 +299,7 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = (
|
||||
currentYear,
|
||||
"41"
|
||||
);
|
||||
return set((state: rainChkgdnState) => ({
|
||||
set((state: rainChkgdnState) => ({
|
||||
...state,
|
||||
rainChkgdn: {
|
||||
...state.rainChkgdn,
|
||||
@@ -309,29 +307,28 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = (
|
||||
rainChkCount: rainChkRes.count,
|
||||
},
|
||||
}));
|
||||
} else {
|
||||
toast.error("지도점검 수질 및 과태료 수정 오류입니다.");
|
||||
|
||||
return successMessage;
|
||||
}
|
||||
return failMessage;
|
||||
} catch (error) {
|
||||
console.log(' 지도점검 수질 및 과태료 수정 오류', error)
|
||||
toast.error("지도점검 수질 및 과태료 수정 오류입니다.");
|
||||
console.log(" 지도점검 수질 및 과태료 수정 오류", error);
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
rainChkDelete: async (chkgdnSns: number[] ,year :string) => {
|
||||
const successMessage = "삭제가 완료되었습니다. ";
|
||||
const failMessage = "삭제시 오류가 발생하였습니다.. ";
|
||||
try {
|
||||
const res = await deleteFectch(`/reuseChk/rainy`, chkgdnSns);
|
||||
|
||||
if (res) {
|
||||
toast.success("삭제가 완료되었습니다. ");
|
||||
|
||||
const rainChkRes = await initFetch(
|
||||
1,
|
||||
rainPageSize,
|
||||
year,
|
||||
"41"
|
||||
);
|
||||
return set((state: rainChkgdnState) => ({
|
||||
set((state: rainChkgdnState) => ({
|
||||
...state,
|
||||
rainChkgdn: {
|
||||
...state.rainChkgdn,
|
||||
@@ -339,14 +336,12 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = (
|
||||
rainChkCount: rainChkRes.count,
|
||||
},
|
||||
}));
|
||||
} else {
|
||||
toast.error("삭제시 오류가 발생하였습니다.. ");
|
||||
|
||||
return successMessage;
|
||||
}
|
||||
return failMessage;
|
||||
} catch (error) {
|
||||
console.log(' 삭제시 오류가 발생하였습니다', error)
|
||||
|
||||
toast.error("삭제시 오류가 발생하였습니다.. ");
|
||||
console.log(" 삭제시 오류가 발생하였습니다.", error);
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
rainChkHeadChange: async (rainChkgdn: rainChkgdnState, isEdit: boolean) => {
|
||||
@@ -391,3 +386,4 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = (
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { buildingType } from "@/app/store/common/code";
|
||||
import { buildingType } from "@/app/store/common/code";
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import {
|
||||
TEST_UUID,
|
||||
@@ -11,12 +11,10 @@ import {
|
||||
postFectch,
|
||||
putFectch,
|
||||
} from "@/components/lib/api";
|
||||
import { ToastFormUi } from "@/components/ui/toast/toastFromUi";
|
||||
import type {
|
||||
SelectDataType,
|
||||
SheetParameter,
|
||||
} from "@common/business_components";
|
||||
import toast from "react-hot-toast";
|
||||
import { z } from "zod";
|
||||
import { type chHeadType } from "../rainChkgdn/headList";
|
||||
import { rswtMakeExcelSample } from "./excel";
|
||||
@@ -78,12 +76,12 @@ type rswtChkgdnActions = {
|
||||
sggCode: SelectDataType[],
|
||||
sggCd: string,
|
||||
): Promise<void>;
|
||||
rswtChkExceDataUpload: (excelData: rswtChkZodType[],laeSeCd:string) => void;
|
||||
rswtChkDelete: (chkgdnSns: number[] ,year:string) => void;
|
||||
rswtChkDetilsUpdate: (rswtChkDetails: rswtrChkDetailsZodType[] ,year:string) => void;
|
||||
rswtChkExceDataUpload: (excelData: rswtChkZodType[],laeSeCd:string) => Promise<string>;
|
||||
rswtChkDelete: (chkgdnSns: number[] ,year:string) => Promise<string>;
|
||||
rswtChkDetilsUpdate: (rswtChkDetails: rswtrChkDetailsZodType[] ,year:string) => Promise<string>;
|
||||
rswtChkPolAndGuide: (chkgdnSn: number) => void;
|
||||
rswtChkPolInit: () => void;
|
||||
rwstPolAndGuideUpdate: (rswtChk: rswtChkZodType[]) => void;
|
||||
rwstPolAndGuideUpdate: (rswtChk: rswtChkZodType[]) => Promise<string>;
|
||||
rswtChkHeadChange: (rswtChkgdn: rswtChkgdnState, isEdit: boolean) => void;
|
||||
setRswtChkLoading:(status:boolean) =>void
|
||||
};
|
||||
@@ -245,19 +243,18 @@ export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = (
|
||||
}
|
||||
},
|
||||
rswtChkExceDataUpload: async (excelData: rswtChkZodType[],laeSeCd:string) => {
|
||||
const successMessage = "지도점검 등록이 완료되었습니다.";
|
||||
const failMessage = "지도점검 등록이 실패되었습니다.";
|
||||
try {
|
||||
set((state: rswtChkgdnType) => (
|
||||
{ rswtChkgdn: { ...state.rswtChkgdn, isLoading: true } }));
|
||||
const res = await postFectch("/reuseChk/reuseWater", excelData);
|
||||
if (res.ok) {
|
||||
ToastFormUi({
|
||||
body: "지도점검 등록이 완료되었습니다.",
|
||||
title: "지도점검 등록",
|
||||
});
|
||||
if (!res.ok) {
|
||||
return failMessage;
|
||||
}
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
const rswtChkRes = await initFetch(1, rswtPageSize, currentYear, laeSeCd);
|
||||
return set((state: rswtChkgdnState) => ({
|
||||
set((state: rswtChkgdnState) => ({
|
||||
...state,
|
||||
rswtChkgdn: {
|
||||
...state.rswtChkgdn,
|
||||
@@ -265,8 +262,10 @@ export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = (
|
||||
rswtChkCount: rswtChkRes.count,
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return failMessage;
|
||||
}finally{
|
||||
set((state: rswtChkgdnType) => (
|
||||
{ rswtChkgdn: { ...state.rswtChkgdn, isLoading: false } }));
|
||||
@@ -274,15 +273,17 @@ export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = (
|
||||
|
||||
},
|
||||
rswtChkDetilsUpdate: async (rswtChk: rswtrChkDetailsZodType[] ,year:string) => {
|
||||
const successMessage = "지도점검 과태료 수정이 완료되었습니다. ";
|
||||
const failMessage = "지도점검 과태료 수정 오류입니다. ";
|
||||
try {
|
||||
const chData = await makeMdfrChk(rswtChk);
|
||||
|
||||
const res = await putFectch("/reuseChk/reuseWater", chData);
|
||||
if (res.ok) {
|
||||
toast.success("지도점검 과태료 수정이 완료되었습니다. ",)
|
||||
if (!res.ok) {
|
||||
return failMessage;
|
||||
}
|
||||
const rswtChkRes = await initFetch(1, rswtPageSize, year, "0");
|
||||
return set((state: rswtChkgdnState) => ({
|
||||
set((state: rswtChkgdnState) => ({
|
||||
...state,
|
||||
rswtChkgdn: {
|
||||
...state.rswtChkgdn,
|
||||
@@ -291,21 +292,24 @@ export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = (
|
||||
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
toast.error("지도점검 과태료 수정 오류입니다. ",)
|
||||
return failMessage;
|
||||
|
||||
}
|
||||
},
|
||||
rswtChkDelete: async (chkgdnSns: number[] ,year:string) => {
|
||||
const successMessage = "삭제가 완료되었습니다.";
|
||||
const failMessage = "삭제 오류입니다.";
|
||||
try {
|
||||
const res = await deleteFectch(`/reuseChk/reuseWater`, chkgdnSns);
|
||||
|
||||
if (res) {
|
||||
toast.success("삭제가 완료되었습니다.")
|
||||
if (!res) {
|
||||
return failMessage;
|
||||
}
|
||||
const rswtChkRes = await initFetch(1, rswtPageSize, year, "0");
|
||||
return set((state: rswtChkgdnState) => ({
|
||||
set((state: rswtChkgdnState) => ({
|
||||
...state,
|
||||
rswtChkgdn: {
|
||||
...state.rswtChkgdn,
|
||||
@@ -313,9 +317,10 @@ export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = (
|
||||
rswtChkCount: rswtChkRes.count,
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (error) {
|
||||
toast.error("삭제 오류입니다.")
|
||||
console.error(error);
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
rswtChkPolAndGuide: async (chkgdnSn: number) => {
|
||||
@@ -350,18 +355,20 @@ export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = (
|
||||
}
|
||||
},
|
||||
rwstPolAndGuideUpdate: async (rswtChk: rswtChkZodType[]) => {
|
||||
const successMessage = "지도점검 연간 수질 및 대체수/중수도 수정이 완료되었습니다.";
|
||||
const failMessage = "지도점검 연간 수질 및 대체수/중수도 수정 오류입니다.";
|
||||
try {
|
||||
const chData = await makeMdfrChk(rswtChk);
|
||||
const res = await putFectch(
|
||||
`/reuseChk/reuseWater/${rswtChk[0]?.chkgdnSn}`,
|
||||
chData[0]
|
||||
);
|
||||
if (res.ok) {
|
||||
toast.success("지도점검 연간 수질 및 대체수/중수도 수정이 완료되었습니다.")
|
||||
if (!res.ok) {
|
||||
return failMessage;
|
||||
}
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
const rswtChkRes = await initFetch(1, rswtPageSize, currentYear, "0");
|
||||
return set((state: rswtChkgdnState) => ({
|
||||
set((state: rswtChkgdnState) => ({
|
||||
...state,
|
||||
rswtChkgdn: {
|
||||
...state.rswtChkgdn,
|
||||
@@ -369,10 +376,11 @@ export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = (
|
||||
rswtChkCount: rswtChkRes.count,
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
toast.error("지도점검 연간 수질 및 대체수/중수도 수정 오류입니다.")
|
||||
return failMessage;
|
||||
|
||||
}
|
||||
},
|
||||
@@ -409,3 +417,4 @@ export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = (
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* 재이용실적등록 > 하수재이용실적등록
|
||||
*
|
||||
* 🔗 사용 API
|
||||
@@ -13,7 +13,6 @@ import { pbnstPrfmncHeadListExport, monthHeadListExport } from "./headList";
|
||||
import type { pubHasuType } from "../../ruseFcltMng/fcltReg/pbnstReg/type";
|
||||
import type { FcPrfType, PrfType } from "./type";
|
||||
import type { TableUpperProps } from "../../common/type/header";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
const pbnstPrfmncHeadList = pbnstPrfmncHeadListExport;
|
||||
const monthHeadList = monthHeadListExport;
|
||||
@@ -66,7 +65,7 @@ type pbnstPrfmncActions = {
|
||||
data: PrfType,
|
||||
year: string,
|
||||
prfPbnFclts: string[]
|
||||
) => void;
|
||||
) => Promise<string>;
|
||||
getPrfFmcRes: () => void;
|
||||
};
|
||||
|
||||
@@ -203,6 +202,7 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (
|
||||
year: string,
|
||||
prfPbnFclts: string[]
|
||||
) => {
|
||||
const failMessage = "하수재이용 시설 실적 등록이 실패하였습니다.";
|
||||
try {
|
||||
const ressponse = await postFectch(
|
||||
"/reuseFc/pubFcPrf",
|
||||
@@ -211,7 +211,6 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (
|
||||
);
|
||||
|
||||
if (ressponse.status === 200) {
|
||||
toast.success("하수재이용 시설 실적 등록이 완료되었습니다.");
|
||||
const prfmncRes = await hasuListFetch(
|
||||
page,
|
||||
sggOrCity,
|
||||
@@ -219,7 +218,7 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (
|
||||
prfPbnFclts
|
||||
);
|
||||
|
||||
return set((state: pbnstPrfmncState) => ({
|
||||
set((state: pbnstPrfmncState) => ({
|
||||
...state,
|
||||
prfmnc: {
|
||||
...state.prfmnc,
|
||||
@@ -229,10 +228,12 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (
|
||||
pageKey: state.prfmnc.pageKey + 1,
|
||||
},
|
||||
}));
|
||||
return "하수재이용 시설 실적 등록이 완료되었습니다.";
|
||||
}
|
||||
return failMessage;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
toast.error("하수재이용 시설 실적 등록이 실패하였습니다.");
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,61 +1,25 @@
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
|
||||
export const rainChkgdnHeadSttnExport: TableUpperProps[] = [
|
||||
{ id: 'order', title: "순번", mergeCell: true },
|
||||
{ id: "cityText", title: "시도", mergeCell: true },
|
||||
{ id: "sggText", title: "시군구", mergeCell: true },
|
||||
{ id: "bdstNm", title: "시설명", mergeCell: true },
|
||||
{ id: "operMngCdText", title: "운영관리형태", mergeCell: true },
|
||||
{ id: "oilqMeasMthdText", title: "유량측정방법", mergeCell: true },
|
||||
{ id: "anlOperCst", title: "연간운영비(원/년)", mergeCell: true },
|
||||
{ id: "dtfcltCpct", title: "빗물저류조용량(m³)", mergeCell: true },
|
||||
{ id: "chckYmd", title: "점검일", mergeCell: true },
|
||||
{ id: "utztnUsgCdText", title: "이용용도" },
|
||||
{ id: "totalSplyUswtrUtztnQnt", title: "연간대체수이용량(m³)" },
|
||||
{ id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)" },
|
||||
{
|
||||
id: "ph",
|
||||
title: "수소이온농도(pH)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 1,
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
id: "trbt",
|
||||
title: "탁도(NTU)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 2,
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
id: "grssClfg",
|
||||
title: "총대장균군수(개/mg)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 3,
|
||||
type: "number",
|
||||
},
|
||||
{ id: 'order', title: "순번", mergeCell: true, widthPercent: 4 },
|
||||
{ id: "cityText", title: "시도", mergeCell: true, widthPercent: 5 },
|
||||
{ id: "sggText", title: "시군구", mergeCell: true, widthPercent: 5 },
|
||||
{ id: "bdstNm", title: "시설명", mergeCell: true, widthPercent: 7 },
|
||||
{ id: "operMngCdText", title: "운영관리형태", mergeCell: true, widthPercent: 6 },
|
||||
{ id: "oilqMeasMthdText", title: "유량측정방법", mergeCell: true, widthPercent: 6 },
|
||||
{ id: "anlOperCst", title: "연간운영비(원/년)", mergeCell: true, widthPercent: 7 },
|
||||
{ id: "dtfcltCpct", title: "빗물저류조용량(m³)", mergeCell: true, widthPercent: 6 },
|
||||
{ id: "chckYmd", title: "점검일", mergeCell: true, widthPercent: 5 },
|
||||
{ id: "utztnUsgCdText", title: "이용용도", widthPercent: 5 },
|
||||
{ id: "totalSplyUswtrUtztnQnt", title: "연간대체수이용량(m³)", widthPercent: 7 },
|
||||
{ id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)", widthPercent: 7 },
|
||||
{ id: "ph", title: "수소이온농도(pH)", upName: "useQuilty", upSequnce: 1, type: "number", widthPercent: 5 },
|
||||
{ id: "trbt", title: "탁도(NTU)", upName: "useQuilty", upSequnce: 2, type: "number", widthPercent: 4 },
|
||||
{ id: "grssClfg", title: "총대장균군수(개/mg)", upName: "useQuilty", upSequnce: 3, type: "number", widthPercent: 5 },
|
||||
|
||||
{
|
||||
id: "vltnDt",
|
||||
title: "부과일(위반일)",
|
||||
upName: "feeHist",
|
||||
upSequnce: 1,
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
id: "vltnMttr",
|
||||
title: "위반사항",
|
||||
upName: "feeHist",
|
||||
upSequnce: 2,
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
id: "levyAmt",
|
||||
title: "부과금액(천원)",
|
||||
upName: "feeHist",
|
||||
upSequnce: 3,
|
||||
type: "number",
|
||||
},
|
||||
{ id: "vltnDt", title: "부과일(위반일)", upName: "feeHist", upSequnce: 1, type: "text", widthPercent: 5 },
|
||||
{ id: "vltnMttr", title: "위반사항", upName: "feeHist", upSequnce: 2, type: "text", widthPercent: 6 },
|
||||
{ id: "levyAmt", title: "부과금액(천원)", upName: "feeHist", upSequnce: 3, type: "number", widthPercent: 5 },
|
||||
];
|
||||
|
||||
export const ruseSttnHeadListExport: TableUpperProps[] = [
|
||||
@@ -87,24 +51,9 @@ export const splSttnHeadListExport: TableUpperProps[] = [
|
||||
{ id: "spl07", title: "7월", upName: "splWater", upSequnce: 8 },
|
||||
{ id: "spl08", title: "8월", upName: "splWater", upSequnce: 9 },
|
||||
{ id: "spl09", title: "9월", upName: "splWater", upSequnce: 10 },
|
||||
{
|
||||
id: "spl10",
|
||||
title: "10월",
|
||||
upName: "splWater",
|
||||
upSequnce: 11,
|
||||
},
|
||||
{
|
||||
id: "spl11",
|
||||
title: "11월",
|
||||
upName: "splWater",
|
||||
upSequnce: 12,
|
||||
},
|
||||
{
|
||||
id: "spl12",
|
||||
title: "12월",
|
||||
upName: "splWater",
|
||||
upSequnce: 13,
|
||||
},
|
||||
{ id: "spl10", title: "10월", upName: "splWater", upSequnce: 11 },
|
||||
{ id: "spl11", title: "11월", upName: "splWater", upSequnce: 12 },
|
||||
{ id: "spl12", title: "12월", upName: "splWater", upSequnce: 13 },
|
||||
];
|
||||
|
||||
export const rswtDetailHeadListExport: TableUpperProps[] = [
|
||||
|
||||
@@ -1,142 +1,46 @@
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
|
||||
export const rswtChkSttnHeadListExport: TableUpperProps[] = [
|
||||
{ id: "order", title: "순번", mergeCell: true },
|
||||
{ id: "cityText", title: "시도", mergeCell: true },
|
||||
{ id: "sggText", title: "시군구", mergeCell: true },
|
||||
{ id: "bdstNm", title: "시설명", mergeCell: true },
|
||||
{ id: "operMngCd", title: "운영관리형태", mergeCell: true },
|
||||
{ id: "anlOperCst", title: "연간운영비(원/년)", mergeCell: true },
|
||||
{ id: "prcsCpct", title: "처리용량(m³)", mergeCell: true },
|
||||
{ id: "spwtPositn", title: "채수지점", mergeCell: true },
|
||||
{ id: "chckYmd", title: "점검일", mergeCell: true },
|
||||
{ id: "utztnUsgCdText", title: "이용용도" },
|
||||
{ id: "splyUswtrUtztnQnt", title: "연간보급수이용량(m³)", type: "number" },
|
||||
{ id: "ruseFcltUtztnQnt", title: "연간중수도이용량(m³)", type: "number" },
|
||||
{ id: "order", title: "순번", mergeCell: true, widthPercent: 4 },
|
||||
{ id: "cityText", title: "시도", mergeCell: true, widthPercent: 7 },
|
||||
{ id: "sggText", title: "시군구", mergeCell: true, widthPercent: 5 },
|
||||
{ id: "bdstNm", title: "시설명", mergeCell: true, widthPercent: 10 },
|
||||
{ id: "operMngCd", title: "운영관리형태", mergeCell: true, widthPercent: 6 },
|
||||
{ id: "anlOperCst", title: "연간운영비(원/년)", mergeCell: true, widthPercent: 7 },
|
||||
{ id: "prcsCpct", title: "처리용량(m³)", mergeCell: true, widthPercent: 6 },
|
||||
{ id: "spwtPositn", title: "채수지점", mergeCell: true, widthPercent: 6 },
|
||||
{ id: "chckYmd", title: "점검일", mergeCell: true, widthPercent: 7 },
|
||||
{ id: "utztnUsgCdText", title: "이용용도", widthPercent: 7 },
|
||||
{ id: "splyUswtrUtztnQnt", title: "연간보급수이용량(m³)", type: "number", widthPercent: 5 },
|
||||
{ id: "ruseFcltUtztnQnt", title: "연간중수도이용량(m³)", type: "number", widthPercent: 5 },
|
||||
|
||||
{
|
||||
id: "grssClfgUswtr",
|
||||
title: "총대장균군수(개/mg)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 1,
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
id: "combResdch",
|
||||
title: "결합잔류염소(mh/L)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 2,
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
id: "trbt",
|
||||
title: "탁도(NTU)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 3,
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
id: "bod",
|
||||
title: "BOD(mg/L)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 4,
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
id: "smll",
|
||||
title: "냄새",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 5,
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
id: "crmty",
|
||||
title: "색도(도)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 6,
|
||||
type: "number",
|
||||
},
|
||||
{ id: "tn", title: "총질소(T-N)(mg/L)", upName: "useQuilty", upSequnce: 7, type: "number" },
|
||||
{
|
||||
id: "tph",
|
||||
title: "총인(T-P)(mg/L)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 8,
|
||||
type: "number",
|
||||
},
|
||||
{ id: "ph", title: "수소이온농도(pH)", upName: "useQuilty", upSequnce: 9, type: "text" },
|
||||
{
|
||||
id: "clIonQnt",
|
||||
title: "염화물(mg/L)",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 10,
|
||||
type: "number",
|
||||
},
|
||||
{ id: "grssClfgUswtr", title: "총대장균군수(개/mg)", upName: "useQuilty", upSequnce: 1, type: "number", widthPercent: 6 },
|
||||
{ id: "combResdch", title: "결합잔류염소(mh/L)", upName: "useQuilty", upSequnce: 2, type: "number", widthPercent: 6 },
|
||||
{ id: "trbt", title: "탁도(NTU)", upName: "useQuilty", upSequnce: 3, type: "number", widthPercent: 4 },
|
||||
{ id: "bod", title: "BOD (mg/L)", upName: "useQuilty", upSequnce: 4, type: "number", widthPercent: 4 },
|
||||
{ id: "smll", title: "냄새", upName: "useQuilty", upSequnce: 5, type: "text", widthPercent: 4 },
|
||||
{ id: "crmty", title: "색도(도)", upName: "useQuilty", upSequnce: 6, type: "number", widthPercent: 4 },
|
||||
{ id: "tn", title: "총질소(T-N)(mg/L)", upName: "useQuilty", upSequnce: 7, type: "number", widthPercent: 5 },
|
||||
{ id: "tph", title: "총인(T-P)(mg/L)", upName: "useQuilty", upSequnce: 8, type: "number", widthPercent: 5 },
|
||||
{ id: "ph", title: "수소이온농도(pH)", upName: "useQuilty", upSequnce: 9, type: "text", widthPercent: 5 },
|
||||
{ id: "clIonQnt", title: "염화물(mg/L)", upName: "useQuilty", upSequnce: 10, type: "number", widthPercent: 5 },
|
||||
|
||||
{
|
||||
id: "vltnDt",
|
||||
title: "부과일(위반일)",
|
||||
upName: "feeHist",
|
||||
upSequnce: 1,
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
id: "vltnMttr",
|
||||
title: "위반사항",
|
||||
upName: "feeHist",
|
||||
upSequnce: 2,
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
id: "levyAmt",
|
||||
title: "부과금액(천원)",
|
||||
upName: "feeHist",
|
||||
upSequnce: 3,
|
||||
type: "number",
|
||||
},
|
||||
{ id: "vltnDt", title: "부과일(위반일)", upName: "feeHist", upSequnce: 1, type: "text", widthPercent: 5 },
|
||||
{ id: "vltnMttr", title: "위반사항", upName: "feeHist", upSequnce: 2, type: "text", widthPercent: 6 },
|
||||
{ id: "levyAmt", title: "부과금액(천원)", upName: "feeHist", upSequnce: 3, type: "number", widthPercent: 5 },
|
||||
];
|
||||
|
||||
export const rswtDetailSttnHeadListExport: TableUpperProps[] = [
|
||||
{ id: "utztnUsgCd", title: "이용용도" },
|
||||
|
||||
{
|
||||
id: "grssClfgUswtr",
|
||||
title: "총대장균군수",
|
||||
upName: "detailQulity",
|
||||
upSequnce: 2,
|
||||
},
|
||||
{
|
||||
id: "combResdch",
|
||||
title: "결합잔류염소",
|
||||
upName: "detailQulity",
|
||||
upSequnce: 3,
|
||||
},
|
||||
{
|
||||
id: "trbt",
|
||||
title: "탁도",
|
||||
upName: "detailQulity",
|
||||
upSequnce: 4,
|
||||
},
|
||||
{ id: "grssClfgUswtr", title: "총대장균군수", upName: "detailQulity", upSequnce: 2 },
|
||||
{ id: "combResdch", title: "결합잔류염소", upName: "detailQulity", upSequnce: 3 },
|
||||
{ id: "trbt", title: "탁도", upName: "detailQulity", upSequnce: 4 },
|
||||
{ id: "bod", title: "BOD", upName: "detailQulity", upSequnce: 5 },
|
||||
{
|
||||
id: "smll",
|
||||
title: "냄새",
|
||||
upName: "detailQulity",
|
||||
upSequnce: 6,
|
||||
},
|
||||
{
|
||||
id: "crmty",
|
||||
title: "색도",
|
||||
upName: "detailQulity",
|
||||
upSequnce: 7,
|
||||
},
|
||||
{ id: "tn", title: "T-N", upName: "detailQulity", upSequnce: 8},
|
||||
{ id: "smll", title: "냄새", upName: "detailQulity", upSequnce: 6 },
|
||||
{ id: "crmty", title: "색도", upName: "detailQulity", upSequnce: 7 },
|
||||
{ id: "tn", title: "T-N", upName: "detailQulity", upSequnce: 8 },
|
||||
{ id: "tph", title: "T-P", upName: "detailQulity", upSequnce: 9 },
|
||||
{ id: "ph", title: "pH", upName: "detailQulity", upSequnce: 10 },
|
||||
{
|
||||
id: "clIonQnt",
|
||||
title: "염화물",
|
||||
upName: "detailQulity",
|
||||
upSequnce: 11,
|
||||
},
|
||||
{ id: "clIonQnt", title: "염화물", upName: "detailQulity", upSequnce: 11 },
|
||||
];
|
||||
|
||||
@@ -5,31 +5,36 @@ export const pbnstPrfmncSttnHeadListExport: TableUpperProps[] = [
|
||||
id: "number",
|
||||
title: "No",
|
||||
rowSpan: 2,
|
||||
row: 0
|
||||
row: 0,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "sido",
|
||||
title: "시도",
|
||||
rowSpan: 2,
|
||||
row: 0
|
||||
row: 0,
|
||||
widthPercent: 6,
|
||||
},
|
||||
{
|
||||
id: "gugun",
|
||||
title: "시군구",
|
||||
rowSpan: 2,
|
||||
row: 0
|
||||
row: 0,
|
||||
widthPercent: 6,
|
||||
},
|
||||
{
|
||||
id: "bscFctNm",
|
||||
title: "시설명",
|
||||
rowSpan: 2,
|
||||
row: 0
|
||||
row: 0,
|
||||
widthPercent: 10,
|
||||
},
|
||||
{
|
||||
id: "ruseUtztnFcltNm",
|
||||
title: "재이용시설명",
|
||||
rowSpan: 2,
|
||||
row: 0
|
||||
row: 0,
|
||||
widthPercent: 12,
|
||||
},
|
||||
|
||||
]
|
||||
@@ -39,22 +44,26 @@ export const pbnstYearHeadListExport: TableUpperProps[] = [
|
||||
id: "year",
|
||||
title: "년도",
|
||||
colSpan: 3,
|
||||
row: 0
|
||||
row: 0,
|
||||
widthPercent: 18,
|
||||
},
|
||||
{
|
||||
id: "total",
|
||||
title: "계(m³)",
|
||||
row: 1
|
||||
row: 1,
|
||||
widthPercent: 6,
|
||||
},
|
||||
{
|
||||
id: "inUsage",
|
||||
title: "장내용수(m³)",
|
||||
row: 1
|
||||
row: 1,
|
||||
widthPercent: 6,
|
||||
},
|
||||
{
|
||||
id: "outUsage",
|
||||
title: "장외용수(m³)",
|
||||
row: 1
|
||||
row: 1,
|
||||
widthPercent: 6,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -78,4 +87,4 @@ export const monthSttnHeadListExport: TableUpperProps[] = [
|
||||
{ id: "10월", title: "10" },
|
||||
{ id: "11월", title: "11월" },
|
||||
{ id: "12월", title: "12월", },
|
||||
];
|
||||
];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { getFetchWithCount, postFectch, putFectch, deleteFectch } from "@/components/lib/api";
|
||||
import { getFetchWithCount, postFectch, putFectch, deleteFectch } from "@/components/lib/api";
|
||||
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import toast from "react-hot-toast";
|
||||
import { z } from "zod";
|
||||
import { makeMdfr, makeRstr } from "../bdstReg";
|
||||
import {
|
||||
@@ -100,9 +99,9 @@ export type htdflFacState = {
|
||||
type htdflFacSActions = {
|
||||
initHtdflReg: (code: string) => void;
|
||||
htdflNmSearch: (code: string | number, fcltNm:string) => void;
|
||||
htdflBdstUpdate: (data: customHtdflBdst, code: string | number,myUUID:string) => void;
|
||||
htdflBdstReg: (data: customHtdflBdst, code: string | number,myUUID:string) => void;
|
||||
htdflBdstDelete: (data: customHtdflBdst, code: string | number) => void;
|
||||
htdflBdstUpdate: (data: customHtdflBdst, code: string | number,myUUID:string) => Promise<string>;
|
||||
htdflBdstReg: (data: customHtdflBdst, code: string | number,myUUID:string) => Promise<string>;
|
||||
htdflBdstDelete: (data: customHtdflBdst, code: string | number) => Promise<string>;
|
||||
getHtdflBdstData: (pageNation: number, code: string | number) => void;
|
||||
resetHtdflTableIndex:(index:number)=>void;
|
||||
};
|
||||
@@ -172,11 +171,13 @@ export const htdflFacActionsExport: (set: any) => htdflFacSActions = (
|
||||
}
|
||||
},
|
||||
htdflBdstUpdate: async (data: customHtdflBdst, code: string | number,myUUID:string) => {
|
||||
const successMessage = "온배수 시설물 수정이 완료되었습니다.";
|
||||
const failMessage = "온배수 시설물 수정 오류입니다..";
|
||||
try {
|
||||
const chData = await makeMdfr(data,myUUID);
|
||||
const res = await putFectch("/drain/facility", chData);
|
||||
if (res.status) {
|
||||
toast.success("온배수 시설물 수정이 완료되었습니다.");
|
||||
if (!res.status) {
|
||||
return failMessage;
|
||||
}
|
||||
const htdflRes = await getFetchWithCount(
|
||||
"wr",
|
||||
@@ -191,20 +192,23 @@ export const htdflFacActionsExport: (set: any) => htdflFacSActions = (
|
||||
isInit: false,
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (errorUpdate) {
|
||||
toast.error("온배수 시설물 수정 오류입니다..");
|
||||
console.log(errorUpdate);
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
htdflBdstReg: async (data: customHtdflBdst, code: string | number,myUUID:string) => {
|
||||
const successMessage = "온배수 시설 등록이 완료되었습니다.";
|
||||
const failMessage = "온배수 시설물 등록 오류입니다..";
|
||||
try {
|
||||
// data는 단일 객체이므로 .map을 사용할 수 없습니다.
|
||||
// 등록 시에는 건축물 변경 이력이 없으므로 chgBuilding을 빈 배열로 설정하고,
|
||||
// API가 배열을 기대하므로 단일 객체를 배열로 감싸줍니다.
|
||||
const chData = makeRstr(data,myUUID);
|
||||
const res = await postFectch("/drain/facility", chData);
|
||||
if (res.status ===200) {
|
||||
toast.success("온배수 시설 등록이 완료되었습니다.");
|
||||
if (res.status !== 200) {
|
||||
return failMessage;
|
||||
}
|
||||
const htdflRes = await initFetch(String(code));
|
||||
set((state: htdflFacState) => ({
|
||||
@@ -216,17 +220,18 @@ export const htdflFacActionsExport: (set: any) => htdflFacSActions = (
|
||||
isInit: false,
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (errorReg) {
|
||||
toast.error("온배수 시설물 등록 오류입니다..");
|
||||
console.log(errorReg);
|
||||
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
// 온배수시설을 삭제한다.
|
||||
htdflBdstDelete: async (data: customHtdflBdst, code: string | number) => {
|
||||
const successMessage = `${data.bdstNm} 시설이 삭제되었습니다.`;
|
||||
const failMessage = "삭제 중 오류가 발생했습니다.";
|
||||
try {
|
||||
await deleteFectch(`/drain/facility/${data.reuseBuilding?.[0]?.bdstRuseFcltSn}`);
|
||||
toast.success(`${data.bdstNm} 시설이 삭제되었습니다.`);
|
||||
|
||||
const htdflRes = await initFetch(String(code));
|
||||
set((state: htdflFacState) => ({
|
||||
@@ -237,10 +242,10 @@ export const htdflFacActionsExport: (set: any) => htdflFacSActions = (
|
||||
htdflResCount: htdflRes.count,
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (e) {
|
||||
console.log("e", e);
|
||||
const errorMessage = e instanceof Error ? e.message : "삭제 중 오류가 발생했습니다.";
|
||||
toast.error(errorMessage);
|
||||
return e instanceof Error ? e.message : failMessage;
|
||||
} finally {
|
||||
}
|
||||
},
|
||||
@@ -279,3 +284,4 @@ export const htdflFacActionsExport: (set: any) => htdflFacSActions = (
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TEST_UUID } from "../rainReg";
|
||||
import { TEST_UUID } from "../rainReg";
|
||||
import {
|
||||
deleteFectch,
|
||||
fetchType,
|
||||
@@ -24,7 +24,6 @@ import {
|
||||
fcOrgwtsHeadListExport,
|
||||
} from "./headList";
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
/**
|
||||
* 하수재이용시설 등록 (스토어)
|
||||
@@ -67,7 +66,7 @@ type pubFacActions = {
|
||||
pubHasuInit: (page: string, sggOrCity: string) => void;
|
||||
pbnstRegClick: (pubHasuRes: pubHasuType) => void;
|
||||
//pbnstReg: (txt: string | undefined) => void;
|
||||
pbnstInsert(pbnstRes: customPbnst): Promise<void>;
|
||||
pbnstInsert(pbnstRes: customPbnst): Promise<string>;
|
||||
fileDelete: (atflCd: string) => void;
|
||||
fileDownLoad: (atflCd: string) => void;
|
||||
pbnstRuseFcltUpdate: (ruseRes: customPbnst[]) => void;
|
||||
@@ -226,26 +225,28 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => {
|
||||
},
|
||||
// 하수재이용시설을 등록한다.
|
||||
pbnstInsert: async (pbnstRes: customPbnst) => {
|
||||
const successMessage = `${pbnstRes.ruseUtztnFcltNm} 하수재이용 시설이 등록되었습니다.`;
|
||||
const failMessage = "하수재이용 시설 등록 중 오류가 발생했습니다.";
|
||||
try {
|
||||
const response = await postFectch(`/reuseFc/pubFc`, pbnstRes);
|
||||
if (response.status === 200) {
|
||||
toast.success(
|
||||
`${pbnstRes.ruseUtztnFcltNm} 하수재이용 시설이 등록되었습니다.`
|
||||
);
|
||||
if (response.status !== 200) {
|
||||
return failMessage;
|
||||
}
|
||||
|
||||
const newPbnstRes = await initFetch(
|
||||
pbnstRes.pbnstRuseFcltId.slice(0, 11)
|
||||
);
|
||||
return set((state: pubFacState) => ({
|
||||
set((state: pubFacState) => ({
|
||||
...state,
|
||||
pbnst: {
|
||||
...state.pbnst,
|
||||
pbnstRes: newPbnstRes,
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (error) {
|
||||
console.error("Error updating pbnst:", error);
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
// 하수재이용시설을 업데이트한다.(사업제외) 다르게하는 이유는 객체가 너무커서 분활 처리하려고
|
||||
@@ -314,3 +315,4 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => {
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import {
|
||||
deleteFectch,
|
||||
fetchType,
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
postFectch,
|
||||
putFectch,
|
||||
} from "@/components/lib/api";
|
||||
import toast from "react-hot-toast";
|
||||
import { z } from "zod";
|
||||
import { makeMdfr, makeRstr } from "../bdstReg";
|
||||
import {
|
||||
@@ -96,9 +95,9 @@ type rainFacSActions = {
|
||||
initRain: (code: string | number) => void;
|
||||
getRainData: (pageNation: number, code: string | number) => void;
|
||||
rainSearch: (txt: string, pageNation: number, code: string) => void;
|
||||
rainBdstReg: (data: customRainBdst, code: string | number,myUUID:string) => void;
|
||||
rainBdstUpdate: (data: customRainBdst, code: string | number,myUUID:string) => void;
|
||||
rainBdstDelete: (data: customRainBdst, code: string | number) => void;
|
||||
rainBdstReg: (data: customRainBdst, code: string | number,myUUID:string) => Promise<string>;
|
||||
rainBdstUpdate: (data: customRainBdst, code: string | number,myUUID:string) => Promise<string>;
|
||||
rainBdstDelete: (data: customRainBdst, code: string | number) => Promise<string>;
|
||||
resetRainTableIndex:(index:number)=>void;
|
||||
};
|
||||
|
||||
@@ -187,9 +186,13 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = (
|
||||
},
|
||||
// 빗물 이용시설을 등록한다.
|
||||
rainBdstReg: async (data: customRainBdst, code: string | number,myUUID:string) => {
|
||||
const successMessage = "건축물 등록이 완료되었습니다.";
|
||||
const failMessage = "등록시 오류가 발생하였습니다.";
|
||||
const changeBuildingFailMessage = "건축물 증축/개축/재축 오류입니다.";
|
||||
try {
|
||||
const test = await makeRstr(data,myUUID);
|
||||
const res = await postFectch("/reuseFc/rainyInfo", test);
|
||||
let message = failMessage;
|
||||
if (res.status === 200) {
|
||||
if (data.chgBuilding.length > 0) {
|
||||
const chPK = res?.data?.bdstInfoSn;
|
||||
@@ -200,15 +203,13 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = (
|
||||
const chch = await postFectch("/reuseFc/chgBuilding", makeCh);
|
||||
|
||||
if (chch.status === 200) {
|
||||
toast.success("건축물 등록이 완료되었습니다.");
|
||||
message = successMessage;
|
||||
} else {
|
||||
toast.error("건축물 증축/개축/재축 오류입니다.");
|
||||
message = changeBuildingFailMessage;
|
||||
}
|
||||
} else {
|
||||
toast.success("건축물 등록이 완료되었습니다.");
|
||||
message = successMessage;
|
||||
}
|
||||
} else {
|
||||
toast.error("건축물 등록이 완료되었습니다.");
|
||||
}
|
||||
const rainRes = await initFetch(code);
|
||||
set((state: rainFacState) => ({
|
||||
@@ -219,17 +220,21 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = (
|
||||
rainResCount: rainRes.count,
|
||||
},
|
||||
}));
|
||||
return message;
|
||||
} catch (e) {
|
||||
console.log("e", e);
|
||||
toast.error("등록시 오류가 발생하였습니다.");
|
||||
} finally {
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
// 빗물이용시설 시설에 대한 사항을 업데이트한다
|
||||
rainBdstUpdate: async (data: customRainBdst, code: string | number,myUUID:string) => {
|
||||
const successMessage = "건축물 수정이 완료되었습니다.";
|
||||
const failMessage = "수정시 오류가 발생하였습니다.";
|
||||
const changeBuildingFailMessage = "건축물 증축/개축/재축 오류입니다.";
|
||||
try {
|
||||
const chData = await makeMdfr(data,myUUID);
|
||||
const res = await putFectch("/reuseFc/rainyInfo", chData);
|
||||
let message = failMessage;
|
||||
if (res.status === 200) {
|
||||
if (data.chgBuilding.length > 0) {
|
||||
const chPK = data?.bdstInfoSn;
|
||||
@@ -240,17 +245,14 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = (
|
||||
const chch = await postFectch("/reuseFc/chgBuilding", makeCh);
|
||||
|
||||
if (chch.status === 200) {
|
||||
toast.success("건축물 수정이 완료되었습니다.");
|
||||
message = successMessage;
|
||||
} else {
|
||||
toast.error("건축물 증축/개축/재축 오류입니다.");
|
||||
message = changeBuildingFailMessage;
|
||||
}
|
||||
} else {
|
||||
|
||||
await deleteFectch("/reuseFc/DeleteChgBuilding" , data.bdstInfoSn);
|
||||
toast.success("건축물 수정이 완료되었습니다.");
|
||||
message = successMessage;
|
||||
}
|
||||
} else {
|
||||
toast.error("건축물 수정이 완료되었습니다.");
|
||||
}
|
||||
|
||||
const rainRes = await initFetch(code);
|
||||
@@ -262,17 +264,18 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = (
|
||||
rainResCount: rainRes.count,
|
||||
},
|
||||
}));
|
||||
return message;
|
||||
} catch (e) {
|
||||
console.log("e", e);
|
||||
toast.error("수정시 오류가 발생하였습니다.");
|
||||
} finally {
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
// 빗물 이용시설을 삭제한다.
|
||||
rainBdstDelete: async (data: customRainBdst, code: string | number) => {
|
||||
const successMessage = `${data.bdstNm} 시설이 삭제되었습니다.`;
|
||||
const failMessage = "삭제 중 오류가 발생했습니다.";
|
||||
try {
|
||||
await deleteFectch(`/reuseFc/rainyInfo/${data.reuseBuilding?.[0]?.bdstRuseFcltSn}`);
|
||||
toast.success(`${data.bdstNm} 시설이 삭제되었습니다.`);
|
||||
|
||||
const rainRes = await initFetch(code);
|
||||
set((state: rainFacState) => ({
|
||||
@@ -283,10 +286,10 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = (
|
||||
rainResCount: rainRes.count,
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (e) {
|
||||
console.log("e", e);
|
||||
const errorMessage = e instanceof Error ? e.message : "삭제 중 오류가 발생했습니다.";
|
||||
toast.error(errorMessage);
|
||||
return e instanceof Error ? e.message : failMessage;
|
||||
} finally {
|
||||
}
|
||||
},
|
||||
@@ -306,3 +309,4 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = (
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { deleteFectch, getFetchWithCount, postFectch, putFectch } from "@/components/lib/api";
|
||||
import { deleteFectch, getFetchWithCount, postFectch, putFectch } from "@/components/lib/api";
|
||||
import { upHeadList, type chgBuilding } from "../rainReg";
|
||||
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import toast from "react-hot-toast";
|
||||
import { z } from "zod";
|
||||
import { makeMdfr, makeRstr } from "../bdstReg";
|
||||
import { baseReuseBuildingSchema, chgBuildingSchema, validationMessages } from "../rainReg/type";
|
||||
@@ -67,15 +66,15 @@ export type rswtFacState = {
|
||||
};
|
||||
type rswtFacSActions = {
|
||||
initRswt: (code: string | number) => void;
|
||||
rswtBdstUpdate: (data: customRswtBdst, code: string | number,myUUID:string) => void;
|
||||
rswtBdstUpdate: (data: customRswtBdst, code: string | number,myUUID:string) => Promise<string>;
|
||||
getRswtBdstData: (pageNation: number, code: string | number) => void;
|
||||
rswtBdstSearch: (
|
||||
txt: string,
|
||||
pageNation: number,
|
||||
code: string | number
|
||||
) => void;
|
||||
rswtBdstReg: (data: customRswtBdst, code: string | number,myUUID:string) => void;
|
||||
rswtBdstDelete: (data: customRswtBdst, code: string | number) => void;
|
||||
rswtBdstReg: (data: customRswtBdst, code: string | number,myUUID:string) => Promise<string>;
|
||||
rswtBdstDelete: (data: customRswtBdst, code: string | number) => Promise<string>;
|
||||
resetRswtTableIndex:(index:number)=>void;
|
||||
};
|
||||
|
||||
@@ -162,9 +161,13 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = (
|
||||
},
|
||||
// 중수도 시설에 대한 사항을 업데이트한다
|
||||
rswtBdstUpdate: async (data: customRswtBdst, code: string | number,myUUID:string) => {
|
||||
const successMessage = "중수도 건축물 수정이 완료되었습니다.";
|
||||
const failMessage = "중수도 건축물 수정 오류입니다.";
|
||||
const changeBuildingFailMessage = "중수도 건축물 증축/개축/재축 오류입니다.";
|
||||
try {
|
||||
const chData = await makeMdfr(data,myUUID);
|
||||
const res = await putFectch("/reuseFc/waterreuseFc", chData);
|
||||
let message = failMessage;
|
||||
if (res.status === 200) {
|
||||
if (data.chgBuilding.length > 0) {
|
||||
const chPK = data?.bdstInfoSn;
|
||||
@@ -177,16 +180,14 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = (
|
||||
const chch = await postFectch("/reuseFc/chgBuilding", makeCh);
|
||||
|
||||
if (chch.status === 200) {
|
||||
toast.success("중수도 건축물 수정이 완료되었습니다.");
|
||||
message = successMessage;
|
||||
} else {
|
||||
toast.error("중수도 건축물 증축/개축/재축 오류입니다.");
|
||||
message = changeBuildingFailMessage;
|
||||
}
|
||||
} else {
|
||||
await deleteFectch("/reuseFc/DeleteChgBuilding" , data.bdstInfoSn);
|
||||
toast.success("중수도 건축물 수정이 완료되었습니다.");
|
||||
message = successMessage;
|
||||
}
|
||||
} else {
|
||||
toast.error("중수도 건축물 수정이 완료되었습니다.");
|
||||
}
|
||||
const rswtRes = await initFetch(code);
|
||||
set((state: rswtFacState) => ({
|
||||
@@ -197,18 +198,23 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = (
|
||||
rswtResCount: rswtRes.count,
|
||||
},
|
||||
}));
|
||||
return message;
|
||||
|
||||
} catch (errorUpdate) {
|
||||
toast.error("중수도 건축물 수정 오류입니다.");
|
||||
console.error(errorUpdate);
|
||||
} finally {
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
// 중수도 시설을 등록한다.
|
||||
rswtBdstReg: async (data: customRswtBdst, code: string | number,myUUID:string) => {
|
||||
const successMessage = "건축물(중수도) 등록이 완료되었습니다.";
|
||||
const successWithChangeMessage = "건축물(중수도) 및 증축/개축/재축 등록이 완료되었습니다.";
|
||||
const failMessage = "등록시 오류가 발생하였습니다.";
|
||||
const changeBuildingFailMessage = "건축물(중수도) 증축/개축/재축 오류입니다.";
|
||||
try {
|
||||
const chData = await makeRstr(data,myUUID);
|
||||
const res = await postFectch("/reuseFc/waterreuseFc", chData);
|
||||
let message = failMessage;
|
||||
if (res.status === 200) {
|
||||
if (data.chgBuilding.length > 0) {
|
||||
|
||||
@@ -223,15 +229,13 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = (
|
||||
|
||||
if (chch.status === 200) {
|
||||
|
||||
toast.success("건축물(중수도) 및 증축/개축/재축 등록이 완료되었습니다.");
|
||||
message = successWithChangeMessage;
|
||||
} else {
|
||||
toast.error("건축물(중수도) 증축/개축/재축 오류입니다.");
|
||||
message = changeBuildingFailMessage;
|
||||
}
|
||||
} else {
|
||||
toast.success("건축물(중수도) 등록이 완료되었습니다.");
|
||||
message = successMessage;
|
||||
}
|
||||
} else {
|
||||
toast.error("건축물(중수도) 등록이 완료하였습니다.");
|
||||
}
|
||||
const rswtRes = await initFetch(code);
|
||||
set((state: rswtFacState) => ({
|
||||
@@ -242,17 +246,18 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = (
|
||||
rswtResCount: rswtRes.count,
|
||||
},
|
||||
}));
|
||||
return message;
|
||||
} catch (e) {
|
||||
console.log("e", e);
|
||||
toast.error("등록시 오류가 발생하였습니다.");
|
||||
} finally {
|
||||
return failMessage;
|
||||
}
|
||||
},
|
||||
// 중수도시설을 삭제한다.
|
||||
rswtBdstDelete: async (data: customRswtBdst, code: string | number) => {
|
||||
const successMessage = `${data.bdstNm} 시설이 삭제되었습니다.`;
|
||||
const failMessage = "삭제 중 오류가 발생했습니다.";
|
||||
try {
|
||||
await deleteFectch(`/reuseFc/waterreuseFc/${data.reuseBuilding?.[0]?.bdstRuseFcltSn}`);
|
||||
toast.success(`${data.bdstNm} 시설이 삭제되었습니다.`);
|
||||
|
||||
const rswtRes = await initFetch(code);
|
||||
set((state: rswtFacState) => ({
|
||||
@@ -263,10 +268,10 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = (
|
||||
rswtResCount: rswtRes.count,
|
||||
},
|
||||
}));
|
||||
return successMessage;
|
||||
} catch (e) {
|
||||
console.log("e", e);
|
||||
const errorMessage = e instanceof Error ? e.message : "삭제 중 오류가 발생했습니다.";
|
||||
toast.error(errorMessage);
|
||||
return e instanceof Error ? e.message : failMessage;
|
||||
} finally {
|
||||
}
|
||||
},
|
||||
@@ -286,3 +291,4 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = (
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -7,94 +7,112 @@ export const htdflSttHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
id: "cityText",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "sggText",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "bdstNm",
|
||||
title: "발전소명",
|
||||
visible: true,
|
||||
widthPercent: 7,
|
||||
},
|
||||
{
|
||||
id: "daddr",
|
||||
title: "주소",
|
||||
visible: true,
|
||||
widthPercent: 9,
|
||||
},
|
||||
{
|
||||
id: "frstArchPrmsnDt",
|
||||
title: "준공년월",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
{
|
||||
id: "etgtType",
|
||||
title: "발전유형",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "fclCpct",
|
||||
title: "설비용량(KW)",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
{
|
||||
id: "plwtYn",
|
||||
title: "담수화여부",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "orgwtWtritSpt",
|
||||
title: "원수취수지점",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
{
|
||||
id: "wtritEntrcTp",
|
||||
title: "취수구온도(℃)",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
|
||||
{
|
||||
id: "orgwtOcrnProcs",
|
||||
title: "원수발생공정",
|
||||
visible: true,
|
||||
widthPercent: 6,
|
||||
},
|
||||
|
||||
{
|
||||
id: "amtgnr",
|
||||
title: "발생량",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
{
|
||||
id: "prcsProcsYn",
|
||||
title: "처리공정여부",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "prcsFcltCpct",
|
||||
title: "처리시설용량(m³)",
|
||||
visible: true,
|
||||
widthPercent: 6,
|
||||
},
|
||||
{
|
||||
id: "fmYn",
|
||||
title: "유량계여부",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "utztnCpct",
|
||||
title: "이용량(m³)",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
{
|
||||
id: "utztnUsg",
|
||||
title: "이용용도",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
|
||||
{
|
||||
id: "emsnExitTp",
|
||||
title: "배출구온도(℃)",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
@@ -6,31 +6,31 @@ import type {
|
||||
import { z } from "zod";
|
||||
|
||||
export const pbnSttHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
{ id: "rvbsn", title: "권역", visible: true },
|
||||
{ id: "lgbsn", title: "단위유역", visible: true, },
|
||||
{ id: "mdmbsn", title: "중권역", visible: true, },
|
||||
{ id: "rgnNm", title: "환경청", visible: true },
|
||||
{ id: "sido", title: "시도", visible: true, },
|
||||
{ id: "gugun", title: "시군구", visible: true, },
|
||||
{ id: "bscFctNm", title: "시설명", visible: true },
|
||||
{ id: "efflWqltStndrdNm", title: "지역구분", visible: true },
|
||||
{ id: "rvbsn", title: "권역", visible: true, widthPercent: 4 },
|
||||
{ id: "lgbsn", title: "단위유역", visible: true, widthPercent: 4 },
|
||||
{ id: "mdmbsn", title: "중권역", visible: true, widthPercent: 4 },
|
||||
{ id: "rgnNm", title: "환경청", visible: true, widthPercent: 5 },
|
||||
{ id: "sido", title: "시도", visible: true, widthPercent: 4 },
|
||||
{ id: "gugun", title: "시군구", visible: true, widthPercent: 4 },
|
||||
{ id: "bscFctNm", title: "시설명", visible: true, widthPercent: 7 },
|
||||
{ id: "efflWqltStndrdNm", title: "지역구분", visible: true, widthPercent: 5 },
|
||||
|
||||
{ id: "tel", title: "전화번호", visible: true },
|
||||
{ id: "fctCpc", title: "시설용량(톤/일)", visible: true },
|
||||
{ id: "ruseUtztnFcltNm", title: "재이용시설명", visible: true },
|
||||
{ id: "tel", title: "전화번호", visible: true, widthPercent: 6 },
|
||||
{ id: "fctCpc", title: "시설용량(톤/일)", visible: true, widthPercent: 5 },
|
||||
{ id: "ruseUtztnFcltNm", title: "재이용시설명", visible: true, widthPercent: 7 },
|
||||
|
||||
{ id: "fcltCpct", title: "시설용량(m³/일)", visible: true, },
|
||||
{ id: "splyExtraCpct", title: "하수처리량(m³/일)", visible: true, },
|
||||
{ id: "ruseCpct", title: "재이용량(m³/일)", visible: true, },
|
||||
{ id: "fcltCpct", title: "시설용량(m³/일)", visible: true, widthPercent: 5 },
|
||||
{ id: "splyExtraCpct", title: "하수처리량(m³/일)", visible: true, widthPercent: 5 },
|
||||
{ id: "ruseCpct", title: "재이용량(m³/일)", visible: true, widthPercent: 5 },
|
||||
|
||||
{ id: "usageTotal", title: "합계", visible: true, },
|
||||
{ id: "inUsage", title: "장내용수", visible: true, },
|
||||
{ id: "outUsage", title: "장외용수", visible: true, },
|
||||
{ id: "usageTotal", title: "합계", visible: true, widthPercent: 4 },
|
||||
{ id: "inUsage", title: "장내용수", visible: true, widthPercent: 4 },
|
||||
{ id: "outUsage", title: "장외용수", visible: true, widthPercent: 4 },
|
||||
|
||||
{ id: "operMthd", title: "운영방식", visible: true, },
|
||||
{ id: "rprtvBzenty", title: "대행업체", visible: true, },
|
||||
{ id: "bgngDt", title: "시작일", visible: true, },
|
||||
{ id: "endDt", title: "종료일", visible: true, },
|
||||
{ id: "operMthd", title: "운영방식", visible: true, widthPercent: 4 },
|
||||
{ id: "rprtvBzenty", title: "대행업체", visible: true, widthPercent: 5 },
|
||||
{ id: "bgngDt", title: "시작일", visible: true, widthPercent: 4 },
|
||||
{ id: "endDt", title: "종료일", visible: true, widthPercent: 4 },
|
||||
];
|
||||
|
||||
// id는 다확인해야함
|
||||
|
||||
@@ -6,38 +6,39 @@ export const sttnHeadListType = z.array(
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
visible: z.boolean(),
|
||||
widthPercent: z.number().optional(),
|
||||
})
|
||||
);
|
||||
|
||||
export const rainSttHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
{ id: "cityText", title: "시도", visible: true, },
|
||||
{ id: "sggText", title: "시군구", visible: true, },
|
||||
{ id: "bdstNm", title: "건축물명", visible: true, },
|
||||
{ id: "daddr", title: "주소", visible: true, },
|
||||
{ id: "bdsgUsgText", title: "건축물용도", visible: true, },
|
||||
{ id: "frstArchPrmsnDt", title: "최초건축허가일시", visible: true, },
|
||||
{ id: "archArea", title: "건축면적", visible: true, },
|
||||
{ id: "chBuildingYn", title: "증축・개축・재축여부", visible: true, },
|
||||
{ id: "lawTrgtYn", title: "법적의무대상여부", visible: true, },
|
||||
{ id: "instlCmptnDt", title: "설치완료일시", visible: true, },
|
||||
{ id: "cityText", title: "시도", visible: true, widthPercent: 4 },
|
||||
{ id: "sggText", title: "시군구", visible: true, widthPercent: 4 },
|
||||
{ id: "bdstNm", title: "건축물명", visible: true, widthPercent: 6 },
|
||||
{ id: "daddr", title: "주소", visible: true, widthPercent: 8 },
|
||||
{ id: "bdsgUsgText", title: "건축물용도", visible: true, widthPercent: 5 },
|
||||
{ id: "frstArchPrmsnDt", title: "최초건축허가일시", visible: true, widthPercent: 6 },
|
||||
{ id: "archArea", title: "건축면적", visible: true, widthPercent: 4 },
|
||||
{ id: "chBuildingYn", title: "증축・개축・재축여부", visible: true, widthPercent: 4 },
|
||||
{ id: "lawTrgtYn", title: "법적의무대상여부", visible: true, widthPercent: 4 },
|
||||
{ id: "instlCmptnDt", title: "설치완료일시", visible: true, widthPercent: 5 },
|
||||
|
||||
{ id: "instlCst", title: "설치비용", visible: true, },
|
||||
{ id: "instlCst", title: "설치비용", visible: true, widthPercent: 6 },
|
||||
|
||||
{ id: "pntfColKnd", title: "집수지점종류", visible: true, },
|
||||
{ id: "pntfColArea", title: "집수지점면적", visible: true, },
|
||||
{ id: "pntfColKnd", title: "집수지점종류", visible: true, widthPercent: 3 },
|
||||
{ id: "pntfColArea", title: "집수지점면적", visible: true, widthPercent: 4 },
|
||||
|
||||
{ id: "dtfcltCpct", title: "저류조용량", visible: true, },
|
||||
{ id: "filtrTrtmfctYn", title: "여과처리시설유무", visible: true, },
|
||||
{ id: "filtrTrtmfctCpct", title: "여과처리시설용량", visible: true, },
|
||||
{ id: "filtrTrtmfctPrs", title: "여과처리시설처리공정", visible: true, },
|
||||
{ id: "dtfcltCpct", title: "저류조용량", visible: true, widthPercent: 4 },
|
||||
{ id: "filtrTrtmfctYn", title: "여과처리시설유무", visible: true, widthPercent: 4 },
|
||||
{ id: "filtrTrtmfctCpct", title: "여과처리시설용량", visible: true, widthPercent: 5 },
|
||||
{ id: "filtrTrtmfctPrs", title: "여과처리시설처리공정", visible: true, widthPercent: 6 },
|
||||
|
||||
{ id: "instlCstSprtYn", title: "설치지원비용여부", visible: true, },
|
||||
{ id: "instlCstSprtAmt", title: "설치지원비용", visible: true, },
|
||||
{ id: "instlCstSprtYn", title: "설치지원비용여부", visible: true, widthPercent: 4 },
|
||||
{ id: "instlCstSprtAmt", title: "설치지원비용", visible: true, widthPercent: 5 },
|
||||
|
||||
{ id: "grntchBdstCertYn", title: "녹색건축물인증여부", visible: true, },
|
||||
{ id: "grntchBdstCertYr", title: "녹색건축물인증년도", visible: true, },
|
||||
{ id: "grntchBdstCertNo", title: "녹색건축물인증번호", visible: true, },
|
||||
{ id: "grntchBdstCertGrdText", title: "녹색건축물인증등급", visible: true, },
|
||||
{ id: "grntchBdstCertYn", title: "녹색건축물인증여부", visible: true, widthPercent: 3 },
|
||||
{ id: "grntchBdstCertYr", title: "녹색건축물인증년도", visible: true, widthPercent: 3 },
|
||||
{ id: "grntchBdstCertNo", title: "녹색건축물인증번호", visible: true, widthPercent: 4 },
|
||||
{ id: "grntchBdstCertGrdText", title: "녹색건축물인증등급", visible: true, widthPercent: 4 },
|
||||
];
|
||||
|
||||
// id는 다확인해야함
|
||||
|
||||
@@ -7,36 +7,43 @@ export const rswtSttHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
id: "cityText",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "sggText",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "bdstNm",
|
||||
title: "건축물명",
|
||||
visible: true,
|
||||
widthPercent: 6,
|
||||
},
|
||||
{
|
||||
id: "daddr",
|
||||
title: "주소",
|
||||
visible: true,
|
||||
widthPercent: 8,
|
||||
},
|
||||
{
|
||||
id: "bdsgUsgText",
|
||||
title: "건축물용도",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
{
|
||||
id: "frstArchPrmsnDt",
|
||||
title: "최초건축허가일시",
|
||||
visible: true,
|
||||
widthPercent: 6,
|
||||
},
|
||||
{
|
||||
id: "archArea",
|
||||
title: "건축면적",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
// {
|
||||
// id: "wtrUsqty",
|
||||
@@ -47,12 +54,14 @@ export const rswtSttHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
id: "chBuildingYn",
|
||||
title: "증축・개축・재축여부",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
|
||||
{
|
||||
id: "lawTrgtYn",
|
||||
title: "법적의무대상여부",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
// {
|
||||
// id: "oblgTrgtWtrUsqty",
|
||||
@@ -63,65 +72,77 @@ export const rswtSttHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
id: "instlCmptnDt",
|
||||
title: "설치완료일시",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
{
|
||||
id: "instlCst",
|
||||
title: "설치비용",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
|
||||
{
|
||||
id: "orgwtKndCd",
|
||||
title: "원수종류",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
|
||||
{
|
||||
id: "filtrTrtmfctCpct",
|
||||
title: "처리시설용량",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
{
|
||||
id: "filtrTrtmfctProcs",
|
||||
title: "주요처리공정",
|
||||
visible: true,
|
||||
widthPercent: 6,
|
||||
},
|
||||
{
|
||||
id: "filtrTrtmfctUsgCd",
|
||||
title: "이용용도",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
|
||||
{
|
||||
id: "instlCstSprtYn",
|
||||
title: "설치지원비용여부",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "instlCstSprtAmt",
|
||||
title: "설치지원비용",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
|
||||
{
|
||||
id: "grntchBdstCertYn",
|
||||
title: "녹색건축물인증여부",
|
||||
visible: true,
|
||||
widthPercent: 3,
|
||||
},
|
||||
{
|
||||
id: "grntchBdstCertYr",
|
||||
title: "녹색건축물인증년도",
|
||||
visible: true,
|
||||
widthPercent: 3,
|
||||
},
|
||||
{
|
||||
id: "grntchBdstCertNo",
|
||||
title: "녹색건축물인증번호",
|
||||
visible: true,
|
||||
widthPercent: 4,
|
||||
},
|
||||
{
|
||||
id: "grntchBdstCertGrdText",
|
||||
title: "녹색건축물인증등급",
|
||||
visible: true,
|
||||
widthPercent: 5,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -138,7 +138,8 @@ export const chRowspanTable = (
|
||||
<TableCell
|
||||
key={key}
|
||||
rowSpan={rowspan}
|
||||
className="align-middle text-center whitespace-nowrap"
|
||||
className="align-middle text-center whitespace-normal break-words"
|
||||
style={{ width: head.widthPercent ? `${head.widthPercent}%` : undefined }}
|
||||
>
|
||||
{key === "checkBox" ? (
|
||||
<Checkbox
|
||||
@@ -169,8 +170,9 @@ export const chRowspanTable = (
|
||||
return (
|
||||
<TableCell
|
||||
key={key}
|
||||
className="text-center whitespace-nowrap"
|
||||
className="text-center whitespace-normal break-words"
|
||||
onClick={() => handleCellClick(rowIndex, head.id)}
|
||||
style={{ width: head.widthPercent ? `${head.widthPercent}%` : undefined }}
|
||||
>
|
||||
{head.edit === true ? (
|
||||
[
|
||||
|
||||
@@ -94,6 +94,22 @@ export const excelDownload = (
|
||||
if (!response.ok) {
|
||||
throw Error(response.statusText);
|
||||
}
|
||||
|
||||
const isTemplateOnlyDownload =
|
||||
excelList.length === 1 &&
|
||||
Array.isArray(excelList[0]) &&
|
||||
excelList[0].length === 0;
|
||||
|
||||
if (isTemplateOnlyDownload) {
|
||||
const blob = await response.blob();
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = fileNm.endsWith(".xlsx") ? fileNm : `${fileNm}.xlsx`;
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
return;
|
||||
}
|
||||
|
||||
// 받은 파일 바인너리 처리
|
||||
const blobRet = await response.arrayBuffer();
|
||||
// 버퍼에 있는 엑셀데이터 전달 후 json으로 변환
|
||||
@@ -406,4 +422,4 @@ export function handleLaeSeCdChange(
|
||||
isCityCd,
|
||||
isSggCd: [{ text: "전체", val: "0" }, ...sggOrdered],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ import {
|
||||
FormUi,
|
||||
UiTable,
|
||||
} from "@common/business_components/ui";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import PopoverUi from "@common/business_components/ui/popover_ui";
|
||||
import { Button, Checkbox, Input, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { type UseFormReturn } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
/**
|
||||
* ConCostForm
|
||||
* 호출: (with-layout)/matMng/coMat/coMatRvw 에서 호출
|
||||
@@ -57,6 +57,7 @@ export default function ConCostForm({
|
||||
code,
|
||||
} = useWrStore((state) => state);
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const { confirm } = useConfirm();
|
||||
|
||||
const ref = useRef<boolean>(false);
|
||||
|
||||
@@ -233,43 +234,16 @@ export default function ConCostForm({
|
||||
if(pk !==null){
|
||||
|
||||
if (checkFinish) {
|
||||
toast((t) => (
|
||||
<span className="flex flex-col items-center text-2xl">
|
||||
검토완료 변경시 공사비는 변경할수 없습니다.
|
||||
<br />
|
||||
진행하시겠습니까?
|
||||
<div className="flex gap-2 mt-2">
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={async () => {
|
||||
toast.dismiss(t.id);
|
||||
|
||||
const message = await coMatRvwUpdate(
|
||||
pk,
|
||||
form.getValues("dmdInfoId"),
|
||||
data
|
||||
);
|
||||
alert(message);
|
||||
}}
|
||||
>
|
||||
확인
|
||||
</Button>
|
||||
<Button size="sm" onClick={() => toast.dismiss(t.id)}>
|
||||
취소
|
||||
</Button>
|
||||
</div>
|
||||
</span>
|
||||
));
|
||||
if (await confirm("검토완료 변경시 공사비는 변경할수 없습니다.\n진행하시겠습니까?")) {
|
||||
const message = await coMatRvwUpdate( pk, form.getValues("dmdInfoId"), data );
|
||||
alert(message);
|
||||
}
|
||||
} else {
|
||||
const message = await coMatRvwUpdate(
|
||||
pk,
|
||||
form.getValues("dmdInfoId"),
|
||||
data
|
||||
);
|
||||
const message = await coMatRvwUpdate( pk, form.getValues("dmdInfoId"), data );
|
||||
alert(message);
|
||||
}
|
||||
}else{
|
||||
alert('후보지를 먼저 선택해주세요')
|
||||
alert('후보지를 먼저 선택해주세요');
|
||||
}
|
||||
}
|
||||
} else if (type === "hist") {
|
||||
@@ -277,7 +251,8 @@ export default function ConCostForm({
|
||||
delete value.ruseUtztnFcltNm;
|
||||
console.log("onSubmit data ", pk);
|
||||
|
||||
ruseRvwCalUpdate(value);
|
||||
const message = await ruseRvwCalUpdate(value);
|
||||
alert(message);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -9,11 +9,12 @@ import {
|
||||
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import { formH1Class } from "@/components/lib/class/comClass";
|
||||
import {
|
||||
confirmToast,
|
||||
formatCommaNumber,
|
||||
handleCommaNumberChange,
|
||||
handleOnlyNumberChange,
|
||||
} from "@/components/lib/func/common";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import {
|
||||
Form,
|
||||
FormField,
|
||||
@@ -24,7 +25,6 @@ import { Button, Input, Label, ScrollArea } from "@common/components/ui";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { z } from "zod";
|
||||
import BdstReg from "../bdstReg/bdstReg";
|
||||
@@ -54,6 +54,8 @@ export default function HtdflRegForm({
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
const { laeSeCd } = auth;
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const [regCtpvCd, regSggcd] = form.watch(["ctpvCd", "sggCd"]);
|
||||
|
||||
@@ -65,33 +67,42 @@ export default function HtdflRegForm({
|
||||
const myUUID = await getMyUUID();
|
||||
|
||||
if (!myUUID) {
|
||||
toast.error(t('noUserInfoMsg'));
|
||||
alert(t('noUserInfoMsg'));
|
||||
return;
|
||||
}
|
||||
if (isModal) {
|
||||
const data = regCtpvCd ? regCtpvCd : regSggcd ? regSggcd : "noCd";
|
||||
if (data === "noCd") {
|
||||
toast.error("시도/시군구 코드를 선택해야합니다.");
|
||||
alert("시도/시군구 코드를 선택해야합니다.");
|
||||
return;
|
||||
}
|
||||
const handleConfirm = async () => {
|
||||
htdflBdstReg(values, data,myUUID);
|
||||
const message = await htdflBdstReg(values, data,myUUID);
|
||||
alert(message);
|
||||
if (setIsModal) setIsModal(false);
|
||||
};
|
||||
confirmToast(t("isInsertMsg"), handleConfirm);
|
||||
if (await confirm(t("isInsertMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
} else {
|
||||
const handleConfirm = async () => {
|
||||
await htdflBdstUpdate(values, laeSeCd,myUUID);
|
||||
const message = await htdflBdstUpdate(values, laeSeCd,myUUID);
|
||||
alert(message);
|
||||
console.log(' htdflBdstUpdate ')
|
||||
resetHtdflTableIndex(0);
|
||||
};
|
||||
confirmToast(t("isUpdateMsg"), handleConfirm);
|
||||
if (await confirm(t("isUpdateMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const onDelete = async () => {
|
||||
const code = htdflForm.ctpvCd ? htdflForm.ctpvCd : htdflForm.sggCd ? htdflForm.sggCd : "noCd";
|
||||
confirmToast(`정말 ${htdflForm.bdstNm} 시설을 삭제하시겠습니까?`, () => htdflBdstDelete(htdflForm, code));
|
||||
if (await confirm(`정말 ${htdflForm.bdstNm} 시설을 삭제하시겠습니까?`)) {
|
||||
const message = await htdflBdstDelete(htdflForm, code);
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
const cleanHtdflData = (raw: any): z.infer<typeof hdtflZod> => {
|
||||
|
||||
@@ -28,7 +28,6 @@ import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useFieldArray, type UseFormReturn } from "react-hook-form";
|
||||
import MngRegFormDetail from "../mngReg/mngRegFormDetail/mngRegFormDetail";
|
||||
import {
|
||||
//confirmToast,
|
||||
formatCommaNumber,
|
||||
handleCommaNumberChange,
|
||||
safeDate,
|
||||
@@ -39,7 +38,6 @@ import type { DemandCompType } from "@common/business_components/ui/sdmInsertFor
|
||||
import RuseMngTableForm from "@/components/ui/table/pbnstReg/ruseMngTableForm/ruseMngTableForm";
|
||||
import type { SelectDataType } from "@common/business_components";
|
||||
import { BuseWaterQulity } from "./buseWaterQulity/buseWaterQulity";
|
||||
// import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
//import { useTranslation } from "react-i18next";
|
||||
|
||||
@@ -8,10 +8,11 @@ import {
|
||||
} from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import { formH1Class, formH2Class } from "@/components/lib/class/comClass";
|
||||
import {
|
||||
confirmToast,
|
||||
formatCommaNumber,
|
||||
handleMinusNumberChange,
|
||||
} from "@/components/lib/func/common";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { DatePicker, FormUi } from "@common/business_components";
|
||||
import { Form, FormField, SelectBox } from "@common/business_components/ui";
|
||||
import { Button, Input } from "@common/components/ui";
|
||||
@@ -20,7 +21,6 @@ import { useEffect } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { z } from "zod";
|
||||
import BdstReg from "../bdstReg/bdstReg";
|
||||
import toast from "react-hot-toast";
|
||||
import BdstAdd from "../bdstReg/bdstAdd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { numSize, txtSize } from "@/app/store/common/code/basicCode";
|
||||
@@ -48,6 +48,8 @@ export default function RainRegForm({
|
||||
// defaultValues: defaultValues,
|
||||
});
|
||||
const { t } = useTranslation('base');
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const [grntchBdstCertYn, instlCstSprtYn, filtrTrtmfctYn] = form.watch([
|
||||
"reuseBuilding.0.grntchBdstCertYn",
|
||||
@@ -134,7 +136,7 @@ export default function RainRegForm({
|
||||
const myUUID = await getMyUUID();
|
||||
|
||||
if (!myUUID) {
|
||||
toast.error(t('noUserInfoMsg'));
|
||||
alert(t('noUserInfoMsg'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -142,26 +144,35 @@ export default function RainRegForm({
|
||||
const data = regCtpvCd ? regCtpvCd : regSggcd ? regSggcd : "noCd";
|
||||
|
||||
if (data === "noCd") {
|
||||
toast.error("시도/시군구 코드를 선택해야합니다.");
|
||||
alert("시도/시군구 코드를 선택해야합니다.");
|
||||
return;
|
||||
}
|
||||
const handleConfirm = async () => {
|
||||
rainBdstReg(values, data,myUUID);
|
||||
const message = await rainBdstReg(values, data,myUUID);
|
||||
alert(message);
|
||||
if (setIsModal) setIsModal(false);
|
||||
};
|
||||
confirmToast(t('isInsertMsg'), handleConfirm);
|
||||
if (await confirm(t("isInsertMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
} else {
|
||||
const handleConfirm = async () => {
|
||||
await rainBdstUpdate(values, laeSeCd,myUUID);
|
||||
const message = await rainBdstUpdate(values, laeSeCd,myUUID);
|
||||
alert(message);
|
||||
resetRainTableIndex(0)
|
||||
};
|
||||
confirmToast(t('isUpdateMsg'), handleConfirm);
|
||||
if (await confirm(t("isUpdateMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const onDelete = async () => {
|
||||
const code = rainForm.ctpvCd ? rainForm.ctpvCd : rainForm.sggCd ? rainForm.sggCd : "noCd";
|
||||
confirmToast(`정말 ${rainForm.bdstNm} 시설을 삭제하시겠습니까?`, () => rainBdstDelete(rainForm, code));
|
||||
if (await confirm(`정말 ${rainForm.bdstNm} 시설을 삭제하시겠습니까?`)) {
|
||||
const message = await rainBdstDelete(rainForm, code);
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -8,10 +8,10 @@ import {
|
||||
} from "@/app/store/ruseFcltMng/fcltReg/rswtReg";
|
||||
import { formH1Class, formH2Class } from "@/components/lib/class/comClass";
|
||||
import {
|
||||
confirmToast,
|
||||
formatCommaNumber,
|
||||
handleMinusNumberChange,
|
||||
} from "@/components/lib/func/common";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import {
|
||||
DatePicker,
|
||||
Form,
|
||||
@@ -28,7 +28,7 @@ import BdstAdd from "../bdstReg/bdstAdd";
|
||||
import BdstReg from "../bdstReg/bdstReg";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { numSize, txtSize } from "@/app/store/common/code/basicCode";
|
||||
import toast from "react-hot-toast";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
|
||||
export default function RswtrRegForm({
|
||||
rswtForm,
|
||||
@@ -52,6 +52,8 @@ export default function RswtrRegForm({
|
||||
}, [isMap]);
|
||||
// const defaultValues: z.infer<typeof rswtZod> = rswtZod.parse({});
|
||||
const { t } = useTranslation("base");
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const form = useForm<z.infer<typeof rswtZod>>({
|
||||
resolver: zodResolver(rswtZod),
|
||||
@@ -72,32 +74,41 @@ export default function RswtrRegForm({
|
||||
const myUUID = await getMyUUID();
|
||||
|
||||
if (!myUUID) {
|
||||
toast.error(t('noUserInfoMsg'));
|
||||
alert(t('noUserInfoMsg'));
|
||||
return;
|
||||
}
|
||||
if (isModal) {
|
||||
const data = regCtpvCd ? regCtpvCd : regSggcd ? regSggcd : "noCd";
|
||||
if (data === "noCd") {
|
||||
toast.error("시도/시군구 코드를 선택해야합니다.");
|
||||
alert("시도/시군구 코드를 선택해야합니다.");
|
||||
return;
|
||||
}
|
||||
const handleConfirm = async () => {
|
||||
rswtBdstReg(values, data,myUUID);
|
||||
const message = await rswtBdstReg(values, data,myUUID);
|
||||
alert(message);
|
||||
if (setIsModal) setIsModal(false);
|
||||
};
|
||||
confirmToast(t("isInsertMsg"), handleConfirm);
|
||||
if (await confirm(t("isInsertMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
} else {
|
||||
const handleConfirm = async () => {
|
||||
rswtBdstUpdate(values, laeSeCd,myUUID);
|
||||
const message = await rswtBdstUpdate(values, laeSeCd,myUUID);
|
||||
alert(message);
|
||||
resetRswtTableIndex(0)
|
||||
};
|
||||
confirmToast(t("isUpdateMsg"), handleConfirm);
|
||||
if (await confirm(t("isUpdateMsg"))) {
|
||||
await handleConfirm();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const onDelete = async () => {
|
||||
const code = rswtForm.ctpvCd ? rswtForm.ctpvCd : rswtForm.sggCd ? rswtForm.sggCd : "noCd";
|
||||
confirmToast(`정말 ${rswtForm.bdstNm} 시설을 삭제하시겠습니까?`, () => rswtBdstDelete(rswtForm, code));
|
||||
if (await confirm(`정말 ${rswtForm.bdstNm} 시설을 삭제하시겠습니까?`)) {
|
||||
const message = await rswtBdstDelete(rswtForm, code);
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
const cleanRswtData = (raw: any): z.infer<typeof rswtZod> => {
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
rswtExcelDataCheck,
|
||||
} from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/excel";
|
||||
import { showConfirmToast } from "@/components/lib/func/common";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import {
|
||||
filePicked,
|
||||
filePickedArray,
|
||||
@@ -23,7 +24,6 @@ import { Button, Input } from "@common/components/ui";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
import type { z } from "zod";
|
||||
|
||||
export default function ChkgdExcel({
|
||||
@@ -46,6 +46,7 @@ export default function ChkgdExcel({
|
||||
} = useWrStore((state) => {
|
||||
return state;
|
||||
});
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const [excelData, setExcelData] = useState<
|
||||
rswtChkZodType[] | rainChkZodType[]
|
||||
>();
|
||||
@@ -89,7 +90,7 @@ export default function ChkgdExcel({
|
||||
useEffect(() => {
|
||||
if (file) {
|
||||
if (form.getValues("chckYr").length < 1) {
|
||||
toast.error("파일업로드 이전에 등록년도를 작성해주세요 ");
|
||||
alert("파일업로드 이전에 등록년도를 작성해주세요 ");
|
||||
setFile(null);
|
||||
return;
|
||||
}
|
||||
@@ -102,6 +103,9 @@ export default function ChkgdExcel({
|
||||
res,
|
||||
form.getValues("chckYr")
|
||||
);
|
||||
if (excelData.message) {
|
||||
alert(excelData.message);
|
||||
}
|
||||
if (excelData.issues && excelData.issues.length > 0) {
|
||||
excelData.issues.some((err, index) => {
|
||||
showConfirmToast(err);
|
||||
@@ -190,33 +194,35 @@ export default function ChkgdExcel({
|
||||
// );
|
||||
// }
|
||||
|
||||
const onSubmit = (values: z.infer<typeof chkgdRegExcel>) => {
|
||||
const onSubmit = async (values: z.infer<typeof chkgdRegExcel>) => {
|
||||
if (values.chckYr === "") {
|
||||
toast.error("등록년도를 작성해주세요");
|
||||
alert("등록년도를 작성해주세요");
|
||||
return;
|
||||
}
|
||||
|
||||
if (type === "RNB") {
|
||||
if (excelData === undefined || excelData?.length === 0) {
|
||||
toast.error("빈 파일 및 파일 오류 입니다.");
|
||||
alert("빈 파일 및 파일 오류 입니다.");
|
||||
|
||||
return;
|
||||
} else {
|
||||
rainChkExcelDataUPload(
|
||||
const message = await rainChkExcelDataUPload(
|
||||
excelData as rainChkZodType[],
|
||||
form.getValues("chckYr"),
|
||||
laeSeCd
|
||||
);
|
||||
alert(message);
|
||||
setIsRegExcel(false);
|
||||
setYearChange(form.getValues("chckYr"));
|
||||
}
|
||||
} else if (type === "RST") {
|
||||
if (excelRswtData === undefined || excelRswtData?.length === 0) {
|
||||
toast.error("빈 파일 및 파일 오류 입니다.");
|
||||
alert("빈 파일 및 파일 오류 입니다.");
|
||||
|
||||
return;
|
||||
} else {
|
||||
rswtChkExceDataUpload(excelRswtData as rswtChkZodType[], laeSeCd);
|
||||
const message = await rswtChkExceDataUpload(excelRswtData as rswtChkZodType[], laeSeCd);
|
||||
alert(message);
|
||||
setIsRegExcel(false);
|
||||
setYearChange(form.getValues("chckYr"));
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { splRuseWaterType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgd
|
||||
import type { rswtrPolutionsZode } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList";
|
||||
import { codeToText } from "@/components/lib/func/common";
|
||||
import { GuideDetailsTable } from "@/components/ui/table/chkgdTable/guideDetailTable/guideDetailTable";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
import { ScrollArea, Title } from "@common/business_components/ui";
|
||||
import { Button } from "@common/components/ui";
|
||||
import React, { useEffect, useState } from "react";
|
||||
@@ -28,6 +29,7 @@ export default function ChkgdModal({
|
||||
rainChkGuidUpdate,
|
||||
rwstPolAndGuideUpdate,
|
||||
} = useWrStore((state) => state);
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const [guidData, setGuidData] = useState<splRuseWaterType[]>();
|
||||
const [headList, setHeadList] = useState<{
|
||||
splHeadList: TableUpperProps[];
|
||||
@@ -206,7 +208,7 @@ export default function ChkgdModal({
|
||||
}
|
||||
};
|
||||
|
||||
const allDataUpdate = () => {
|
||||
const allDataUpdate = async () => {
|
||||
const realGuideDetail = obj.guideDetails;
|
||||
|
||||
if (updateData === undefined || updateData.length === 0) return;
|
||||
@@ -233,14 +235,16 @@ export default function ChkgdModal({
|
||||
});
|
||||
obj.guideDetails = realGuideDetail;
|
||||
if (type === "RNB") {
|
||||
rainChkGuidUpdate(obj);
|
||||
const message = await rainChkGuidUpdate(obj);
|
||||
alert(message);
|
||||
setIsModal(false);
|
||||
} else {
|
||||
const polution = Object.values(upPolutionData)
|
||||
.flat()
|
||||
.filter((item) => item.utztnUsgCd !== "평균");
|
||||
obj.rswtrPollutions = polution;
|
||||
rwstPolAndGuideUpdate([obj]);
|
||||
const message = await rwstPolAndGuideUpdate([obj]);
|
||||
alert(message);
|
||||
setIsModal(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,13 +12,14 @@ import { useForm } from "react-hook-form";
|
||||
import type { z } from "zod";
|
||||
|
||||
export default function RuseCaseMngExcel({setIsExcelOpen}:{setIsExcelOpen: (isOpen:boolean)=>void}) {
|
||||
const { insertRuseCaseMng } = useWrStore((state) => state);
|
||||
const { insertRuseCaseMng, code } = useWrStore((state) => state);
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const form = useForm<z.infer<typeof coRegExcel>>({
|
||||
resolver: zodResolver(coRegExcel),
|
||||
});
|
||||
|
||||
const [file, setFiles] = useState<File | undefined>();
|
||||
const sewageOutUseCodeList = code.sewageOutFclttUse ?? [];
|
||||
|
||||
const onSubmit = () => {
|
||||
if (file) {
|
||||
@@ -125,7 +126,25 @@ export default function RuseCaseMngExcel({setIsExcelOpen}:{setIsExcelOpen: (isOp
|
||||
|
||||
|
||||
if(parsingExcel.ok&&parsingExcel.value){
|
||||
newArray.push(parsingExcel.value);
|
||||
const parsedValue = { ...parsingExcel.value };
|
||||
const usageText = parsedValue.grnteWqUsg?.toString().trim();
|
||||
|
||||
if (usageText) {
|
||||
const usageCode = sewageOutUseCodeList.find(
|
||||
(codeItem) => codeItem.text.trim() === usageText
|
||||
)?.val;
|
||||
|
||||
if (!usageCode) {
|
||||
isError.push([
|
||||
`${parsedValue.ruseBizNm || "행"} => [보증수질_용도별] '${usageText}' 에 해당하는 WR018 코드가 없습니다.`,
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
parsedValue.grnteWqUsg = usageCode;
|
||||
}
|
||||
|
||||
newArray.push(parsedValue);
|
||||
}else if(parsingExcel.errors){
|
||||
isError.push(parsingExcel.errors);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import { PbnstBuseForm } from "@/components/ui/form/fcltReg/pbnstReg/buseReg/bug
|
||||
import { type FieldErrors, type UseFormReturn } from "react-hook-form";
|
||||
import { writeRgtrAndMdfr } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg";
|
||||
import type { z } from "zod";
|
||||
import { confirmToast } from "@/components/lib/func/common";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export function PbnstRegModal({
|
||||
@@ -35,6 +35,7 @@ export function PbnstRegModal({
|
||||
newIndexMng:number
|
||||
}) {
|
||||
const { t } = useTranslation("base");
|
||||
const { confirm } = useConfirm();
|
||||
|
||||
//TODO: 유즈 스테이트에 set만해도 되나?
|
||||
const [, setCurrentTab] = useState<string>("mng");
|
||||
@@ -50,7 +51,9 @@ export function PbnstRegModal({
|
||||
setPbnstInsert(data[0]);
|
||||
}
|
||||
};
|
||||
confirmToast(t("isInsertMsg"), handleConfirm);
|
||||
if (await confirm(t("isInsertMsg"))) {
|
||||
handleConfirm();
|
||||
}
|
||||
};
|
||||
|
||||
const handleTabChange = (value: string) => {
|
||||
|
||||
@@ -190,7 +190,21 @@ export default function RainChkgdTable({
|
||||
|
||||
return (
|
||||
<>
|
||||
<Table variant="secondary">
|
||||
<Table variant="secondary" className="table-fixed">
|
||||
<colgroup>
|
||||
{headList.headList
|
||||
.filter((head) => head.visible !== false)
|
||||
.map((head) => (
|
||||
<col
|
||||
key={head.id}
|
||||
style={{
|
||||
width: head.widthPercent
|
||||
? `${head.widthPercent}%`
|
||||
: undefined,
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</colgroup>
|
||||
<TableHeader className="font-bold">
|
||||
{headMakeprfmnc(
|
||||
headList?.headList,
|
||||
|
||||
@@ -145,7 +145,21 @@ export default function RswtChkgdTable({
|
||||
|
||||
return (
|
||||
<>
|
||||
<Table variant="secondary">
|
||||
<Table variant="secondary" className="table-fixed">
|
||||
<colgroup>
|
||||
{headList.headList
|
||||
.filter((head) => head.visible !== false)
|
||||
.map((head) => (
|
||||
<col
|
||||
key={head.id}
|
||||
style={{
|
||||
width: head.widthPercent
|
||||
? `${head.widthPercent}%`
|
||||
: undefined,
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</colgroup>
|
||||
<TableHeader className="font-bold">
|
||||
{headMakeprfmnc(headList?.headList, headList?.upHeadList)}
|
||||
</TableHeader>
|
||||
|
||||
Binary file not shown.
@@ -14,6 +14,7 @@ import { ConfirmDialog } from "../../shared/ui/confirm-dialog";
|
||||
// import "./globals.css";
|
||||
import i18next from "i18next";
|
||||
import { I18nextProvider } from "react-i18next";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import koBase from "@/public/locales/ko/message.json";
|
||||
import { StoreProvider as WrStoreProvider } from "@/app/store";
|
||||
//import { LoginApi } from "@/src/entities/auth";
|
||||
@@ -54,6 +55,7 @@ const AppProvider = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
||||
<AlertDialog />
|
||||
<PromptDialog />
|
||||
<ConfirmDialog />
|
||||
<Toaster position="top-center" />
|
||||
</AuthWrapper>
|
||||
</ConfirmProvider>
|
||||
</PromptProvider>
|
||||
|
||||
@@ -17,6 +17,7 @@ export class LoginApiService implements LoginService {
|
||||
|
||||
public async login(payload: ILogin): Promise<void> {
|
||||
try {
|
||||
tokenManager.clearAuthToken();
|
||||
const response = await fetch( PROXY_HOST+ ENDPOINT.USER_SERVICE.LOGIN, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user