diff --git a/apps/wr/app/store/matDmd/coMatRvw/headList.tsx b/apps/wr/app/store/matDmd/coMatRvw/headList.tsx index 6d9bf8862..e7363b0c1 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/headList.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/headList.tsx @@ -1,4 +1,4 @@ -import type { CommonTableProps, TableUpperProps } from "../../common/type/header"; +import type { CommonTableProps } from "../../common/type/header"; diff --git a/apps/wr/app/store/matDmd/coMatRvw/index.tsx b/apps/wr/app/store/matDmd/coMatRvw/index.tsx index 21239fce3..9e857d4d3 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/index.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/index.tsx @@ -1,13 +1,13 @@ +import { fetchType, getFetchWithCount, putFectch } from "@/components/lib/api"; +import toast from "react-hot-toast"; +import type { CommonTableProps } from "../../common/type/header"; import { constCostHeadListExport, coRvwHeadListExport, coRvwNodeListExport, rateFeeHeadListExport, } from "./headList"; -import type { CommonTableProps } from "../../common/type/header"; import type { DedMatUpdateType, DmdCoReqType } from "./type"; -import { fetchType, getFetch, getFetchWithCount, putFectch } from "@/components/lib/api"; -import toast from "react-hot-toast"; const coRvwHeadList = coRvwHeadListExport; const coRvwNodeList = coRvwNodeListExport; @@ -139,6 +139,7 @@ export const coRvwActionsExport: (set: any) => coRvwActions = (set: any) => { } } catch (e) { toast.error("매칭 검토 저장 오류입니다."); + console.error("coMatRvwUpdate error", e); } }, coMatRvwSearch: async ( diff --git a/apps/wr/app/store/matDmd/coSttn/index.tsx b/apps/wr/app/store/matDmd/coSttn/index.tsx index d80b36420..cc1db4566 100644 --- a/apps/wr/app/store/matDmd/coSttn/index.tsx +++ b/apps/wr/app/store/matDmd/coSttn/index.tsx @@ -1,8 +1,7 @@ import type { CommonTableProps } from "@/app/store/common/type/header"; -import { fetchType, getFetch, getFetchWithCount } from "@/components/lib/api"; -import { coSttHeadListExport, coSttNodeListExport } from "./headList"; -import { excelCoSttnParsing } from "./excel"; +import { fetchType, getFetchWithCount } from "@/components/lib/api"; import type { DemandCompType } from "@common/business_components/ui/sdmInsertForm/form"; +import { coSttHeadListExport, coSttNodeListExport } from "./headList"; // 테이블 헤드 리스트 const coSttNodeList = coSttNodeListExport; diff --git a/apps/wr/app/store/matDmd/drgtSttn/index.tsx b/apps/wr/app/store/matDmd/drgtSttn/index.tsx index 4211d2d08..334bedcf3 100644 --- a/apps/wr/app/store/matDmd/drgtSttn/index.tsx +++ b/apps/wr/app/store/matDmd/drgtSttn/index.tsx @@ -1,7 +1,7 @@ import { fetchType, getFetch, postFectch } from "@/components/lib/api"; +import type { z } from "zod"; import type { CommonTableProps } from "../../common/type/header"; import { drgtHeadListExport, drgtZod } from "./headList"; -import type { z } from "zod"; const drgtHeadList = drgtHeadListExport; @@ -57,11 +57,11 @@ console.log("sido",sido) }, {}); const data = Object.values(statusMap); - const formatStatus = data.map((item) => { + const formatStatus = data.map((item: any) => { const attention = item['관심'] || 0; const caution = item['주의'] || 0; return { - sggNm: item.sggNm, + sggNm: item['sggNm'], normal: String(item['정상'] || 0), caution: String(caution), attention: String(attention), @@ -99,7 +99,6 @@ export const drgtActionsExport: (set: any) => drgtActions = ( const year = today.getFullYear(); const month = String(today.getMonth() + 1).padStart(2, '0'); const formatted = `${year}${month}`; - const fromDate = formatted; const toDate = formatted; //FIXME: 페이지 처음 로딩될때 데이터 보려고 6월로 박아놓음 이거 fromDate로 고치기 diff --git a/apps/wr/app/store/matDmd/index.tsx b/apps/wr/app/store/matDmd/index.tsx index ed8ecd919..cc7094bc7 100644 --- a/apps/wr/app/store/matDmd/index.tsx +++ b/apps/wr/app/store/matDmd/index.tsx @@ -1,55 +1,53 @@ import type { SelectDataType } from "@common/business_components/ui"; - - const selectSido = [ - { text: '서울', val: "1" }, - { text: "인천", val: "2" }, - { text: "부산", val: "3" }, - ]; + { text: "서울", val: "1" }, + { text: "인천", val: "2" }, + { text: "부산", val: "3" }, +]; const selectSgg = [ - { text: '종로구', val: "1" }, - { text: "성북구", val: "2" }, - { text: "강남구", val: "3" }, - ]; - const selectUsg = [ - { text: '민간', val: "1" }, - { text: "공공", val: "2" }, - ]; - const selectYN= [ - { text: 'Y', val: "1" }, - { text: 'N', val: "2" }, - ]; + { text: "종로구", val: "1" }, + { text: "성북구", val: "2" }, + { text: "강남구", val: "3" }, +]; +const selectUsg = [ + { text: "민간", val: "1" }, + { text: "공공", val: "2" }, +]; +const selectYN = [ + { text: "Y", val: "1" }, + { text: "N", val: "2" }, +]; -export type matDmdState ={ dmd:{ +export type matDmdState = { + dmd: { isInit: boolean; - selectSido:SelectDataType[]; - selectSgg:SelectDataType[]; - selectUsg:SelectDataType[]; - selectYN:SelectDataType[]; -}} + selectSido: SelectDataType[]; + selectSgg: SelectDataType[]; + selectUsg: SelectDataType[]; + selectYN: SelectDataType[]; + }; +}; type matDmdActions = { - decrementList: () => void -} + decrementList: () => void; +}; export type matDmdType = matDmdState & matDmdActions; -export const matDmdStateExport:matDmdState= {dmd:{ - isInit:false, - selectSido:selectSido, +export const matDmdStateExport: matDmdState = { + dmd: { + isInit: false, + selectSido: selectSido, selectSgg: selectSgg, selectUsg: selectUsg, - selectYN:selectYN, - - -}} -export const matDmdActionsExport:(set:any)=>matDmdActions=(set: any) => { - return { - decrementList:()=>set( - (state:matDmdState) => { - return ( - {rain:{ - }})} - ) - } -} + selectYN: selectYN, + }, +}; +export const matDmdActionsExport: (set: any) => matDmdActions = (set: any) => { + return { + decrementList: () => + set(() => { + return { rain: {} }; + }), + }; +}; diff --git a/apps/wr/app/store/matDmd/ldrmntCoSttn/excel.tsx b/apps/wr/app/store/matDmd/ldrmntCoSttn/excel.tsx index ad7990cfc..55af81643 100644 --- a/apps/wr/app/store/matDmd/ldrmntCoSttn/excel.tsx +++ b/apps/wr/app/store/matDmd/ldrmntCoSttn/excel.tsx @@ -1,4 +1,3 @@ -import { TEST_UUID } from "../../ruseFcltMng/fcltReg/rainReg"; type nameMap = { [key: string]: string; diff --git a/apps/wr/app/store/matDmd/ldrmntCoSttn/index.tsx b/apps/wr/app/store/matDmd/ldrmntCoSttn/index.tsx index f21ca753f..c268ca1e6 100644 --- a/apps/wr/app/store/matDmd/ldrmntCoSttn/index.tsx +++ b/apps/wr/app/store/matDmd/ldrmntCoSttn/index.tsx @@ -1,10 +1,9 @@ import type { CommonTableProps } from "@/app/store/common/type/header"; -import { deleteFectch, fetchType, getFetch, getFetchWithCount, postFectch, putFectch } from "@/components/lib/api"; -import { ToastFormUi } from "@/components/ui/toast/toastFromUi"; +import { deleteFectch, fetchType, getFetchWithCount, postFectch, putFectch } from "@/components/lib/api"; +import toast from "react-hot-toast"; import { z } from "zod"; import { TEST_UUID } from "../../ruseFcltMng/fcltReg/rainReg"; import { ldrmntHeadListExport, ldrmntNodeListExport, ldrmntZod } from "./headList"; -import toast from "react-hot-toast"; // 테이블 헤드 리스트 const ldrmntHeadList = ldrmntHeadListExport; @@ -124,7 +123,7 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = ( ); console.log("알이에스", ldrmntRes) if (isExcel) { - let excelDownList: ExcelType[] = []; + const excelDownList: ExcelType[] = []; ldrmntRes.data.forEach((item: customLdrmnt) => { excelDownList.push({ ctpvCd: item.ctpvCd, @@ -191,7 +190,7 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = ( }, }; }); - const response = await deleteFectch( + await deleteFectch( `/reuseFc/request/temp`, ); diff --git a/apps/wr/app/store/matDmd/ruseCaseMng/index.tsx b/apps/wr/app/store/matDmd/ruseCaseMng/index.tsx index 5a2ad235e..5ae2e67b4 100644 --- a/apps/wr/app/store/matDmd/ruseCaseMng/index.tsx +++ b/apps/wr/app/store/matDmd/ruseCaseMng/index.tsx @@ -1,7 +1,7 @@ -import { fetchType, getFetch, getFetchWithCount, postFectch } from "@/components/lib/api"; +import { fetchType, getFetchWithCount, postFectch } from "@/components/lib/api"; +import { toast } from "react-hot-toast"; import type { TableUpperProps } from "../../common/type/header"; import { ruseCaseHeadListExport } from "./headList"; -import { toast } from "react-hot-toast"; export type ruseCaseState = { ruseCaseMng: { ruseHeadList:TableUpperProps[]; diff --git a/apps/wr/app/store/matDmd/ruseRvwHstry/index.tsx b/apps/wr/app/store/matDmd/ruseRvwHstry/index.tsx index cfd991b4d..65f2d2730 100644 --- a/apps/wr/app/store/matDmd/ruseRvwHstry/index.tsx +++ b/apps/wr/app/store/matDmd/ruseRvwHstry/index.tsx @@ -1,14 +1,11 @@ -import type { z } from "zod"; -import type { sttnHeadListType } from "../coSttn/headList"; -import type { - CommonTableProps, - TableUpperProps, -} from "../../common/type/header"; -import { ruseHstryHeadListExport } from "./headList"; -import { fetchType, getFetch, getFetchWithCount, postFectch, putFectch } from "@/components/lib/api"; -import type { DmdCoReqType } from "../coMatRvw/type"; +import { fetchType, getFetchWithCount, postFectch, putFectch } from "@/components/lib/api"; import toast from "react-hot-toast"; +import type { + TableUpperProps +} from "../../common/type/header"; import { TEST_UUID } from "../../ruseFcltMng/fcltReg/rainReg"; +import type { DmdCoReqType } from "../coMatRvw/type"; +import { ruseHstryHeadListExport } from "./headList"; const ruseHistHeadList = ruseHstryHeadListExport; @@ -72,7 +69,7 @@ type ruseHstryActions = { endYear: string, sggCd: string ) => void; - ruseRvwComplete:( data: Number[]) => void; + ruseRvwComplete:( data: number[]) => void; }; const irvwHistInit = async ( @@ -81,7 +78,7 @@ const irvwHistInit = async ( startYear: string, endYear: string, ) => { - let url = `/reuseFc/request/infoList/Matched/${pageNo}/${pageCnt}/${startYear}/${endYear}`; + const url = `/reuseFc/request/infoList/Matched/${pageNo}/${pageCnt}/${startYear}/${endYear}`; // console.log("sggCd ", sggCd); // if (sggCd) { @@ -102,7 +99,6 @@ export const ruseHstryActionsExport: (set: any) => ruseHstryActions = ( pageCnt: number, startYear: string, endYear: string, - sggCd?: string ) => { const rvwHistRes = await irvwHistInit( pageNo, @@ -213,7 +209,7 @@ export const ruseHstryActionsExport: (set: any) => ruseHstryActions = ( console.log(" error ", e); } }, - ruseRvwComplete: async (data: Number[]) => { + ruseRvwComplete: async (data: number[]) => { try { const complet = await postFectch( `/reuseFc/request/completeCheck`,