공공 재이용 등록 수정

This commit is contained in:
leedj312
2025-05-23 17:37:46 +09:00
parent 584bd9b432
commit bf6ad4ee79
5 changed files with 84 additions and 77 deletions
@@ -16,7 +16,7 @@ export const pubFacHeadListExport: TableUpperProps[] = [
{ id: "authoDay", title: "등록여부" },
];
export const pubMngUpHeadListExport: TableUpperProps[] = [
export const pbnstMngUpHeadListExport: TableUpperProps[] = [
{ id: "mng", title: "운영방식" },
{ id: "subCo", title: "대행업체" },
{ id: "startDay", title: "시작일", upName: "upChangeRe", upSequnce: 1 },
@@ -24,7 +24,7 @@ export const pubMngUpHeadListExport: TableUpperProps[] = [
];
export const pubOrgwtHeadListExport: TableUpperProps[] = [
export const pbnstOrgwtHeadListRxport: TableUpperProps[] = [
{ id: "ruseUtztnFcltNm", title: "운영방식" },
{ id: "orgwtWtritQnt", title: "원수취수량" },
{ id: "tmsYn", title: "하수처리량TMS 전후", },
@@ -33,7 +33,7 @@ export const pubOrgwtHeadListExport: TableUpperProps[] = [
];
const date = new Date();
export const pubMngNmExport: chHeadType[] = [
export const pbnstMngNmExport: chHeadType[] = [
{ headNm: "upChangeRe", text: "운영대행기간", length: 2 },
];
@@ -2,34 +2,36 @@ import { z } from "zod";
import type { TableUpperProps } from "../rainReg";
import { getFetch } from "@/components/lib/api";
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
import { pubFacHeadListExport, pubMngNmExport, pubMngUpHeadListExport } from "./headList";
import { exampleData, fcBizSchema, type customPbnst, type pubHasuType } from "./type";
import type { SelectDataType } from "@common/business_components/ui";
import { pbnstMngUpHeadListExport, pbnstOrgwtHeadListRxport, pbnstMngNmExport, pubFacHeadListExport } from "./headList";
const selectLabel: SelectDataType[] = [{ text: "test", val: "1" }];
const pubFacHeadList= pubFacHeadListExport;
const pubMngUpHeadList = pubMngUpHeadListExport
const pubMngNm= pubMngNmExport;
const pbnstMngUpHeadList = pbnstMngUpHeadListExport
const pbnstOrgwtHeadList =pbnstOrgwtHeadListRxport
const pbnstMngNm= pbnstMngNmExport;
export type pubFacState = {
pbnst: {
isInit: boolean;
pubFacHeadList: TableUpperProps[];
pubMngUpHeadList: TableUpperProps[];
pubMngNm: chHeadType[];
pbnstMngUpHeadList: TableUpperProps[];
pbnstMngNm: chHeadType[];
pbnstHasuRes: pubHasuType[]
selectLabel: SelectDataType[];
pbnstRes: customPbnst[];
pbnstBizCycle: SelectDataType[];
selectLabel: SelectDataType[];
pbnstOrgwtHeadList:TableUpperProps[]
};
};
type pubFacActions = {
pubHasuInit: (txt: string | undefined) => void;
pbnstRegInit: (sgg: string) => void;
pbnstRegSearch: (txt: string | undefined, sgg: string) => void;
pbnstReg: (txt: string | undefined) => void;
pubHasuInit: (txt: string | undefined) => void;
};
export type pubFacType = pubFacState & pubFacActions;
@@ -38,12 +40,13 @@ export const pubFacStateExport: pubFacState = {
pbnst: {
isInit: false,
pubFacHeadList: pubFacHeadList,
pubMngUpHeadList: pubMngUpHeadList,
selectLabel: selectLabel,
pubMngNm: pubMngNm,
pbnstMngUpHeadList: pbnstMngUpHeadList,
pbnstMngNm: pbnstMngNm,
pbnstOrgwtHeadList:pbnstOrgwtHeadList,
pbnstHasuRes: [],
pbnstRes: [],
pbnstBizCycle:[]
pbnstBizCycle:[{text:'없음', val:'1'}],
selectLabel: selectLabel,
},
};
@@ -55,13 +58,14 @@ const initFetch = async (txt: string | undefined) => {
return rainRes;
};
const getBizCycle = async (fcBizs: z.infer<typeof fcBizSchema>[] ) => {
const getBizCycle = (fcBizs: z.infer<typeof fcBizSchema>[] ) => {
const pbnstBizCycle =fcBizs.map((item: z.infer<typeof fcBizSchema>) => {
return {
text: `${item.cycl}차수`,
text: `${item.cycl}차`,
val: item.cycl,
};
});
return pbnstBizCycle;
}
export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => {
@@ -92,6 +96,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => {
const pbnstRes = exampleData;
const pbnstBizCycle = getBizCycle(pbnstRes?.fcBizs);
return set((state: pubFacState) => ({
...state,
pbnst: {